[gnome-software] Make app menu work
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Make app menu work
- Date: Sat, 24 Aug 2013 14:45:37 +0000 (UTC)
commit d5a77ac49faeff36e4359d84931c94d8dd40e80e
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Aug 24 10:45:08 2013 -0400
Make app menu work
For the app menu to work, the window needs to be a
GtkApplicationWindow. Make it so.
src/gnome-software.ui | 4 +++-
src/gs-application.c | 4 +++-
src/gs-shell.c | 3 ---
3 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/src/gnome-software.ui b/src/gnome-software.ui
index f9342c2..8afd60c 100644
--- a/src/gnome-software.ui
+++ b/src/gnome-software.ui
@@ -12,8 +12,10 @@
<column type="gchararray"/>
</columns>
</object>
- <object class="GtkWindow" id="window_software">
+ <object class="GtkApplicationWindow" id="window_software">
<property name="can_focus">False</property>
+ <property name="default-width">1200</property>
+ <property name="default-height">800</property>
<property name="title" translatable="yes">Software</property>
<child>
<object class="GtkBox" id="box1">
diff --git a/src/gs-application.c b/src/gs-application.c
index 5567107..4f01a41 100644
--- a/src/gs-application.c
+++ b/src/gs-application.c
@@ -168,7 +168,9 @@ gs_application_startup (GApplication *application)
app->cancellable = g_cancellable_new ();
window = gs_shell_setup (app->shell, app->plugin_loader, app->cancellable);
- gtk_application_add_window (GTK_APPLICATION (app), GTK_WINDOW (window));
+ gtk_application_add_window (GTK_APPLICATION (app), window);
+
+ gtk_widget_show (GTK_WIDGET (window));
}
static void
diff --git a/src/gs-shell.c b/src/gs-shell.c
index 552d8b0..408d570 100644
--- a/src/gs-shell.c
+++ b/src/gs-shell.c
@@ -286,8 +286,6 @@ gs_shell_setup (GsShell *shell, GsPluginLoader *plugin_loader, GCancellable *can
/* Hide window first so that the dialogue resizes itself without redrawing */
main_window = GTK_WIDGET (gtk_builder_get_object (priv->builder, "window_software"));
- 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"));
@@ -343,7 +341,6 @@ gs_shell_setup (GsShell *shell, GsPluginLoader *plugin_loader, GCancellable *can
priv->cancellable);
/* show main UI */
- gtk_widget_show (main_window);
gs_shell_set_mode (shell, GS_SHELL_MODE_OVERVIEW);
return GTK_WINDOW (main_window);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]