diff options
author | György Balló <[email protected]> | 2015-12-16 10:53:50 +0100 |
---|---|---|
committer | György Balló <[email protected]> | 2015-12-16 10:53:50 +0100 |
commit | d1eaf938f5e4da182225bf4ca93b7de81f4803d6 (patch) | |
tree | e1e725613a9d49645d7c664a69ef9f72e07b9e54 /src/themes/slider/theme.c | |
parent | 6645e6f3d692868788b0b3762d6e4a131f18c133 (diff) | |
download | mate-notification-daemon-d1eaf938f5e4da182225bf4ca93b7de81f4803d6.tar.bz2 mate-notification-daemon-d1eaf938f5e4da182225bf4ca93b7de81f4803d6.tar.xz |
GTK3 slider: don't call override_style multiple times
It's enough to call gtk_widget_override_* functions on the toplevel element, child elements will inherit the style properly. Fixes issue #90.
Diffstat (limited to 'src/themes/slider/theme.c')
-rw-r--r-- | src/themes/slider/theme.c | 32 |
1 files changed, 8 insertions, 24 deletions
diff --git a/src/themes/slider/theme.c b/src/themes/slider/theme.c index c0762d6..670cf14 100644 --- a/src/themes/slider/theme.c +++ b/src/themes/slider/theme.c @@ -685,9 +685,7 @@ GtkWindow* create_notification(UrlClickedCb url_clicked) g_signal_connect(G_OBJECT(win), "configure-event", G_CALLBACK(on_configure_event), windata); main_vbox = gtk_vbox_new(FALSE, 0); -#if GTK_CHECK_VERSION (3, 0, 0) - g_signal_connect(G_OBJECT(main_vbox), "style-updated", G_CALLBACK(on_style_updated), windata); -#else +#if !GTK_CHECK_VERSION (3, 0, 0) g_signal_connect(G_OBJECT(main_vbox), "style-set", G_CALLBACK(on_style_set), windata); #endif gtk_widget_show(main_vbox); @@ -720,9 +718,7 @@ GtkWindow* create_notification(UrlClickedCb url_clicked) gtk_box_pack_start(GTK_BOX(windata->main_hbox), alignment, FALSE, FALSE, 0); close_button = gtk_button_new(); -#if GTK_CHECK_VERSION (3, 0, 0) - g_signal_connect(G_OBJECT(close_button), "style-updated", G_CALLBACK(on_style_updated), windata); -#else +#if !GTK_CHECK_VERSION (3, 0, 0) g_signal_connect(G_OBJECT(close_button), "style-set", G_CALLBACK(on_style_set), windata); #endif gtk_widget_show(close_button); @@ -754,9 +750,7 @@ GtkWindow* create_notification(UrlClickedCb url_clicked) /* center vbox */ windata->summary_label = gtk_label_new(NULL); -#if GTK_CHECK_VERSION (3, 0, 0) - g_signal_connect(G_OBJECT(windata->summary_label), "style-updated", G_CALLBACK(on_style_updated), windata); -#else +#if !GTK_CHECK_VERSION (3, 0, 0) g_signal_connect(G_OBJECT(windata->summary_label), "style-set", G_CALLBACK(on_style_set), windata); #endif gtk_widget_show(windata->summary_label); @@ -785,9 +779,7 @@ GtkWindow* create_notification(UrlClickedCb url_clicked) gtk_box_pack_start(GTK_BOX(windata->content_hbox), vbox, TRUE, TRUE, 0); windata->body_label = gtk_label_new(NULL); -#if GTK_CHECK_VERSION (3, 0, 0) - g_signal_connect(G_OBJECT(windata->body_label), "style-updated", G_CALLBACK(on_style_updated), windata); -#else +#if !GTK_CHECK_VERSION (3, 0, 0) g_signal_connect(G_OBJECT(windata->body_label), "style-set", G_CALLBACK(on_style_set), windata); #endif gtk_widget_show(windata->body_label); @@ -1100,9 +1092,7 @@ void add_notification_action(GtkWindow* nw, const char* text, const char* key, A gtk_box_pack_end(GTK_BOX(windata->actions_box), alignment, FALSE, TRUE, 0); windata->pie_countdown = gtk_drawing_area_new(); -#if GTK_CHECK_VERSION (3, 0, 0) - g_signal_connect(G_OBJECT(windata->pie_countdown), "style-updated", G_CALLBACK(on_style_updated), windata); -#else +#if !GTK_CHECK_VERSION (3, 0, 0) g_signal_connect(G_OBJECT(windata->pie_countdown), "style-set", G_CALLBACK(on_style_set), windata); #endif @@ -1117,9 +1107,7 @@ void add_notification_action(GtkWindow* nw, const char* text, const char* key, A } button = gtk_button_new(); -#if GTK_CHECK_VERSION (3, 0, 0) - g_signal_connect(G_OBJECT(button), "style-updated", G_CALLBACK(on_style_updated), windata); -#else +#if !GTK_CHECK_VERSION (3, 0, 0) g_signal_connect(G_OBJECT(button), "style-set", G_CALLBACK(on_style_set), windata); #endif gtk_widget_show(button); @@ -1140,9 +1128,7 @@ void add_notification_action(GtkWindow* nw, const char* text, const char* key, A if (pixbuf != NULL) { GtkWidget* image = gtk_image_new_from_pixbuf(pixbuf); -#if GTK_CHECK_VERSION (3, 0, 0) - g_signal_connect(G_OBJECT(image), "style-updated", G_CALLBACK(on_style_updated), windata); -#else +#if !GTK_CHECK_VERSION (3, 0, 0) g_signal_connect(G_OBJECT(image), "style-set", G_CALLBACK(on_style_set), windata); #endif gtk_widget_show(image); @@ -1156,9 +1142,7 @@ void add_notification_action(GtkWindow* nw, const char* text, const char* key, A } label = gtk_label_new(NULL); -#if GTK_CHECK_VERSION (3, 0, 0) - g_signal_connect(G_OBJECT(label), "style-updated", G_CALLBACK(on_style_updated), windata); -#else +#if !GTK_CHECK_VERSION (3, 0, 0) g_signal_connect(G_OBJECT(label), "style-set", G_CALLBACK(on_style_set), windata); #endif gtk_widget_show(label); |