[Xfce4-commits] r30261 - in xfce4-settings/branches/migration-to-4ui: dialogs/appearance-settings dialogs/display-settings dialogs/keyboard-settings dialogs/mouse-settings xfce4-settings-editor xfce4-settings-helper xfce4-settings-manager xfsettingsd

Nick Schermer nick at xfce.org
Sat Jul 11 00:15:59 CEST 2009


Author: nick
Date: 2009-07-10 22:15:58 +0000 (Fri, 10 Jul 2009)
New Revision: 30261

Modified:
   xfce4-settings/branches/migration-to-4ui/dialogs/appearance-settings/main.c
   xfce4-settings/branches/migration-to-4ui/dialogs/display-settings/main.c
   xfce4-settings/branches/migration-to-4ui/dialogs/keyboard-settings/command-dialog.c
   xfce4-settings/branches/migration-to-4ui/dialogs/keyboard-settings/xfce-keyboard-settings.c
   xfce4-settings/branches/migration-to-4ui/dialogs/mouse-settings/main.c
   xfce4-settings/branches/migration-to-4ui/xfce4-settings-editor/main_window.c
   xfce4-settings/branches/migration-to-4ui/xfce4-settings-editor/main_window.h
   xfce4-settings/branches/migration-to-4ui/xfce4-settings-helper/accessibility.c
   xfce4-settings/branches/migration-to-4ui/xfce4-settings-helper/displays.c
   xfce4-settings/branches/migration-to-4ui/xfce4-settings-helper/keyboard-layout.c
   xfce4-settings/branches/migration-to-4ui/xfce4-settings-helper/keyboard-shortcuts.c
   xfce4-settings/branches/migration-to-4ui/xfce4-settings-helper/keyboards.c
   xfce4-settings/branches/migration-to-4ui/xfce4-settings-helper/pointers.c
   xfce4-settings/branches/migration-to-4ui/xfce4-settings-helper/workspaces.c
   xfce4-settings/branches/migration-to-4ui/xfce4-settings-helper/workspaces.h
   xfce4-settings/branches/migration-to-4ui/xfce4-settings-manager/xfce-settings-manager-dialog.c
   xfce4-settings/branches/migration-to-4ui/xfce4-settings-manager/xfce-settings-manager-dialog.h
   xfce4-settings/branches/migration-to-4ui/xfce4-settings-manager/xfce-text-renderer.c
   xfce4-settings/branches/migration-to-4ui/xfsettingsd/main.c
   xfce4-settings/branches/migration-to-4ui/xfsettingsd/registry.c
   xfce4-settings/branches/migration-to-4ui/xfsettingsd/registry.h
Log:
Fix a bunch of compiler warnings.


Modified: xfce4-settings/branches/migration-to-4ui/dialogs/appearance-settings/main.c
===================================================================
--- xfce4-settings/branches/migration-to-4ui/dialogs/appearance-settings/main.c	2009-07-10 22:15:28 UTC (rev 30260)
+++ xfce4-settings/branches/migration-to-4ui/dialogs/appearance-settings/main.c	2009-07-10 22:15:58 UTC (rev 30261)
@@ -623,9 +623,26 @@
     GtkCellRenderer  *renderer;
     GtkTreeSelection *icon_selection, *ui_selection;
     GdkPixbuf        *pixbuf;
+    GtkWidget *ui_theme_treeview;
+    GtkWidget *rgba_combo_box;
+    GtkWidget *caneditaccels_check_button;
+    GtkWidget *menu_images_check_button;
+    GtkWidget *button_images_check_button;
+    GtkWidget *fontname_button;
+    GtkWidget *icon_theme_treeview;
+    GtkWidget *toolbar_style_combo;
+    GtkWidget *antialias_check_button;
+    GtkWidget *custom_dpi_check;
+    GtkWidget *custom_dpi_spin;
+#ifdef ENABLE_SOUND_SETTINGS
+    GtkWidget *event_sounds_frame;
+    GtkWidget *enable_event_sounds_check_button;
+    GtkWidget *enable_input_feedback_sounds_button;
+#endif
+    GtkWidget *hinting_style_combo;
 
     /* Icon themes list */
-    GtkWidget *icon_theme_treeview = glade_xml_get_widget (gxml, "icon_theme_treeview");
+    icon_theme_treeview = glade_xml_get_widget (gxml, "icon_theme_treeview");
 
     list_store = gtk_list_store_new (N_THEME_COLUMNS, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);
     gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (list_store), COLUMN_THEME_DISPLAY_NAME, GTK_SORT_ASCENDING);
@@ -646,7 +663,7 @@
     g_signal_connect (G_OBJECT (icon_selection), "changed", G_CALLBACK (cb_icon_theme_tree_selection_changed), NULL);
 
     /* Gtk (UI) themes */
-    GtkWidget *ui_theme_treeview = glade_xml_get_widget (gxml, "gtk_theme_treeview");
+    ui_theme_treeview = glade_xml_get_widget (gxml, "gtk_theme_treeview");
 
     list_store = gtk_list_store_new (N_THEME_COLUMNS, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);
     gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (list_store), COLUMN_THEME_DISPLAY_NAME, GTK_SORT_ASCENDING);
@@ -667,7 +684,7 @@
     g_signal_connect (G_OBJECT (ui_selection), "changed", G_CALLBACK (cb_ui_theme_tree_selection_changed), NULL);
 
     /* Subpixel (rgba) hinting Combo */
-    GtkWidget *rgba_combo_box = glade_xml_get_widget (gxml, "xft_rgba_combo_box");
+    rgba_combo_box = glade_xml_get_widget (gxml, "xft_rgba_combo_box");
 
     list_store = gtk_list_store_new (N_RGBA_COLUMNS, GDK_TYPE_PIXBUF, G_TYPE_STRING);
 
@@ -706,27 +723,27 @@
     g_signal_connect (G_OBJECT (rgba_combo_box), "changed", G_CALLBACK (cb_rgba_style_combo_changed), NULL);
 
     /* Enable editable menu accelerators */
-    GtkWidget *caneditaccels_check_button = glade_xml_get_widget (gxml, "gtk_caneditaccels_check_button");
+    caneditaccels_check_button = glade_xml_get_widget (gxml, "gtk_caneditaccels_check_button");
     xfconf_g_property_bind (xsettings_channel, "/Gtk/CanChangeAccels", G_TYPE_BOOLEAN,
                             G_OBJECT (caneditaccels_check_button), "active");
 
     /* Show menu images */
-    GtkWidget *menu_images_check_button = glade_xml_get_widget (gxml, "gtk_menu_images_check_button");
+    menu_images_check_button = glade_xml_get_widget (gxml, "gtk_menu_images_check_button");
     xfconf_g_property_bind (xsettings_channel, "/Gtk/MenuImages", G_TYPE_BOOLEAN,
                             G_OBJECT (menu_images_check_button), "active");
 
     /* Show button images */
-    GtkWidget *button_images_check_button = glade_xml_get_widget (gxml, "gtk_button_images_check_button");
+    button_images_check_button = glade_xml_get_widget (gxml, "gtk_button_images_check_button");
     xfconf_g_property_bind (xsettings_channel, "/Gtk/ButtonImages", G_TYPE_BOOLEAN,
                             G_OBJECT (button_images_check_button), "active");
 
     /* Font name */
-    GtkWidget *fontname_button = glade_xml_get_widget (gxml, "gtk_fontname_button");
+    fontname_button = glade_xml_get_widget (gxml, "gtk_fontname_button");
     xfconf_g_property_bind (xsettings_channel,  "/Gtk/FontName", G_TYPE_STRING,
                             G_OBJECT (fontname_button), "font-name");
 
     /* Toolbar style */
-    GtkWidget *toolbar_style_combo = glade_xml_get_widget (gxml, "gtk_toolbar_style_combo_box");
+    toolbar_style_combo = glade_xml_get_widget (gxml, "gtk_toolbar_style_combo_box");
 
     list_store = gtk_list_store_new (1, G_TYPE_STRING);
     gtk_list_store_insert_with_values (list_store, NULL, 0, 0, _("Icons"), -1);
@@ -744,7 +761,7 @@
     g_signal_connect (G_OBJECT (toolbar_style_combo), "changed", G_CALLBACK(cb_toolbar_style_combo_changed), NULL);
 
     /* Hinting style */
-    GtkWidget *hinting_style_combo = glade_xml_get_widget (gxml, "xft_hinting_style_combo_box");
+    hinting_style_combo = glade_xml_get_widget (gxml, "xft_hinting_style_combo_box");
 
     list_store = gtk_list_store_new (1, G_TYPE_STRING);
     gtk_list_store_insert_with_values (list_store, NULL, 0, 0, _("None"), -1);
@@ -762,22 +779,22 @@
     g_signal_connect (G_OBJECT (hinting_style_combo), "changed", G_CALLBACK (cb_hinting_style_combo_changed), NULL);
 
     /* Hinting */
-    GtkWidget *antialias_check_button = glade_xml_get_widget (gxml, "xft_antialias_check_button");
+    antialias_check_button = glade_xml_get_widget (gxml, "xft_antialias_check_button");
     appearance_settings_dialog_channel_property_changed (xsettings_channel, "/Xft/Antialias", NULL, gxml);
     g_signal_connect (G_OBJECT (antialias_check_button), "toggled", G_CALLBACK (cb_antialias_check_button_toggled), NULL);
 
     /* DPI */
-    GtkWidget *custom_dpi_check = glade_xml_get_widget (gxml, "xft_custom_dpi_check_button");
-    GtkWidget *custom_dpi_spin = glade_xml_get_widget (gxml, "xft_custom_dpi_spin_button");
+    custom_dpi_check = glade_xml_get_widget (gxml, "xft_custom_dpi_check_button");
+    custom_dpi_spin = glade_xml_get_widget (gxml, "xft_custom_dpi_spin_button");
     appearance_settings_dialog_channel_property_changed (xsettings_channel, "/Xft/DPI", NULL, gxml);
     g_signal_connect (custom_dpi_check, "toggled", G_CALLBACK (cb_custom_dpi_check_button_toggled), custom_dpi_spin);
     g_signal_connect (custom_dpi_spin, "value-changed", G_CALLBACK (cb_custom_dpi_spin_button_changed), custom_dpi_check);
 
 #ifdef ENABLE_SOUND_SETTINGS
     /* Sounds */
-    GtkWidget *event_sounds_frame = glade_xml_get_widget (gxml, "event_sounds_frame");
-    GtkWidget *enable_event_sounds_check_button = glade_xml_get_widget (gxml, "enable_event_sounds_check_button");
-    GtkWidget *enable_input_feedback_sounds_button  = glade_xml_get_widget (gxml, "enable_input_feedback_sounds_button");
+    event_sounds_frame = glade_xml_get_widget (gxml, "event_sounds_frame");
+    enable_event_sounds_check_button = glade_xml_get_widget (gxml, "enable_event_sounds_check_button");
+    enable_input_feedback_sounds_button  = glade_xml_get_widget (gxml, "enable_input_feedback_sounds_button");
 
     gtk_widget_show (event_sounds_frame);
     g_signal_connect (G_OBJECT (enable_event_sounds_check_button),

Modified: xfce4-settings/branches/migration-to-4ui/dialogs/display-settings/main.c
===================================================================
--- xfce4-settings/branches/migration-to-4ui/dialogs/display-settings/main.c	2009-07-10 22:15:28 UTC (rev 30260)
+++ xfce4-settings/branches/migration-to-4ui/dialogs/display-settings/main.c	2009-07-10 22:15:58 UTC (rev 30261)
@@ -717,7 +717,7 @@
                 /* show an error dialog the version is too old */
                 dialog = gtk_message_dialog_new (NULL, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_NONE,
                                                  _("Failed to use the RandR extension"));
-                gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), error->message);
+                gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), "%s", error->message);
                 gtk_dialog_add_button (GTK_DIALOG (dialog), GTK_STOCK_QUIT, GTK_RESPONSE_CLOSE);
                 gtk_dialog_run (GTK_DIALOG (dialog));
                 gtk_widget_destroy (dialog);

Modified: xfce4-settings/branches/migration-to-4ui/dialogs/keyboard-settings/command-dialog.c
===================================================================
--- xfce4-settings/branches/migration-to-4ui/dialogs/keyboard-settings/command-dialog.c	2009-07-10 22:15:28 UTC (rev 30260)
+++ xfce4-settings/branches/migration-to-4ui/dialogs/keyboard-settings/command-dialog.c	2009-07-10 22:15:58 UTC (rev 30261)
@@ -32,8 +32,6 @@
 
 
 
-static void command_dialog_class_init      (CommandDialogClass *klass);
-static void command_dialog_init            (CommandDialog      *dialog);
 static void command_dialog_dispose         (GObject             *object);
 static void command_dialog_finalize        (GObject             *object);
 static void command_dialog_create_contents (CommandDialog      *dialog,
@@ -58,47 +56,15 @@
 
 
 
-static GObjectClass *command_dialog_parent_class = NULL;
+G_DEFINE_TYPE (CommandDialog, command_dialog, XFCE_TYPE_TITLED_DIALOG)
 
 
 
-GType
-command_dialog_get_type (void)
-{
-  static GType type = G_TYPE_INVALID;
-
-  if (G_UNLIKELY (type == G_TYPE_INVALID))
-    {
-      static const GTypeInfo info = 
-        {
-          sizeof (CommandDialogClass),
-          NULL,
-          NULL,
-          (GClassInitFunc) command_dialog_class_init,
-          NULL,
-          NULL,
-          sizeof (CommandDialog),
-          0,
-          (GInstanceInitFunc) command_dialog_init,
-          NULL,
-        };
-
-      type = g_type_register_static (XFCE_TYPE_TITLED_DIALOG, "CommandDialog", &info, 0);
-    }
-  
-  return type;
-}
-
-
-
 static void
 command_dialog_class_init (CommandDialogClass *klass)
 {
   GObjectClass *gobject_class;
 
-  /* Determine parent type class */
-  command_dialog_parent_class = g_type_class_peek_parent (klass);
-
   gobject_class = G_OBJECT_CLASS (klass);
   gobject_class->dispose = command_dialog_dispose;
   gobject_class->finalize = command_dialog_finalize;

Modified: xfce4-settings/branches/migration-to-4ui/dialogs/keyboard-settings/xfce-keyboard-settings.c
===================================================================
--- xfce4-settings/branches/migration-to-4ui/dialogs/keyboard-settings/xfce-keyboard-settings.c	2009-07-10 22:15:28 UTC (rev 30260)
+++ xfce4-settings/branches/migration-to-4ui/dialogs/keyboard-settings/xfce-keyboard-settings.c	2009-07-10 22:15:58 UTC (rev 30261)
@@ -94,8 +94,6 @@
 
 
 
-static void                      xfce_keyboard_settings_class_init            (XfceKeyboardSettingsClass *klass);
-static void                      xfce_keyboard_settings_init                  (XfceKeyboardSettings      *settings);
 static void                      xfce_keyboard_settings_constructed           (GObject                   *object);
 static void                      xfce_keyboard_settings_finalize              (GObject                   *object);
 static void                      xfce_keyboard_settings_get_property          (GObject                   *object,
@@ -204,39 +202,10 @@
 
 
 
-static GObjectClass *xfce_keyboard_settings_parent_class = NULL;
+G_DEFINE_TYPE (XfceKeyboardSettings, xfce_keyboard_settings, G_TYPE_OBJECT)
 
 
 
-GType
-xfce_keyboard_settings_get_type (void)
-{
-  static GType type = G_TYPE_INVALID;
-
-  if (G_UNLIKELY (type == G_TYPE_INVALID))
-    {
-      static const GTypeInfo info =
-      {
-        sizeof (XfceKeyboardSettingsClass),
-        NULL,
-        NULL,
-        (GClassInitFunc) xfce_keyboard_settings_class_init,
-        NULL,
-        NULL,
-        sizeof (XfceKeyboardSettings),
-        0,
-        (GInstanceInitFunc) xfce_keyboard_settings_init,
-        NULL,
-      };
-
-      type = g_type_register_static (G_TYPE_OBJECT, "XfceKeyboardSettings", &info, 0);
-    }
-
-  return type;
-}
-
-
-
 static void
 xfce_keyboard_settings_class_init (XfceKeyboardSettingsClass *klass)
 {
@@ -244,9 +213,6 @@
 
   g_type_class_add_private (klass, sizeof (XfceKeyboardSettingsPrivate));
 
-  /* Determine the parent type class */
-  xfce_keyboard_settings_parent_class = g_type_class_peek_parent (klass);
-
   gobject_class = G_OBJECT_CLASS (klass);
 #if GLIB_CHECK_VERSION (2,14,0)
   gobject_class->constructed = xfce_keyboard_settings_constructed;

Modified: xfce4-settings/branches/migration-to-4ui/dialogs/mouse-settings/main.c
===================================================================
--- xfce4-settings/branches/migration-to-4ui/dialogs/mouse-settings/main.c	2009-07-10 22:15:28 UTC (rev 30260)
+++ xfce4-settings/branches/migration-to-4ui/dialogs/mouse-settings/main.c	2009-07-10 22:15:58 UTC (rev 30261)
@@ -84,7 +84,7 @@
 
 #ifdef HAS_DEVICE_HOTPLUGGING
 /* event id for device add/remove */
-gint device_presence_event_type = 0;
+static gint device_presence_event_type = 0;
 #endif
 
 /* option entries */

Modified: xfce4-settings/branches/migration-to-4ui/xfce4-settings-editor/main_window.c
===================================================================
--- xfce4-settings/branches/migration-to-4ui/xfce4-settings-editor/main_window.c	2009-07-10 22:15:28 UTC (rev 30260)
+++ xfce4-settings/branches/migration-to-4ui/xfce4-settings-editor/main_window.c	2009-07-10 22:15:58 UTC (rev 30261)
@@ -35,6 +35,7 @@
 #include <libxfcegui4/libxfcegui4.h>
 
 #include "xfce4-settings-editor_glade.h"
+#include "main_window.h"
 
 static GladeXML *gxml_main_window = NULL;
 static XfconfChannel *current_channel = NULL;
@@ -89,7 +90,7 @@
 #endif
 
 GtkDialog *
-xfce4_settings_editor_main_window_new()
+xfce4_settings_editor_main_window_new(void)
 {
     GtkWidget *dialog;
     GtkWidget *channel_treeview;
@@ -219,12 +220,15 @@
     GValue child_type = {0,};
     GValue child_locked = {0,};
 
+    GHashTable *hash_table;
+    gchar **components;
+
     g_value_init (&child_name, G_TYPE_STRING);
     g_value_init (&child_locked, G_TYPE_BOOLEAN);
     g_value_init (&child_type, G_TYPE_STRING);
     g_value_init (&child_value, G_TYPE_STRING);
 
-    GHashTable *hash_table = xfconf_channel_get_properties (channel, NULL);
+    hash_table = xfconf_channel_get_properties (channel, NULL);
 
     if (hash_table != NULL)
     {
@@ -238,7 +242,7 @@
         {
             key = _keys->data;
             value = g_hash_table_lookup (hash_table, key);
-            gchar **components = g_strsplit (key, "/", 0);
+            components = g_strsplit (key, "/", 0);
 
             /* components[0] will be empty because properties start with '/'*/
             for (i = 1; components[i]; ++i)

Modified: xfce4-settings/branches/migration-to-4ui/xfce4-settings-editor/main_window.h
===================================================================
--- xfce4-settings/branches/migration-to-4ui/xfce4-settings-editor/main_window.h	2009-07-10 22:15:28 UTC (rev 30260)
+++ xfce4-settings/branches/migration-to-4ui/xfce4-settings-editor/main_window.h	2009-07-10 22:15:58 UTC (rev 30261)
@@ -18,4 +18,4 @@
 
 
 GtkDialog *
-xfce4_settings_editor_main_window_new();
+xfce4_settings_editor_main_window_new(void);

Modified: xfce4-settings/branches/migration-to-4ui/xfce4-settings-helper/accessibility.c
===================================================================
--- xfce4-settings/branches/migration-to-4ui/xfce4-settings-helper/accessibility.c	2009-07-10 22:15:28 UTC (rev 30260)
+++ xfce4-settings/branches/migration-to-4ui/xfce4-settings-helper/accessibility.c	2009-07-10 22:15:58 UTC (rev 30261)
@@ -54,8 +54,6 @@
 
 
 
-static void            xfce_accessibility_helper_class_init                     (XfceAccessibilityHelperClass *klass);
-static void            xfce_accessibility_helper_init                           (XfceAccessibilityHelper      *helper);
 static void            xfce_accessibility_helper_finalize                       (GObject                      *object);
 static void            xfce_accessibility_helper_set_xkb                        (XfceAccessibilityHelper      *helper,
                                                                                  gulong                        mask);

Modified: xfce4-settings/branches/migration-to-4ui/xfce4-settings-helper/displays.c
===================================================================
--- xfce4-settings/branches/migration-to-4ui/xfce4-settings-helper/displays.c	2009-07-10 22:15:28 UTC (rev 30260)
+++ xfce4-settings/branches/migration-to-4ui/xfce4-settings-helper/displays.c	2009-07-10 22:15:58 UTC (rev 30261)
@@ -43,8 +43,6 @@
 
 #undef HAS_RANDR_ONE_POINT_TWO
 
-static void            xfce_displays_helper_class_init                     (XfceDisplaysHelperClass *klass);
-static void            xfce_displays_helper_init                           (XfceDisplaysHelper      *helper);
 static void            xfce_displays_helper_finalize                       (GObject                 *object);
 static void            xfce_displays_helper_channel_property_changed       (XfconfChannel           *channel,
                                                                             const gchar             *property_name,

Modified: xfce4-settings/branches/migration-to-4ui/xfce4-settings-helper/keyboard-layout.c
===================================================================
--- xfce4-settings/branches/migration-to-4ui/xfce4-settings-helper/keyboard-layout.c	2009-07-10 22:15:28 UTC (rev 30260)
+++ xfce4-settings/branches/migration-to-4ui/xfce4-settings-helper/keyboard-layout.c	2009-07-10 22:15:58 UTC (rev 30261)
@@ -44,8 +44,6 @@
 
 #include "keyboard-layout.h"
 
-static void xfce_keyboard_layout_helper_class_init                (XfceKeyboardLayoutHelperClass *klass);
-static void xfce_keyboard_layout_helper_init                      (XfceKeyboardLayoutHelper      *helper);
 static void xfce_keyboard_layout_helper_finalize                  (GObject                       *object);
 static void xfce_keyboard_layout_helper_set_model                 (XfceKeyboardLayoutHelper      *helper);
 static void xfce_keyboard_layout_helper_set_layout                (XfceKeyboardLayoutHelper      *helper);

Modified: xfce4-settings/branches/migration-to-4ui/xfce4-settings-helper/keyboard-shortcuts.c
===================================================================
--- xfce4-settings/branches/migration-to-4ui/xfce4-settings-helper/keyboard-shortcuts.c	2009-07-10 22:15:28 UTC (rev 30260)
+++ xfce4-settings/branches/migration-to-4ui/xfce4-settings-helper/keyboard-shortcuts.c	2009-07-10 22:15:58 UTC (rev 30261)
@@ -54,8 +54,6 @@
 
 
 
-static void            xfce_keyboard_shortcuts_helper_class_init         (XfceKeyboardShortcutsHelperClass *klass);
-static void            xfce_keyboard_shortcuts_helper_init               (XfceKeyboardShortcutsHelper      *helper);
 static void            xfce_keyboard_shortcuts_helper_finalize           (GObject                          *object);
 static void            xfce_keyboard_shortcuts_helper_get_property       (GObject                          *object,
                                                                           guint                             prop_id,
@@ -96,47 +94,15 @@
 
 
 
-static GObjectClass *xfce_keyboard_shortcuts_helper_parent_class = NULL;
+G_DEFINE_TYPE (XfceKeyboardShortcutsHelper, xfce_keyboard_shortcuts_helper, G_TYPE_OBJECT)
 
 
 
-GType
-xfce_keyboard_shortcuts_helper_get_type (void)
-{
-  static GType type = G_TYPE_INVALID;
-
-  if (G_UNLIKELY (type == G_TYPE_INVALID))
-    {
-      static const GTypeInfo info =
-      {
-        sizeof (XfceKeyboardShortcutsHelperClass),
-        NULL,
-        NULL,
-        (GClassInitFunc) xfce_keyboard_shortcuts_helper_class_init,
-        NULL,
-        NULL,
-        sizeof (XfceKeyboardShortcutsHelper),
-        0,
-        (GInstanceInitFunc) xfce_keyboard_shortcuts_helper_init,
-        NULL,
-      };
-
-      type = g_type_register_static (G_TYPE_OBJECT, "XfceKeyboardShortcutsHelper", &info, 0);
-    }
-
-  return type;
-}
-
-
-
 static void
 xfce_keyboard_shortcuts_helper_class_init (XfceKeyboardShortcutsHelperClass *klass)
 {
   GObjectClass *gobject_class;
 
-  /* Determine the parent type class */
-  xfce_keyboard_shortcuts_helper_parent_class = g_type_class_peek_parent (klass);
-
   gobject_class = G_OBJECT_CLASS (klass);
   gobject_class->finalize = xfce_keyboard_shortcuts_helper_finalize;
   gobject_class->get_property = xfce_keyboard_shortcuts_helper_get_property;

Modified: xfce4-settings/branches/migration-to-4ui/xfce4-settings-helper/keyboards.c
===================================================================
--- xfce4-settings/branches/migration-to-4ui/xfce4-settings-helper/keyboards.c	2009-07-10 22:15:28 UTC (rev 30260)
+++ xfce4-settings/branches/migration-to-4ui/xfce4-settings-helper/keyboards.c	2009-07-10 22:15:58 UTC (rev 30261)
@@ -44,8 +44,6 @@
 
 
 
-static void xfce_keyboards_helper_class_init                (XfceKeyboardsHelperClass *klass);
-static void xfce_keyboards_helper_init                      (XfceKeyboardsHelper      *helper);
 static void xfce_keyboards_helper_finalize                  (GObject                  *object);
 static void xfce_keyboards_helper_set_auto_repeat_mode      (XfceKeyboardsHelper      *helper);
 static void xfce_keyboards_helper_set_repeat_rate           (XfceKeyboardsHelper      *helper);

Modified: xfce4-settings/branches/migration-to-4ui/xfce4-settings-helper/pointers.c
===================================================================
--- xfce4-settings/branches/migration-to-4ui/xfce4-settings-helper/pointers.c	2009-07-10 22:15:28 UTC (rev 30260)
+++ xfce4-settings/branches/migration-to-4ui/xfce4-settings-helper/pointers.c	2009-07-10 22:15:58 UTC (rev 30261)
@@ -54,8 +54,6 @@
 
 
 
-static void             xfce_pointers_helper_class_init                     (XfcePointersHelperClass *klass);
-static void             xfce_pointers_helper_init                           (XfcePointersHelper      *helper);
 static void             xfce_pointers_helper_finalize                       (GObject                 *object);
 static void             xfce_pointers_helper_change_button_mapping_swap     (guchar                  *buttonmap,
                                                                              gshort                   num_buttons,

Modified: xfce4-settings/branches/migration-to-4ui/xfce4-settings-helper/workspaces.c
===================================================================
--- xfce4-settings/branches/migration-to-4ui/xfce4-settings-helper/workspaces.c	2009-07-10 22:15:28 UTC (rev 30260)
+++ xfce4-settings/branches/migration-to-4ui/xfce4-settings-helper/workspaces.c	2009-07-10 22:15:58 UTC (rev 30261)
@@ -47,8 +47,6 @@
     GObjectClass parent;
 } XfceWorkspacesHelperClass;
 
-static void xfce_workspaces_helper_class_init(XfceWorkspacesHelperClass *klass);
-static void xfce_workspaces_helper_init(XfceWorkspacesHelper *helper);
 static void xfce_workspaces_helper_finalize(GObject *obj);
 
 static void xfce_workspaces_helper_set_names_prop(XfceWorkspacesHelper *helper,
@@ -108,7 +106,7 @@
         n_workspaces = wnck_screen_get_workspace_count(helper->screens[s]);
         if(G_UNLIKELY(!names))
             names = g_new0(gchar *, n_workspaces + 1);
-        else if(g_strv_length(names) < n_workspaces)
+        else if(g_strv_length(names) < (guint)n_workspaces)
             names = g_renew(gchar *, names, n_workspaces + 1);
 
         for(w = g_strv_length(names); w < n_workspaces; ++w) {
@@ -204,7 +202,7 @@
 {
     XfceWorkspacesHelper *helper = user_data;
     GPtrArray *names_arr;
-    gint s, i, n_workspaces;
+    guint s,i, n_workspaces;
     gchar **names;
     GdkDisplay *display;
     GdkScreen *screen;

Modified: xfce4-settings/branches/migration-to-4ui/xfce4-settings-helper/workspaces.h
===================================================================
--- xfce4-settings/branches/migration-to-4ui/xfce4-settings-helper/workspaces.h	2009-07-10 22:15:28 UTC (rev 30260)
+++ xfce4-settings/branches/migration-to-4ui/xfce4-settings-helper/workspaces.h	2009-07-10 22:15:58 UTC (rev 30261)
@@ -28,7 +28,7 @@
 
 typedef struct _XfceWorkspacesHelper  XfceWorkspacesHelper;
 
-GType xfce_workspaces_helper_get_type() G_GNUC_CONST;
+GType xfce_workspaces_helper_get_type(void) G_GNUC_CONST;
 
 G_END_DECLS
 

Modified: xfce4-settings/branches/migration-to-4ui/xfce4-settings-manager/xfce-settings-manager-dialog.c
===================================================================
--- xfce4-settings/branches/migration-to-4ui/xfce4-settings-manager/xfce-settings-manager-dialog.c	2009-07-10 22:15:28 UTC (rev 30260)
+++ xfce4-settings/branches/migration-to-4ui/xfce4-settings-manager/xfce-settings-manager-dialog.c	2009-07-10 22:15:58 UTC (rev 30261)
@@ -98,8 +98,6 @@
     N_COLS
 };
 
-static void xfce_settings_manager_dialog_class_init(XfceSettingsManagerDialogClass *klass);
-static void xfce_settings_manager_dialog_init(XfceSettingsManagerDialog *dialog);
 static void xfce_settings_manager_dialog_finalize(GObject *obj);
 
 static void xfce_settings_manager_dialog_create_liststore(XfceSettingsManagerDialog *dialog);
@@ -834,7 +832,7 @@
 
 
 GtkWidget *
-xfce_settings_manager_dialog_new()
+xfce_settings_manager_dialog_new(void)
 {
     return g_object_new(XFCE_TYPE_SETTINGS_MANAGER_DIALOG, NULL);
 }

Modified: xfce4-settings/branches/migration-to-4ui/xfce4-settings-manager/xfce-settings-manager-dialog.h
===================================================================
--- xfce4-settings/branches/migration-to-4ui/xfce4-settings-manager/xfce-settings-manager-dialog.h	2009-07-10 22:15:28 UTC (rev 30260)
+++ xfce4-settings/branches/migration-to-4ui/xfce4-settings-manager/xfce-settings-manager-dialog.h	2009-07-10 22:15:58 UTC (rev 30261)
@@ -31,9 +31,9 @@
 
 typedef struct _XfceSettingsManagerDialog  XfceSettingsManagerDialog;
 
-GType xfce_settings_manager_dialog_get_type() G_GNUC_CONST;
+GType xfce_settings_manager_dialog_get_type(void) G_GNUC_CONST;
 
-GtkWidget *xfce_settings_manager_dialog_new();
+GtkWidget *xfce_settings_manager_dialog_new(void);
 void       xfce_settings_manager_dialog_show_dialog(XfceSettingsManagerDialog *dialog,
                                                     const gchar *dialog_name);
 

Modified: xfce4-settings/branches/migration-to-4ui/xfce4-settings-manager/xfce-text-renderer.c
===================================================================
--- xfce4-settings/branches/migration-to-4ui/xfce4-settings-manager/xfce-text-renderer.c	2009-07-10 22:15:28 UTC (rev 30260)
+++ xfce4-settings/branches/migration-to-4ui/xfce4-settings-manager/xfce-text-renderer.c	2009-07-10 22:15:58 UTC (rev 30261)
@@ -53,8 +53,6 @@
 
 
 
-static void xfce_text_renderer_class_init   (XfceTextRendererClass *klass);
-static void xfce_text_renderer_init         (XfceTextRenderer      *text_renderer);
 static void xfce_text_renderer_finalize     (GObject               *object);
 static void xfce_text_renderer_get_property (GObject               *object,
                                              guint                  prop_id,
@@ -110,48 +108,16 @@
 
 
 
-static GObjectClass *xfce_text_renderer_parent_class;
+G_DEFINE_TYPE (XfceTextRenderer, xfce_text_renderer, GTK_TYPE_CELL_RENDERER)
 
 
 
-GType
-xfce_text_renderer_get_type (void)
-{
-  static GType type = G_TYPE_INVALID;
-
-  if (G_UNLIKELY (type == G_TYPE_INVALID))
-    {
-      static const GTypeInfo info =
-      {
-        sizeof (XfceTextRendererClass),
-        NULL,
-        NULL,
-        (GClassInitFunc) xfce_text_renderer_class_init,
-        NULL,
-        NULL,
-        sizeof (XfceTextRenderer),
-        0,
-        (GInstanceInitFunc) xfce_text_renderer_init,
-        NULL,
-      };
-
-      type = g_type_register_static (GTK_TYPE_CELL_RENDERER, I_("XfceTextRenderer"), &info, 0);
-    }
-
-  return type;
-}
-
-
-
 static void
 xfce_text_renderer_class_init (XfceTextRendererClass *klass)
 {
   GtkCellRendererClass *gtkcell_renderer_class;
   GObjectClass         *gobject_class;
 
-  /* determine the parent type class */
-  xfce_text_renderer_parent_class = g_type_class_peek_parent (klass);
-
   gobject_class = G_OBJECT_CLASS (klass);
   gobject_class->finalize = xfce_text_renderer_finalize;
   gobject_class->get_property = xfce_text_renderer_get_property;
@@ -461,7 +427,7 @@
  *
  * Return value: a #PangoAttrList for underlining text using a single line.
  **/
-PangoAttrList*
+static PangoAttrList*
 xfce_pango_attr_list_underline_single (void)
 {
   static PangoAttrList *attr_list = NULL;

Modified: xfce4-settings/branches/migration-to-4ui/xfsettingsd/main.c
===================================================================
--- xfce4-settings/branches/migration-to-4ui/xfsettingsd/main.c	2009-07-10 22:15:28 UTC (rev 30260)
+++ xfce4-settings/branches/migration-to-4ui/xfsettingsd/main.c	2009-07-10 22:15:58 UTC (rev 30261)
@@ -68,7 +68,7 @@
 };
 
 
-GdkFilterReturn
+static GdkFilterReturn
 manager_event_filter (GdkXEvent *xevent,
                       GdkEvent *event,
                       gpointer data)
@@ -96,7 +96,7 @@
  *
  * Return value: TRUE if an XSETTINGS daemon is already running
  */
-gboolean
+static gboolean
 settings_daemon_check_running (Display *display, gint screen)
 {
     Atom atom;

Modified: xfce4-settings/branches/migration-to-4ui/xfsettingsd/registry.c
===================================================================
--- xfce4-settings/branches/migration-to-4ui/xfsettingsd/registry.c	2009-07-10 22:15:28 UTC (rev 30260)
+++ xfce4-settings/branches/migration-to-4ui/xfsettingsd/registry.c	2009-07-10 22:15:58 UTC (rev 30261)
@@ -445,12 +445,14 @@
 {
     guchar *buffer, *pos;
     gint buf_len;
-
     gint prop_count = 0;
+    XSettingsRegistryEntry *entry = properties;
+    const gchar *value, *val;
+    gint name_len, value_len, str_length;
+    gint dpi;
+    
     registry->priv->last_change_serial = registry->priv->serial;
 
-    XSettingsRegistryEntry *entry = properties;
-
     buf_len = 12;
 
     /** Calculate buffer size */
@@ -467,7 +469,7 @@
             case G_TYPE_STRING:
                 {
                     buf_len += 4;
-                    const gchar *value = g_value_get_string(&entry->value);
+                    value = g_value_get_string(&entry->value);
                     if(value)
                     {
                         buf_len += XSETTINGS_PAD(strlen(value), 4);
@@ -501,9 +503,6 @@
     entry = properties;
     for(; entry->name != NULL; ++entry)
     {
-        gint name_len, value_len = 0, str_length;
-
-
         name_len = XSETTINGS_PAD(strlen(entry->name), 4);
         value_len = 0;
 
@@ -516,7 +515,7 @@
             case G_TYPE_STRING:
                 *pos++ = 1; // String 
                 {
-                    const gchar *value = g_value_get_string(&entry->value);
+                    value = g_value_get_string(&entry->value);
                     if(value)
                     {
                         value_len = XSETTINGS_PAD(strlen(value), 4);
@@ -553,7 +552,7 @@
         {
             case G_TYPE_STRING:
                 {
-                    const gchar *val = g_value_get_string(&entry->value);
+                    val = g_value_get_string(&entry->value);
 
                     if (val)
                     {
@@ -584,7 +583,7 @@
                  * this a bit more. */
                 if (strcmp (entry->name, "Xft/DPI") == 0)
                 {
-                    gint dpi = g_value_get_int (&entry->value);
+                    dpi = g_value_get_int (&entry->value);
 
                     if (dpi < 0)
                     {

Modified: xfce4-settings/branches/migration-to-4ui/xfsettingsd/registry.h
===================================================================
--- xfce4-settings/branches/migration-to-4ui/xfsettingsd/registry.h	2009-07-10 22:15:28 UTC (rev 30260)
+++ xfce4-settings/branches/migration-to-4ui/xfsettingsd/registry.h	2009-07-10 22:15:58 UTC (rev 30261)
@@ -72,7 +72,7 @@
     GObjectClass parent_class;
 };
 
-GType xsettings_registry_get_type();
+GType xsettings_registry_get_type(void);
 
 XSettingsRegistry *
 xsettings_registry_new (XfconfChannel *channel, Display *dpy, gint screen);




More information about the Xfce4-commits mailing list