diff options
author | monsta <[email protected]> | 2016-11-06 14:43:26 +0300 |
---|---|---|
committer | monsta <[email protected]> | 2016-11-06 14:43:26 +0300 |
commit | 4c06cb5cd0859067769dac1317682d430b18cc78 (patch) | |
tree | 0c363ee71311366fb2016df9858858ef5ef2d25d /pluma/pluma-close-button.c | |
parent | 65371f53dbb06180b750dad7c19e7bcf0f8651d6 (diff) | |
download | pluma-4c06cb5cd0859067769dac1317682d430b18cc78.tar.bz2 pluma-4c06cb5cd0859067769dac1317682d430b18cc78.tar.xz |
move to GTK+3 (>= 3.14), drop GTK+2 code and --with-gtk build option
Diffstat (limited to 'pluma/pluma-close-button.c')
-rw-r--r-- | pluma/pluma-close-button.c | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/pluma/pluma-close-button.c b/pluma/pluma-close-button.c index 3fab3e35..b3bf036b 100644 --- a/pluma/pluma-close-button.c +++ b/pluma/pluma-close-button.c @@ -25,7 +25,6 @@ G_DEFINE_TYPE (PlumaCloseButton, pluma_close_button, GTK_TYPE_BUTTON) static void -#if GTK_CHECK_VERSION (3, 0, 0) pluma_close_button_class_init (PlumaCloseButtonClass *klass) { } @@ -72,67 +71,13 @@ pluma_close_button_init (PlumaCloseButton *button) g_error_free (error); } } -#else -pluma_close_button_style_set (GtkWidget *button, - GtkStyle *previous_style) -{ - gint h, w; - - gtk_icon_size_lookup_for_settings (gtk_widget_get_settings (button), - GTK_ICON_SIZE_MENU, &w, &h); - - gtk_widget_set_size_request (button, w + 2, h + 2); - - GTK_WIDGET_CLASS (pluma_close_button_parent_class)->style_set (button, previous_style); -} -#endif - -#if !GTK_CHECK_VERSION (3, 0, 0) -static void -pluma_close_button_class_init (PlumaCloseButtonClass *klass) -{ - GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); - - widget_class->style_set = pluma_close_button_style_set; -} - -static void -pluma_close_button_init (PlumaCloseButton *button) -{ - GtkRcStyle *rcstyle; - GtkWidget *image; - - /* make it as small as possible */ - rcstyle = gtk_rc_style_new (); - rcstyle->xthickness = rcstyle->ythickness = 0; - gtk_widget_modify_style (GTK_WIDGET (button), rcstyle); - g_object_unref (rcstyle); - - image = gtk_image_new_from_stock (GTK_STOCK_CLOSE, - GTK_ICON_SIZE_MENU); - gtk_widget_show (image); - - gtk_container_add (GTK_CONTAINER (button), image); -} -#endif GtkWidget * pluma_close_button_new () { -#if GTK_CHECK_VERSION (3, 0, 0) return GTK_WIDGET (g_object_new (PLUMA_TYPE_CLOSE_BUTTON, "relief", GTK_RELIEF_NONE, "focus-on-click", FALSE, NULL)); -#else - PlumaCloseButton *button; - - button = g_object_new (PLUMA_TYPE_CLOSE_BUTTON, - "relief", GTK_RELIEF_NONE, - "focus-on-click", FALSE, - NULL); - - return GTK_WIDGET (button); -#endif } |