[Xfce4-commits] <xfce4-session:master> Pack the widgets in the returned bin of the framebox.

Nick Schermer noreply at xfce.org
Thu Jan 28 19:52:24 CET 2010


Updating branch refs/heads/master
         to c59e0733a7fcf79778b6f51d4846981070dbd88c (commit)
       from 9b5077215b589fc5fb96173adad950d1b7ed8601 (commit)

commit c59e0733a7fcf79778b6f51d4846981070dbd88c
Author: Nick Schermer <nick at xfce.org>
Date:   Thu Jan 28 18:57:47 2010 +0100

    Pack the widgets in the returned bin of the framebox.
    
    This fixes the following warning:
    (xfce4-session-settings:3386): Gtk-WARNING **: Attempting to add a
    widget with type GtkFontButton to a GtkFrame, but as a GtkBin subclass
    a GtkFrame can only contain one widget at a time; it already contains
    a widget of type GtkAlignment

 engines/balou/config.c  |    5 +++--
 engines/simple/simple.c |   13 +++++++------
 2 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/engines/balou/config.c b/engines/balou/config.c
index 4f0d355..19d3fa4 100644
--- a/engines/balou/config.c
+++ b/engines/balou/config.c
@@ -847,16 +847,17 @@ config_create (XfsmSplashRc *rc)
   GtkWidget         *swin;
   GtkWidget         *vbox;
   gchar             *theme;
+  GtkWidget         *bin;
 
   theme = xfsm_splash_rc_read_entry (rc, "Theme", "Default");
 
   page = gtk_vbox_new (FALSE, BORDER);
   gtk_container_set_border_width (GTK_CONTAINER (page), BORDER);
 
-  frame = xfce_gtk_frame_box_new (_("Balou theme"), NULL);
+  frame = xfce_gtk_frame_box_new (_("Balou theme"), &bin);
   gtk_box_pack_start (GTK_BOX (page), frame, TRUE, TRUE, 0);
   vbox = gtk_vbox_new (FALSE, 0);
-  gtk_container_add (GTK_CONTAINER (frame), vbox);
+  gtk_container_add (GTK_CONTAINER (bin), vbox);
 
   swin = gtk_scrolled_window_new (NULL, NULL);
   gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swin),
diff --git a/engines/simple/simple.c b/engines/simple/simple.c
index 233e03e..f4da626 100644
--- a/engines/simple/simple.c
+++ b/engines/simple/simple.c
@@ -341,6 +341,7 @@ config_configure (XfsmSplashConfig *config,
   GdkColor     color;
   GtkBox      *dbox;
   gchar        buffer[32];
+  GtkWidget   *bin;
 
   dialog = gtk_dialog_new_with_buttons (_("Configure Simple..."),
                                         GTK_WINDOW (parent),
@@ -353,22 +354,22 @@ config_configure (XfsmSplashConfig *config,
 
   dbox = GTK_BOX (GTK_DIALOG (dialog)->vbox);
 
-  frame = xfce_gtk_frame_box_new (_("Font"), NULL);
+  frame = xfce_gtk_frame_box_new (_("Font"), &bin);
   gtk_box_pack_start (dbox, frame, FALSE, FALSE, 6);
   gtk_widget_show (frame);
 
   font = xfsm_splash_rc_read_entry (config->rc, "Font", DEFAULT_FONT);
   btn_font = gtk_font_button_new_with_font (font);
   g_free (font);
-  gtk_container_add (GTK_CONTAINER (frame), btn_font);
+  gtk_container_add (GTK_CONTAINER (bin), btn_font);
   gtk_widget_show (btn_font);
 
-  frame = xfce_gtk_frame_box_new (_("Colors"), NULL);
+  frame = xfce_gtk_frame_box_new (_("Colors"), &bin);
   gtk_box_pack_start (dbox, frame, FALSE, FALSE, 6);
   gtk_widget_show (frame);
 
   table = gtk_table_new (2, 2, FALSE);
-  gtk_container_add (GTK_CONTAINER (frame), table);
+  gtk_container_add (GTK_CONTAINER (bin), table);
   gtk_widget_show (table);
 
   label = gtk_label_new (_("Background color:"));
@@ -397,12 +398,12 @@ config_configure (XfsmSplashConfig *config,
                     GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
   gtk_widget_show (sel_fg);
 
-  frame = xfce_gtk_frame_box_new (_("Image"), NULL);
+  frame = xfce_gtk_frame_box_new (_("Image"), &bin);
   gtk_box_pack_start (dbox, frame, FALSE, FALSE, 6);
   gtk_widget_show (frame);
 
   vbox = gtk_vbox_new (FALSE, 6);
-  gtk_container_add (GTK_CONTAINER (frame), vbox);
+  gtk_container_add (GTK_CONTAINER (bin), vbox);
   gtk_widget_show (vbox);
 
   checkbox = gtk_check_button_new_with_label (_("Use custom image"));



More information about the Xfce4-commits mailing list