1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
4 * Copyright (C) James Liggett 2007 <jrliggett@cox.net>
6 * anjuta is free software.
8 * You may redistribute it and/or modify it under the terms of the
9 * GNU General Public License, as published by the Free Software
10 * Foundation; either version 2 of the License, or (at your option)
13 * anjuta is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16 * See the GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with anjuta. If not, write to:
20 * The Free Software Foundation, Inc.,
21 * 51 Franklin Street, Fifth Floor
22 * Boston, MA 02110-1301, USA.
25 #ifndef GIT_UI_UTILS_H
26 #define GIT_UI_UTILS_H
28 #include <libanjuta/anjuta-vcs-status-tree-view.h>
29 #include <libanjuta/interfaces/ianjuta-document-manager.h>
30 #include <libanjuta/interfaces/ianjuta-editor.h>
31 #include <libanjuta/interfaces/ianjuta-message-manager.h>
33 #include "git-status-command.h"
34 #include "git-diff-command.h"
35 #include "git-branch-list-command.h"
36 #include "git-branch-combo-model.h"
51 GitUIData
* git_ui_data_new (Git
* plugin
, GladeXML
* gxml
);
52 void git_ui_data_free (GitUIData
* data
);
53 GitProgressData
*git_progress_data_new (Git
*plugin
, const gchar
*text
);
54 void git_progress_data_free (GitProgressData
*data
);
55 void git_create_message_view (Git
* plugin
);
56 gboolean
git_check_input (GtkWidget
*parent
, GtkWidget
*widget
,
57 const gchar
*input
, const gchar
*error_message
);
58 gchar
*git_get_log_from_textview (GtkWidget
* textview
);
59 guint
git_status_bar_progress_pulse (Git
*plugin
, gchar
*text
);
60 void git_clear_status_bar_progress_pulse (guint timer_id
);
61 void git_pulse_progress_bar (GtkProgressBar
*progress_bar
);
62 void git_report_errors (AnjutaCommand
*command
, guint return_code
);
63 gchar
*git_get_filename_from_full_path (gchar
*path
);
64 const gchar
*git_get_relative_path (const gchar
*path
,
65 const gchar
*working_directory
);
67 /* Stock signal handlers */
68 void on_git_command_finished (AnjutaCommand
*command
, guint return_code
,
70 void on_git_status_command_data_arrived (AnjutaCommand
*command
,
71 AnjutaVcsStatusTreeView
*tree_view
);
72 void on_git_command_info_arrived (AnjutaCommand
*command
, Git
*plugin
);
73 void on_git_command_progress (AnjutaCommand
*command
, gfloat progress
,
74 GitProgressData
*data
);
75 void on_git_list_branch_command_data_arrived (AnjutaCommand
*command
,
76 GitBranchComboData
*data
);
77 void on_git_list_branch_command_finished (AnjutaCommand
*command
,
79 GitBranchComboData
*data
);
80 void git_select_all_status_items (GtkButton
*select_all_button
,
81 AnjutaVcsStatusTreeView
*tree_view
);
82 void git_clear_all_status_selections (GtkButton
*clear_button
,
83 AnjutaVcsStatusTreeView
*tree_view
);
85 void git_init_whole_project (Git
*plugin
, GtkWidget
* project
,
87 void on_git_whole_project_toggled (GtkToggleButton
* project
, Git
*plugin
);
89 void on_git_diff_command_finished (AnjutaCommand
*command
, guint return_code
,
91 void git_send_raw_command_output_to_editor (AnjutaCommand
*command
,
92 IAnjutaEditor
*editor
);
93 void git_stop_status_bar_progress_pulse (AnjutaCommand
*command
,
94 guint return_code
, gpointer timer_id
);
95 void git_hide_pulse_progress_bar (AnjutaCommand
*command
, guint return_code
,
96 GtkProgressBar
*progress_bar
);
97 void git_disconnect_data_arrived_signals (AnjutaCommand
*command
, GObject
*object
);
98 void git_cancel_data_arrived_signal_disconnect (AnjutaCommand
*command
,
100 GObject
*signal_target
);