[gtk+/wip/baedert/box: 20/29] recentchooserdefault: Stop implementing GtkActivatable
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/baedert/box: 20/29] recentchooserdefault: Stop implementing GtkActivatable
- Date: Mon, 17 Oct 2016 07:16:05 +0000 (UTC)
commit 1c123da1d70130da5f322cedfb41fcc8e64ae475
Author: Timm Bäder <mail baedert org>
Date: Sun Oct 16 18:26:00 2016 +0200
recentchooserdefault: Stop implementing GtkActivatable
gtk/gtkrecentchooserdefault.c | 92 +----------------------------------------
1 files changed, 1 insertions(+), 91 deletions(-)
---
diff --git a/gtk/gtkrecentchooserdefault.c b/gtk/gtkrecentchooserdefault.c
index b6b8f93..a305b32 100644
--- a/gtk/gtkrecentchooserdefault.c
+++ b/gtk/gtkrecentchooserdefault.c
@@ -64,7 +64,6 @@
#include "gtktypebuiltins.h"
#include "gtkorientable.h"
#include "gtkwindowgroup.h"
-#include "deprecated/gtkactivatable.h"
#include "gtkrecentmanager.h"
#include "gtkrecentfilter.h"
@@ -73,16 +72,6 @@
#include "gtkrecentchooserutils.h"
#include "gtkrecentchooserdefault.h"
-
-enum
-{
- PROP_0,
-
- /* activatable properties */
- PROP_ACTIVATABLE_RELATED_ACTION,
- PROP_ACTIVATABLE_USE_ACTION_APPEARANCE
-};
-
typedef struct
{
GtkRecentManager *manager;
@@ -283,25 +272,12 @@ static gboolean recent_view_query_tooltip_cb (GtkWidget *widget,
GtkTooltip *tooltip,
gpointer user_data);
-static void gtk_recent_chooser_activatable_iface_init (GtkActivatableIface *iface);
-static void gtk_recent_chooser_update (GtkActivatable *activatable,
- GtkAction *action,
- const gchar *property_name);
-static void gtk_recent_chooser_sync_action_properties (GtkActivatable *activatable,
- GtkAction *action);
-
-G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
G_DEFINE_TYPE_WITH_CODE (GtkRecentChooserDefault,
_gtk_recent_chooser_default,
GTK_TYPE_BOX,
G_ADD_PRIVATE (GtkRecentChooserDefault)
G_IMPLEMENT_INTERFACE (GTK_TYPE_RECENT_CHOOSER,
- gtk_recent_chooser_iface_init)
- G_IMPLEMENT_INTERFACE (GTK_TYPE_ACTIVATABLE,
- gtk_recent_chooser_activatable_iface_init))
-G_GNUC_END_IGNORE_DEPRECATIONS;
-
-
+ gtk_recent_chooser_iface_init))
static void
gtk_recent_chooser_iface_init (GtkRecentChooserIface *iface)
@@ -321,14 +297,6 @@ gtk_recent_chooser_iface_init (GtkRecentChooserIface *iface)
}
static void
-gtk_recent_chooser_activatable_iface_init (GtkActivatableIface *iface)
-
-{
- iface->update = gtk_recent_chooser_update;
- iface->sync_action_properties = gtk_recent_chooser_sync_action_properties;
-}
-
-static void
_gtk_recent_chooser_default_class_init (GtkRecentChooserDefaultClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
@@ -344,9 +312,6 @@ _gtk_recent_chooser_default_class_init (GtkRecentChooserDefaultClass *klass)
_gtk_recent_chooser_install_properties (gobject_class);
- g_object_class_override_property (gobject_class, PROP_ACTIVATABLE_RELATED_ACTION, "related-action");
- g_object_class_override_property (gobject_class, PROP_ACTIVATABLE_USE_ACTION_APPEARANCE,
"use-action-appearance");
-
/* Bind class to template
*/
gtk_widget_class_set_template_from_resource (widget_class,
@@ -510,12 +475,6 @@ gtk_recent_chooser_default_set_property (GObject *object,
case GTK_RECENT_CHOOSER_PROP_FILTER:
set_current_filter (impl, g_value_get_object (value));
break;
- case PROP_ACTIVATABLE_RELATED_ACTION:
- _gtk_recent_chooser_set_related_action (GTK_RECENT_CHOOSER (impl), g_value_get_object (value));
- break;
- case PROP_ACTIVATABLE_USE_ACTION_APPEARANCE:
- _gtk_recent_chooser_set_use_action_appearance (GTK_RECENT_CHOOSER (impl), g_value_get_boolean (value));
- break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -559,12 +518,6 @@ gtk_recent_chooser_default_get_property (GObject *object,
case GTK_RECENT_CHOOSER_PROP_FILTER:
g_value_set_object (value, impl->priv->current_filter);
break;
- case PROP_ACTIVATABLE_RELATED_ACTION:
- g_value_set_object (value, _gtk_recent_chooser_get_related_action (GTK_RECENT_CHOOSER (impl)));
- break;
- case PROP_ACTIVATABLE_USE_ACTION_APPEARANCE:
- g_value_set_boolean (value, _gtk_recent_chooser_get_use_action_appearance (GTK_RECENT_CHOOSER (impl)));
- break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -1817,49 +1770,6 @@ set_recent_manager (GtkRecentChooserDefault *impl,
}
}
-static void
-gtk_recent_chooser_update (GtkActivatable *activatable,
- GtkAction *action,
- const gchar *property_name)
-{
- G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
- if (strcmp (property_name, "visible") == 0)
- {
- if (gtk_action_is_visible (action))
- gtk_widget_show (GTK_WIDGET (activatable));
- else
- gtk_widget_hide (GTK_WIDGET (activatable));
- }
-
- if (strcmp (property_name, "sensitive") == 0)
- gtk_widget_set_sensitive (GTK_WIDGET (activatable), gtk_action_is_sensitive (action));
-
- G_GNUC_END_IGNORE_DEPRECATIONS;
-
- _gtk_recent_chooser_update (activatable, action, property_name);
-}
-
-
-static void
-gtk_recent_chooser_sync_action_properties (GtkActivatable *activatable,
- GtkAction *action)
-{
- G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
- if (action)
- {
- if (gtk_action_is_visible (action))
- gtk_widget_show (GTK_WIDGET (activatable));
- else
- gtk_widget_hide (GTK_WIDGET (activatable));
-
- gtk_widget_set_sensitive (GTK_WIDGET (activatable), gtk_action_is_sensitive (action));
- }
- G_GNUC_END_IGNORE_DEPRECATIONS;
-
- _gtk_recent_chooser_sync_action_properties (activatable, action);
-}
-
-
GtkWidget *
_gtk_recent_chooser_default_new (GtkRecentManager *manager)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]