summaryrefslogtreecommitdiff
path: root/capplets/keyboard/mate-keyboard-properties-xkblt.c
diff options
context:
space:
mode:
authorrbuj <[email protected]>2021-10-27 14:22:58 +0200
committerLuke from DC <[email protected]>2022-02-09 04:42:12 +0000
commit2a06f17c2ef442bd63cc0463c5ee2d5b6cc84c64 (patch)
tree0de842f92df7aa496d2867a65f160322687e47a4 /capplets/keyboard/mate-keyboard-properties-xkblt.c
parent0bfa4ca16e527fdc333fc1ded8b1d9f5963ccf1e (diff)
downloadmate-control-center-2a06f17c2ef442bd63cc0463c5ee2d5b6cc84c64.tar.bz2
mate-control-center-2a06f17c2ef442bd63cc0463c5ee2d5b6cc84c64.tar.xz
Unnecessary G_OBJECT cast when calling signal connect function
Diffstat (limited to 'capplets/keyboard/mate-keyboard-properties-xkblt.c')
-rw-r--r--capplets/keyboard/mate-keyboard-properties-xkblt.c52
1 files changed, 27 insertions, 25 deletions
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);
}