[Xfce4-commits] <xfce4-panel:master> Don't use g_object_set in the init function (bug #6110).
Nick Schermer
noreply at xfce.org
Wed Dec 30 12:26:01 CET 2009
Updating branch refs/heads/master
to c5c653df3242d3413a660f784df72f753c856b3a (commit)
from 6cd5652ed72fae15ef73a6709ddfcc70005f5e3c (commit)
commit c5c653df3242d3413a660f784df72f753c856b3a
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