[gtk+/wip/otte/clipboard: 101/102] gtk: Remove GtkClipboard



commit 3b8636cf40b3d65f0d4a810af0b9e9a563f77f41
Author: Benjamin Otte <otte redhat com>
Date:   Sat Dec 2 15:42:12 2017 +0100

    gtk: Remove GtkClipboard

 gdk/gdkcontentformats.c   |    2 +-
 gtk/gtk.h                 |    1 -
 gtk/gtkapplication.c      |    1 -
 gtk/gtkclipboard-quartz.c | 1128 ------------------------
 gtk/gtkclipboard.c        | 2073 ---------------------------------------------
 gtk/gtkclipboard.h        |  288 -------
 gtk/gtkclipboardprivate.h |   91 --
 gtk/gtkmain.c             |    9 +-
 gtk/gtkwidget.c           |   31 -
 gtk/gtkwidget.h           |    3 -
 gtk/meson.build           |    3 -
 po-properties/POTFILES.in |    2 -
 po/POTFILES.in            |    2 -
 tests/meson.build         |    1 -
 tests/testclipboard.c     |  140 ---
 testsuite/gtk/clipboard.c |   88 --
 testsuite/gtk/meson.build |    1 -
 17 files changed, 2 insertions(+), 3862 deletions(-)
---
diff --git a/gdk/gdkcontentformats.c b/gdk/gdkcontentformats.c
index d5d071f..ab97163 100644
--- a/gdk/gdkcontentformats.c
+++ b/gdk/gdkcontentformats.c
@@ -20,7 +20,7 @@
  * @Title: Content Formats
  * @Short_description: Advertising and negotiating of content
  *     exchange formats
-   @See_also: #GdkDragContext, #GtkClipboard
+ * @See_also: #GdkDragContext, #GdkClipboard
  *
  * This section describes the #GdkContentFormats structure that is used to
  * advertise and negotiate the format of content passed between different
diff --git a/gtk/gtk.h b/gtk/gtk.h
index 9571edf..3f06cbd 100644
--- a/gtk/gtk.h
+++ b/gtk/gtk.h
@@ -71,7 +71,6 @@
 #include <gtk/gtkcenterbox.h>
 #include <gtk/gtkcheckbutton.h>
 #include <gtk/gtkcheckmenuitem.h>
-#include <gtk/gtkclipboard.h>
 #include <gtk/gtkcolorbutton.h>
 #include <gtk/gtkcolorchooser.h>
 #include <gtk/gtkcolorchooserdialog.h>
diff --git a/gtk/gtkapplication.c b/gtk/gtkapplication.c
index 0954d83..50b67de 100644
--- a/gtk/gtkapplication.c
+++ b/gtk/gtkapplication.c
@@ -29,7 +29,6 @@
 #endif
 
 #include "gtkapplicationprivate.h"
-#include "gtkclipboardprivate.h"
 #include "gtkmarshalers.h"
 #include "gtkmain.h"
 #include "gtkrecentmanager.h"
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index d727cbe..5cff51e 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -114,7 +114,6 @@
 
 #include "gtkaccelmapprivate.h"
 #include "gtkbox.h"
-#include "gtkclipboardprivate.h"
 #include "gtkdebug.h"
 #include "gtkdebugupdatesprivate.h"
 #include "gtkdndprivate.h"
@@ -1071,9 +1070,6 @@ gtk_main_sync (void)
   g_main_loop_unref (store.store_loop);
   store.store_loop = NULL;
   
-  /* Try storing all clipboard data we have */
-  _gtk_clipboard_store_all ();
-
   /* Synchronize the recent manager singleton */
   _gtk_recent_manager_sync ();
 }
@@ -1689,10 +1685,7 @@ gtk_main_do_event (GdkEvent *event)
   GList *tmp_list;
 
   if (event->type == GDK_OWNER_CHANGE)
-    {
-      _gtk_clipboard_handle_event (&event->owner_change);
-      return;
-    }
+    return;
 
   /* Find the widget which got the event. We store the widget
    * in the user_data field of GdkWindow's. Ignore the event
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 51b0864..9997d51 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -39,7 +39,6 @@
 #include "gtkcontainer.h"
 #include "gtkaccelmapprivate.h"
 #include "gtkaccelgroupprivate.h"
-#include "gtkclipboard.h"
 #include "gtkcssfiltervalueprivate.h"
 #include "gtkcssnumbervalueprivate.h"
 #include "gtkcssshadowsvalueprivate.h"
@@ -12424,36 +12423,6 @@ gtk_widget_get_primary_clipboard (GtkWidget *widget)
 }
 
 /**
- * gtk_widget_get_old_clipboard:
- * @widget: a #GtkWidget
- * @selection: a #GdkAtom which identifies the clipboard
- *             to use. %GDK_SELECTION_CLIPBOARD gives the
- *             default clipboard. Another common value
- *             is %GDK_SELECTION_PRIMARY, which gives
- *             the primary X selection.
- *
- * Returns the clipboard object for the given selection to
- * be used with @widget. @widget must have a #GdkDisplay
- * associated with it, so must be attached to a toplevel
- * window.
- *
- * Returns: (transfer none): the appropriate clipboard object. If no
- *             clipboard already exists, a new one will
- *             be created. Once a clipboard object has
- *             been created, it is persistent for all time.
- *
- * Since: 2.2
- **/
-GtkClipboard *
-gtk_widget_get_old_clipboard (GtkWidget *widget, GdkAtom selection)
-{
-  g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL);
-
-  return gtk_clipboard_get_for_display (gtk_widget_get_display (widget),
-                                       selection);
-}
-
-/**
  * gtk_widget_list_mnemonic_labels:
  * @widget: a #GtkWidget
  *
diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h
index edb7fea..ac33083 100644
--- a/gtk/gtkwidget.h
+++ b/gtk/gtkwidget.h
@@ -786,9 +786,6 @@ GDK_AVAILABLE_IN_3_94
 GdkClipboard *gtk_widget_get_clipboard   (GtkWidget *widget);
 GDK_AVAILABLE_IN_3_94
 GdkClipboard *gtk_widget_get_primary_clipboard (GtkWidget *widget);
-GDK_AVAILABLE_IN_ALL
-GtkClipboard *gtk_widget_get_old_clipboard   (GtkWidget *widget,
-                                         GdkAtom    selection);
 
 
 /* Expand flags and related support */
diff --git a/gtk/meson.build b/gtk/meson.build
index 5eb371f..6c27dab 100644
--- a/gtk/meson.build
+++ b/gtk/meson.build
@@ -413,7 +413,6 @@ gtk_public_headers = files([
   'gtkcellview.h',
   'gtkcheckbutton.h',
   'gtkcheckmenuitem.h',
-  'gtkclipboard.h',
   'gtkcolorbutton.h',
   'gtkcolorchooser.h',
   'gtkcolorchooserdialog.h',
@@ -707,12 +706,10 @@ gtk_use_wayland_or_x11_c_sources = files([
 
 if quartz_enabled
   dnd_sources = files([
-    'gtkclipboard-quartz.c',
     'gtkdnd-quartz.c',
   ])
 else
   dnd_sources = files([
-    'gtkclipboard.c',
     'gtkdnd.c',
     'gtkdragdest.c',
   ])
diff --git a/po-properties/POTFILES.in b/po-properties/POTFILES.in
index 1c7313d..907c1e0 100644
--- a/po-properties/POTFILES.in
+++ b/po-properties/POTFILES.in
@@ -88,8 +88,6 @@ gtk/gtkcellview.c
 gtk/gtkcenterbox.c
 gtk/gtkcheckbutton.c
 gtk/gtkcheckmenuitem.c
-gtk/gtkclipboard.c
-gtk/gtkclipboard-quartz.c
 gtk/gtkcolorbutton.c
 gtk/gtkcolorchooser.c
 gtk/gtkcolorchooserdialog.c
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 2ec85c9..0b5364d 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -88,8 +88,6 @@ gtk/gtkcellview.c
 gtk/gtkcenterbox.c
 gtk/gtkcheckbutton.c
 gtk/gtkcheckmenuitem.c
-gtk/gtkclipboard.c
-gtk/gtkclipboard-quartz.c
 gtk/gtkcolorbutton.c
 gtk/gtkcolorchooser.c
 gtk/gtkcolorchooserdialog.c
diff --git a/tests/meson.build b/tests/meson.build
index 69f871b..5db73a6 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -25,7 +25,6 @@ gtk_tests = [
   ['testbuttons'],
   ['testcairo'],
   ['testcalendar'],
-  ['testclipboard'],
   ['testclipboard2'],
   ['testcolorchooser'],
   ['testcolorchooser2'],
diff --git a/testsuite/gtk/meson.build b/testsuite/gtk/meson.build
index bce3b4d..c5b4ade 100644
--- a/testsuite/gtk/meson.build
+++ b/testsuite/gtk/meson.build
@@ -16,7 +16,6 @@ tests = [
   ['builderparser'],
   ['cellarea'],
   ['check-icon-names'],
-  ['clipboard'],
   ['cssprovider'],
   ['entry'],
   ['firefox-stylecontext'],


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