diff options
author | raveit65 <chat-to-me@raveit.de> | 2015-07-22 16:50:36 +0200 |
---|---|---|
committer | infirit <infirit@gmail.com> | 2015-07-22 18:40:12 +0200 |
commit | 4b8e9d507796d6c1ff55db1ca892a423a3bfad0a (patch) | |
tree | a27645882825ae9e6331a33ea0a310b524cb0b61 | |
parent | 81c9996cddb0214faaf69fc0239311ef6437929e (diff) | |
download | mate-notification-daemon-4b8e9d507796d6c1ff55db1ca892a423a3bfad0a.tar.bz2 mate-notification-daemon-4b8e9d507796d6c1ff55db1ca892a423a3bfad0a.tar.xz |
GTK3: don't use deprecated GtkRcStyle
taken from
https://git.gnome.org/browse/notification-daemon/commit/?id=2f0409b
-rw-r--r-- | src/themes/slider/theme.c | 4 | ||||
-rw-r--r-- | src/themes/standard/theme.c | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/themes/slider/theme.c b/src/themes/slider/theme.c index eb54509..6721996 100644 --- a/src/themes/slider/theme.c +++ b/src/themes/slider/theme.c @@ -533,7 +533,9 @@ GtkWindow* create_notification(UrlClickedCb url_clicked) GtkWidget* image; GtkWidget* alignment; AtkObject* atkobj; +#if !GTK_CHECK_VERSION(3, 0, 0) GtkRcStyle* rcstyle; +#endif WindowData* windata; #if GTK_CHECK_VERSION(3, 0, 0) GdkVisual *visual; @@ -651,10 +653,12 @@ GtkWindow* create_notification(UrlClickedCb url_clicked) gtk_container_set_border_width(GTK_CONTAINER(close_button), 0); g_signal_connect_swapped(G_OBJECT(close_button), "clicked", G_CALLBACK(gtk_widget_destroy), win); +#if !GTK_CHECK_VERSION(3, 0, 0) rcstyle = gtk_rc_style_new(); rcstyle->xthickness = rcstyle->ythickness = 0; gtk_widget_modify_style(close_button, rcstyle); g_object_unref(rcstyle); +#endif atkobj = gtk_widget_get_accessible(close_button); atk_action_set_description(ATK_ACTION(atkobj), 0, "Closes the notification."); diff --git a/src/themes/standard/theme.c b/src/themes/standard/theme.c index 52a6474..010003e 100644 --- a/src/themes/standard/theme.c +++ b/src/themes/standard/theme.c @@ -615,7 +615,9 @@ GtkWindow* create_notification(UrlClickedCb url_clicked) GtkWidget* image; GtkWidget* alignment; AtkObject* atkobj; +#if !GTK_CHECK_VERSION(3, 0, 0) GtkRcStyle* rcstyle; +#endif WindowData* windata; #if GTK_CHECK_VERSION (3, 0, 0) @@ -749,10 +751,12 @@ GtkWindow* create_notification(UrlClickedCb url_clicked) //gtk_widget_set_size_request(close_button, 20, 20); g_signal_connect_swapped(G_OBJECT(close_button), "clicked", G_CALLBACK(g_object_unref), win); +#if !GTK_CHECK_VERSION(3, 0, 0) rcstyle = gtk_rc_style_new(); rcstyle->xthickness = rcstyle->ythickness = 0; gtk_widget_modify_style(close_button, rcstyle); g_object_unref(rcstyle); +#endif atkobj = gtk_widget_get_accessible(close_button); atk_action_set_description(ATK_ACTION(atkobj), 0, "Closes the notification."); |