From 1febbdb499757ac01c2cc505e8bcaa455133006a Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Sat, 16 Aug 2014 00:43:18 +0200 Subject: [PATCH] togglebutton: Don't duplicate button code It's the same code, so no need to write the same vfunc twice. --- gtk/gtktogglebutton.c | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/gtk/gtktogglebutton.c b/gtk/gtktogglebutton.c index b12fbf29e7..ebd99cae62 100644 --- a/gtk/gtktogglebutton.c +++ b/gtk/gtktogglebutton.c @@ -124,8 +124,6 @@ enum { static gboolean gtk_toggle_button_mnemonic_activate (GtkWidget *widget, gboolean group_cycling); -static void gtk_toggle_button_pressed (GtkButton *button); -static void gtk_toggle_button_released (GtkButton *button); static void gtk_toggle_button_clicked (GtkButton *button); static void gtk_toggle_button_set_property (GObject *object, guint prop_id, @@ -172,8 +170,6 @@ gtk_toggle_button_class_init (GtkToggleButtonClass *class) widget_class->mnemonic_activate = gtk_toggle_button_mnemonic_activate; - button_class->pressed = gtk_toggle_button_pressed; - button_class->released = gtk_toggle_button_released; button_class->clicked = gtk_toggle_button_clicked; button_class->enter = gtk_toggle_button_enter_leave; button_class->leave = gtk_toggle_button_enter_leave; @@ -602,30 +598,6 @@ gtk_toggle_button_mnemonic_activate (GtkWidget *widget, return TRUE; } -static void -gtk_toggle_button_pressed (GtkButton *button) -{ - button->priv->button_down = TRUE; - - gtk_toggle_button_update_state (button); - gtk_widget_queue_draw (GTK_WIDGET (button)); -} - -static void -gtk_toggle_button_released (GtkButton *button) -{ - if (button->priv->button_down) - { - button->priv->button_down = FALSE; - - if (button->priv->in_button) - gtk_button_clicked (button); - - gtk_toggle_button_update_state (button); - gtk_widget_queue_draw (GTK_WIDGET (button)); - } -} - static void gtk_toggle_button_clicked (GtkButton *button) {