summaryrefslogtreecommitdiff
path: root/gtk/gtktogglebutton.c
diff options
context:
space:
mode:
authorTimm Bäder <mail@baedert.org>2016-10-12 22:06:44 +0200
committerBenjamin Otte <otte@redhat.com>2016-10-18 00:29:18 +0200
commit7e16396cc52008ffeba91648d08a43e20926aec5 (patch)
tree461166ecdee2ee0afba26ca560cbdff52ce81773 /gtk/gtktogglebutton.c
parent05211d200fad4963704f98b42ee6b6b5838ced46 (diff)
downloadgtk+-7e16396cc52008ffeba91648d08a43e20926aec5.tar.gz
button: Stop implementing GtkActivatable
Diffstat (limited to 'gtk/gtktogglebutton.c')
-rw-r--r--gtk/gtktogglebutton.c69
1 files changed, 1 insertions, 68 deletions
diff --git a/gtk/gtktogglebutton.c b/gtk/gtktogglebutton.c
index 2421b2e1d4..d588e5ba9a 100644
--- a/gtk/gtktogglebutton.c
+++ b/gtk/gtktogglebutton.c
@@ -32,7 +32,6 @@
#include "gtkmain.h"
#include "gtkmarshalers.h"
#include "deprecated/gtktoggleaction.h"
-#include "deprecated/gtkactivatable.h"
#include "gtkprivate.h"
#include "gtkintl.h"
#include "a11y/gtktogglebuttonaccessible.h"
@@ -143,22 +142,10 @@ static void gtk_toggle_button_get_property (GObject *object,
GParamSpec *pspec);
-static void gtk_toggle_button_activatable_interface_init (GtkActivatableIface *iface);
-static void gtk_toggle_button_update (GtkActivatable *activatable,
- GtkAction *action,
- const gchar *property_name);
-static void gtk_toggle_button_sync_action_properties (GtkActivatable *activatable,
- GtkAction *action);
-
-static GtkActivatableIface *parent_activatable_iface;
static guint toggle_button_signals[LAST_SIGNAL] = { 0 };
-G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
G_DEFINE_TYPE_WITH_CODE (GtkToggleButton, gtk_toggle_button, GTK_TYPE_BUTTON,
- G_ADD_PRIVATE (GtkToggleButton)
- G_IMPLEMENT_INTERFACE (GTK_TYPE_ACTIVATABLE,
- gtk_toggle_button_activatable_interface_init))
-G_GNUC_END_IGNORE_DEPRECATIONS;
+ G_ADD_PRIVATE (GtkToggleButton))
static void
gtk_toggle_button_class_init (GtkToggleButtonClass *class)
@@ -236,60 +223,6 @@ gtk_toggle_button_init (GtkToggleButton *toggle_button)
gtk_style_context_add_class (context, "toggle");
}
-static void
-gtk_toggle_button_activatable_interface_init (GtkActivatableIface *iface)
-{
- parent_activatable_iface = g_type_interface_peek_parent (iface);
- iface->update = gtk_toggle_button_update;
- iface->sync_action_properties = gtk_toggle_button_sync_action_properties;
-}
-
-static void
-gtk_toggle_button_update (GtkActivatable *activatable,
- GtkAction *action,
- const gchar *property_name)
-{
- GtkToggleButton *button;
-
- parent_activatable_iface->update (activatable, action, property_name);
-
- button = GTK_TOGGLE_BUTTON (activatable);
-
- if (strcmp (property_name, "active") == 0)
- {
- G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
- gtk_action_block_activate (action);
- gtk_toggle_button_set_active (button, gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)));
- gtk_action_unblock_activate (action);
- G_GNUC_END_IGNORE_DEPRECATIONS;
- }
-
-}
-
-static void
-gtk_toggle_button_sync_action_properties (GtkActivatable *activatable,
- GtkAction *action)
-{
- GtkToggleButton *button;
- gboolean is_toggle_action;
-
- parent_activatable_iface->sync_action_properties (activatable, action);
-
- G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
- is_toggle_action = GTK_IS_TOGGLE_ACTION (action);
- G_GNUC_END_IGNORE_DEPRECATIONS;
-
- if (!is_toggle_action)
- return;
-
- button = GTK_TOGGLE_BUTTON (activatable);
-
- G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
- gtk_action_block_activate (action);
- gtk_toggle_button_set_active (button, gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)));
- gtk_action_unblock_activate (action);
- G_GNUC_END_IGNORE_DEPRECATIONS;
-}
/**
* gtk_toggle_button_new: