]> Pileus Git - ~andy/gtk/commitdiff
initialize GdkColor structs to fix warning about uninitialized "pixel"
authorMichael Natterer <mitch@imendio.com>
Fri, 1 Feb 2008 11:20:47 +0000 (11:20 +0000)
committerMichael Natterer <mitch@src.gnome.org>
Fri, 1 Feb 2008 11:20:47 +0000 (11:20 +0000)
2008-02-01  Michael Natterer  <mitch@imendio.com>

* tests/testgtk.c: initialize GdkColor structs to fix warning
about uninitialized "pixel" member.

* tests/testactions.c: connect the toolbar_style() callback so it
does something useful and doesn't warn about being defined but not
used.

svn path=/trunk/; revision=19454

ChangeLog
tests/testactions.c
tests/testgtk.c

index 8c2c1989d9b7d03ee461f2f24bbd66d1a613c9c1..51290fe7c12dc61c28d26ffad039ac2c5d5aa183 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2008-02-01  Michael Natterer  <mitch@imendio.com>
+
+       * tests/testgtk.c: initialize GdkColor structs to fix warning
+       about uninitialized "pixel" member.
+
+       * tests/testactions.c: connect the toolbar_style() callback so it
+       does something useful and doesn't warn about being defined but not
+       used.
+
 2008-01-31  Cody Russell  <bratsche@gnome.org>
 
        * gdk/win32/gdkevents-win32.c:
index 01b6655171d98dae48e7d07ff08876119216da74..9b97b7c605c5ac946037f7dbd9585522d57ed6fb 100644 (file)
@@ -95,13 +95,15 @@ show_accel_dialog (GtkAction *action)
 }
 
 static void
-toolbar_style (GtkAction *action, 
-              gpointer   user_data)
+toolbar_style (GtkAction *action)
 {
   GtkToolbarStyle style;
 
   g_return_if_fail (toolbar != NULL);
-  style = GPOINTER_TO_INT (user_data);
+
+  radio_action (action);
+
+  style = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (action));
 
   gtk_toolbar_set_style (toolbar, style);
 }
@@ -430,7 +432,7 @@ main (int argc, char **argv)
   gtk_action_group_add_radio_actions (action_group, 
                                      toolbar_entries, n_toolbar_entries, 
                                      GTK_TOOLBAR_BOTH,
-                                     G_CALLBACK (radio_action), NULL);
+                                     G_CALLBACK (toolbar_style), NULL);
   gtk_action_group_add_action_with_accel (action_group, action, NULL);
 
   create_window (action_group);
index 079bb14f91708f6443da52613f5a75127e830453..1c0dde58e0e5edb7be3121199e31664f7e9aaef6 100644 (file)
@@ -6761,8 +6761,8 @@ insert_row_clist (GtkWidget *widget, gpointer data)
 
   if (!style1)
     {
-      GdkColor col1;
-      GdkColor col2;
+      GdkColor col1 = { 0, };
+      GdkColor col2 = { 0, };
 
       col1.red   = 0;
       col1.green = 56000;
@@ -6887,8 +6887,8 @@ create_clist (GtkWidget *widget)
   GtkWidget *label;
 
   GtkStyle *style;
-  GdkColor col1;
-  GdkColor col2;
+  GdkColor col1 = { 0, };
+  GdkColor col2 = { 0, };
 
   if (!window)
     {
@@ -7204,8 +7204,8 @@ void change_style (GtkWidget *widget, GtkCTree *ctree)
   static GtkStyle *style2 = NULL;
 
   GtkCTreeNode *node;
-  GdkColor col1;
-  GdkColor col2;
+  GdkColor col1 = { 0, };
+  GdkColor col2 = { 0, };
 
   if (GTK_CLIST (ctree)->focus_row >= 0)
     node = GTK_CTREE_NODE