[gnome-software] Move the headerbar back in place



commit 07caee8e74baf7106ee7ea1fd433ccda7252963a
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Aug 22 15:06:55 2013 -0400

    Move the headerbar back in place
    
    Don't rely on glade support, just do it in code for now.

 src/gs-shell.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-shell.c b/src/gs-shell.c
index 1a3c506..aa3da36 100644
--- a/src/gs-shell.c
+++ b/src/gs-shell.c
@@ -382,6 +382,13 @@ gs_shell_setup (GsShell *shell, GsPluginLoader *plugin_loader, GCancellable *can
        gtk_widget_hide (main_window);
        gtk_window_set_default_size (GTK_WINDOW (main_window), 1200, 800);
 
+        /* fix up the header bar */
+        widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "header"));
+        g_object_ref (widget);
+        gtk_container_remove (GTK_CONTAINER (gtk_widget_get_parent (widget)), widget);
+        gtk_window_set_titlebar (GTK_WINDOW (main_window), widget);
+        g_object_unref (widget);
+
        /* setup callbacks */
        widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "notebook_main"));
        gtk_notebook_set_show_tabs (GTK_NOTEBOOK (widget), FALSE);


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