diff options
-rw-r--r-- | accessx-status/src/applet.c | 26 | ||||
-rw-r--r-- | battstat/battstat-upower.c | 2 | ||||
-rw-r--r-- | battstat/battstat_applet.c | 19 | ||||
-rw-r--r-- | battstat/power-management.c | 10 | ||||
-rw-r--r-- | charpick/charpick.c | 26 | ||||
-rw-r--r-- | charpick/properties.c | 34 | ||||
-rw-r--r-- | command/src/command.c | 35 | ||||
-rw-r--r-- | cpufreq/src/cpufreq-applet.c | 22 | ||||
-rw-r--r-- | cpufreq/src/cpufreq-popup.c | 4 | ||||
-rw-r--r-- | cpufreq/src/cpufreq-prefs.c | 28 | ||||
-rw-r--r-- | cpufreq/src/cpufreq-utils.c | 6 | ||||
-rw-r--r-- | drivemount/src/drive-button.c | 21 | ||||
-rw-r--r-- | geyes/src/geyes.c | 5 | ||||
-rw-r--r-- | geyes/src/themes.c | 2 | ||||
-rw-r--r-- | mateweather/src/mateweather-applet.c | 37 | ||||
-rw-r--r-- | mateweather/src/mateweather-pref.c | 4 | ||||
-rw-r--r-- | multiload/src/load-graph.c | 12 | ||||
-rw-r--r-- | multiload/src/main.c | 20 | ||||
-rw-r--r-- | stickynotes/stickynotes.c | 155 | ||||
-rw-r--r-- | stickynotes/stickynotes_applet_callbacks.c | 9 | ||||
-rw-r--r-- | timerapplet/src/timerapplet.c | 21 | ||||
-rw-r--r-- | trashapplet/src/trashapplet.c | 2 |
22 files changed, 278 insertions, 222 deletions
diff --git a/accessx-status/src/applet.c b/accessx-status/src/applet.c index 4101bb61..cba2cb86 100644 --- a/accessx-status/src/applet.c +++ b/accessx-status/src/applet.c @@ -143,8 +143,7 @@ help_cb (GtkAction* action, _("There was an error launching the help viewer: %s"), error->message); - g_signal_connect (G_OBJECT (dialog), - "response", + g_signal_connect (dialog, "response", G_CALLBACK (gtk_widget_destroy), NULL); @@ -200,8 +199,7 @@ dialog_cb (GtkAction* action, _("There was an error launching the keyboard preferences dialog: %s"), error->message); - g_signal_connect (G_OBJECT (dialog), - "response", + g_signal_connect (dialog, "response", G_CALLBACK (gtk_widget_destroy), NULL); @@ -1295,8 +1293,7 @@ popup_error_dialog (AccessxStatusApplet* sapplet) _("Error: %s"), error_txt); - g_signal_connect (G_OBJECT (dialog), - "response", + g_signal_connect (dialog, "response", G_CALLBACK (gtk_widget_destroy), NULL); @@ -1626,8 +1623,7 @@ accessx_status_applet_fill (MatePanelApplet* applet) if (!gtk_widget_get_realized (sapplet->box)) { - g_signal_connect_after (G_OBJECT (sapplet->box), - "realize", + g_signal_connect_after (sapplet->box, "realize", G_CALLBACK (accessx_status_applet_realize), sapplet); } @@ -1638,18 +1634,16 @@ accessx_status_applet_fill (MatePanelApplet* applet) } g_object_connect (sapplet->applet, - "signal::destroy", accessx_status_applet_destroy, sapplet, - "signal::change_orient", accessx_status_applet_reorient, sapplet, - "signal::change_size", accessx_status_applet_resize, sapplet, - NULL); + "signal::destroy", accessx_status_applet_destroy, sapplet, + "signal::change_orient", accessx_status_applet_reorient, sapplet, + "signal::change_size", accessx_status_applet_resize, sapplet, + NULL); - g_signal_connect (sapplet->applet, - "button_press_event", + g_signal_connect (sapplet->applet, "button_press_event", G_CALLBACK (button_press_cb), sapplet); - g_signal_connect (sapplet->applet, - "key_press_event", + g_signal_connect (sapplet->applet, "key_press_event", G_CALLBACK (key_press_cb), sapplet); diff --git a/battstat/battstat-upower.c b/battstat/battstat-upower.c index 788adfd4..da830c2b 100644 --- a/battstat/battstat-upower.c +++ b/battstat/battstat-upower.c @@ -318,7 +318,7 @@ error_dialog (const char *fmt , ...) dialog = gtk_message_dialog_new (NULL, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, "%s", str); - g_signal_connect_swapped (G_OBJECT (dialog), "response", + g_signal_connect_swapped (dialog, "response", G_CALLBACK (gtk_widget_destroy), G_OBJECT (dialog)); diff --git a/battstat/battstat_applet.c b/battstat/battstat_applet.c index d2d29134..ce1598dc 100644 --- a/battstat/battstat_applet.c +++ b/battstat/battstat_applet.c @@ -153,7 +153,7 @@ battstat_error_dialog (GtkWidget *applet, gtk_window_set_screen (GTK_WINDOW (dialog), gtk_widget_get_screen (GTK_WIDGET (applet))); - g_signal_connect_swapped (G_OBJECT (dialog), "response", + g_signal_connect_swapped (dialog, "response", G_CALLBACK (gtk_widget_destroy), G_OBJECT (dialog)); @@ -276,10 +276,9 @@ battery_full_dialog (GtkWidget *applet) "gtk-ok", GTK_RESPONSE_ACCEPT, NULL); - g_signal_connect_swapped (G_OBJECT (dialog), - "response", + g_signal_connect_swapped (dialog, "response", G_CALLBACK (gtk_widget_destroy), - G_OBJECT (dialog)); + dialog); gtk_container_set_border_width (GTK_CONTAINER (dialog), 6); hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6); @@ -438,8 +437,7 @@ battery_low_dialog (ProgressData *battery, gtk_dialog_set_default_response (GTK_DIALOG (battery->battery_low_dialog), GTK_RESPONSE_ACCEPT); - g_signal_connect_swapped (G_OBJECT (battery->battery_low_dialog), - "response", + g_signal_connect_swapped (battery->battery_low_dialog, "response", G_CALLBACK (battery_low_dialog_destroy), battery); @@ -1091,18 +1089,15 @@ create_layout (ProgressData *battstat) gtk_widget_show_all (battstat->applet); /* Attach all sorts of signals to the applet. */ - g_signal_connect (G_OBJECT (battstat->applet), - "destroy", + g_signal_connect (battstat->applet, "destroy", G_CALLBACK (destroy_applet), battstat); - g_signal_connect (battstat->applet, - "change_orient", + g_signal_connect (battstat->applet, "change_orient", G_CALLBACK (change_orient), battstat); - g_signal_connect (battstat->applet, - "size_allocate", + g_signal_connect (battstat->applet, "size_allocate", G_CALLBACK (size_allocate), battstat); diff --git a/battstat/power-management.c b/battstat/power-management.c index 8a19aed2..5c4145c6 100644 --- a/battstat/power-management.c +++ b/battstat/power-management.c @@ -122,32 +122,32 @@ initialise_test (void) gtk_box_pack_start (box, gtk_label_new ("percent"), TRUE, TRUE, 0); w = gtk_spin_button_new_with_range (-1.0, 100.0, 1); gtk_spin_button_set_value (GTK_SPIN_BUTTON (w), 50.0); - g_signal_connect (G_OBJECT (w), "value-changed", + g_signal_connect (w, "value-changed", G_CALLBACK (test_update_integer), &test_status.percent); gtk_box_pack_start (box, w, TRUE, TRUE, 0); gtk_box_pack_start (box, gtk_label_new ("minutes"), TRUE, TRUE, 0); w = gtk_spin_button_new_with_range (-1.0, 1000.0, 1); gtk_spin_button_set_value (GTK_SPIN_BUTTON (w), 180.0); - g_signal_connect (G_OBJECT (w), "value-changed", + g_signal_connect (w, "value-changed", G_CALLBACK (test_update_integer), &test_status.minutes); gtk_box_pack_start (box, w, TRUE, TRUE, 0); w = gtk_toggle_button_new_with_label ("on_ac_power"); - g_signal_connect (G_OBJECT (w), "toggled", + g_signal_connect (w, "toggled", G_CALLBACK (test_update_boolean), &test_status.on_ac_power); gtk_box_pack_start (box, w, TRUE, TRUE, 0); w = gtk_toggle_button_new_with_label ("charging"); - g_signal_connect (G_OBJECT (w), "toggled", + g_signal_connect (w, "toggled", G_CALLBACK (test_update_boolean), &test_status.charging); gtk_box_pack_start (box, w, TRUE, TRUE, 0); w = gtk_toggle_button_new_with_label ("present"); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (w), TRUE); - g_signal_connect (G_OBJECT (w), "toggled", + g_signal_connect (w, "toggled", G_CALLBACK (test_update_boolean), &test_status.present); gtk_box_pack_start (box, w, TRUE, TRUE, 0); diff --git a/charpick/charpick.c b/charpick/charpick.c index 696d7067..6991b34f 100644 --- a/charpick/charpick.c +++ b/charpick/charpick.c @@ -308,7 +308,7 @@ populate_menu (charpick_data *curr_data) group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menuitem)); gtk_widget_show (menuitem); g_object_set_data (G_OBJECT (menuitem), "string", string); - g_signal_connect (G_OBJECT (menuitem), "activate", + g_signal_connect (menuitem, "activate", G_CALLBACK (menuitem_activated), curr_data); gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem); @@ -437,11 +437,11 @@ build_table (charpick_data *p_curr_data) force_no_button_padding (button); gtk_box_pack_start (GTK_BOX (box), button, TRUE, TRUE, 0); - g_signal_connect (G_OBJECT (button), "clicked", + g_signal_connect (button, "clicked", G_CALLBACK (chooser_button_clicked), p_curr_data); - g_signal_connect (G_OBJECT (button), "button_press_event", + g_signal_connect (button, "button_press_event", G_CALLBACK (button_press_hack), p_curr_data->applet); } @@ -488,11 +488,11 @@ build_table (charpick_data *p_curr_data) g_object_set_data (G_OBJECT (toggle_button[i]), "unichar", GINT_TO_POINTER (g_utf8_get_char (label))); - g_signal_connect (G_OBJECT (toggle_button[i]), "toggled", + g_signal_connect (toggle_button[i], "toggled", G_CALLBACK (toggle_button_toggled_cb), p_curr_data); - g_signal_connect (G_OBJECT (toggle_button[i]), "button_press_event", + g_signal_connect (toggle_button[i], "button_press_event", G_CALLBACK (button_press_hack), p_curr_data->applet); } @@ -774,7 +774,7 @@ charpicker_applet_fill (MatePanelApplet *applet) || (orientation == MATE_PANEL_APPLET_ORIENT_RIGHT); build_table (curr_data); - g_signal_connect (G_OBJECT (curr_data->applet), "key_press_event", + g_signal_connect (curr_data->applet, "key_press_event", G_CALLBACK (key_press_event), curr_data); utf8_atom = gdk_atom_intern ("UTF8_STRING", FALSE); @@ -787,24 +787,24 @@ charpicker_applet_fill (MatePanelApplet *applet) GDK_SELECTION_CLIPBOARD, utf8_atom, 0); - g_signal_connect (G_OBJECT (curr_data->applet), "selection_get", - G_CALLBACK (charpick_selection_handler), - curr_data); + g_signal_connect (curr_data->applet, "selection_get", + G_CALLBACK (charpick_selection_handler), + curr_data); - g_signal_connect (G_OBJECT (curr_data->applet), "selection_clear_event", + g_signal_connect (curr_data->applet, "selection_clear_event", G_CALLBACK (selection_clear_cb), curr_data); make_applet_accessible (GTK_WIDGET (applet)); /* session save signal */ - g_signal_connect (G_OBJECT (applet), "change_orient", + g_signal_connect (applet, "change_orient", G_CALLBACK (applet_change_orient), curr_data); - g_signal_connect (G_OBJECT (applet), "size_allocate", + g_signal_connect (applet, "size_allocate", G_CALLBACK (applet_size_allocate), curr_data); - g_signal_connect (G_OBJECT (applet), "destroy", + g_signal_connect (applet, "destroy", G_CALLBACK (applet_destroy), curr_data); gtk_widget_show_all (GTK_WIDGET (applet)); diff --git a/charpick/properties.c b/charpick/properties.c index 66c13a68..f0693115 100644 --- a/charpick/properties.c +++ b/charpick/properties.c @@ -224,13 +224,11 @@ add_palette (GtkButton *buttonk, if (curr_data->add_edit_dialog == NULL) { add_edit_dialog_create (curr_data, NULL, _("Add Palette")); - g_signal_connect (curr_data->add_edit_dialog, - "response", + g_signal_connect (curr_data->add_edit_dialog, "response", G_CALLBACK (add_palette_cb), curr_data); - g_signal_connect (curr_data->add_edit_dialog, - "destroy", + g_signal_connect (curr_data->add_edit_dialog, "destroy", G_CALLBACK (gtk_widget_destroyed), &curr_data->add_edit_dialog); @@ -262,13 +260,11 @@ edit_palette (GtkButton *button, add_edit_dialog_create (curr_data, charlist, _("Edit Palette")); - g_signal_connect (curr_data->add_edit_dialog, - "response", + g_signal_connect (curr_data->add_edit_dialog, "response", G_CALLBACK (edit_palette_cb), curr_data); - g_signal_connect (curr_data->add_edit_dialog, - "destroy", + g_signal_connect (curr_data->add_edit_dialog, "destroy", G_CALLBACK (gtk_widget_destroyed), &curr_data->add_edit_dialog); @@ -381,18 +377,18 @@ create_palettes_tree (charpick_data *curr_data, while (list) { GtkTreeIter iter; gchar *charlist = list->data; - + gtk_list_store_append (GTK_LIST_STORE (model), &iter); gtk_list_store_set (GTK_LIST_STORE (model), &iter, 0, charlist, 1, charlist, -1); - + list = g_list_next (list); } selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tree)); - g_signal_connect (G_OBJECT (selection), "changed", + g_signal_connect (selection, "changed", G_CALLBACK (selection_changed), scrolled); @@ -475,12 +471,12 @@ default_chars_frame_create (charpick_data *curr_data) NULL)); gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0); - g_signal_connect (G_OBJECT (button), "clicked", - G_CALLBACK (add_palette), + g_signal_connect (button, "clicked", + G_CALLBACK (add_palette), curr_data); set_access_namedesc (button, _("Add button"), _("Click to add a new palette")); - + button = GTK_WIDGET (g_object_new (GTK_TYPE_BUTTON, "label", CHARPICK_STOCK_EDIT, "use-stock", TRUE, @@ -488,14 +484,14 @@ default_chars_frame_create (charpick_data *curr_data) NULL)); gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0); - g_signal_connect (G_OBJECT (button), "clicked", + g_signal_connect (button, "clicked", G_CALLBACK (edit_palette), curr_data); g_object_set_data (G_OBJECT (scrolled), "edit_button", button); set_access_namedesc (button, _("Edit button"), _("Click to edit the selected palette")); - + button = GTK_WIDGET (g_object_new (GTK_TYPE_BUTTON, "label", "gtk-delete", "use-stock", TRUE, @@ -503,7 +499,7 @@ default_chars_frame_create (charpick_data *curr_data) NULL)); gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0); - g_signal_connect (G_OBJECT (button), "clicked", + g_signal_connect (button, "clicked", G_CALLBACK (delete_palette), curr_data); g_object_set_data (G_OBJECT (scrolled), @@ -577,8 +573,8 @@ show_preferences_dialog (GtkAction *action, gtk_dialog_set_default_response (GTK_DIALOG (curr_data->propwindow), GTK_RESPONSE_CLOSE); default_chars_frame_create (curr_data); - g_signal_connect (G_OBJECT (curr_data->propwindow), "response", + g_signal_connect (curr_data->propwindow, "response", G_CALLBACK (response_cb), curr_data); - + gtk_widget_show_all (curr_data->propwindow); } diff --git a/command/src/command.c b/command/src/command.c index 231aeb45..2412d123 100644 --- a/command/src/command.c +++ b/command/src/command.c @@ -205,7 +205,10 @@ command_settings_callback (GtkAction *action, CommandApplet *command_applet) "on_width_spinbutton_value_changed", G_CALLBACK (width_value_changed), NULL); gtk_builder_connect_signals (builder, command_applet); - g_signal_connect (dialog, "response", G_CALLBACK (gtk_widget_destroy), dialog); + + g_signal_connect (dialog, "response", + G_CALLBACK (gtk_widget_destroy), + dialog); g_object_unref (builder); @@ -438,23 +441,23 @@ command_applet_fill (MatePanelApplet* applet) gtk_widget_show_all (GTK_WIDGET (command_applet->applet)); - g_signal_connect(G_OBJECT (command_applet->applet), "destroy", - G_CALLBACK (command_applet_destroy), - command_applet); + g_signal_connect (command_applet->applet, "destroy", + G_CALLBACK (command_applet_destroy), + command_applet); /* GSettings signals */ - g_signal_connect(command_applet->settings, - "changed::" COMMAND_KEY, - G_CALLBACK (settings_command_changed), - command_applet); - g_signal_connect(command_applet->settings, - "changed::" INTERVAL_KEY, - G_CALLBACK (settings_interval_changed), - command_applet); - g_signal_connect(command_applet->settings, - "changed::" WIDTH_KEY, - G_CALLBACK (settings_width_changed), - command_applet); + g_signal_connect (command_applet->settings, "changed::" COMMAND_KEY, + G_CALLBACK (settings_command_changed), + command_applet); + + g_signal_connect (command_applet->settings, "changed::" INTERVAL_KEY, + G_CALLBACK (settings_interval_changed), + command_applet); + + g_signal_connect (command_applet->settings, "changed::" WIDTH_KEY, + G_CALLBACK (settings_width_changed), + command_applet); + g_settings_bind (command_applet->settings, SHOW_ICON_KEY, command_applet->image, diff --git a/cpufreq/src/cpufreq-applet.c b/cpufreq/src/cpufreq-applet.c index eb887229..adbd0e8c 100644 --- a/cpufreq/src/cpufreq-applet.c +++ b/cpufreq/src/cpufreq-applet.c @@ -799,27 +799,27 @@ cpufreq_applet_setup (CPUFreqApplet *applet) settings = mate_panel_applet_settings_new (MATE_PANEL_APPLET (applet), "org.mate.panel.applet.cpufreq"); applet->prefs = cpufreq_prefs_new (settings); - g_signal_connect (G_OBJECT (applet->prefs), - "notify::cpu", + g_signal_connect (applet->prefs, "notify::cpu", G_CALLBACK (cpufreq_applet_prefs_cpu_changed), - (gpointer) applet); - g_signal_connect (G_OBJECT (applet->prefs), - "notify::show-mode", + applet); + + g_signal_connect (applet->prefs, "notify::show-mode", G_CALLBACK (cpufreq_applet_prefs_show_mode_changed), - (gpointer) applet); - g_signal_connect (G_OBJECT (applet->prefs), - "notify::show-text-mode", + applet); + + g_signal_connect (applet->prefs, "notify::show-text-mode", G_CALLBACK (cpufreq_applet_prefs_show_mode_changed), - (gpointer) applet); + applet); /* Monitor */ applet->monitor = cpufreq_monitor_factory_create_monitor (cpufreq_prefs_get_cpu (applet->prefs)); cpufreq_monitor_run (applet->monitor); - g_signal_connect_swapped (G_OBJECT (applet->monitor), "changed", + + g_signal_connect_swapped (applet->monitor, "changed", G_CALLBACK (cpufreq_applet_update), - (gpointer) applet); + applet); /* Setup the menus */ action_group = gtk_action_group_new ("CPUFreq Applet Actions"); diff --git a/cpufreq/src/cpufreq-popup.c b/cpufreq/src/cpufreq-popup.c index 56c1b0d0..456a60a6 100644 --- a/cpufreq/src/cpufreq-popup.c +++ b/cpufreq/src/cpufreq-popup.c @@ -244,14 +244,14 @@ cpufreq_popup_menu_add_action (CPUFreqPopup *popup, g_signal_connect (action, "activate", G_CALLBACK (cpufreq_popup_frequencies_menu_activate), - (gpointer) popup); + popup); } else if (g_ascii_strcasecmp (menu, "Governor") == 0) { popup->priv->govs_actions = g_slist_prepend (popup->priv->govs_actions, (gpointer) action); g_signal_connect (action, "activate", G_CALLBACK (cpufreq_popup_governors_menu_activate), - (gpointer) popup); + popup); } gtk_action_group_add_action (action_group, GTK_ACTION (action)); diff --git a/cpufreq/src/cpufreq-prefs.c b/cpufreq/src/cpufreq-prefs.c index 5682e5e5..f0e60bf0 100644 --- a/cpufreq/src/cpufreq-prefs.c +++ b/cpufreq/src/cpufreq-prefs.c @@ -553,25 +553,29 @@ cpufreq_prefs_dialog_create (CPUFreqPrefs *prefs) if (cpufreq_utils_get_n_cpus () > 1) cpufreq_prefs_dialog_cpu_combo_setup (prefs); - g_signal_connect_swapped (G_OBJECT (prefs->priv->dialog), "response", + g_signal_connect_swapped (prefs->priv->dialog, "response", G_CALLBACK (cpufreq_prefs_dialog_response_cb), - (gpointer) prefs); + prefs); - g_signal_connect (G_OBJECT (prefs->priv->show_freq), "toggled", + g_signal_connect (prefs->priv->show_freq, "toggled", G_CALLBACK (cpufreq_prefs_dialog_show_freq_toggled), - (gpointer) prefs); - g_signal_connect (G_OBJECT (prefs->priv->show_unit), "toggled", + prefs); + + g_signal_connect (prefs->priv->show_unit, "toggled", G_CALLBACK (cpufreq_prefs_dialog_show_unit_toggled), - (gpointer) prefs); - g_signal_connect (G_OBJECT (prefs->priv->show_perc), "toggled", + prefs); + + g_signal_connect (prefs->priv->show_perc, "toggled", G_CALLBACK (cpufreq_prefs_dialog_show_perc_toggled), - (gpointer) prefs); - g_signal_connect (G_OBJECT (prefs->priv->cpu_combo), "changed", + prefs); + + g_signal_connect (prefs->priv->cpu_combo, "changed", G_CALLBACK (cpufreq_prefs_dialog_cpu_number_changed), - (gpointer) prefs); - g_signal_connect (G_OBJECT (prefs->priv->show_mode_combo), "changed", + prefs); + + g_signal_connect (prefs->priv->show_mode_combo, "changed", G_CALLBACK (cpufreq_prefs_dialog_show_mode_changed), - (gpointer) prefs); + prefs); } void diff --git a/cpufreq/src/cpufreq-utils.c b/cpufreq/src/cpufreq-utils.c index a49d27c6..736806e8 100644 --- a/cpufreq/src/cpufreq-utils.c +++ b/cpufreq/src/cpufreq-utils.c @@ -99,9 +99,9 @@ cpufreq_utils_display_error (const gchar *message, gtk_window_set_title (GTK_WINDOW (dialog), ""); /* as per HIG */ gtk_window_set_skip_taskbar_hint (GTK_WINDOW (dialog), TRUE); - g_signal_connect (G_OBJECT (dialog), - "response", - G_CALLBACK (gtk_widget_destroy), NULL); + g_signal_connect (dialog, "response", + G_CALLBACK (gtk_widget_destroy), + NULL); gtk_widget_show (dialog); } diff --git a/drivemount/src/drive-button.c b/drivemount/src/drive-button.c index f64f38c4..95472c86 100644 --- a/drivemount/src/drive-button.c +++ b/drivemount/src/drive-button.c @@ -113,9 +113,10 @@ drive_button_new (GVolume *volume) self = g_object_new (DRIVE_TYPE_BUTTON, NULL); if (volume != NULL) { drive_button_set_volume (self, volume); - g_signal_connect (gtk_icon_theme_get_default (), - "changed", G_CALLBACK (drive_button_theme_change), - self); + + g_signal_connect (gtk_icon_theme_get_default (), "changed", + G_CALLBACK (drive_button_theme_change), + self); } return (GtkWidget *)self; @@ -129,9 +130,9 @@ drive_button_new_from_mount (GMount *mount) self = g_object_new (DRIVE_TYPE_BUTTON, NULL); drive_button_set_mount (self, mount); - g_signal_connect (gtk_icon_theme_get_default (), - "changed", G_CALLBACK (drive_button_theme_change), - self); + g_signal_connect (gtk_icon_theme_get_default (), "changed", + G_CALLBACK (drive_button_theme_change), + self); return (GtkWidget *)self; } @@ -538,7 +539,8 @@ create_menu_item (DriveButton *self, gtk_widget_show (image); } if (callback) - g_signal_connect_object (item, "activate", callback, self, + g_signal_connect_object (item, "activate", + callback, self, G_CONNECT_SWAPPED); gtk_widget_set_sensitive (item, sensitive); gtk_widget_show (item); @@ -599,8 +601,11 @@ open_drive (DriveButton *self, gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), "%s", error->message); else gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), "Could not find Caja"); + g_signal_connect (dialog, "response", - G_CALLBACK (gtk_widget_destroy), NULL); + G_CALLBACK (gtk_widget_destroy), + NULL); + gtk_widget_show (dialog); g_error_free (error); } diff --git a/geyes/src/geyes.c b/geyes/src/geyes.c index 3c8b182c..7fca8539 100644 --- a/geyes/src/geyes.c +++ b/geyes/src/geyes.c @@ -349,7 +349,7 @@ help_cb (GtkAction *action, GTK_BUTTONS_CLOSE, _("There was an error displaying help: %s"), error->message); - g_signal_connect (G_OBJECT (dialog), "response", + g_signal_connect (dialog, "response", G_CALLBACK (gtk_widget_destroy), NULL); gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE); @@ -427,8 +427,7 @@ geyes_applet_fill (MatePanelApplet *applet) set_atk_name_description (GTK_WIDGET (eyes_applet->applet), _("Eyes"), _("The eyes look in the direction of the mouse pointer")); - g_signal_connect (eyes_applet->vbox, - "destroy", + g_signal_connect (eyes_applet->vbox, "destroy", G_CALLBACK (destroy_cb), eyes_applet); diff --git a/geyes/src/themes.c b/geyes/src/themes.c index 726af951..e9ebe24b 100644 --- a/geyes/src/themes.c +++ b/geyes/src/themes.c @@ -225,7 +225,7 @@ phelp_cb (GtkDialog *dialog) GTK_BUTTONS_CLOSE, _("There was an error displaying help: %s"), error->message); - g_signal_connect (G_OBJECT (error_dialog), "response", + g_signal_connect (error_dialog, "response", G_CALLBACK (gtk_widget_destroy), NULL); gtk_window_set_resizable (GTK_WINDOW (error_dialog), FALSE); diff --git a/mateweather/src/mateweather-applet.c b/mateweather/src/mateweather-applet.c index d32d88bb..3165607e 100644 --- a/mateweather/src/mateweather-applet.c +++ b/mateweather/src/mateweather-applet.c @@ -61,7 +61,9 @@ static void help_cb (GtkAction *action, if (error) { GtkWidget *dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, _("There was an error displaying help: %s"), error->message); - g_signal_connect (G_OBJECT (dialog), "response", G_CALLBACK (gtk_widget_destroy), NULL); + g_signal_connect (dialog, "response", + G_CALLBACK (gtk_widget_destroy), + NULL); gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE); gtk_window_set_screen (GTK_WINDOW (dialog), gtk_widget_get_screen (GTK_WIDGET (gw_applet->applet))); gtk_widget_show (dialog); @@ -344,16 +346,25 @@ void mateweather_applet_create (MateWeatherApplet *gw_applet) gtk_window_set_default_icon_name ("weather-storm"); - g_signal_connect (G_OBJECT(gw_applet->applet), "change_orient", - G_CALLBACK(change_orient_cb), gw_applet); - g_signal_connect (G_OBJECT(gw_applet->applet), "size_allocate", - G_CALLBACK(size_allocate_cb), gw_applet); - g_signal_connect (G_OBJECT(gw_applet->applet), "destroy", - G_CALLBACK (applet_destroy), gw_applet); - g_signal_connect (G_OBJECT(gw_applet->applet), "button_press_event", - G_CALLBACK(clicked_cb), gw_applet); - g_signal_connect (G_OBJECT(gw_applet->applet), "key_press_event", - G_CALLBACK(key_press_cb), gw_applet); + g_signal_connect (gw_applet->applet, "change_orient", + G_CALLBACK (change_orient_cb), + gw_applet); + + g_signal_connect (gw_applet->applet, "size_allocate", + G_CALLBACK (size_allocate_cb), + gw_applet); + + g_signal_connect (gw_applet->applet, "destroy", + G_CALLBACK (applet_destroy), + gw_applet); + + g_signal_connect (gw_applet->applet, "button_press_event", + G_CALLBACK(clicked_cb), + gw_applet); + + g_signal_connect (gw_applet->applet, "key_press_event", + G_CALLBACK (key_press_cb), + gw_applet); gtk_widget_set_tooltip_text (GTK_WIDGET(gw_applet->applet), _("MATE Weather")); @@ -387,7 +398,9 @@ void mateweather_applet_create (MateWeatherApplet *gw_applet) monitor = g_network_monitor_get_default(); g_signal_connect (monitor, "network-changed", - G_CALLBACK (network_changed), gw_applet);} + G_CALLBACK (network_changed), + gw_applet); +} gint timeout_cb (gpointer data) { diff --git a/mateweather/src/mateweather-pref.c b/mateweather/src/mateweather-pref.c index c0408a68..12ef8864 100644 --- a/mateweather/src/mateweather-pref.c +++ b/mateweather/src/mateweather-pref.c @@ -772,7 +772,9 @@ static void help_cb(GtkDialog* dialog, MateWeatherPref* pref) if (error) { GtkWidget* error_dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, _("There was an error displaying help: %s"), error->message); - g_signal_connect (G_OBJECT (error_dialog), "response", G_CALLBACK (gtk_widget_destroy), NULL); + g_signal_connect (error_dialog, "response", + G_CALLBACK (gtk_widget_destroy), + NULL); gtk_window_set_resizable (GTK_WINDOW (error_dialog), FALSE); gtk_window_set_screen (GTK_WINDOW (error_dialog), gtk_widget_get_screen (GTK_WIDGET (dialog))); gtk_widget_show (error_dialog); diff --git a/multiload/src/load-graph.c b/multiload/src/load-graph.c index fbff7d7d..23fbacde 100644 --- a/multiload/src/load-graph.c +++ b/multiload/src/load-graph.c @@ -471,17 +471,17 @@ load_graph_new (MultiloadApplet *ma, guint n, const gchar *label, GDK_LEAVE_NOTIFY_MASK | GDK_BUTTON_PRESS_MASK); - g_signal_connect (G_OBJECT (g->disp), "draw", + g_signal_connect (g->disp, "draw", G_CALLBACK (load_graph_expose), g); - g_signal_connect (G_OBJECT(g->disp), "configure_event", + g_signal_connect (g->disp, "configure_event", G_CALLBACK (load_graph_configure), g); - g_signal_connect (G_OBJECT(g->disp), "destroy", + g_signal_connect (g->disp, "destroy", G_CALLBACK (load_graph_destroy), g); - g_signal_connect (G_OBJECT(g->disp), "button-press-event", + g_signal_connect (g->disp, "button-press-event", G_CALLBACK (load_graph_clicked), g); - g_signal_connect (G_OBJECT(g->disp), "enter-notify-event", + g_signal_connect (g->disp, "enter-notify-event", G_CALLBACK(load_graph_enter_cb), g); - g_signal_connect (G_OBJECT(g->disp), "leave-notify-event", + g_signal_connect (g->disp, "leave-notify-event", G_CALLBACK(load_graph_leave_cb), g); gtk_box_pack_start (GTK_BOX (g->box), g->disp, TRUE, TRUE, 0); diff --git a/multiload/src/main.c b/multiload/src/main.c index 124020ba..3d88e6b0 100644 --- a/multiload/src/main.c +++ b/multiload/src/main.c @@ -533,16 +533,16 @@ multiload_applet_new(MatePanelApplet *applet, const gchar *iid, gpointer data) g_object_unref (action_group); - g_signal_connect(G_OBJECT(applet), "change_size", - G_CALLBACK(multiload_change_size_cb), ma); - g_signal_connect(G_OBJECT(applet), "change_orient", - G_CALLBACK(multiload_change_orient_cb), ma); - g_signal_connect(G_OBJECT(applet), "destroy", - G_CALLBACK(multiload_destroy_cb), ma); - g_signal_connect(G_OBJECT(applet), "button_press_event", - G_CALLBACK(multiload_button_press_event_cb), ma); - g_signal_connect(G_OBJECT(applet), "key_press_event", - G_CALLBACK(multiload_key_press_event_cb), ma); + g_signal_connect (applet, "change_size", + G_CALLBACK (multiload_change_size_cb), ma); + g_signal_connect (applet, "change_orient", + G_CALLBACK (multiload_change_orient_cb), ma); + g_signal_connect (applet, "destroy", + G_CALLBACK (multiload_destroy_cb), ma); + g_signal_connect (applet, "button_press_event", + G_CALLBACK (multiload_button_press_event_cb), ma); + g_signal_connect (applet, "key_press_event", + G_CALLBACK (multiload_key_press_event_cb), ma); multiload_applet_refresh (ma); diff --git a/stickynotes/stickynotes.c b/stickynotes/stickynotes.c index 21ea7c3b..be05a5fb 100644 --- a/stickynotes/stickynotes.c +++ b/stickynotes/stickynotes.c @@ -261,79 +261,122 @@ stickynote_new_aux (GdkScreen *screen, * we would have an invalid GtkMenu. We need to ref it. */ g_object_ref (note->w_menu); - g_signal_connect (G_OBJECT (note->w_window), "button-press-event", - G_CALLBACK (stickynote_show_popup_menu), note->w_menu); - g_signal_connect (G_OBJECT (note->w_lock), "button-press-event", - G_CALLBACK (stickynote_show_popup_menu), note->w_menu); + g_signal_connect (note->w_window, "button-press-event", + G_CALLBACK (stickynote_show_popup_menu), + note->w_menu); - g_signal_connect (G_OBJECT (note->w_close), "button-press-event", - G_CALLBACK (stickynote_show_popup_menu), note->w_menu); + g_signal_connect (note->w_lock, "button-press-event", + G_CALLBACK (stickynote_show_popup_menu), + note->w_menu); - g_signal_connect (G_OBJECT (note->w_resize_se), "button-press-event", - G_CALLBACK (stickynote_show_popup_menu), note->w_menu); + g_signal_connect (note->w_close, "button-press-event", + G_CALLBACK (stickynote_show_popup_menu), + note->w_menu); - g_signal_connect (G_OBJECT (note->w_resize_sw), "button-press-event", - G_CALLBACK (stickynote_show_popup_menu), note->w_menu); + g_signal_connect (note->w_resize_se, "button-press-event", + G_CALLBACK (stickynote_show_popup_menu), + note->w_menu); + + g_signal_connect (note->w_resize_sw, "button-press-event", + G_CALLBACK (stickynote_show_popup_menu), + note->w_menu); /* Connect a properties dialog to the note */ gtk_window_set_transient_for (GTK_WINDOW (note->w_properties), GTK_WINDOW (note->w_window)); gtk_dialog_set_default_response (GTK_DIALOG (note->w_properties), GTK_RESPONSE_CLOSE); - g_signal_connect (G_OBJECT (note->w_properties), "response", - G_CALLBACK (response_cb), note); + g_signal_connect (note->w_properties, "response", + G_CALLBACK (response_cb), + note); /* Connect signals to the sticky note */ - g_signal_connect (G_OBJECT (note->w_lock), "clicked", - G_CALLBACK (stickynote_toggle_lock_cb), note); - g_signal_connect (G_OBJECT (note->w_close), "clicked", - G_CALLBACK (stickynote_close_cb), note); - g_signal_connect (G_OBJECT (note->w_resize_se), "button-press-event", - G_CALLBACK (stickynote_resize_cb), note); - g_signal_connect (G_OBJECT (note->w_resize_sw), "button-press-event", - G_CALLBACK (stickynote_resize_cb), note); - - g_signal_connect (G_OBJECT (note->w_window), "button-press-event", - G_CALLBACK (stickynote_move_cb), note); - g_signal_connect (G_OBJECT (note->w_window), "configure-event", - G_CALLBACK (stickynote_configure_cb), note); - g_signal_connect (G_OBJECT (note->w_window), "delete-event", - G_CALLBACK (stickynote_delete_cb), note); - - g_signal_connect (gtk_builder_get_object (builder, "popup_create"), - "activate", G_CALLBACK (popup_create_cb), note); - g_signal_connect (gtk_builder_get_object (builder, "popup_destroy"), - "activate", G_CALLBACK (popup_destroy_cb), note); - g_signal_connect (gtk_builder_get_object (builder, "popup_toggle_lock"), - "toggled", G_CALLBACK (popup_toggle_lock_cb), note); - g_signal_connect (gtk_builder_get_object (builder, "popup_properties"), - "activate", G_CALLBACK (popup_properties_cb), note); - - g_signal_connect_swapped (G_OBJECT (note->w_entry), "changed", - G_CALLBACK (properties_apply_title_cb), note); - g_signal_connect (G_OBJECT (note->w_color), "color-set", - G_CALLBACK (properties_color_cb), note); - g_signal_connect (G_OBJECT (note->w_font_color), "color-set", - G_CALLBACK (properties_color_cb), note); - g_signal_connect_swapped (G_OBJECT (note->w_def_color), "toggled", - G_CALLBACK (properties_apply_color_cb), note); - g_signal_connect (G_OBJECT (note->w_font), "font-set", - G_CALLBACK (properties_font_cb), note); - g_signal_connect_swapped (G_OBJECT (note->w_def_font), "toggled", - G_CALLBACK (properties_apply_font_cb), note); - g_signal_connect (G_OBJECT (note->w_entry), "activate", - G_CALLBACK (properties_activate_cb), note); - g_signal_connect (G_OBJECT (note->w_properties), "delete-event", - G_CALLBACK (gtk_widget_hide), note); + g_signal_connect (note->w_lock, "clicked", + G_CALLBACK (stickynote_toggle_lock_cb), + note); + + g_signal_connect (note->w_close, "clicked", + G_CALLBACK (stickynote_close_cb), + note); + + g_signal_connect (note->w_resize_se, "button-press-event", + G_CALLBACK (stickynote_resize_cb), + note); + + g_signal_connect (note->w_resize_sw, "button-press-event", + G_CALLBACK (stickynote_resize_cb), + note); + + g_signal_connect (note->w_window, "button-press-event", + G_CALLBACK (stickynote_move_cb), + note); + + g_signal_connect (note->w_window, "configure-event", + G_CALLBACK (stickynote_configure_cb), + note); + + g_signal_connect (note->w_window, "delete-event", + G_CALLBACK (stickynote_delete_cb), + note); + + g_signal_connect (gtk_builder_get_object (builder, "popup_create"), "activate", + G_CALLBACK (popup_create_cb), + note); + + g_signal_connect (gtk_builder_get_object (builder, "popup_destroy"), "activate", + G_CALLBACK (popup_destroy_cb), + note); + + g_signal_connect (gtk_builder_get_object (builder, "popup_toggle_lock"), "toggled", + G_CALLBACK (popup_toggle_lock_cb), + note); + + g_signal_connect (gtk_builder_get_object (builder, "popup_properties"), "activate", + G_CALLBACK (popup_properties_cb), + note); + + g_signal_connect_swapped (note->w_entry, "changed", + G_CALLBACK (properties_apply_title_cb), + note); + + g_signal_connect (note->w_color, "color-set", + G_CALLBACK (properties_color_cb), + note); + + g_signal_connect (note->w_font_color, "color-set", + G_CALLBACK (properties_color_cb), + note); + + g_signal_connect_swapped (note->w_def_color, "toggled", + G_CALLBACK (properties_apply_color_cb), + note); + + g_signal_connect (note->w_font, "font-set", + G_CALLBACK (properties_font_cb), + note); + + g_signal_connect_swapped (note->w_def_font, "toggled", + G_CALLBACK (properties_apply_font_cb), + note); + + g_signal_connect (note->w_entry, "activate", + G_CALLBACK (properties_activate_cb), + note); + + g_signal_connect (note->w_properties, "delete-event", + G_CALLBACK (gtk_widget_hide), + note); g_object_unref (builder); g_signal_connect_after (note->w_body, "button-press-event", - G_CALLBACK (gtk_true), note); + G_CALLBACK (gtk_true), + note); - g_signal_connect (gtk_text_view_get_buffer (GTK_TEXT_VIEW (note->w_body)), - "changed", G_CALLBACK (buffer_changed), note); + g_signal_connect (gtk_text_view_get_buffer (GTK_TEXT_VIEW (note->w_body)), "changed", + G_CALLBACK (buffer_changed), + note); return note; } diff --git a/stickynotes/stickynotes_applet_callbacks.c b/stickynotes/stickynotes_applet_callbacks.c index 4e006bd2..7b454f5b 100644 --- a/stickynotes/stickynotes_applet_callbacks.c +++ b/stickynotes/stickynotes_applet_callbacks.c @@ -383,8 +383,7 @@ menu_help_cb (GtkAction *action, _("There was an error displaying help: %s"), error->message); - g_signal_connect (dialog, - "response", + g_signal_connect (dialog, "response", G_CALLBACK (gtk_widget_destroy), NULL); @@ -612,12 +611,10 @@ preferences_response_cb (GtkWidget *dialog, _("There was an error displaying help: %s"), error->message); - g_signal_connect (G_OBJECT (dialog), - "response", + g_signal_connect (dialog, "response", G_CALLBACK (gtk_widget_destroy), NULL); - gtk_window_set_resizable (GTK_WINDOW (dialog), - FALSE); + gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE); gtk_window_set_screen (GTK_WINDOW (dialog), gtk_widget_get_screen (GTK_WIDGET (dialog))); gtk_widget_show (dialog); diff --git a/timerapplet/src/timerapplet.c b/timerapplet/src/timerapplet.c index 6e1fc2d4..e72d8e21 100644 --- a/timerapplet/src/timerapplet.c +++ b/timerapplet/src/timerapplet.c @@ -333,7 +333,10 @@ timer_preferences_callback (GtkAction *action, TimerApplet *applet) "on_seconds_spinbutton_value_changed", G_CALLBACK (timer_spin_button_value_changed), NULL); gtk_builder_connect_signals (builder, applet); - g_signal_connect (dialog, "response", G_CALLBACK (gtk_widget_destroy), dialog); + + g_signal_connect (dialog, "response", + G_CALLBACK (gtk_widget_destroy), + dialog); g_object_unref (builder); @@ -400,12 +403,13 @@ timer_applet_fill (MatePanelApplet* applet_widget) gtk_widget_show_all (GTK_WIDGET (applet->applet)); gtk_widget_hide (GTK_WIDGET (applet->pause_image)); - g_signal_connect(G_OBJECT (applet->applet), "destroy", - G_CALLBACK (timer_applet_destroy), - applet); + g_signal_connect (applet->applet, "destroy", + G_CALLBACK (timer_applet_destroy), + applet); - g_signal_connect_swapped(GTK_WIDGET (applet->applet), "button-release-event", - G_CALLBACK (timer_applet_click), applet); + g_signal_connect_swapped (applet->applet, "button-release-event", + G_CALLBACK (timer_applet_click), + applet); /* set up context menu */ applet->action_group = gtk_action_group_new ("Timer Applet Actions"); @@ -418,8 +422,9 @@ timer_applet_fill (MatePanelApplet* applet_widget) timer_callback (applet); /* GSettings callback */ - g_signal_connect (G_OBJECT (applet->settings), "changed", - G_CALLBACK (timer_settings_changed), applet); + g_signal_connect (applet->settings, "changed", + G_CALLBACK (timer_settings_changed), + applet); return TRUE; } diff --git a/trashapplet/src/trashapplet.c b/trashapplet/src/trashapplet.c index 3e98f283..2ba46c7c 100644 --- a/trashapplet/src/trashapplet.c +++ b/trashapplet/src/trashapplet.c @@ -339,7 +339,7 @@ error_dialog (TrashApplet *applet, const gchar *error, ...) GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, "%s", error_string); - g_signal_connect (G_OBJECT (dialog), "response", + g_signal_connect (dialog, "response", G_CALLBACK (gtk_widget_destroy), NULL); |