[gtk+] Remove GtkShortcutsGesture
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Remove GtkShortcutsGesture
- Date: Sat, 5 Dec 2015 17:10:36 +0000 (UTC)
commit c83ab24237783b7224262889d7272432fd662fd9
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Dec 5 12:09:16 2015 -0500
Remove GtkShortcutsGesture
The gesture functionality was taken over by GtkShortcutsShortcut,
so this widget is no longer needed, and it never was in a stable
release, so lets get rid of it.
docs/reference/gtk/gtk3-sections.txt | 14 --
docs/reference/gtk/gtk3.types.in | 1 -
gtk/Makefile.am | 2 -
gtk/gtk.h | 1 -
gtk/gtkshortcutsgesture.c | 311 ----------------------------------
gtk/gtkshortcutsgesture.h | 42 -----
gtk/gtkshortcutsgroup.c | 10 +-
gtk/gtkshortcutswindow.c | 44 -----
8 files changed, 1 insertions(+), 424 deletions(-)
---
diff --git a/docs/reference/gtk/gtk3-sections.txt b/docs/reference/gtk/gtk3-sections.txt
index 4f0aaf4..cb13a99 100644
--- a/docs/reference/gtk/gtk3-sections.txt
+++ b/docs/reference/gtk/gtk3-sections.txt
@@ -8538,17 +8538,3 @@ GTK_GET_SHORTCUTS_SHORTCUT_CLASS
GtkShortcutsShortcutClass
gtk_shortcuts_shortcut_get_type
</SECTION>
-
-<SECTION>
-<FILE>gtkshortcutsgesture</FILE>
-GtkShortcutsGesture
-<SUBSECTION Standard>
-GTK_TYPE_SHORTCUTS_GESTURE
-GTK_SHORTCUTS_GESTURE
-GTK_IS_SHORTCUTS_GESTURE
-GTK_SHORTCUTS_GESTURE_CLASS
-GTK_IS_SHORTCUTS_GESTURE_CLASS
-GTK_GET_SHORTCUTS_GESTURE_CLASS
-<SUBSECTION Private>
-gtk_shortcuts_gesture_get_type
-</SECTION>
diff --git a/docs/reference/gtk/gtk3.types.in b/docs/reference/gtk/gtk3.types.in
index 93e42dc..beb5a4a 100644
--- a/docs/reference/gtk/gtk3.types.in
+++ b/docs/reference/gtk/gtk3.types.in
@@ -177,7 +177,6 @@ gtk_shortcuts_window_get_type
gtk_shortcuts_section_get_type
gtk_shortcuts_group_get_type
gtk_shortcuts_shortcut_get_type
-gtk_shortcuts_gesture_get_type
gtk_size_group_get_type
@ENABLE_ON_X11 gtk_socket_get_type
gtk_spin_button_get_type
diff --git a/gtk/Makefile.am b/gtk/Makefile.am
index 1498173..f56aa57 100644
--- a/gtk/Makefile.am
+++ b/gtk/Makefile.am
@@ -272,7 +272,6 @@ gtk_public_h_sources = \
gtkseparatormenuitem.h \
gtkseparatortoolitem.h \
gtksettings.h \
- gtkshortcutsgesture.h \
gtkshortcutsgroup.h \
gtkshortcutssection.h \
gtkshortcutsshortcut.h \
@@ -827,7 +826,6 @@ gtk_base_c_sources = \
gtkseparatormenuitem.c \
gtkseparatortoolitem.c \
gtksettings.c \
- gtkshortcutsgesture.c \
gtkshortcutsgroup.c \
gtkshortcutlabel.c \
gtkshortcutsshortcut.c \
diff --git a/gtk/gtk.h b/gtk/gtk.h
index ebfa22e..148d52f 100644
--- a/gtk/gtk.h
+++ b/gtk/gtk.h
@@ -186,7 +186,6 @@
#include <gtk/gtkseparatormenuitem.h>
#include <gtk/gtkseparatortoolitem.h>
#include <gtk/gtksettings.h>
-#include <gtk/gtkshortcutsgesture.h>
#include <gtk/gtkshortcutsgroup.h>
#include <gtk/gtkshortcutssection.h>
#include <gtk/gtkshortcutsshortcut.h>
diff --git a/gtk/gtkshortcutsgroup.c b/gtk/gtkshortcutsgroup.c
index 650c5b8..9e92715 100644
--- a/gtk/gtkshortcutsgroup.c
+++ b/gtk/gtkshortcutsgroup.c
@@ -21,7 +21,6 @@
#include "gtkshortcutsgroup.h"
#include "gtkshortcutsshortcut.h"
-#include "gtkshortcutsgesture.h"
#include "gtklabel.h"
#include "gtkorientable.h"
#include "gtksizegroup.h"
@@ -78,8 +77,6 @@ gtk_shortcuts_group_apply_accel_size_group (GtkShortcutsGroup *group,
{
if (GTK_IS_SHORTCUTS_SHORTCUT (child))
g_object_set (child, "accel-size-group", group->accel_size_group, NULL);
- else if (GTK_IS_SHORTCUTS_GESTURE (child))
- g_object_set (child, "icon-size-group", group->accel_size_group, NULL);
}
static void
@@ -88,8 +85,6 @@ gtk_shortcuts_group_apply_title_size_group (GtkShortcutsGroup *group,
{
if (GTK_IS_SHORTCUTS_SHORTCUT (child))
g_object_set (child, "title-size-group", group->title_size_group, NULL);
- else if (GTK_IS_SHORTCUTS_GESTURE (child))
- g_object_set (child, "title-size-group", group->title_size_group, NULL);
}
static void
@@ -137,8 +132,6 @@ gtk_shortcuts_group_get_height (GtkShortcutsGroup *group)
continue;
else if (GTK_IS_SHORTCUTS_SHORTCUT (child))
height += 1;
- else if (GTK_IS_SHORTCUTS_GESTURE (child))
- height += 2;
}
g_list_free (children);
@@ -149,8 +142,7 @@ static void
gtk_shortcuts_group_add (GtkContainer *container,
GtkWidget *widget)
{
- if (GTK_IS_SHORTCUTS_SHORTCUT (widget) ||
- GTK_IS_SHORTCUTS_GESTURE (widget))
+ if (GTK_IS_SHORTCUTS_SHORTCUT (widget))
{
GTK_CONTAINER_CLASS (gtk_shortcuts_group_parent_class)->add (container, widget);
gtk_shortcuts_group_apply_accel_size_group (GTK_SHORTCUTS_GROUP (container), widget);
diff --git a/gtk/gtkshortcutswindow.c b/gtk/gtkshortcutswindow.c
index 2d3e5c3..f9e46b6 100644
--- a/gtk/gtkshortcutswindow.c
+++ b/gtk/gtkshortcutswindow.c
@@ -22,7 +22,6 @@
#include "gtkscrolledwindow.h"
#include "gtkshortcutssection.h"
#include "gtkshortcutsgroup.h"
-#include "gtkshortcutsgesture.h"
#include "gtkshortcutsshortcut.h"
#include "gtksearchbar.h"
#include "gtksearchentry.h"
@@ -180,11 +179,9 @@ gtk_shortcuts_window_add_search_item (GtkWidget *child, gpointer data)
GtkShortcutsWindow *self = data;
GtkShortcutsWindowPrivate *priv = gtk_shortcuts_window_get_instance_private (self);
GtkWidget *item;
- gchar *subtitle = NULL;
gchar *accelerator = NULL;
gchar *title = NULL;
gchar *hash_key = NULL;
- GIcon *icon = NULL;
GtkTextDirection direction;
gchar *str;
gchar *keywords;
@@ -226,45 +223,6 @@ gtk_shortcuts_window_add_search_item (GtkWidget *child, gpointer data)
g_free (accelerator);
g_free (str);
}
- else if (GTK_IS_SHORTCUTS_GESTURE (child))
- {
- g_object_get (child,
- "title", &title,
- "subtitle", &subtitle,
- "icon", &icon,
- NULL);
-
- hash_key = g_strdup_printf ("%s-%s", title, subtitle);
- if (g_hash_table_contains (priv->search_items_hash, hash_key))
- {
- g_free (subtitle);
- g_free (title);
- g_free (hash_key);
- g_clear_object (&icon);
- return;
- }
-
- g_hash_table_insert (priv->search_items_hash, hash_key, GINT_TO_POINTER (1));
-
- item = g_object_new (GTK_TYPE_SHORTCUTS_GESTURE,
- "title", title,
- "subtitle", subtitle,
- "icon", icon,
- "icon-size-group", priv->search_image_group,
- "title-size-group", priv->search_text_group,
- NULL);
-
- str = g_strdup_printf ("%s %s", title, subtitle);
- keywords = g_utf8_strdown (str, -1);
-
- g_hash_table_insert (priv->keywords, item, keywords);
- gtk_container_add (GTK_CONTAINER (priv->search_gestures), item);
-
- g_free (subtitle);
- g_free (title);
- g_clear_object (&icon);
- g_free (str);
- }
else if (GTK_IS_CONTAINER (child))
{
gtk_container_foreach (GTK_CONTAINER (child), gtk_shortcuts_window_add_search_item, self);
@@ -782,8 +740,6 @@ gtk_shortcuts_window_class_init (GtkShortcutsWindowClass *klass)
gtk_binding_entry_add_signal (binding_set, GDK_KEY_f, GDK_CONTROL_MASK, "search", 0);
g_type_ensure (GTK_TYPE_SHORTCUTS_GROUP);
- g_type_ensure (GTK_TYPE_SHORTCUTS_GROUP);
- g_type_ensure (GTK_TYPE_SHORTCUTS_GESTURE);
g_type_ensure (GTK_TYPE_SHORTCUTS_SHORTCUT);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]