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> 5 * 6 * Portions based on the original Subversion plugin 7 * Copyright (C) Johannes Schmid 2005 8 * 9 * anjuta is free software. 10 * 11 * You may redistribute it and/or modify it under the terms of the 12 * GNU General Public License, as published by the Free Software 13 * Foundation; either version 2 of the License, or (at your option) 14 * any later version. 15 * 16 * anjuta is distributed in the hope that it will be useful, 17 * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 * See the GNU General Public License for more details. 20 * 21 * You should have received a copy of the GNU General Public License 22 * along with anjuta. If not, write to: 23 * The Free Software Foundation, Inc., 24 * 51 Franklin Street, Fifth Floor 25 * Boston, MA 02110-1301, USA. 26 */ 27 28 #ifndef SUBVERSION_UI_UTILS_H 29 #define SUBVERSION_UI_UTILS_H 30 31 #include "plugin.h" 32 #include "svn-status-command.h" 33 #include "svn-diff-command.h" 34 #include <libanjuta/anjuta-vcs-status-tree-view.h> 35 #include <libanjuta/interfaces/ianjuta-document-manager.h> 36 #include <libanjuta/interfaces/ianjuta-editor.h> 37 38 typedef struct 39 { 40 GtkBuilder* bxml; 41 Subversion* plugin; 42 } SubversionData; 43 44 SubversionData* subversion_data_new (Subversion* plugin, GtkBuilder* bxml); 45 void subversion_data_free (SubversionData* data); 46 void create_message_view (Subversion* plugin); 47 gboolean check_input (GtkWidget *parent, GtkWidget *entry, 48 const gchar *error_message); 49 gchar *get_log_from_textview (GtkWidget* textview); 50 guint status_bar_progress_pulse (Subversion *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 56 /* Stock signal handlers */ 57 void on_status_command_finished (AnjutaCommand *command, guint return_code, 58 gpointer user_data); 59 void on_status_command_data_arrived (AnjutaCommand *command, 60 AnjutaVcsStatusTreeView *tree_view); 61 void on_command_info_arrived (AnjutaCommand *command, Subversion *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); 66 67 void init_whole_project (Subversion *plugin, GtkWidget* project, 68 gboolean active); 69 void on_whole_project_toggled (GtkToggleButton* project, Subversion *plugin); 70 void on_diff_command_finished (AnjutaCommand *command, guint return_code, 71 Subversion *plugin); 72 void send_diff_command_output_to_editor (AnjutaCommand *command, 73 IAnjutaEditor *editor); 74 void stop_status_bar_progress_pulse (AnjutaCommand *command, guint return_code, 75 gpointer timer_id); 76 void hide_pulse_progress_bar (AnjutaCommand *command, guint return_code, 77 GtkProgressBar *progress_bar); 78 void disconnect_data_arrived_signals (AnjutaCommand *command, GObject *object); 79 void cancel_data_arrived_signal_disconnect (AnjutaCommand *command, 80 guint return_code, 81 GObject *signal_target); 82 void on_subversion_browse_button_clicked (GtkButton *button, GtkEntry *entry); 83 #endif 84