diff options
author | monsta <[email protected]> | 2016-11-21 21:14:26 +0300 |
---|---|---|
committer | monsta <[email protected]> | 2016-11-21 21:14:26 +0300 |
commit | d0ddaedffa7d417a699cafce73c1e418515c4a28 (patch) | |
tree | 645b7a86e32b21113e1ce14f563bfb8d8900fa53 /applets/notification_area/main.c | |
parent | 7dfeb78328039cf92a9f45d64c9b3662d967a1fe (diff) | |
download | mate-panel-d0ddaedffa7d417a699cafce73c1e418515c4a28.tar.bz2 mate-panel-d0ddaedffa7d417a699cafce73c1e418515c4a28.tar.xz |
move to GTK+3 (>= 3.14), drop GTK+2 code and --with-gtk build option
and require libmate-desktop >= 1.17
WARNING: use GTK+3 build of libmateweather for this build.
that lib is not migrated to GTK+3 only as we will possibly
use libgweather instead of it.
Diffstat (limited to 'applets/notification_area/main.c')
-rw-r--r-- | applets/notification_area/main.c | 46 |
1 files changed, 2 insertions, 44 deletions
diff --git a/applets/notification_area/main.c b/applets/notification_area/main.c index e431a699..54080a20 100644 --- a/applets/notification_area/main.c +++ b/applets/notification_area/main.c @@ -45,16 +45,11 @@ G_DEFINE_TYPE (NaTrayApplet, na_tray_applet, PANEL_TYPE_APPLET) static void (*parent_class_realize) (GtkWidget *widget); static void (*parent_class_unrealize) (GtkWidget *widget); -#if GTK_CHECK_VERSION (3, 0, 0) static void (*parent_class_style_updated) (GtkWidget *widget); static void (*parent_class_change_background)(MatePanelApplet* panel_applet, MatePanelAppletBackgroundType type, GdkRGBA* color, cairo_pattern_t* pattern); -#else -static void (*parent_class_change_background)(MatePanelApplet* panel_applet, MatePanelAppletBackgroundType type, GdkColor* color, GdkPixmap* pixmap); -#endif static void (*parent_class_change_orient)(MatePanelApplet *panel_applet, MatePanelAppletOrient orient); - static GtkOrientation get_gtk_orientation_from_applet_orient (MatePanelAppletOrient orient) { @@ -201,7 +196,6 @@ na_tray_applet_unrealize (GtkWidget *widget) parent_class_unrealize (widget); } -#if GTK_CHECK_VERSION (3, 0, 0) static void na_tray_applet_style_updated (GtkWidget *widget) { @@ -244,24 +238,14 @@ na_tray_applet_style_updated (GtkWidget *widget) gtk_widget_style_get (widget, "icon-size", &icon_size, NULL); na_tray_set_icon_size (applet->priv->tray, icon_size); } -#endif -#if GTK_CHECK_VERSION (3, 0, 0) static void na_tray_applet_change_background(MatePanelApplet* panel_applet, MatePanelAppletBackgroundType type, GdkRGBA* color, cairo_pattern_t* pattern) -#else -static void -na_tray_applet_change_background(MatePanelApplet* panel_applet, MatePanelAppletBackgroundType type, GdkColor* color, GdkPixmap* pixmap) -#endif { NaTrayApplet *applet = NA_TRAY_APPLET (panel_applet); if (parent_class_change_background) { -#if GTK_CHECK_VERSION (3, 0, 0) parent_class_change_background (panel_applet, type, color, pattern); -#else - parent_class_change_background (panel_applet, type, color, pixmap); -#endif } if (!applet->priv->tray) @@ -286,10 +270,7 @@ na_tray_applet_change_orient (MatePanelApplet *panel_applet, get_gtk_orientation_from_applet_orient (orient)); } -#if GTK_CHECK_VERSION (3, 0, 0) -#if GTK_CHECK_VERSION (3, 20, 0) -/* deprecated with gtk+-3.19.0 */ -#else +#if !GTK_CHECK_VERSION (3, 20, 0) static inline void force_no_focus_padding (GtkWidget *widget) { @@ -308,21 +289,6 @@ force_no_focus_padding (GtkWidget *widget) g_object_unref (provider); } #endif -#else -static inline void -force_no_focus_padding (GtkWidget *widget) -{ - gtk_rc_parse_string ("\n" - " style \"na-tray-style\"\n" - " {\n" - " GtkWidget::focus-line-width=0\n" - " GtkWidget::focus-padding=0\n" - " }\n" - "\n" - " class \"NaTrayApplet\" style \"na-tray-style\"\n" - "\n"); -} -#endif static void na_tray_applet_class_init (NaTrayAppletClass *class) @@ -335,10 +301,8 @@ na_tray_applet_class_init (NaTrayAppletClass *class) parent_class_unrealize = widget_class->unrealize; widget_class->unrealize = na_tray_applet_unrealize; -#if GTK_CHECK_VERSION (3, 0, 0) parent_class_style_updated = widget_class->style_updated; widget_class->style_updated = na_tray_applet_style_updated; -#endif parent_class_change_background = applet_class->change_background; applet_class->change_background = na_tray_applet_change_background; @@ -386,13 +350,7 @@ na_tray_applet_init (NaTrayApplet *applet) mate_panel_applet_set_flags (MATE_PANEL_APPLET (applet), MATE_PANEL_APPLET_HAS_HANDLE|MATE_PANEL_APPLET_EXPAND_MINOR); -#if !GTK_CHECK_VERSION (3, 0, 0) - mate_panel_applet_set_background_widget (MATE_PANEL_APPLET (applet), - GTK_WIDGET (applet)); -#endif -#if GTK_CHECK_VERSION (3, 20, 0) -/* deprecated with gtk+-3.19.0 */ -#else +#if !GTK_CHECK_VERSION (3, 20, 0) force_no_focus_padding (GTK_WIDGET (applet)); #endif } |