diff options
author | rbuj <[email protected]> | 2021-10-27 14:22:58 +0200 |
---|---|---|
committer | Luke from DC <[email protected]> | 2022-02-09 04:42:12 +0000 |
commit | 2a06f17c2ef442bd63cc0463c5ee2d5b6cc84c64 (patch) | |
tree | 0de842f92df7aa496d2867a65f160322687e47a4 /libslab | |
parent | 0bfa4ca16e527fdc333fc1ded8b1d9f5963ccf1e (diff) | |
download | mate-control-center-2a06f17c2ef442bd63cc0463c5ee2d5b6cc84c64.tar.bz2 mate-control-center-2a06f17c2ef442bd63cc0463c5ee2d5b6cc84c64.tar.xz |
Unnecessary G_OBJECT cast when calling signal connect function
Diffstat (limited to 'libslab')
-rw-r--r-- | libslab/app-resizer.c | 4 | ||||
-rw-r--r-- | libslab/app-shell.c | 5 | ||||
-rw-r--r-- | libslab/slab-section.c | 29 | ||||
-rw-r--r-- | libslab/tile-action.c | 5 |
4 files changed, 25 insertions, 18 deletions
diff --git a/libslab/app-resizer.c b/libslab/app-resizer.c index 299e48f9..f7d9d0a1 100644 --- a/libslab/app-resizer.c +++ b/libslab/app-resizer.c @@ -245,7 +245,9 @@ app_resizer_new (GtkBox * child, gint initial_num_columns, gboolean homogeneous, widget->setting_style = FALSE; widget->app_data = app_data; - g_signal_connect (G_OBJECT (widget), "draw", G_CALLBACK (app_resizer_paint_window), app_data); + g_signal_connect (widget, "draw", + G_CALLBACK (app_resizer_paint_window), + app_data); gtk_container_add (GTK_CONTAINER (widget), GTK_WIDGET (child)); widget->child = child; diff --git a/libslab/app-shell.c b/libslab/app-shell.c index 6ca880bc..116194cd 100644 --- a/libslab/app-shell.c +++ b/libslab/app-shell.c @@ -542,8 +542,9 @@ create_filter_section (AppShellData * app_data, const gchar * title) nld_search_bar_set_search_timeout (NLD_SEARCH_BAR (search_bar), 0); slab_section_set_contents (SLAB_SECTION (section), search_bar); - g_signal_connect (G_OBJECT (search_bar), "search", G_CALLBACK (handle_filter_changed), - app_data); + g_signal_connect (search_bar, "search", + G_CALLBACK (handle_filter_changed), + app_data); return section; } diff --git a/libslab/slab-section.c b/libslab/slab-section.c index 068048d6..530a0826 100644 --- a/libslab/slab-section.c +++ b/libslab/slab-section.c @@ -100,17 +100,19 @@ slab_section_set_selected (SlabSection * section, gboolean selected) return; section->selected = selected; - /* - if(selected) - { - section->expose_handler_id = g_signal_connect(G_OBJECT(section), - "expose-event", G_CALLBACK(slab_section_expose_event), NULL); - } - else - { - g_signal_handler_disconnect(section, section->expose_handler_id); - } - */ +/* + if(selected) + { + section->expose_handler_id = + g_signal_connect (section, "expose-event", + G_CALLBACK (slab_section_expose_event), + NULL); + } + else + { + g_signal_handler_disconnect(section, section->expose_handler_id); + } +*/ slab_section_set_title_color (GTK_WIDGET (section)); } @@ -151,8 +153,9 @@ slab_section_new_with_markup (const gchar * title_markup, SlabStyle style) gtk_label_set_xalign (GTK_LABEL (section->title), 0.0); gtk_widget_set_name (GTK_WIDGET (section), widget_theming_name); - g_signal_connect (G_OBJECT (section), "style-set", G_CALLBACK (slab_section_style_set), - NULL); + g_signal_connect (section, "style-set", + G_CALLBACK (slab_section_style_set), + NULL); gtk_box_pack_start (section->childbox, section->title, FALSE, FALSE, 0); diff --git a/libslab/tile-action.c b/libslab/tile-action.c index 4934cbd3..c1d5906c 100644 --- a/libslab/tile-action.c +++ b/libslab/tile-action.c @@ -88,8 +88,9 @@ tile_action_set_menu_item_label (TileAction * this, const gchar * markup) this->menu_item = GTK_MENU_ITEM (gtk_menu_item_new ()); gtk_container_add (GTK_CONTAINER (this->menu_item), label); - g_signal_connect (G_OBJECT (this->menu_item), "activate", - G_CALLBACK (tile_action_menu_item_activate_cb), this); + g_signal_connect (this->menu_item, "activate", + G_CALLBACK (tile_action_menu_item_activate_cb), + this); } } |