diff options
author | Wolfgang Ulbrich <[email protected]> | 2016-02-11 08:03:12 +0100 |
---|---|---|
committer | Wolfgang Ulbrich <[email protected]> | 2016-02-12 07:04:31 +0100 |
commit | 0aa05dc52ee3c1988c6a33b529bdee3275693e2d (patch) | |
tree | 3c68ecf233a92f2d5b0667b07a52cefa34a5db4d /applets/clock | |
parent | aecc9d08b373a102defc235dba5dccd55c4ae4b3 (diff) | |
download | mate-panel-0aa05dc52ee3c1988c6a33b529bdee3275693e2d.tar.bz2 mate-panel-0aa05dc52ee3c1988c6a33b529bdee3275693e2d.tar.xz |
GTK+-3.20 clock: remove deprecated style properties
taken from:
https://git.gnome.org/browse/gnome-panel/commit/?id=c5549ba
Diffstat (limited to 'applets/clock')
-rw-r--r-- | applets/clock/clock.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/applets/clock/clock.c b/applets/clock/clock.c index 3c512474..370bf9ac 100644 --- a/applets/clock/clock.c +++ b/applets/clock/clock.c @@ -1351,11 +1351,12 @@ clock_update_text_gravity (GtkWidget *label) pango_context_set_base_gravity (context, PANGO_GRAVITY_AUTO); } +#if GTK_CHECK_VERSION (3, 0, 0) +#if !GTK_CHECK_VERSION (3, 19, 0) static inline void force_no_focus_padding (GtkWidget *widget) { static gboolean first_time = TRUE; -#if GTK_CHECK_VERSION (3, 0, 0) GtkCssProvider *provider; if (first_time) { @@ -1369,7 +1370,17 @@ force_no_focus_padding (GtkWidget *widget) GTK_STYLE_PROVIDER (provider), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); g_object_unref (provider); + first_time = FALSE; + } + + gtk_widget_set_name (widget, "clock-applet-button"); +} +#endif #else +static inline void +force_no_focus_padding (GtkWidget *widget) +{ + static gboolean first_time = TRUE; if (first_time) { gtk_rc_parse_string ("\n" " style \"clock-applet-button-style\"\n" @@ -1380,12 +1391,12 @@ force_no_focus_padding (GtkWidget *widget) "\n" " widget \"*.clock-applet-button\" style \"clock-applet-button-style\"\n" "\n"); -#endif first_time = FALSE; } gtk_widget_set_name (widget, "clock-applet-button"); } +#endif static GtkWidget * create_main_clock_button (void) @@ -1395,7 +1406,11 @@ create_main_clock_button (void) button = gtk_toggle_button_new (); gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE); +#if GTK_CHECK_VERSION (3, 19, 0) + gtk_widget_set_name (button, "clock-applet-button"); +#else force_no_focus_padding (button); +#endif return button; } |