[anjuta] git: Fix bgo 699544 - Git pane prevents maximize of main window in small screens



commit ef85afaa05bd802bed485ff83c14eaed6632844c
Author: James Liggett <jrliggett cox net>
Date:   Sat Jul 27 14:31:06 2013 -0700

    git: Fix bgo 699544 - Git pane prevents maximize of main window in small screens

 plugins/git/plugin.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/plugins/git/plugin.c b/plugins/git/plugin.c
index 23f5416..819707c 100644
--- a/plugins/git/plugin.c
+++ b/plugins/git/plugin.c
@@ -829,6 +829,7 @@ git_activate_plugin (AnjutaPlugin *plugin)
        gchar *objects[] = {"grip_box",
                                                NULL};
        GtkWidget *git_tasks_button;
+       GtkWidget *scrolled_window, *viewport;
        AnjutaUI *ui;
        
        DEBUG_PRINT ("%s", "Git: Activating Git plugin …");
@@ -843,17 +844,21 @@ git_activate_plugin (AnjutaPlugin *plugin)
        /* Command bar and dock */
        git_plugin->command_bar = anjuta_command_bar_new ();
        git_plugin->dock = anjuta_dock_new ();
+       viewport = gtk_viewport_new (NULL, NULL);
+       scrolled_window = gtk_scrolled_window_new (NULL, NULL);
+
+       gtk_container_add (GTK_CONTAINER (viewport), git_plugin->dock);
+       gtk_container_add (GTK_CONTAINER (scrolled_window), viewport);
 
        git_plugin->box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2);
-       gtk_box_pack_start (GTK_BOX (git_plugin->box), git_plugin->dock, TRUE, TRUE, 0);
+       gtk_box_pack_start (GTK_BOX (git_plugin->box), scrolled_window, TRUE, TRUE, 0);
        gtk_box_pack_start (GTK_BOX (git_plugin->box), git_plugin->command_bar, FALSE, FALSE, 0);
        
 
        anjuta_dock_set_command_bar (ANJUTA_DOCK (git_plugin->dock), 
                                     ANJUTA_COMMAND_BAR (git_plugin->command_bar));
 
-       gtk_widget_show (git_plugin->box);
-       gtk_widget_show (git_plugin->dock);
+       gtk_widget_show_all (git_plugin->box);
        anjuta_shell_add_widget_custom (plugin->shell, git_plugin->box, "GitDock", 
                                                _("Git"), "git-plugin", 
                                        GTK_WIDGET (gtk_builder_get_object (builder, "grip_box")), 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]