summaryrefslogtreecommitdiff
path: root/gtk/gtktogglebutton.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2014-08-16 00:43:18 +0200
committerBenjamin Otte <otte@redhat.com>2014-08-16 16:34:15 +0200
commit1febbdb499757ac01c2cc505e8bcaa455133006a (patch)
tree57db57379bc2e76e1bff226caca6e8f973d4381a /gtk/gtktogglebutton.c
parent0f7c90ac6294566e06e08bb54ff18b80ea0de31c (diff)
downloadgtk+-1febbdb499757ac01c2cc505e8bcaa455133006a.tar.gz
togglebutton: Don't duplicate button code
It's the same code, so no need to write the same vfunc twice.
Diffstat (limited to 'gtk/gtktogglebutton.c')
-rw-r--r--gtk/gtktogglebutton.c28
1 files changed, 0 insertions, 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;
@@ -603,30 +599,6 @@ gtk_toggle_button_mnemonic_activate (GtkWidget *widget,
}
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)
{
GtkToggleButton *toggle_button = GTK_TOGGLE_BUTTON (button);