Implement support for listing and merging branches.
[anjuta-git-plugin.git] / plugins / git / git-ui-utils.h
blobe572412fd1128a325727ae1a6ff3cdc87652e3cd
1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
2 /*
3 * anjuta
4 * Copyright (C) James Liggett 2007 <jrliggett@cox.net>
6 * anjuta is free software.
7 *
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)
11 * any later version.
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>
32 #include "plugin.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"
38 typedef struct
40 GladeXML* gxml;
41 Git* plugin;
42 } GitUIData;
44 GitUIData* git_ui_data_new (Git* plugin, GladeXML* gxml);
45 void git_ui_data_free (GitUIData* data);
46 void create_message_view (Git* plugin);
47 gboolean check_input (GtkWidget *parent, GtkWidget *widget, const gchar *input,
48 const gchar *error_message);
49 gchar *get_log_from_textview (GtkWidget* textview);
50 guint status_bar_progress_pulse (Git *plugin, gchar *text);
51 void clear_status_bar_progress_pulse (guint timer_id);
52 void pulse_progress_bar (GtkProgressBar *progress_bar);
53 void report_errors (AnjutaCommand *command, guint return_code);
54 gchar *get_filename_from_full_path (gchar *path);
55 const gchar *get_relative_path (const gchar *path,
56 const gchar *working_directory);
58 /* Stock signal handlers */
59 void on_command_finished (AnjutaCommand *command, guint return_code,
60 gpointer user_data);
61 void on_status_command_data_arrived (AnjutaCommand *command,
62 AnjutaVcsStatusTreeView *tree_view);
63 void on_command_info_arrived (AnjutaCommand *command, Git *plugin);
64 void on_list_branch_command_data_arrived (AnjutaCommand *command,
65 GitBranchComboData *data);
66 void on_list_branch_command_finished (AnjutaCommand *command, guint return_code,
67 GitBranchComboData *data);
68 void select_all_status_items (GtkButton *select_all_button,
69 AnjutaVcsStatusTreeView *tree_view);
70 void clear_all_status_selections (GtkButton *clear_button,
71 AnjutaVcsStatusTreeView *tree_view);
73 void init_whole_project (Git *plugin, GtkWidget* project,
74 gboolean active);
75 void on_whole_project_toggled (GtkToggleButton* project, Git *plugin);
77 void on_diff_command_finished (AnjutaCommand *command, guint return_code,
78 Git *plugin);
79 void send_diff_command_output_to_editor (AnjutaCommand *command,
80 IAnjutaEditor *editor);
81 void stop_status_bar_progress_pulse (AnjutaCommand *command, guint return_code,
82 gpointer timer_id);
83 void hide_pulse_progress_bar (AnjutaCommand *command, guint return_code,
84 GtkProgressBar *progress_bar);
85 void disconnect_data_arrived_signals (AnjutaCommand *command, GObject *object);
86 void cancel_data_arrived_signal_disconnect (AnjutaCommand *command,
87 guint return_code,
88 GObject *signal_target);
89 #endif