summaryrefslogtreecommitdiff
path: root/gdk/win32
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2017-12-14 01:03:00 +0100
committerBenjamin Otte <otte@redhat.com>2017-12-14 03:05:34 +0100
commita4b42f0b736943be15924963c8d563c44962225f (patch)
tree2db9045fb2155d6d49f369737e140a977c1fe7e2 /gdk/win32
parent8993a51893473fa6904e6b6ce8ba6e8b7abc3ee8 (diff)
downloadgtk+-a4b42f0b736943be15924963c8d563c44962225f.tar.gz
gdk: Remove selection defines
And with it, remove the selections section from the docs. So selections are gone for good now.
Diffstat (limited to 'gdk/win32')
-rw-r--r--gdk/win32/gdkproperty-win32.c42
-rw-r--r--gdk/win32/gdkselection-win32.c5
2 files changed, 5 insertions, 42 deletions
diff --git a/gdk/win32/gdkproperty-win32.c b/gdk/win32/gdkproperty-win32.c
index 16a8db5bff..4692df5dfc 100644
--- a/gdk/win32/gdkproperty-win32.c
+++ b/gdk/win32/gdkproperty-win32.c
@@ -29,7 +29,6 @@
#include <glib/gprintf.h>
#include "gdkproperty.h"
-#include "gdkselection.h"
#include "gdkdisplayprivate.h"
#include "gdkprivate-win32.h"
#include "gdkwin32.h"
@@ -49,33 +48,9 @@ _gdk_win32_display_manager_atom_intern (GdkDisplayManager *manager,
retval = g_hash_table_lookup (atom_hash, atom_name);
if (!retval)
{
- if (strcmp (atom_name, "PRIMARY") == 0)
- retval = GDK_SELECTION_PRIMARY;
- else if (strcmp (atom_name, "SECONDARY") == 0)
- retval = GDK_SELECTION_SECONDARY;
- else if (strcmp (atom_name, "CLIPBOARD") == 0)
- retval = GDK_SELECTION_CLIPBOARD;
- else if (strcmp (atom_name, "ATOM") == 0)
- retval = GDK_SELECTION_TYPE_ATOM;
- else if (strcmp (atom_name, "BITMAP") == 0)
- retval = GDK_SELECTION_TYPE_BITMAP;
- else if (strcmp (atom_name, "COLORMAP") == 0)
- retval = GDK_SELECTION_TYPE_COLORMAP;
- else if (strcmp (atom_name, "DRAWABLE") == 0)
- retval = GDK_SELECTION_TYPE_DRAWABLE;
- else if (strcmp (atom_name, "INTEGER") == 0)
- retval = GDK_SELECTION_TYPE_INTEGER;
- else if (strcmp (atom_name, "PIXMAP") == 0)
- retval = GDK_SELECTION_TYPE_PIXMAP;
- else if (strcmp (atom_name, "WINDOW") == 0)
- retval = GDK_SELECTION_TYPE_WINDOW;
- else if (strcmp (atom_name, "STRING") == 0)
- retval = GDK_SELECTION_TYPE_STRING;
- else
- {
- win32_atom = GlobalAddAtom (atom_name);
- retval = GUINT_TO_POINTER ((guint) win32_atom);
- }
+ win32_atom = GlobalAddAtom (atom_name);
+ retval = GUINT_TO_POINTER ((guint) win32_atom);
+
g_hash_table_insert (atom_hash,
g_strdup (atom_name),
retval);
@@ -92,17 +67,6 @@ _gdk_win32_display_manager_get_atom_name (GdkDisplayManager *manager,
gchar name[256];
if (NULL == atom) return g_strdup ("<none>");
- else if (GDK_SELECTION_PRIMARY == atom) return g_strdup ("PRIMARY");
- else if (GDK_SELECTION_SECONDARY == atom) return g_strdup ("SECONDARY");
- else if (GDK_SELECTION_CLIPBOARD == atom) return g_strdup ("CLIPBOARD");
- else if (GDK_SELECTION_TYPE_ATOM == atom) return g_strdup ("ATOM");
- else if (GDK_SELECTION_TYPE_BITMAP == atom) return g_strdup ("BITMAP");
- else if (GDK_SELECTION_TYPE_COLORMAP == atom) return g_strdup ("COLORMAP");
- else if (GDK_SELECTION_TYPE_DRAWABLE == atom) return g_strdup ("DRAWABLE");
- else if (GDK_SELECTION_TYPE_INTEGER == atom) return g_strdup ("INTEGER");
- else if (GDK_SELECTION_TYPE_PIXMAP == atom) return g_strdup ("PIXMAP");
- else if (GDK_SELECTION_TYPE_WINDOW == atom) return g_strdup ("WINDOW");
- else if (GDK_SELECTION_TYPE_STRING == atom) return g_strdup ("STRING");
win32_atom = GPOINTER_TO_UINT (atom);
diff --git a/gdk/win32/gdkselection-win32.c b/gdk/win32/gdkselection-win32.c
index 18a285908a..35ef0be45f 100644
--- a/gdk/win32/gdkselection-win32.c
+++ b/gdk/win32/gdkselection-win32.c
@@ -284,7 +284,6 @@ which emits the "drag-data-received" signal for the app.
#include <shlobj.h>
#include "gdkproperty.h"
-#include "gdkselection.h"
#include "gdkdisplay.h"
#include "gdkprivate-win32.h"
#include "gdkselection-win32.h"
@@ -2558,7 +2557,7 @@ gdk_text_property_to_text_list_for_display (GdkDisplay *display,
if (!list)
return 0;
- if (encoding == GDK_TARGET_STRING)
+ if (encoding == gdk_atom_intern_static_string ("STRING"))
source_charset = g_strdup ("ISO-8859-1");
else if (encoding == _gdk_win32_selection_atom (GDK_WIN32_ATOM_INDEX_UTF8_STRING))
source_charset = g_strdup ("UTF-8");
@@ -2669,7 +2668,7 @@ _gdk_win32_display_text_property_to_utf8_list (GdkDisplay *display,
g_return_val_if_fail (text != NULL, 0);
g_return_val_if_fail (length >= 0, 0);
- if (encoding == GDK_TARGET_STRING)
+ if (encoding == gdk_atom_intern_static_string ("STRING"))
{
return make_list ((gchar *)text, length, TRUE, list);
}