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"
42 GitUIData
* git_ui_data_new (Git
* plugin
, GladeXML
* gxml
);
43 void git_ui_data_free (GitUIData
* data
);
44 void create_message_view (Git
* plugin
);
45 gboolean
check_input (GtkWidget
*parent
, GtkWidget
*entry
,
46 const gchar
*error_message
);
47 gchar
*get_log_from_textview (GtkWidget
* textview
);
48 guint
status_bar_progress_pulse (Git
*plugin
, gchar
*text
);
49 void clear_status_bar_progress_pulse (guint timer_id
);
50 void pulse_progress_bar (GtkProgressBar
*progress_bar
);
51 void report_errors (AnjutaCommand
*command
, guint return_code
);
52 gchar
*get_filename_from_full_path (gchar
*path
);
53 const gchar
*get_relative_path (const gchar
*path
,
54 const gchar
*working_directory
);
56 /* Stock signal handlers */
57 void on_status_command_finished (AnjutaCommand
*command
, guint return_code
,
59 void on_status_command_data_arrived (AnjutaCommand
*command
,
60 AnjutaVcsStatusTreeView
*tree_view
);
61 void on_command_info_arrived (AnjutaCommand
*command
, Git
*plugin
);
62 void select_all_status_items (GtkButton
*select_all_button
,
63 AnjutaVcsStatusTreeView
*tree_view
);
64 void clear_all_status_selections (GtkButton
*clear_button
,
65 AnjutaVcsStatusTreeView
*tree_view
);
67 void init_whole_project (Git
*plugin
, GtkWidget
* project
,
69 void on_whole_project_toggled (GtkToggleButton
* project
, Git
*plugin
);
71 void on_diff_command_finished (AnjutaCommand
*command
, guint return_code
,
73 void send_diff_command_output_to_editor (AnjutaCommand
*command
,
74 IAnjutaEditor
*editor
);
75 void stop_status_bar_progress_pulse (AnjutaCommand
*command
, guint return_code
,
77 void hide_pulse_progress_bar (AnjutaCommand
*command
, guint return_code
,
78 GtkProgressBar
*progress_bar
);
79 void disconnect_data_arrived_signals (AnjutaCommand
*command
, GObject
*object
);
80 void cancel_data_arrived_signal_disconnect (AnjutaCommand
*command
,
82 GObject
*signal_target
);