2009-03-10 Alberto Garcia <agarcia@igalia.com>
authorAlberto Garcia <agarcia@igalia.com>
Tue, 10 Mar 2009 16:42:57 +0000 (16:42 +0000)
committerAlberto Garcia <agarcia@igalia.com>
Tue, 10 Mar 2009 16:42:57 +0000 (16:42 +0000)
* src/hildon-app-menu.c
(hildon_app_menu_apply_style, hildon_app_menu_class_init):
Remove the "external-border" style property, let the menu take its
natural size (or the one set by the window manager)
(hildon_app_menu_repack_items):
Don't reshow the menu, avoid flickers.

Partially fixes NB#94957 (Smoothly opened application menu)

ChangeLog
src/hildon-app-menu.c

index d1f2152..77733f1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2009-03-10  Alberto Garcia  <agarcia@igalia.com>
+
+       * src/hildon-app-menu.c
+       (hildon_app_menu_apply_style, hildon_app_menu_class_init):
+       Remove the "external-border" style property, let the menu take its
+       natural size (or the one set by the window manager)
+       (hildon_app_menu_repack_items):
+       Don't reshow the menu, avoid flickers.
+
+       Partially fixes NB#94957 (Smoothly opened application menu)
+
 2009-03-10  Claudio Saavedra  <csaavedra@igalia.com>
 
        [Release 2.1.50]
index 2ebc0fb..0813d8a 100644 (file)
@@ -755,10 +755,8 @@ hildon_app_menu_unrealize                       (GtkWidget *widget)
 static void
 hildon_app_menu_apply_style                     (GtkWidget *widget)
 {
-    GdkScreen *screen;
-    gint width;
     guint horizontal_spacing, vertical_spacing, filter_vertical_spacing;
-    guint inner_border, external_border;
+    guint inner_border;
     HildonAppMenuPrivate *priv;
 
     priv = HILDON_APP_MENU_GET_PRIVATE (widget);
@@ -768,7 +766,6 @@ hildon_app_menu_apply_style                     (GtkWidget *widget)
                           "vertical-spacing", &vertical_spacing,
                           "filter-vertical-spacing", &filter_vertical_spacing,
                           "inner-border", &inner_border,
-                          "external-border", &external_border,
                           NULL);
 
     /* Set spacings */
@@ -778,11 +775,6 @@ hildon_app_menu_apply_style                     (GtkWidget *widget)
 
     /* Set inner border */
     gtk_container_set_border_width (GTK_CONTAINER (widget), inner_border);
-
-    /* Set default size */
-    screen = gtk_widget_get_screen (widget);
-    width = gdk_screen_get_width (screen) - external_border * 2;
-    gtk_window_set_default_size (GTK_WINDOW (widget), width, -1);
 }
 
 static void
@@ -877,10 +869,6 @@ hildon_app_menu_repack_items                    (HildonAppMenu *menu,
     } else {
         gtk_table_resize (priv->table, row + 1, priv->columns);
     }
-
-    if (GTK_WIDGET_VISIBLE (GTK_WIDGET (menu))) {
-        gtk_window_reshow_with_initial_size (GTK_WINDOW (menu));
-    }
 }
 
 /**
@@ -1067,13 +1055,4 @@ hildon_app_menu_class_init                      (HildonAppMenuClass *klass)
             "Border between menu edges and buttons",
             0, G_MAXUINT, 16,
             G_PARAM_READABLE));
-
-    gtk_widget_class_install_style_property (
-        widget_class,
-        g_param_spec_uint (
-            "external-border",
-            "Border between menu and screen edges",
-            "Border between the right and left edges of the menu and the screen edges",
-            0, G_MAXUINT, 40,
-            G_PARAM_READABLE));
 }