[gnome-panel/wip/gnome-3.10+: 11/75] panel: don't set panel's initial size to G_MAXINT



commit 04d4d68e6f925b9b33df84e45473360728440055
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Mon Nov 18 23:38:27 2013 +0200

    panel: don't set panel's initial size to G_MAXINT
    
    Replacing GtkTable with GtkGrid introduced new bug. Warning is -
    'Native children wider or taller than 65535 pixels are not supported'.
    This is caused by setting panels initial size to G_MAXINT. Changing
    initial size to 0 fixes this new bug.

 gnome-panel/panel-widget.c |   13 +++++--------
 1 files changed, 5 insertions(+), 8 deletions(-)
---
diff --git a/gnome-panel/panel-widget.c b/gnome-panel/panel-widget.c
index e189989..c76b68a 100644
--- a/gnome-panel/panel-widget.c
+++ b/gnome-panel/panel-widget.c
@@ -1689,7 +1689,7 @@ panel_widget_init (PanelWidget *panel)
        
        panel->packed        = FALSE;
        panel->orient        = GTK_ORIENTATION_HORIZONTAL;
-       panel->size          = G_MAXINT;
+       panel->size          = 0;
        panel->applet_list   = NULL;
        panel->drop_widget   = widget;
        panel->open_dialogs  = NULL;
@@ -1718,21 +1718,18 @@ panel_widget_new (PanelToplevel  *toplevel,
 
        panel = g_object_new (PANEL_TYPE_WIDGET, NULL);
 
-        gtk_widget_set_has_window (GTK_WIDGET (panel), TRUE);
-        gtk_widget_set_can_focus (GTK_WIDGET (panel), TRUE);
+       gtk_widget_set_has_window (GTK_WIDGET (panel), TRUE);
+       gtk_widget_set_can_focus (GTK_WIDGET (panel), TRUE);
 
        panel->orient = orient;
        panel->sz = sz;
 
        panel->packed = packed;
-       if (packed)
-               panel->size = 0;
-       else
-               panel->size = G_MAXINT;
+       panel->size = 0;
 
        panel->toplevel    = toplevel;
        panel->drop_widget = GTK_WIDGET (toplevel);
-       
+
        return GTK_WIDGET (panel);
 }
 


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