From 857821a05afa9a8733006f4953178bad48ab02eb Mon Sep 17 00:00:00 2001 From: James Liggett Date: Thu, 24 Jul 2008 20:43:42 -0700 Subject: [PATCH] Put all of the UI utility functions into the "git" namespace. This prevents clashes with Subversion functions of the same name. Such clashes cause either plugin to crash if the other was loaded before it, creating a situation where one plugin would try to cast to the other's classes. --- plugins/git/git-add-dialog.c | 10 +-- plugins/git/git-add-remote-dialog.c | 16 ++--- plugins/git/git-bisect-dialog.c | 23 +++---- plugins/git/git-checkout-files-dialog.c | 18 +++--- plugins/git/git-commit-dialog.c | 24 +++---- plugins/git/git-create-branch-dialog.c | 17 ++--- plugins/git/git-create-patch-series-dialog.c | 10 +-- plugins/git/git-create-tag-dialog.c | 12 ++-- plugins/git/git-delete-branch-dialog.c | 10 +-- plugins/git/git-delete-remote-dialog.c | 6 +- plugins/git/git-diff-dialog.c | 8 +-- plugins/git/git-fetch-dialog.c | 8 +-- plugins/git/git-ignore-dialog.c | 18 +++--- plugins/git/git-log-dialog.c | 10 +-- plugins/git/git-merge-dialog.c | 12 ++-- plugins/git/git-pull-dialog.c | 12 ++-- plugins/git/git-rebase-dialog.c | 18 +++--- plugins/git/git-remove-dialog.c | 8 +-- plugins/git/git-reset-dialog.c | 10 +-- plugins/git/git-resolve-dialog.c | 18 +++--- plugins/git/git-revert-dialog.c | 10 +-- plugins/git/git-switch-dialog.c | 10 +-- plugins/git/git-ui-utils.c | 96 ++++++++++++++-------------- plugins/git/git-ui-utils.h | 77 +++++++++++----------- plugins/git/git-unstage-dialog.c | 18 +++--- 25 files changed, 242 insertions(+), 237 deletions(-) diff --git a/plugins/git/git-add-dialog.c b/plugins/git/git-add-dialog.c index b7883a5f..5927c94d 100644 --- a/plugins/git/git-add-dialog.c +++ b/plugins/git/git-add-dialog.c @@ -35,7 +35,7 @@ on_add_command_finished (AnjutaCommand *command, guint return_code, anjuta_status (status, _("Git: File staged for add."), 5); - report_errors (command, return_code); + git_report_errors (command, return_code); g_object_unref (command); } @@ -58,11 +58,11 @@ on_add_dialog_response (GtkDialog *dialog, gint response_id, force_check = glade_xml_get_widget (data->gxml, "force_check"); filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (add_file_chooser_button)); - if (check_input (GTK_WIDGET (dialog), add_file_chooser_button, filename, - _("Please select a file."))) + if (git_check_input (GTK_WIDGET (dialog), add_file_chooser_button, filename, + _("Please select a file."))) { - relative_filename = get_relative_path (filename, - data->plugin->project_root_directory); + relative_filename = git_get_relative_path (filename, + data->plugin->project_root_directory); add_command = git_add_command_new_path (data->plugin->project_root_directory, relative_filename, gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (force_check))); diff --git a/plugins/git/git-add-remote-dialog.c b/plugins/git/git-add-remote-dialog.c index 7c7766b8..dcc9a4cb 100644 --- a/plugins/git/git-add-remote-dialog.c +++ b/plugins/git/git-add-remote-dialog.c @@ -46,7 +46,7 @@ on_remote_add_command_finished (AnjutaCommand *command, guint return_code, g_free (status_message); } - report_errors (command, return_code); + git_report_errors (command, return_code); g_object_unref (command); } @@ -77,8 +77,8 @@ on_add_remote_dialog_response (GtkDialog *dialog, gint response_id, branch_name = gtk_editable_get_chars (GTK_EDITABLE (add_remote_name_entry), 0, -1); - if (!check_input (GTK_WIDGET (dialog), add_remote_name_entry, - branch_name, _("Please enter a branch name."))) + if (!git_check_input (GTK_WIDGET (dialog), add_remote_name_entry, + branch_name, _("Please enter a branch name."))) { g_free (branch_name); return; @@ -87,8 +87,8 @@ on_add_remote_dialog_response (GtkDialog *dialog, gint response_id, url = gtk_editable_get_chars (GTK_EDITABLE (add_remote_url_entry), 0, -1); - if (!check_input (GTK_WIDGET (dialog), add_remote_url_entry, - url, _("Please enter a URL."))) + if (!git_check_input (GTK_WIDGET (dialog), add_remote_url_entry, + url, _("Please enter a URL."))) { g_free (branch_name); g_free (url); @@ -110,14 +110,14 @@ on_add_remote_dialog_response (GtkDialog *dialog, gint response_id, progress_data = git_progress_data_new (data->plugin, _("Git: Fetching...")); - create_message_view (data->plugin); + git_create_message_view (data->plugin); g_signal_connect (G_OBJECT (remote_add_command), "data-arrived", - G_CALLBACK (on_command_info_arrived), + G_CALLBACK (on_git_command_info_arrived), data->plugin); g_signal_connect (G_OBJECT (remote_add_command), "progress", - G_CALLBACK (on_command_progress), + G_CALLBACK (on_git_command_progress), progress_data); g_signal_connect_swapped (G_OBJECT (remote_add_command), diff --git a/plugins/git/git-bisect-dialog.c b/plugins/git/git-bisect-dialog.c index 260e2d55..eec9fee8 100644 --- a/plugins/git/git-bisect-dialog.c +++ b/plugins/git/git-bisect-dialog.c @@ -49,8 +49,9 @@ on_bisect_start_dialog_response (GtkDialog *dialog, gint response_id, { bad_revision = gtk_entry_get_text (GTK_ENTRY (bisect_start_bad_revision_entry)); - if (!check_input (GTK_WIDGET (dialog), bisect_start_bad_revision_entry, - bad_revision, _("Please enter a revision."))) + if (!git_check_input (GTK_WIDGET (dialog), + bisect_start_bad_revision_entry, + bad_revision, _("Please enter a revision."))) { return; } @@ -71,14 +72,14 @@ on_bisect_start_dialog_response (GtkDialog *dialog, gint response_id, bad_revision, good_revision); - create_message_view (data->plugin); + git_create_message_view (data->plugin); g_signal_connect (G_OBJECT (bisect_command), "command-finished", - G_CALLBACK (on_command_finished), + G_CALLBACK (on_git_command_finished), data->plugin); g_signal_connect (G_OBJECT (bisect_command), "data-arrived", - G_CALLBACK (on_command_info_arrived), + G_CALLBACK (on_git_command_info_arrived), data->plugin); anjuta_command_start (ANJUTA_COMMAND (bisect_command)); @@ -144,14 +145,14 @@ bisect_reset (Git *plugin) bisect_command = git_bisect_reset_command_new (plugin->project_root_directory); - create_message_view (plugin); + git_create_message_view (plugin); g_signal_connect (G_OBJECT (bisect_command), "command-finished", - G_CALLBACK (on_command_finished), + G_CALLBACK (on_git_command_finished), plugin); g_signal_connect (G_OBJECT (bisect_command), "data-arrived", - G_CALLBACK (on_command_info_arrived), + G_CALLBACK (on_git_command_info_arrived), plugin); anjuta_command_start (ANJUTA_COMMAND (bisect_command)); @@ -165,14 +166,14 @@ bisect_state (Git *plugin, GitBisectState state, const gchar *revision) bisect_command = git_bisect_state_command_new (plugin->project_root_directory, state, revision); - create_message_view (plugin); + git_create_message_view (plugin); g_signal_connect (G_OBJECT (bisect_command), "command-finished", - G_CALLBACK (on_command_finished), + G_CALLBACK (on_git_command_finished), plugin); g_signal_connect (G_OBJECT (bisect_command), "data-arrived", - G_CALLBACK (on_command_info_arrived), + G_CALLBACK (on_git_command_info_arrived), plugin); anjuta_command_start (ANJUTA_COMMAND (bisect_command)); diff --git a/plugins/git/git-checkout-files-dialog.c b/plugins/git/git-checkout-files-dialog.c index 6f5ab038..9daf1e8f 100644 --- a/plugins/git/git-checkout-files-dialog.c +++ b/plugins/git/git-checkout-files-dialog.c @@ -35,7 +35,7 @@ on_checkout_files_command_finished (AnjutaCommand *command, guint return_code, anjuta_status (status, _("Git: Files checked out."), 5); - report_errors (command, return_code); + git_report_errors (command, return_code); g_object_unref (command); } @@ -93,33 +93,33 @@ checkout_files_dialog (Git *plugin) GIT_STATUS_SECTION_NOT_UPDATED); g_signal_connect (G_OBJECT (checkout_select_all_button), "clicked", - G_CALLBACK (select_all_status_items), + G_CALLBACK (git_select_all_status_items), checkout_status_view); g_signal_connect (G_OBJECT (checkout_clear_button), "clicked", - G_CALLBACK (clear_all_status_selections), + G_CALLBACK (git_clear_all_status_selections), checkout_status_view); - pulse_progress_bar (GTK_PROGRESS_BAR (checkout_status_progress_bar)); + git_pulse_progress_bar (GTK_PROGRESS_BAR (checkout_status_progress_bar)); g_signal_connect (G_OBJECT (status_command), "command-finished", - G_CALLBACK (cancel_data_arrived_signal_disconnect), + G_CALLBACK (git_cancel_data_arrived_signal_disconnect), checkout_status_view); g_signal_connect (G_OBJECT (status_command), "command-finished", - G_CALLBACK (hide_pulse_progress_bar), + G_CALLBACK (git_hide_pulse_progress_bar), checkout_status_progress_bar); g_signal_connect (G_OBJECT (status_command), "command-finished", - G_CALLBACK (on_command_finished), + G_CALLBACK (on_git_command_finished), NULL); g_signal_connect (G_OBJECT (status_command), "data-arrived", - G_CALLBACK (on_status_command_data_arrived), + G_CALLBACK (on_git_status_command_data_arrived), checkout_status_view); g_object_weak_ref (G_OBJECT (checkout_status_view), - (GWeakNotify) disconnect_data_arrived_signals, + (GWeakNotify) git_disconnect_data_arrived_signals, status_command); anjuta_command_start (ANJUTA_COMMAND (status_command)); diff --git a/plugins/git/git-commit-dialog.c b/plugins/git/git-commit-dialog.c index a6ed7172..0b6c17ce 100644 --- a/plugins/git/git-commit-dialog.c +++ b/plugins/git/git-commit-dialog.c @@ -35,7 +35,7 @@ on_commit_command_finished (AnjutaCommand *command, guint return_code, anjuta_status (status, _("Git: Commit complete."), 5); - report_errors (command, return_code); + git_report_errors (command, return_code); g_object_unref (command); } @@ -57,7 +57,7 @@ on_commit_dialog_response (GtkDialog *dialog, gint response_id, if (response_id == GTK_RESPONSE_OK) { commit_log_view = glade_xml_get_widget (data->gxml, "commit_log_view"); - log = get_log_from_textview (commit_log_view); + log = git_get_log_from_textview (commit_log_view); if (!g_utf8_strlen(log, -1)) { @@ -85,14 +85,14 @@ on_commit_dialog_response (GtkDialog *dialog, gint response_id, g_free (log); git_command_free_path_list (selected_paths); - create_message_view (data->plugin); + git_create_message_view (data->plugin); g_signal_connect (G_OBJECT (commit_command), "command-finished", G_CALLBACK (on_commit_command_finished), data->plugin); g_signal_connect (G_OBJECT (commit_command), "data-arrived", - G_CALLBACK (on_command_info_arrived), + G_CALLBACK (on_git_command_info_arrived), data->plugin); anjuta_command_start (ANJUTA_COMMAND (commit_command)); @@ -133,37 +133,37 @@ commit_dialog (Git *plugin) GIT_STATUS_SECTION_MODIFIED); g_signal_connect (G_OBJECT (commit_select_all_button), "clicked", - G_CALLBACK (select_all_status_items), + G_CALLBACK (git_select_all_status_items), commit_status_view); g_signal_connect (G_OBJECT (commit_clear_button), "clicked", - G_CALLBACK (clear_all_status_selections), + G_CALLBACK (git_clear_all_status_selections), commit_status_view); g_signal_connect (G_OBJECT (status_command), "command-finished", G_CALLBACK (select_all_files), commit_status_view); - pulse_progress_bar (GTK_PROGRESS_BAR (commit_status_progress_bar)); + git_pulse_progress_bar (GTK_PROGRESS_BAR (commit_status_progress_bar)); g_signal_connect (G_OBJECT (status_command), "command-finished", - G_CALLBACK (cancel_data_arrived_signal_disconnect), + G_CALLBACK (git_cancel_data_arrived_signal_disconnect), commit_status_view); g_signal_connect (G_OBJECT (status_command), "command-finished", - G_CALLBACK (hide_pulse_progress_bar), + G_CALLBACK (git_hide_pulse_progress_bar), commit_status_progress_bar); g_signal_connect (G_OBJECT (status_command), "command-finished", - G_CALLBACK (on_command_finished), + G_CALLBACK (on_git_command_finished), NULL); g_signal_connect (G_OBJECT (status_command), "data-arrived", - G_CALLBACK (on_status_command_data_arrived), + G_CALLBACK (on_git_status_command_data_arrived), commit_status_view); g_object_weak_ref (G_OBJECT (commit_status_view), - (GWeakNotify) disconnect_data_arrived_signals, + (GWeakNotify) git_disconnect_data_arrived_signals, status_command); anjuta_command_start (ANJUTA_COMMAND (status_command)); diff --git a/plugins/git/git-create-branch-dialog.c b/plugins/git/git-create-branch-dialog.c index ec678ff4..d9cb83fd 100644 --- a/plugins/git/git-create-branch-dialog.c +++ b/plugins/git/git-create-branch-dialog.c @@ -48,7 +48,7 @@ on_create_command_finished (AnjutaCommand *command, guint return_code, - report_errors (command, return_code); + git_report_errors (command, return_code); g_object_unref (command); } @@ -85,8 +85,8 @@ on_create_branch_dialog_response (GtkDialog *dialog, gint response_id, { revision = gtk_editable_get_chars (GTK_EDITABLE (branch_revision_entry), 0, -1); - if (!check_input (GTK_WIDGET (dialog), branch_revision_entry, - revision, _("Please enter a revision."))) + if (!git_check_input (GTK_WIDGET (dialog), branch_revision_entry, + revision, _("Please enter a revision."))) { g_free (revision); g_free (branch_name); @@ -94,8 +94,8 @@ on_create_branch_dialog_response (GtkDialog *dialog, gint response_id, } } - if (!check_input (GTK_WIDGET (dialog), branch_revision_entry, - branch_name, _("Please enter a branch name."))) + if (!git_check_input (GTK_WIDGET (dialog), branch_revision_entry, + branch_name, _("Please enter a branch name."))) { g_free (revision); @@ -113,14 +113,14 @@ on_create_branch_dialog_response (GtkDialog *dialog, gint response_id, g_free (branch_name); g_free (revision); - create_message_view (data->plugin); + git_create_message_view (data->plugin); g_signal_connect (G_OBJECT (create_command), "command-finished", G_CALLBACK (on_create_command_finished), data->plugin); g_signal_connect (G_OBJECT (create_command), "data-arrived", - G_CALLBACK (on_command_info_arrived), + G_CALLBACK (on_git_command_info_arrived), data->plugin); anjuta_command_start (ANJUTA_COMMAND (create_command)); @@ -181,7 +181,8 @@ create_branch_dialog (Git *plugin, const gchar *revision) if (revision) { - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (branch_revision_radio), TRUE); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (branch_revision_radio), + TRUE); gtk_entry_set_text (GTK_ENTRY (branch_revision_entry), revision); } diff --git a/plugins/git/git-create-patch-series-dialog.c b/plugins/git/git-create-patch-series-dialog.c index aaa3f08d..b2101c84 100644 --- a/plugins/git/git-create-patch-series-dialog.c +++ b/plugins/git/git-create-patch-series-dialog.c @@ -58,14 +58,14 @@ on_create_patch_series_dialog_response (GtkDialog *dialog, gint response_id, g_free (branch); g_free (output_directory); - create_message_view (data->plugin); + git_create_message_view (data->plugin); g_signal_connect (G_OBJECT (format_patch_command), "command-finished", - G_CALLBACK (on_command_finished), + G_CALLBACK (on_git_command_finished), data->plugin); g_signal_connect (G_OBJECT (format_patch_command), "data-arrived", - G_CALLBACK (on_command_info_arrived), + G_CALLBACK (on_git_command_info_arrived), data->plugin); anjuta_command_start (ANJUTA_COMMAND (format_patch_command)); @@ -104,11 +104,11 @@ create_patch_series_dialog (Git *plugin) GIT_BRANCH_TYPE_ALL); g_signal_connect (G_OBJECT (list_command), "data-arrived", - G_CALLBACK (on_list_branch_command_data_arrived), + G_CALLBACK (on_git_list_branch_command_data_arrived), data); g_signal_connect (G_OBJECT (list_command), "command-finished", - G_CALLBACK (on_list_branch_command_finished), + G_CALLBACK (on_git_list_branch_command_finished), data); anjuta_command_start (ANJUTA_COMMAND (list_command)); diff --git a/plugins/git/git-create-tag-dialog.c b/plugins/git/git-create-tag-dialog.c index 53796a3d..793a5445 100644 --- a/plugins/git/git-create-tag-dialog.c +++ b/plugins/git/git-create-tag-dialog.c @@ -48,7 +48,7 @@ on_create_command_finished (AnjutaCommand *command, guint return_code, - report_errors (command, return_code); + git_report_errors (command, return_code); g_object_unref (command); } @@ -95,8 +95,8 @@ on_create_tag_dialog_response (GtkDialog *dialog, gint response_id, { revision = gtk_editable_get_chars (GTK_EDITABLE (tag_revision_entry), 0, -1); - if (!check_input (GTK_WIDGET (dialog), tag_revision_entry, - revision, _("Please enter a revision."))) + if (!git_check_input (GTK_WIDGET (dialog), tag_revision_entry, + revision, _("Please enter a revision."))) { g_free (revision); g_free (tag_name); @@ -104,8 +104,8 @@ on_create_tag_dialog_response (GtkDialog *dialog, gint response_id, } } - if (!check_input (GTK_WIDGET (dialog), tag_revision_entry, - tag_name, _("Please enter a tag name."))) + if (!git_check_input (GTK_WIDGET (dialog), tag_revision_entry, + tag_name, _("Please enter a tag name."))) { g_free (revision); @@ -116,7 +116,7 @@ on_create_tag_dialog_response (GtkDialog *dialog, gint response_id, if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (tag_annotate_check))) { - log = get_log_from_textview (tag_log_view); + log = git_get_log_from_textview (tag_log_view); if (!g_utf8_strlen (log, -1)) { diff --git a/plugins/git/git-delete-branch-dialog.c b/plugins/git/git-delete-branch-dialog.c index 52544d30..0b6eaafb 100644 --- a/plugins/git/git-delete-branch-dialog.c +++ b/plugins/git/git-delete-branch-dialog.c @@ -46,7 +46,7 @@ on_delete_command_finished (AnjutaCommand *command, guint return_code, g_free (status_message); } - report_errors (command, return_code); + git_report_errors (command, return_code); g_object_unref (command); } @@ -77,14 +77,14 @@ on_delete_branch_dialog_response (GtkDialog *dialog, gint response_id, g_free (branch); - create_message_view (data->plugin); + git_create_message_view (data->plugin); g_signal_connect (G_OBJECT (delete_command), "command-finished", G_CALLBACK (on_delete_command_finished), data->plugin); g_signal_connect (G_OBJECT (delete_command), "data-arrived", - G_CALLBACK (on_command_info_arrived), + G_CALLBACK (on_git_command_info_arrived), data->plugin); anjuta_command_start (ANJUTA_COMMAND (delete_command)); @@ -122,11 +122,11 @@ delete_branch_dialog (Git *plugin) GIT_BRANCH_TYPE_LOCAL); g_signal_connect (G_OBJECT (list_command), "data-arrived", - G_CALLBACK (on_list_branch_command_data_arrived), + G_CALLBACK (on_git_list_branch_command_data_arrived), data); g_signal_connect (G_OBJECT (list_command), "command-finished", - G_CALLBACK (on_list_branch_command_finished), + G_CALLBACK (on_git_list_branch_command_finished), data); anjuta_command_start (ANJUTA_COMMAND (list_command)); diff --git a/plugins/git/git-delete-remote-dialog.c b/plugins/git/git-delete-remote-dialog.c index 33824348..3fc853cb 100644 --- a/plugins/git/git-delete-remote-dialog.c +++ b/plugins/git/git-delete-remote-dialog.c @@ -47,14 +47,14 @@ on_delete_remote_dialog_response (GtkDialog *dialog, gint response_id, g_free (branch); - create_message_view (data->plugin); + git_create_message_view (data->plugin); g_signal_connect (G_OBJECT (delete_command), "command-finished", - G_CALLBACK (on_command_finished), + G_CALLBACK (on_git_command_finished), data->plugin); g_signal_connect (G_OBJECT (delete_command), "data-arrived", - G_CALLBACK (on_command_info_arrived), + G_CALLBACK (on_git_command_info_arrived), data->plugin); anjuta_command_start (ANJUTA_COMMAND (delete_command)); diff --git a/plugins/git/git-diff-dialog.c b/plugins/git/git-diff-dialog.c index c7f12187..641ff144 100644 --- a/plugins/git/git-diff-dialog.c +++ b/plugins/git/git-diff-dialog.c @@ -45,11 +45,11 @@ git_diff (Git *plugin) diff_command = git_diff_command_new (plugin->project_root_directory); g_signal_connect (G_OBJECT (diff_command), "data-arrived", - G_CALLBACK (send_raw_command_output_to_editor), + G_CALLBACK (git_send_raw_command_output_to_editor), editor); g_signal_connect (G_OBJECT (diff_command), "command_finished", - G_CALLBACK (on_diff_command_finished), + G_CALLBACK (on_git_diff_command_finished), plugin); anjuta_command_start (ANJUTA_COMMAND (diff_command)); @@ -90,11 +90,11 @@ git_commit_diff (Git *plugin) sha); g_signal_connect (G_OBJECT (diff_command), "data-arrived", - G_CALLBACK (send_raw_command_output_to_editor), + G_CALLBACK (git_send_raw_command_output_to_editor), editor); g_signal_connect (G_OBJECT (diff_command), "command_finished", - G_CALLBACK (on_diff_command_finished), + G_CALLBACK (on_git_diff_command_finished), plugin); anjuta_command_start (ANJUTA_COMMAND (diff_command)); diff --git a/plugins/git/git-fetch-dialog.c b/plugins/git/git-fetch-dialog.c index 682c3989..ec4926cb 100644 --- a/plugins/git/git-fetch-dialog.c +++ b/plugins/git/git-fetch-dialog.c @@ -39,7 +39,7 @@ on_fetch_command_finished (AnjutaCommand *command, guint return_code, anjuta_status (status, _("Git: Fetch complete."), 5); - report_errors (command, return_code); + git_report_errors (command, return_code); g_object_unref (command); @@ -55,7 +55,7 @@ git_fetch (Git *plugin) fetch_command = git_fetch_command_new (plugin->project_root_directory); g_signal_connect (G_OBJECT (fetch_command), "data-arrived", - G_CALLBACK (on_command_info_arrived), + G_CALLBACK (on_git_command_info_arrived), plugin); g_signal_connect (G_OBJECT (fetch_command), "command-finished", @@ -67,10 +67,10 @@ git_fetch (Git *plugin) data); g_signal_connect (G_OBJECT (fetch_command), "progress", - G_CALLBACK (on_command_progress), + G_CALLBACK (on_git_command_progress), data); - create_message_view (plugin); + git_create_message_view (plugin); anjuta_command_start (ANJUTA_COMMAND (fetch_command)); diff --git a/plugins/git/git-ignore-dialog.c b/plugins/git/git-ignore-dialog.c index c92917c2..c15b46aa 100644 --- a/plugins/git/git-ignore-dialog.c +++ b/plugins/git/git-ignore-dialog.c @@ -42,7 +42,7 @@ on_ignore_dialog_response (GtkDialog *dialog, gint response_id, git_command_free_path_list (selected_paths); g_signal_connect (G_OBJECT (ignore_command), "command-finished", - G_CALLBACK (on_command_finished), + G_CALLBACK (on_git_command_finished), data->plugin); anjuta_command_start (ANJUTA_COMMAND (ignore_command)); @@ -76,33 +76,33 @@ ignore_dialog (Git *plugin) GIT_STATUS_SECTION_UNTRACKED); g_signal_connect (G_OBJECT (ignore_select_all_button), "clicked", - G_CALLBACK (select_all_status_items), + G_CALLBACK (git_select_all_status_items), ignore_status_view); g_signal_connect (G_OBJECT (ignore_clear_button), "clicked", - G_CALLBACK (clear_all_status_selections), + G_CALLBACK (git_clear_all_status_selections), ignore_status_view); - pulse_progress_bar (GTK_PROGRESS_BAR (ignore_status_progress_bar)); + git_pulse_progress_bar (GTK_PROGRESS_BAR (ignore_status_progress_bar)); g_signal_connect (G_OBJECT (status_command), "command-finished", - G_CALLBACK (cancel_data_arrived_signal_disconnect), + G_CALLBACK (git_cancel_data_arrived_signal_disconnect), ignore_status_view); g_signal_connect (G_OBJECT (status_command), "command-finished", - G_CALLBACK (hide_pulse_progress_bar), + G_CALLBACK (git_hide_pulse_progress_bar), ignore_status_progress_bar); g_signal_connect (G_OBJECT (status_command), "command-finished", - G_CALLBACK (on_command_finished), + G_CALLBACK (on_git_command_finished), NULL); g_signal_connect (G_OBJECT (status_command), "data-arrived", - G_CALLBACK (on_status_command_data_arrived), + G_CALLBACK (on_git_status_command_data_arrived), ignore_status_view); g_object_weak_ref (G_OBJECT (ignore_status_view), - (GWeakNotify) disconnect_data_arrived_signals, + (GWeakNotify) git_disconnect_data_arrived_signals, status_command); anjuta_command_start (ANJUTA_COMMAND (status_command)); diff --git a/plugins/git/git-log-dialog.c b/plugins/git/git-log-dialog.c index b29f76f6..11a5b5db 100644 --- a/plugins/git/git-log-dialog.c +++ b/plugins/git/git-log-dialog.c @@ -272,12 +272,12 @@ on_ref_command_finished (AnjutaCommand *command, guint return_code, gtk_list_store_clear (data->list_store); - pulse_timer_id = status_bar_progress_pulse (data->plugin, - _("Git: Retrieving" - " log...")); + pulse_timer_id = git_status_bar_progress_pulse (data->plugin, + _("Git: Retrieving" + " log...")); g_signal_connect (G_OBJECT (log_command), "command-finished", - G_CALLBACK (stop_status_bar_progress_pulse), + G_CALLBACK (git_stop_status_bar_progress_pulse), GUINT_TO_POINTER (pulse_timer_id)); g_signal_connect (G_OBJECT (log_command), "command-finished", @@ -735,7 +735,7 @@ git_log_window_create (Git *plugin) g_object_set_data (G_OBJECT (whole_project_check), "file-entry", path_entry); g_signal_connect (G_OBJECT (whole_project_check), "toggled", - G_CALLBACK (on_whole_project_toggled), plugin); + G_CALLBACK (on_git_whole_project_toggled), plugin); data->list_store = gtk_list_store_new (NUM_COLS, G_TYPE_OBJECT); diff --git a/plugins/git/git-merge-dialog.c b/plugins/git/git-merge-dialog.c index d988fe0b..c1fb142b 100644 --- a/plugins/git/git-merge-dialog.c +++ b/plugins/git/git-merge-dialog.c @@ -35,7 +35,7 @@ on_merge_command_finished (AnjutaCommand *command, guint return_code, anjuta_status (status, _("Git: Merge complete."), 5); - report_errors (command, return_code); + git_report_errors (command, return_code); g_object_unref (command); } @@ -69,7 +69,7 @@ on_merge_dialog_response (GtkDialog *dialog, gint response_id, if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (use_custom_log_check))) { - log = get_log_from_textview (merge_log_view); + log = git_get_log_from_textview (merge_log_view); if (!g_utf8_strlen (log, -1)) { @@ -99,14 +99,14 @@ on_merge_dialog_response (GtkDialog *dialog, gint response_id, g_free (branch); - create_message_view (data->plugin); + git_create_message_view (data->plugin); g_signal_connect (G_OBJECT (merge_command), "command-finished", G_CALLBACK (on_merge_command_finished), data->plugin); g_signal_connect (G_OBJECT (merge_command), "data-arrived", - G_CALLBACK (on_command_info_arrived), + G_CALLBACK (on_git_command_info_arrived), data->plugin); anjuta_command_start (ANJUTA_COMMAND (merge_command)); @@ -156,11 +156,11 @@ merge_dialog (Git *plugin) GIT_BRANCH_TYPE_ALL); g_signal_connect (G_OBJECT (list_command), "data-arrived", - G_CALLBACK (on_list_branch_command_data_arrived), + G_CALLBACK (on_git_list_branch_command_data_arrived), data); g_signal_connect (G_OBJECT (list_command), "command-finished", - G_CALLBACK (on_list_branch_command_finished), + G_CALLBACK (on_git_list_branch_command_finished), data); anjuta_command_start (ANJUTA_COMMAND (list_command)); diff --git a/plugins/git/git-pull-dialog.c b/plugins/git/git-pull-dialog.c index b38a8094..0962a7c4 100644 --- a/plugins/git/git-pull-dialog.c +++ b/plugins/git/git-pull-dialog.c @@ -35,7 +35,7 @@ on_pull_command_finished (AnjutaCommand *command, guint return_code, anjuta_status (status, _("Git: Pull complete."), 5); - report_errors (command, return_code); + git_report_errors (command, return_code); g_object_unref (command); } @@ -73,9 +73,9 @@ on_pull_dialog_response (GtkDialog *dialog, gint response_id, url = gtk_editable_get_chars (GTK_EDITABLE (pull_url_entry), 0, -1); - if (!check_input (GTK_WIDGET (dialog), pull_url_entry, url, - _("Please enter the URL of the repository to pull" - " from."))) + if (!git_check_input (GTK_WIDGET (dialog), pull_url_entry, url, + _("Please enter the URL of the repository to pull" + " from."))) { g_free (url); return; @@ -94,14 +94,14 @@ on_pull_dialog_response (GtkDialog *dialog, gint response_id, g_free (url); - create_message_view (data->plugin); + git_create_message_view (data->plugin); g_signal_connect (G_OBJECT (pull_command), "command-finished", G_CALLBACK (on_pull_command_finished), data->plugin); g_signal_connect (G_OBJECT (pull_command), "data-arrived", - G_CALLBACK (on_command_info_arrived), + G_CALLBACK (on_git_command_info_arrived), data->plugin); anjuta_command_start (ANJUTA_COMMAND (pull_command)); diff --git a/plugins/git/git-rebase-dialog.c b/plugins/git/git-rebase-dialog.c index 21723ae9..c7aa0125 100644 --- a/plugins/git/git-rebase-dialog.c +++ b/plugins/git/git-rebase-dialog.c @@ -50,18 +50,18 @@ on_rebase_dialog_response (GtkDialog *dialog, gint response_id, g_free (branch); - create_message_view (data->plugin); + git_create_message_view (data->plugin); g_signal_connect (G_OBJECT (rebase_command), "command-finished", - G_CALLBACK (on_command_finished), + G_CALLBACK (on_git_command_finished), data->plugin); g_signal_connect (G_OBJECT (rebase_command), "data-arrived", - G_CALLBACK (on_command_info_arrived), + G_CALLBACK (on_git_command_info_arrived), data->plugin); g_signal_connect (G_OBJECT (rebase_command), "progress", - G_CALLBACK (on_command_progress), + G_CALLBACK (on_git_command_progress), data->plugin); g_signal_connect_swapped (G_OBJECT (rebase_command), @@ -104,11 +104,11 @@ rebase_dialog (Git *plugin) GIT_BRANCH_TYPE_REMOTE); g_signal_connect (G_OBJECT (list_command), "data-arrived", - G_CALLBACK (on_list_branch_command_data_arrived), + G_CALLBACK (on_git_list_branch_command_data_arrived), data); g_signal_connect (G_OBJECT (list_command), "command-finished", - G_CALLBACK (on_list_branch_command_finished), + G_CALLBACK (on_git_list_branch_command_finished), data); anjuta_command_start (ANJUTA_COMMAND (list_command)); @@ -125,17 +125,17 @@ rebase_continue (Git *plugin, GitRebaseContinueAction action) { GitRebaseContinueCommand *rebase_command; - create_message_view (plugin); + git_create_message_view (plugin); rebase_command = git_rebase_continue_command_new (plugin->project_root_directory, action); g_signal_connect (G_OBJECT (rebase_command), "command-finished", - G_CALLBACK (on_command_finished), + G_CALLBACK (on_git_command_finished), plugin); g_signal_connect (G_OBJECT (rebase_command), "data-arrived", - G_CALLBACK (on_command_info_arrived), + G_CALLBACK (on_git_command_info_arrived), plugin); anjuta_command_start (ANJUTA_COMMAND (rebase_command)); diff --git a/plugins/git/git-remove-dialog.c b/plugins/git/git-remove-dialog.c index fa2726fa..509f36fe 100644 --- a/plugins/git/git-remove-dialog.c +++ b/plugins/git/git-remove-dialog.c @@ -35,7 +35,7 @@ on_remove_command_finished (AnjutaCommand *command, guint return_code, anjuta_status (status, _("Git: File removed."), 5); - report_errors (command, return_code); + git_report_errors (command, return_code); g_object_unref (command); } @@ -58,10 +58,10 @@ on_remove_dialog_response (GtkDialog *dialog, gint response_id, force_check = glade_xml_get_widget (data->gxml, "force_check"); filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (remove_file_chooser_button)); - if (check_input (GTK_WIDGET (dialog), remove_file_chooser_button, filename, - _("Please select a file."))) + if (git_check_input (GTK_WIDGET (dialog), remove_file_chooser_button, filename, + _("Please select a file."))) { - relative_filename = get_relative_path (filename, + relative_filename = git_get_relative_path (filename, data->plugin->project_root_directory); remove_command = git_remove_command_new_path (data->plugin->project_root_directory, relative_filename, diff --git a/plugins/git/git-reset-dialog.c b/plugins/git/git-reset-dialog.c index 43142561..ca55c8f2 100644 --- a/plugins/git/git-reset-dialog.c +++ b/plugins/git/git-reset-dialog.c @@ -53,8 +53,8 @@ on_reset_dialog_response (GtkDialog *dialog, gint response_id, { revision = gtk_editable_get_chars (GTK_EDITABLE (reset_revision_entry), 0, -1); - if (!check_input (GTK_WIDGET (dialog), reset_revision_entry, - revision, _("Please enter a revision."))) + if (!git_check_input (GTK_WIDGET (dialog), reset_revision_entry, + revision, _("Please enter a revision."))) { g_free (revision); return; @@ -80,14 +80,14 @@ on_reset_dialog_response (GtkDialog *dialog, gint response_id, - create_message_view (data->plugin); + git_create_message_view (data->plugin); g_signal_connect (G_OBJECT (reset_command), "command-finished", - G_CALLBACK (on_command_finished), + G_CALLBACK (on_git_command_finished), data->plugin); g_signal_connect (G_OBJECT (reset_command), "data-arrived", - G_CALLBACK (on_command_info_arrived), + G_CALLBACK (on_git_command_info_arrived), data->plugin); anjuta_command_start (ANJUTA_COMMAND (reset_command)); diff --git a/plugins/git/git-resolve-dialog.c b/plugins/git/git-resolve-dialog.c index f403418d..f4f3ca20 100644 --- a/plugins/git/git-resolve-dialog.c +++ b/plugins/git/git-resolve-dialog.c @@ -35,7 +35,7 @@ on_add_command_finished (AnjutaCommand *command, guint return_code, anjuta_status (status, _("Git: Resolve complete."), 5); - report_errors (command, return_code); + git_report_errors (command, return_code); g_object_unref (command); } @@ -93,33 +93,33 @@ resolve_dialog (Git *plugin) GIT_STATUS_SECTION_NOT_UPDATED); g_signal_connect (G_OBJECT (resolve_select_all_button), "clicked", - G_CALLBACK (select_all_status_items), + G_CALLBACK (git_select_all_status_items), resolve_status_view); g_signal_connect (G_OBJECT (resolve_clear_button), "clicked", - G_CALLBACK (clear_all_status_selections), + G_CALLBACK (git_clear_all_status_selections), resolve_status_view); - pulse_progress_bar (GTK_PROGRESS_BAR (resolve_status_progress_bar)); + git_pulse_progress_bar (GTK_PROGRESS_BAR (resolve_status_progress_bar)); g_signal_connect (G_OBJECT (status_command), "command-finished", - G_CALLBACK (cancel_data_arrived_signal_disconnect), + G_CALLBACK (git_cancel_data_arrived_signal_disconnect), resolve_status_view); g_signal_connect (G_OBJECT (status_command), "command-finished", - G_CALLBACK (hide_pulse_progress_bar), + G_CALLBACK (git_hide_pulse_progress_bar), resolve_status_progress_bar); g_signal_connect (G_OBJECT (status_command), "command-finished", - G_CALLBACK (on_command_finished), + G_CALLBACK (on_git_command_finished), NULL); g_signal_connect (G_OBJECT (status_command), "data-arrived", - G_CALLBACK (on_status_command_data_arrived), + G_CALLBACK (on_git_status_command_data_arrived), resolve_status_view); g_object_weak_ref (G_OBJECT (resolve_status_view), - (GWeakNotify) disconnect_data_arrived_signals, + (GWeakNotify) git_disconnect_data_arrived_signals, status_command); anjuta_command_start (ANJUTA_COMMAND (status_command)); diff --git a/plugins/git/git-revert-dialog.c b/plugins/git/git-revert-dialog.c index e7dc5968..027b57ff 100644 --- a/plugins/git/git-revert-dialog.c +++ b/plugins/git/git-revert-dialog.c @@ -42,8 +42,8 @@ on_revert_dialog_response (GtkDialog *dialog, gint response_id, revision = gtk_editable_get_chars (GTK_EDITABLE (revert_revision_entry), 0, -1); - if (check_input (GTK_WIDGET (dialog), revert_revision_entry, revision, - _("Please enter a revision."))) + if (git_check_input (GTK_WIDGET (dialog), revert_revision_entry, revision, + _("Please enter a revision."))) { revert_command = git_revert_command_new (data->plugin->project_root_directory, revision, @@ -51,14 +51,14 @@ on_revert_dialog_response (GtkDialog *dialog, gint response_id, g_free (revision); - create_message_view (data->plugin); + git_create_message_view (data->plugin); g_signal_connect (G_OBJECT (revert_command), "command-finished", - G_CALLBACK (on_command_finished), + G_CALLBACK (on_git_command_finished), data->plugin); g_signal_connect (G_OBJECT (revert_command), "data-arrived", - G_CALLBACK (on_command_info_arrived), + G_CALLBACK (on_git_command_info_arrived), data->plugin); anjuta_command_start (ANJUTA_COMMAND (revert_command)); diff --git a/plugins/git/git-switch-dialog.c b/plugins/git/git-switch-dialog.c index 4a4d6464..0167c8a8 100644 --- a/plugins/git/git-switch-dialog.c +++ b/plugins/git/git-switch-dialog.c @@ -35,7 +35,7 @@ on_checkout_command_finished (AnjutaCommand *command, guint return_code, anjuta_status (status, _("Git: Branch checkout complete."), 5); - report_errors (command, return_code); + git_report_errors (command, return_code); g_object_unref (command); } @@ -62,14 +62,14 @@ on_switch_dialog_response (GtkDialog *dialog, gint response_id, g_free (branch); - create_message_view (data->plugin); + git_create_message_view (data->plugin); g_signal_connect (G_OBJECT (checkout_command), "command-finished", G_CALLBACK (on_checkout_command_finished), data->plugin); g_signal_connect (G_OBJECT (checkout_command), "data-arrived", - G_CALLBACK (on_command_info_arrived), + G_CALLBACK (on_git_command_info_arrived), data->plugin); anjuta_command_start (ANJUTA_COMMAND (checkout_command)); @@ -107,11 +107,11 @@ switch_dialog (Git *plugin) GIT_BRANCH_TYPE_LOCAL); g_signal_connect (G_OBJECT (list_command), "data-arrived", - G_CALLBACK (on_list_branch_command_data_arrived), + G_CALLBACK (on_git_list_branch_command_data_arrived), data); g_signal_connect (G_OBJECT (list_command), "command-finished", - G_CALLBACK (on_list_branch_command_finished), + G_CALLBACK (on_git_list_branch_command_finished), data); anjuta_command_start (ANJUTA_COMMAND (list_command)); diff --git a/plugins/git/git-ui-utils.c b/plugins/git/git-ui-utils.c index 3b9826c3..81f79b18 100644 --- a/plugins/git/git-ui-utils.c +++ b/plugins/git/git-ui-utils.c @@ -83,7 +83,7 @@ on_message_view_destroy (Git* plugin, gpointer destroyed_view) } void -create_message_view (Git* plugin) +git_create_message_view (Git *plugin) { IAnjutaMessageManager* message_manager; @@ -104,13 +104,14 @@ create_message_view (Git* plugin) } ianjuta_message_view_clear(plugin->message_view, NULL); - ianjuta_message_manager_set_current_view (message_manager, plugin->message_view, + ianjuta_message_manager_set_current_view (message_manager, + plugin->message_view, NULL); } gboolean -check_input (GtkWidget *parent, GtkWidget *widget, const gchar *input, - const gchar *error_message) +git_check_input (GtkWidget *parent, GtkWidget *widget, const gchar *input, + const gchar *error_message) { gboolean ret; GtkWidget *dialog; @@ -142,7 +143,7 @@ check_input (GtkWidget *parent, GtkWidget *widget, const gchar *input, } gchar * -get_log_from_textview (GtkWidget* textview) +git_get_log_from_textview (GtkWidget* textview) { gchar* log; GtkTextBuffer* textbuf; @@ -179,7 +180,7 @@ on_pulse_timer_destroyed (PulseProgressData *data) } guint -status_bar_progress_pulse (Git *plugin, gchar *text) +git_status_bar_progress_pulse (Git *plugin, gchar *text) { PulseProgressData *data; @@ -194,13 +195,13 @@ status_bar_progress_pulse (Git *plugin, gchar *text) } void -clear_status_bar_progress_pulse (guint timer_id) +git_clear_status_bar_progress_pulse (guint timer_id) { g_source_remove (timer_id); } void -report_errors (AnjutaCommand *command, guint return_code) +git_report_errors (AnjutaCommand *command, guint return_code) { gchar *message; @@ -227,7 +228,7 @@ stop_pulse_timer (gpointer timer_id, GtkProgressBar *progress_bar) } void -pulse_progress_bar (GtkProgressBar *progress_bar) +git_pulse_progress_bar (GtkProgressBar *progress_bar) { guint timer_id; @@ -242,7 +243,7 @@ pulse_progress_bar (GtkProgressBar *progress_bar) } gchar * -get_filename_from_full_path (gchar *path) +git_get_filename_from_full_path (gchar *path) { gchar *last_slash; @@ -256,7 +257,7 @@ get_filename_from_full_path (gchar *path) } const gchar * -get_relative_path (const gchar *path, const gchar *working_directory) +git_get_relative_path (const gchar *path, const gchar *working_directory) { /* Path could already be a relative path */ if (strstr (path, working_directory)) @@ -266,17 +267,17 @@ get_relative_path (const gchar *path, const gchar *working_directory) } void -on_command_finished (AnjutaCommand *command, guint return_code, - gpointer user_data) +on_git_command_finished (AnjutaCommand *command, guint return_code, + gpointer user_data) { - report_errors (command, return_code); + git_report_errors (command, return_code); g_object_unref (command); } void -on_status_command_data_arrived (AnjutaCommand *command, - AnjutaVcsStatusTreeView *tree_view) +on_git_status_command_data_arrived (AnjutaCommand *command, + AnjutaVcsStatusTreeView *tree_view) { GQueue *status_queue; GitStatus *status; @@ -299,7 +300,7 @@ on_status_command_data_arrived (AnjutaCommand *command, } void -on_command_info_arrived (AnjutaCommand *command, Git *plugin) +on_git_command_info_arrived (AnjutaCommand *command, Git *plugin) { GQueue *info; gchar *message; @@ -317,8 +318,8 @@ on_command_info_arrived (AnjutaCommand *command, Git *plugin) } void -on_command_progress (AnjutaCommand *command, gfloat progress, - GitProgressData *data) +on_git_command_progress (AnjutaCommand *command, gfloat progress, + GitProgressData *data) { AnjutaStatus *status; gint ticks; @@ -344,8 +345,8 @@ on_command_progress (AnjutaCommand *command, gfloat progress, } void -on_list_branch_command_data_arrived (AnjutaCommand *command, - GitBranchComboData *data) +on_git_list_branch_command_data_arrived (AnjutaCommand *command, + GitBranchComboData *data) { GQueue *output_queue; GitBranch *branch; @@ -361,31 +362,31 @@ on_list_branch_command_data_arrived (AnjutaCommand *command, } void -on_list_branch_command_finished (AnjutaCommand *command, guint return_code, - GitBranchComboData *data) +on_git_list_branch_command_finished (AnjutaCommand *command, guint return_code, + GitBranchComboData *data) { gtk_combo_box_set_active (data->combo_box, 0); - report_errors (command, return_code); + git_report_errors (command, return_code); g_object_unref (command); } void -select_all_status_items (GtkButton *select_all_button, - AnjutaVcsStatusTreeView *tree_view) +git_select_all_status_items (GtkButton *select_all_button, + AnjutaVcsStatusTreeView *tree_view) { anjuta_vcs_status_tree_view_select_all (tree_view); } void -clear_all_status_selections (GtkButton *clear_button, - AnjutaVcsStatusTreeView *tree_view) +git_clear_all_status_selections (GtkButton *clear_button, + AnjutaVcsStatusTreeView *tree_view) { anjuta_vcs_status_tree_view_unselect_all (tree_view); } void -init_whole_project (Git *plugin, GtkWidget* project, gboolean active) +git_init_whole_project (Git *plugin, GtkWidget* project, gboolean active) { gboolean project_loaded; @@ -398,7 +399,7 @@ init_whole_project (Git *plugin, GtkWidget* project, gboolean active) } void -on_whole_project_toggled (GtkToggleButton* project, Git *plugin) +on_git_whole_project_toggled (GtkToggleButton* project, Git *plugin) { GtkWidget *path_entry; @@ -409,8 +410,8 @@ on_whole_project_toggled (GtkToggleButton* project, Git *plugin) } void -send_raw_command_output_to_editor (AnjutaCommand *command, - IAnjutaEditor *editor) +git_send_raw_command_output_to_editor (AnjutaCommand *command, + IAnjutaEditor *editor) { GQueue *output; gchar *line; @@ -426,8 +427,8 @@ send_raw_command_output_to_editor (AnjutaCommand *command, } void -on_diff_command_finished (AnjutaCommand *command, guint return_code, - Git *plugin) +on_git_diff_command_finished (AnjutaCommand *command, guint return_code, + Git *plugin) { AnjutaStatus *status; @@ -436,21 +437,21 @@ on_diff_command_finished (AnjutaCommand *command, guint return_code, anjuta_status (status, _("Git: Diff complete."), 5); - report_errors (command, return_code); + git_report_errors (command, return_code); g_object_unref (command); } void -stop_status_bar_progress_pulse (AnjutaCommand *command, guint return_code, - gpointer timer_id) +git_stop_status_bar_progress_pulse (AnjutaCommand *command, guint return_code, + gpointer timer_id) { - clear_status_bar_progress_pulse (GPOINTER_TO_UINT (timer_id)); + git_clear_status_bar_progress_pulse (GPOINTER_TO_UINT (timer_id)); } void -hide_pulse_progress_bar (AnjutaCommand *command, guint return_code, - GtkProgressBar *progress_bar) +git_hide_pulse_progress_bar (AnjutaCommand *command, guint return_code, + GtkProgressBar *progress_bar) { guint timer_id; @@ -470,10 +471,11 @@ hide_pulse_progress_bar (AnjutaCommand *command, guint return_code, * handlers in this file. It is assumed that object is the user data for the * callback. If you use any of the stock callbacks defined here, make sure * to weak ref its target with this callback. Make sure to cancel this ref - * by connecting cancel_data_arrived_signal_disconnect to the command-finished - * signal so we don't try to disconnect signals on a destroyed command. */ + * by connecting git_cancel_data_arrived_signal_disconnect to the + * command-finished signal so we don't try to disconnect signals on a destroyed + * command. */ void -disconnect_data_arrived_signals (AnjutaCommand *command, GObject *object) +git_disconnect_data_arrived_signals (AnjutaCommand *command, GObject *object) { guint data_arrived_signal; @@ -494,11 +496,11 @@ disconnect_data_arrived_signals (AnjutaCommand *command, GObject *object) } void -cancel_data_arrived_signal_disconnect (AnjutaCommand *command, - guint return_code, - GObject *signal_target) +git_cancel_data_arrived_signal_disconnect (AnjutaCommand *command, + guint return_code, + GObject *signal_target) { g_object_weak_unref (signal_target, - (GWeakNotify) disconnect_data_arrived_signals, + (GWeakNotify) git_disconnect_data_arrived_signals, command); } diff --git a/plugins/git/git-ui-utils.h b/plugins/git/git-ui-utils.h index 67ad8511..6701d264 100644 --- a/plugins/git/git-ui-utils.h +++ b/plugins/git/git-ui-utils.h @@ -52,49 +52,50 @@ GitUIData* git_ui_data_new (Git* plugin, GladeXML* gxml); void git_ui_data_free (GitUIData* data); GitProgressData *git_progress_data_new (Git *plugin, const gchar *text); void git_progress_data_free (GitProgressData *data); -void create_message_view (Git* plugin); -gboolean check_input (GtkWidget *parent, GtkWidget *widget, const gchar *input, - const gchar *error_message); -gchar *get_log_from_textview (GtkWidget* textview); -guint status_bar_progress_pulse (Git *plugin, gchar *text); -void clear_status_bar_progress_pulse (guint timer_id); -void pulse_progress_bar (GtkProgressBar *progress_bar); -void report_errors (AnjutaCommand *command, guint return_code); -gchar *get_filename_from_full_path (gchar *path); -const gchar *get_relative_path (const gchar *path, +void git_create_message_view (Git* plugin); +gboolean git_check_input (GtkWidget *parent, GtkWidget *widget, + const gchar *input, const gchar *error_message); +gchar *git_get_log_from_textview (GtkWidget* textview); +guint git_status_bar_progress_pulse (Git *plugin, gchar *text); +void git_clear_status_bar_progress_pulse (guint timer_id); +void git_pulse_progress_bar (GtkProgressBar *progress_bar); +void git_report_errors (AnjutaCommand *command, guint return_code); +gchar *git_get_filename_from_full_path (gchar *path); +const gchar *git_get_relative_path (const gchar *path, const gchar *working_directory); /* Stock signal handlers */ -void on_command_finished (AnjutaCommand *command, guint return_code, - gpointer user_data); -void on_status_command_data_arrived (AnjutaCommand *command, - AnjutaVcsStatusTreeView *tree_view); -void on_command_info_arrived (AnjutaCommand *command, Git *plugin); -void on_command_progress (AnjutaCommand *command, gfloat progress, - GitProgressData *data); -void on_list_branch_command_data_arrived (AnjutaCommand *command, +void on_git_command_finished (AnjutaCommand *command, guint return_code, + gpointer user_data); +void on_git_status_command_data_arrived (AnjutaCommand *command, + AnjutaVcsStatusTreeView *tree_view); +void on_git_command_info_arrived (AnjutaCommand *command, Git *plugin); +void on_git_command_progress (AnjutaCommand *command, gfloat progress, + GitProgressData *data); +void on_git_list_branch_command_data_arrived (AnjutaCommand *command, + GitBranchComboData *data); +void on_git_list_branch_command_finished (AnjutaCommand *command, + guint return_code, GitBranchComboData *data); -void on_list_branch_command_finished (AnjutaCommand *command, guint return_code, - GitBranchComboData *data); -void select_all_status_items (GtkButton *select_all_button, - AnjutaVcsStatusTreeView *tree_view); -void clear_all_status_selections (GtkButton *clear_button, +void git_select_all_status_items (GtkButton *select_all_button, AnjutaVcsStatusTreeView *tree_view); +void git_clear_all_status_selections (GtkButton *clear_button, + AnjutaVcsStatusTreeView *tree_view); -void init_whole_project (Git *plugin, GtkWidget* project, - gboolean active); -void on_whole_project_toggled (GtkToggleButton* project, Git *plugin); +void git_init_whole_project (Git *plugin, GtkWidget* project, + gboolean active); +void on_git_whole_project_toggled (GtkToggleButton* project, Git *plugin); -void on_diff_command_finished (AnjutaCommand *command, guint return_code, - Git *plugin); -void send_raw_command_output_to_editor (AnjutaCommand *command, - IAnjutaEditor *editor); -void stop_status_bar_progress_pulse (AnjutaCommand *command, guint return_code, - gpointer timer_id); -void hide_pulse_progress_bar (AnjutaCommand *command, guint return_code, - GtkProgressBar *progress_bar); -void disconnect_data_arrived_signals (AnjutaCommand *command, GObject *object); -void cancel_data_arrived_signal_disconnect (AnjutaCommand *command, - guint return_code, - GObject *signal_target); +void on_git_diff_command_finished (AnjutaCommand *command, guint return_code, + Git *plugin); +void git_send_raw_command_output_to_editor (AnjutaCommand *command, + IAnjutaEditor *editor); +void git_stop_status_bar_progress_pulse (AnjutaCommand *command, + guint return_code, gpointer timer_id); +void git_hide_pulse_progress_bar (AnjutaCommand *command, guint return_code, + GtkProgressBar *progress_bar); +void git_disconnect_data_arrived_signals (AnjutaCommand *command, GObject *object); +void git_cancel_data_arrived_signal_disconnect (AnjutaCommand *command, + guint return_code, + GObject *signal_target); #endif diff --git a/plugins/git/git-unstage-dialog.c b/plugins/git/git-unstage-dialog.c index 30308fc7..cd48c49d 100644 --- a/plugins/git/git-unstage-dialog.c +++ b/plugins/git/git-unstage-dialog.c @@ -35,7 +35,7 @@ on_reset_files_command_finished (AnjutaCommand *command, guint return_code, anjuta_status (status, _("Git: Files unstaged."), 5); - report_errors (command, return_code); + git_report_errors (command, return_code); g_object_unref (command); } @@ -94,33 +94,33 @@ unstage_dialog (Git *plugin) GIT_STATUS_SECTION_COMMIT); g_signal_connect (G_OBJECT (unstage_select_all_button), "clicked", - G_CALLBACK (select_all_status_items), + G_CALLBACK (git_select_all_status_items), unstage_status_view); g_signal_connect (G_OBJECT (unstage_clear_button), "clicked", - G_CALLBACK (clear_all_status_selections), + G_CALLBACK (git_clear_all_status_selections), unstage_status_view); - pulse_progress_bar (GTK_PROGRESS_BAR (unstage_status_progress_bar)); + git_pulse_progress_bar (GTK_PROGRESS_BAR (unstage_status_progress_bar)); g_signal_connect (G_OBJECT (status_command), "command-finished", - G_CALLBACK (cancel_data_arrived_signal_disconnect), + G_CALLBACK (git_cancel_data_arrived_signal_disconnect), unstage_status_view); g_signal_connect (G_OBJECT (status_command), "command-finished", - G_CALLBACK (hide_pulse_progress_bar), + G_CALLBACK (git_hide_pulse_progress_bar), unstage_status_progress_bar); g_signal_connect (G_OBJECT (status_command), "command-finished", - G_CALLBACK (on_command_finished), + G_CALLBACK (on_git_command_finished), NULL); g_signal_connect (G_OBJECT (status_command), "data-arrived", - G_CALLBACK (on_status_command_data_arrived), + G_CALLBACK (on_git_status_command_data_arrived), unstage_status_view); g_object_weak_ref (G_OBJECT (unstage_status_view), - (GWeakNotify) disconnect_data_arrived_signals, + (GWeakNotify) git_disconnect_data_arrived_signals, status_command); anjuta_command_start (ANJUTA_COMMAND (status_command)); -- 2.11.4.GIT