[anjuta] git: Show the active branch in the status bar (bgo 589401)
- From: James Liggett <jrliggett src gnome org>
- To: svn-commits-list gnome org
- Subject: [anjuta] git: Show the active branch in the status bar (bgo 589401)
- Date: Fri, 24 Jul 2009 02:55:14 +0000 (UTC)
commit e6b81ff1556e2efd8712084301c41756a834b239
Author: James Liggett <jrliggett cox net>
Date: Thu Jul 23 19:54:00 2009 -0700
git: Show the active branch in the status bar (bgo 589401)
plugins/git/git-log-dialog.c | 15 +++++++++++----
plugins/git/plugin.c | 5 +++++
2 files changed, 16 insertions(+), 4 deletions(-)
---
diff --git a/plugins/git/git-log-dialog.c b/plugins/git/git-log-dialog.c
index 9af98a0..04cb21a 100644
--- a/plugins/git/git-log-dialog.c
+++ b/plugins/git/git-log-dialog.c
@@ -803,7 +803,7 @@ setup_filters (LogData *data)
static void
on_log_list_branch_command_data_arrived (AnjutaCommand *command,
- GtkBuilder *bxml)
+ LogData *data)
{
GtkListStore *log_branch_combo_model;
GtkComboBox *log_branch_combo;
@@ -813,10 +813,11 @@ on_log_list_branch_command_data_arrived (AnjutaCommand *command,
GtkTreeIter iter;
gchar *name;
gboolean active;
+ AnjutaStatus *status;
- log_branch_combo_model = GTK_LIST_STORE (gtk_builder_get_object (bxml,
+ log_branch_combo_model = GTK_LIST_STORE (gtk_builder_get_object (data->bxml,
"log_branch_combo_model"));
- log_branch_combo = GTK_COMBO_BOX (gtk_builder_get_object (bxml,
+ log_branch_combo = GTK_COMBO_BOX (gtk_builder_get_object (data->bxml,
"log_branch_combo"));
branches_table = g_object_get_data (G_OBJECT (log_branch_combo),
"branches-table");
@@ -840,6 +841,12 @@ on_log_list_branch_command_data_arrived (AnjutaCommand *command,
g_free);
active = TRUE;
+
+ /* Show the active branch in the status bar */
+ status = anjuta_shell_get_status (ANJUTA_PLUGIN (data->plugin)->shell,
+ NULL);
+
+ anjuta_status_set_default (status, _("Branch"), "%s", name);
}
gtk_list_store_set (log_branch_combo_model, &iter,
@@ -1299,7 +1306,7 @@ git_log_refresh_branches_full (Git *plugin,
g_signal_connect (G_OBJECT (branch_list_command), "data-arrived",
G_CALLBACK (on_log_list_branch_command_data_arrived),
- data->bxml);
+ data);
g_signal_connect (G_OBJECT (branch_list_command), "command-finished",
G_CALLBACK (on_log_list_branch_command_finished),
diff --git a/plugins/git/plugin.c b/plugins/git/plugin.c
index 3950331..d8b1e55 100644
--- a/plugins/git/plugin.c
+++ b/plugins/git/plugin.c
@@ -812,10 +812,15 @@ git_deactivate_plugin (AnjutaPlugin *plugin)
{
AnjutaUI *ui = anjuta_shell_get_ui (plugin->shell, NULL);
Git *git_plugin;
+ AnjutaStatus *status;
git_plugin = ANJUTA_PLUGIN_GIT (plugin);
+ status = anjuta_shell_get_status (plugin->shell, NULL);
DEBUG_PRINT ("%s", "Git: Dectivating Git plugin ...");
+
+ anjuta_status_set_default (status, _("Branch"), NULL);
+
anjuta_ui_unmerge (ui, git_plugin->uiid);
anjuta_plugin_remove_watch (plugin, git_plugin->project_root_watch_id,
TRUE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]