[gtk+/wip/baedert/box: 60/68] Remove GtkActivatable



commit 1b76c3846d443992319dc5983179a2ee918ecc52
Author: Timm Bäder <mail baedert org>
Date:   Sun Oct 16 18:48:05 2016 +0200

    Remove GtkActivatable

 gtk/deprecated/Makefile.inc     |    2 -
 gtk/deprecated/gtkaction.c      |   10 -
 gtk/deprecated/gtkactivatable.c |  558 ---------------------------------------
 gtk/deprecated/gtkactivatable.h |   98 -------
 gtk/deprecated/gtkuimanager.c   |    8 -
 gtk/gtk.h                       |    1 -
 tests/testmerge.c               |    6 -
 testsuite/gtk/action.c          |    3 -
 testsuite/gtk/notify.c          |    3 +-
 9 files changed, 1 insertions(+), 688 deletions(-)
---
diff --git a/gtk/deprecated/Makefile.inc b/gtk/deprecated/Makefile.inc
index 3968788..b7ae68a 100644
--- a/gtk/deprecated/Makefile.inc
+++ b/gtk/deprecated/Makefile.inc
@@ -1,5 +1,4 @@
 deprecated_h_sources =                         \
-       deprecated/gtkactivatable.h     \
        deprecated/gtkaction.h          \
        deprecated/gtkactiongroup.h     \
        deprecated/gtkgradient.h        \
@@ -12,7 +11,6 @@ deprecated_private_h_sources =                        \
        deprecated/gtksymboliccolorprivate.h
 
 deprecated_c_sources =                         \
-       deprecated/gtkactivatable.c     \
        deprecated/gtkaction.c          \
        deprecated/gtkactiongroup.c     \
        deprecated/gtkgradient.c        \
diff --git a/gtk/deprecated/gtkaction.c b/gtk/deprecated/gtkaction.c
index 036b786..d0adf04 100644
--- a/gtk/deprecated/gtkaction.c
+++ b/gtk/deprecated/gtkaction.c
@@ -98,7 +98,6 @@
 #include "gtktoolbar.h"
 #include "gtkprivate.h"
 #include "gtkbuildable.h"
-#include "gtkactivatable.h"
 
 
 struct _GtkActionPrivate 
@@ -872,9 +871,6 @@ _gtk_action_sync_menu_visible (GtkAction *action,
   g_return_if_fail (GTK_IS_MENU_ITEM (proxy));
   g_return_if_fail (action == NULL || GTK_IS_ACTION (action));
 
-  if (action == NULL)
-    action = gtk_activatable_get_related_action (GTK_ACTIVATABLE (proxy));
-
   if (action)
     {
       /* a GtkMenu for a <popup/> doesn't have to have an action */
@@ -1032,9 +1028,6 @@ gtk_action_create_menu_item (GtkAction *action)
 
   menu_item = GTK_ACTION_GET_CLASS (action)->create_menu_item (action);
 
-  gtk_activatable_set_use_action_appearance (GTK_ACTIVATABLE (menu_item), TRUE);
-  gtk_activatable_set_related_action (GTK_ACTIVATABLE (menu_item), action);
-
   return menu_item;
 }
 
@@ -1060,9 +1053,6 @@ gtk_action_create_tool_item (GtkAction *action)
 
   button = GTK_ACTION_GET_CLASS (action)->create_tool_item (action);
 
-  gtk_activatable_set_use_action_appearance (GTK_ACTIVATABLE (button), TRUE);
-  gtk_activatable_set_related_action (GTK_ACTIVATABLE (button), action);
-
   return button;
 }
 
diff --git a/gtk/deprecated/gtkuimanager.c b/gtk/deprecated/gtkuimanager.c
index e38b548..7cd6121 100644
--- a/gtk/deprecated/gtkuimanager.c
+++ b/gtk/deprecated/gtkuimanager.c
@@ -32,7 +32,6 @@
 
 #include <string.h>
 #include "gtkaccellabel.h"
-#include "gtkactivatable.h"
 #include "gtkbuildable.h"
 #include "gtkintl.h"
 #include "gtkmarshalers.h"
@@ -2517,7 +2516,6 @@ update_node (GtkUIManager *manager,
                }
              }
 
-            gtk_activatable_set_related_action (GTK_ACTIVATABLE (info->proxy), NULL);
            gtk_container_remove (GTK_CONTAINER (gtk_widget_get_parent (info->proxy)),
                                  info->proxy);
            g_object_unref (info->proxy);
@@ -2578,8 +2576,6 @@ update_node (GtkUIManager *manager,
                  }
              }
          }
-       else
-          gtk_activatable_set_related_action (GTK_ACTIVATABLE (info->proxy), action);
 
        if (prev_submenu)
          {
@@ -2712,7 +2708,6 @@ update_node (GtkUIManager *manager,
          g_signal_handlers_disconnect_by_func (info->proxy,
                                                G_CALLBACK (update_smart_separators),
                                                NULL);  
-          gtk_activatable_set_related_action (GTK_ACTIVATABLE (info->proxy), NULL);
          gtk_container_remove (GTK_CONTAINER (gtk_widget_get_parent (info->proxy)),
                                info->proxy);
          g_object_unref (info->proxy);
@@ -2739,7 +2734,6 @@ update_node (GtkUIManager *manager,
                                                G_CALLBACK (update_smart_separators),
                                                NULL);
          gtk_menu_item_set_submenu (GTK_MENU_ITEM (info->proxy), NULL);
-          gtk_activatable_set_related_action (GTK_ACTIVATABLE (info->proxy), action);
        }
 
       if (info->proxy)
@@ -2764,7 +2758,6 @@ update_node (GtkUIManager *manager,
          g_signal_handlers_disconnect_by_func (info->proxy,
                                                G_CALLBACK (update_smart_separators),
                                                NULL);
-          gtk_activatable_set_related_action (GTK_ACTIVATABLE (info->proxy), NULL);
          gtk_container_remove (GTK_CONTAINER (gtk_widget_get_parent (info->proxy)),
                                info->proxy);
          g_object_unref (info->proxy);
@@ -2791,7 +2784,6 @@ update_node (GtkUIManager *manager,
          g_signal_handlers_disconnect_by_func (info->proxy,
                                                G_CALLBACK (update_smart_separators),
                                                NULL);
-         gtk_activatable_set_related_action (GTK_ACTIVATABLE (info->proxy), action);
        }
 
       if (info->proxy)
diff --git a/gtk/gtk.h b/gtk/gtk.h
index 262c27a..1bec15d 100644
--- a/gtk/gtk.h
+++ b/gtk/gtk.h
@@ -244,7 +244,6 @@
 #include <gtk/gtkwindowgroup.h>
 
 #ifndef GTK_DISABLE_DEPRECATED
-#include <gtk/deprecated/gtkactivatable.h>
 #include <gtk/deprecated/gtkaction.h>
 #include <gtk/deprecated/gtkactiongroup.h>
 #include <gtk/deprecated/gtkgradient.h>
diff --git a/tests/testmerge.c b/tests/testmerge.c
index 6221e08..041afc1 100644
--- a/tests/testmerge.c
+++ b/tests/testmerge.c
@@ -569,15 +569,11 @@ main (int argc, char **argv)
 
   button = gtk_button_new ();
   gtk_box_pack_end (GTK_BOX (menu_box), button, FALSE, FALSE);
-  gtk_activatable_set_related_action (GTK_ACTIVATABLE (button),
-                           gtk_action_group_get_action (action_group, "AboutAction"));
 
   gtk_widget_show (button);
 
   button = gtk_check_button_new ();
   gtk_box_pack_end (GTK_BOX (menu_box), button, FALSE, FALSE);
-  gtk_activatable_set_related_action (GTK_ACTIVATABLE (button),
-                           gtk_action_group_get_action (action_group, "BoldAction"));
   gtk_widget_show (button);
 
   box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
@@ -585,8 +581,6 @@ main (int argc, char **argv)
   gtk_container_add (GTK_CONTAINER (box), gtk_label_new ("Bold:"));
   button = gtk_switch_new ();
   gtk_container_add (GTK_CONTAINER (box), button);
-  gtk_activatable_set_related_action (GTK_ACTIVATABLE (button),
-                            gtk_action_group_get_action (action_group, "BoldAction"));
   gtk_widget_show_all (box);
 
   merge = gtk_ui_manager_new ();
diff --git a/testsuite/gtk/action.c b/testsuite/gtk/action.c
index 92a1e08..a727b0a 100644
--- a/testsuite/gtk/action.c
+++ b/testsuite/gtk/action.c
@@ -60,9 +60,6 @@ menu_item_label_notify_count (ActionTest    *fixture,
   g_signal_connect (item, "notify::label",
                    G_CALLBACK (notify_count_emmisions), &emmisions);
 
-  gtk_activatable_do_set_related_action (GTK_ACTIVATABLE (item),
-                                        fixture->action);
-
   g_assert_cmpuint (emmisions, ==, 1);
 
   gtk_action_set_label (fixture->action, "new label");
diff --git a/testsuite/gtk/notify.c b/testsuite/gtk/notify.c
index 30131f3..b0b0be0 100644
--- a/testsuite/gtk/notify.c
+++ b/testsuite/gtk/notify.c
@@ -523,8 +523,7 @@ test_type (gconstpointer data)
         continue;
 
       /* Deprecated, not getting fixed */
-      if (g_str_equal (g_type_name (pspec->owner_type), "GtkActivatable") ||
-          g_str_equal (g_type_name (pspec->owner_type), "GtkActionGroup") ||
+      if (g_str_equal (g_type_name (pspec->owner_type), "GtkActionGroup") ||
           g_str_equal (g_type_name (pspec->owner_type), "GtkAction"))
         continue;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]