[Xfce4-commits] <xfce4-panel:xfce-4.6> Don't use g_object_set in the init function (bug #6110).

Nick Schermer noreply at xfce.org
Wed Dec 30 12:50:02 CET 2009


Updating branch refs/heads/xfce-4.6
         to 586257b3ca946386e0f02eac7ae075e1c9087f02 (commit)
       from 6f3c1f79637d74f8f6ff3ed14b59ac896db2c161 (commit)

commit 586257b3ca946386e0f02eac7ae075e1c9087f02
Author: Nick Schermer <nick at xfce.org>
Date:   Wed Dec 30 12:23:39 2009 +0100

    Don't use g_object_set in the init function (bug #6110).
    
    This will show the following warning with glib >= 2.23.1:
    
    (xfce4-panel:17374): GLib-GObject-WARNING **: IA__g_object_set_valist: construct property "type" for object `XfcePanelWindow' can't be set after construction
    
    and shows a window with decorations. Use the normal gtk functions
    for setting the properties.

 libxfce4panel/xfce-panel-window.c |   12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/libxfce4panel/xfce-panel-window.c b/libxfce4panel/xfce-panel-window.c
index 7d0687b..6a6ecd8 100644
--- a/libxfce4panel/xfce-panel-window.c
+++ b/libxfce4panel/xfce-panel-window.c
@@ -304,14 +304,10 @@ xfce_panel_window_init (XfcePanelWindow *panel_window)
 
     GTK_WIDGET_SET_FLAGS (GTK_WIDGET (panel_window), GTK_CAN_FOCUS);
 
-    g_object_set (G_OBJECT (panel_window),
-                  "type", GTK_WINDOW_TOPLEVEL,
-                  "decorated", FALSE,
-                  "resizable", FALSE,
-                  "type-hint", GDK_WINDOW_TYPE_HINT_DOCK,
-                  "title", PACKAGE_NAME " " PACKAGE_VERSION,
-                  NULL);
-
+    gtk_window_set_type_hint (GTK_WINDOW (panel_window), GDK_WINDOW_TYPE_HINT_DOCK);
+    gtk_window_set_decorated (GTK_WINDOW (panel_window), FALSE);
+    gtk_window_set_resizable (GTK_WINDOW (panel_window), FALSE);
+    gtk_window_set_title (GTK_WINDOW (panel_window), PACKAGE_NAME);
     gtk_window_stick (GTK_WINDOW (panel_window));
 
     priv = XFCE_PANEL_WINDOW_GET_PRIVATE (panel_window);



More information about the Xfce4-commits mailing list