diff options
Diffstat (limited to 'capplets/keyboard')
-rw-r--r-- | capplets/keyboard/mate-keyboard-properties-xkb.c | 31 | ||||
-rw-r--r-- | capplets/keyboard/mate-keyboard-properties-xkblt.c | 52 | ||||
-rw-r--r-- | capplets/keyboard/mate-keyboard-properties-xkbltadd.c | 26 | ||||
-rw-r--r-- | capplets/keyboard/mate-keyboard-properties-xkbmc.c | 23 |
4 files changed, 63 insertions, 69 deletions
diff --git a/capplets/keyboard/mate-keyboard-properties-xkb.c b/capplets/keyboard/mate-keyboard-properties-xkb.c index 11833c70..d1dd7925 100644 --- a/capplets/keyboard/mate-keyboard-properties-xkb.c +++ b/capplets/keyboard/mate-keyboard-properties-xkb.c @@ -211,29 +211,28 @@ setup_xkb_tabs (GtkBuilder * dialog) xkb_get_default_group () < 0); xkb_layouts_register_buttons_handlers (dialog); - g_signal_connect (G_OBJECT (WID ("xkb_reset_to_defaults")), - "clicked", G_CALLBACK (reset_to_defaults), - dialog); + g_signal_connect (gtk_builder_get_object (dialog, "xkb_reset_to_defaults"), "clicked", + G_CALLBACK (reset_to_defaults), + dialog); - g_signal_connect (G_OBJECT (chk_new_windows_inherit_layout), - "toggled", (GCallback) - chk_new_windows_inherit_layout_toggled, dialog); + g_signal_connect (chk_new_windows_inherit_layout, "toggled", + (GCallback) chk_new_windows_inherit_layout_toggled, + dialog); - g_signal_connect_swapped (G_OBJECT (WID ("xkb_layout_options")), - "clicked", - G_CALLBACK (xkb_options_popup_dialog), - dialog); + g_signal_connect_swapped (gtk_builder_get_object (dialog, "xkb_layout_options"), "clicked", + G_CALLBACK (xkb_options_popup_dialog), + dialog); - g_signal_connect_swapped (G_OBJECT (WID ("xkb_model_pick")), - "clicked", G_CALLBACK (choose_model), - dialog); + g_signal_connect_swapped (gtk_builder_get_object (dialog, "xkb_model_pick"), "clicked", + G_CALLBACK (choose_model), + dialog); xkb_layouts_register_gsettings_listener (dialog); xkb_options_register_gsettings_listener (dialog); - g_signal_connect (G_OBJECT (WID ("keyboard_dialog")), - "destroy", G_CALLBACK (cleanup_xkb_tabs), - dialog); + g_signal_connect (gtk_builder_get_object (dialog, "keyboard_dialog"), "destroy", + G_CALLBACK (cleanup_xkb_tabs), + dialog); enable_disable_restoring (dialog); } diff --git a/capplets/keyboard/mate-keyboard-properties-xkblt.c b/capplets/keyboard/mate-keyboard-properties-xkblt.c index 12943d53..113fb88f 100644 --- a/capplets/keyboard/mate-keyboard-properties-xkblt.c +++ b/capplets/keyboard/mate-keyboard-properties-xkblt.c @@ -257,10 +257,9 @@ xkb_layouts_prepare_selected_tree (GtkBuilder * dialog) gtk_tree_view_append_column (GTK_TREE_VIEW (tree_view), desc_column); - g_signal_connect_swapped (G_OBJECT (selection), "changed", - G_CALLBACK - (xkb_layouts_enable_disable_buttons), - dialog); + g_signal_connect_swapped (selection, "changed", + G_CALLBACK(xkb_layouts_enable_disable_buttons), + dialog); max_selected_layouts = xkl_engine_get_max_num_groups (engine); /* Setting up DnD */ @@ -270,11 +269,12 @@ xkb_layouts_prepare_selected_tree (GtkBuilder * dialog) gtk_drag_dest_set (tree_view, GTK_DEST_DEFAULT_ALL, &self_drag_target, 1, GDK_ACTION_MOVE); - g_signal_connect (G_OBJECT (tree_view), "drag_data_get", - G_CALLBACK (xkb_layouts_dnd_data_get), dialog); - g_signal_connect (G_OBJECT (tree_view), "drag_data_received", - G_CALLBACK (xkb_layouts_dnd_data_received), - dialog); + g_signal_connect (tree_view, "drag_data_get", + G_CALLBACK (xkb_layouts_dnd_data_get), + dialog); + g_signal_connect (tree_view, "drag_data_received", + G_CALLBACK (xkb_layouts_dnd_data_received), + dialog); } gchar * @@ -436,18 +436,21 @@ move_down_selected_layout (GtkWidget * button, GtkBuilder * dialog) void xkb_layouts_register_buttons_handlers (GtkBuilder * dialog) { - g_signal_connect (G_OBJECT (WID ("xkb_layouts_add")), "clicked", - G_CALLBACK (add_selected_layout), dialog); - g_signal_connect (G_OBJECT (WID ("xkb_layouts_show")), "clicked", - G_CALLBACK (show_selected_layout), dialog); - g_signal_connect (G_OBJECT (WID ("xkb_layouts_remove")), "clicked", - G_CALLBACK (remove_selected_layout), dialog); - g_signal_connect (G_OBJECT (WID ("xkb_layouts_move_up")), - "clicked", G_CALLBACK (move_up_selected_layout), - dialog); - g_signal_connect (G_OBJECT (WID ("xkb_layouts_move_down")), - "clicked", - G_CALLBACK (move_down_selected_layout), dialog); + g_signal_connect (gtk_builder_get_object (dialog, "xkb_layouts_add"), "clicked", + G_CALLBACK (add_selected_layout), + dialog); + g_signal_connect (gtk_builder_get_object (dialog, "xkb_layouts_show"), "clicked", + G_CALLBACK (show_selected_layout), + dialog); + g_signal_connect (gtk_builder_get_object (dialog, "xkb_layouts_remove"), "clicked", + G_CALLBACK (remove_selected_layout), + dialog); + g_signal_connect (gtk_builder_get_object (dialog, "xkb_layouts_move_up"), "clicked", + G_CALLBACK (move_up_selected_layout), + dialog); + g_signal_connect (gtk_builder_get_object (dialog, "xkb_layouts_move_down"), "clicked", + G_CALLBACK (move_down_selected_layout), + dialog); } static void @@ -460,8 +463,7 @@ xkb_layouts_update_list (GSettings * settings, gchar * key, GtkBuilder * dialog) void xkb_layouts_register_gsettings_listener (GtkBuilder * dialog) { - g_signal_connect (xkb_kbd_settings, - "changed::layouts", - G_CALLBACK (xkb_layouts_update_list), - dialog); + g_signal_connect (xkb_kbd_settings, "changed::layouts", + G_CALLBACK (xkb_layouts_update_list), + dialog); } diff --git a/capplets/keyboard/mate-keyboard-properties-xkbltadd.c b/capplets/keyboard/mate-keyboard-properties-xkbltadd.c index 723f29fa..1edaa666 100644 --- a/capplets/keyboard/mate-keyboard-properties-xkbltadd.c +++ b/capplets/keyboard/mate-keyboard-properties-xkbltadd.c @@ -322,8 +322,9 @@ xkb_layout_chooser_available_layouts_fill (GtkBuilder * COMBO_BOX_MODEL_COL_SORT, GTK_SORT_ASCENDING); - g_signal_connect_swapped (G_OBJECT (cbl), "changed", - combo_changed_notify, chooser_dialog); + g_signal_connect_swapped (cbl, "changed", + G_CALLBACK (combo_changed_notify), + chooser_dialog); /* Setup the variants combo */ renderer = gtk_cell_renderer_text_new (); @@ -333,10 +334,9 @@ xkb_layout_chooser_available_layouts_fill (GtkBuilder * renderer, "markup", COMBO_BOX_MODEL_COL_VISIBLE, NULL); - g_signal_connect_swapped (G_OBJECT (cbev), "changed", - G_CALLBACK - (xkb_layout_chooser_available_variant_changed), - chooser_dialog); + g_signal_connect_swapped (cbev, "changed", + G_CALLBACK(xkb_layout_chooser_available_variant_changed), + chooser_dialog); } static gchar ** @@ -462,10 +462,9 @@ xkb_layout_choose (GtkBuilder * dialog) G_CALLBACK (xkb_layout_chooser_available_language_changed)); - g_signal_connect_after (G_OBJECT (notebook), "switch_page", - G_CALLBACK - (xkb_layout_chooser_page_changed), - chooser_dialog); + g_signal_connect_after (notebook, "switch_page", + G_CALLBACK(xkb_layout_chooser_page_changed), + chooser_dialog); gtk_combo_box_set_active (GTK_COMBO_BOX (CWID ("xkb_countries_available")), @@ -507,10 +506,9 @@ xkb_layout_choose (GtkBuilder * dialog) gtk_widget_hide (CWID ("btnPrint")); } - g_signal_connect (G_OBJECT (chooser), - "response", - G_CALLBACK (xkb_layout_chooser_response), - chooser_dialog); + g_signal_connect (chooser, "response", + G_CALLBACK (xkb_layout_chooser_response), + chooser_dialog); toplevel = gtk_widget_get_toplevel (chooser); if (gtk_widget_is_toplevel (toplevel)) { diff --git a/capplets/keyboard/mate-keyboard-properties-xkbmc.c b/capplets/keyboard/mate-keyboard-properties-xkbmc.c index 6ffc69e6..67b3e22c 100644 --- a/capplets/keyboard/mate-keyboard-properties-xkbmc.c +++ b/capplets/keyboard/mate-keyboard-properties-xkbmc.c @@ -217,11 +217,9 @@ fill_vendors_list (GtkBuilder * chooser_dialog) fill_models_list (chooser_dialog); } - g_signal_connect (G_OBJECT - (gtk_tree_view_get_selection - (GTK_TREE_VIEW (vendors_list))), "changed", - G_CALLBACK (xkb_model_chooser_change_vendor_sel), - chooser_dialog); + g_signal_connect (gtk_tree_view_get_selection (GTK_TREE_VIEW (vendors_list)), "changed", + G_CALLBACK (xkb_model_chooser_change_vendor_sel), + chooser_dialog); return gtk_tree_model_get_iter_first (GTK_TREE_MODEL (list_store), &iter); @@ -278,11 +276,9 @@ fill_models_list (GtkBuilder * chooser_dialog) } } - g_signal_connect (G_OBJECT - (gtk_tree_view_get_selection - (GTK_TREE_VIEW (models_list))), "changed", - G_CALLBACK (xkb_model_chooser_change_model_sel), - chooser_dialog); + g_signal_connect (gtk_tree_view_get_selection (GTK_TREE_VIEW (models_list)), "changed", + G_CALLBACK (xkb_model_chooser_change_model_sel), + chooser_dialog); } static void @@ -335,10 +331,9 @@ choose_model (GtkBuilder * dialog) fill_models_list (chooser_dialog); } - g_signal_connect (G_OBJECT (chooser), - "response", - G_CALLBACK (xkb_model_chooser_response), - chooser_dialog); + g_signal_connect (chooser, "response", + G_CALLBACK (xkb_model_chooser_response), + chooser_dialog); gtk_dialog_run (GTK_DIALOG (chooser)); gtk_widget_destroy (chooser); g_free (current_model_name); |