aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2019-03-28 08:25:55 +1100
committerNeil <nyamatongwe@gmail.com>2019-03-28 08:25:55 +1100
commitf26ce8da060279b8c6be63e29dac6f339bd65be4 (patch)
treeaedcb946140301ed2a93106b7257f61a4c4b9d3c
parent87ad00ce89284e66fc818ce60c8109bbfa047329 (diff)
downloadscintilla-mirror-f26ce8da060279b8c6be63e29dac6f339bd65be4.tar.gz
Use standard GDK_SELECTION_CLIPBOARD instead of interning "CLIPBOARD".
-rw-r--r--gtk/ScintillaGTK.cxx8
-rw-r--r--gtk/ScintillaGTK.h1
2 files changed, 3 insertions, 6 deletions
diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx
index ccf2498fa..9d6fa275f 100644
--- a/gtk/ScintillaGTK.cxx
+++ b/gtk/ScintillaGTK.cxx
@@ -131,7 +131,6 @@ enum {
TARGET_URI
};
-GdkAtom ScintillaGTK::atomClipboard = nullptr;
GdkAtom ScintillaGTK::atomUTF8 = nullptr;
GdkAtom ScintillaGTK::atomString = nullptr;
GdkAtom ScintillaGTK::atomUriList = nullptr;
@@ -1302,7 +1301,7 @@ void ScintillaGTK::RequestSelection(GdkAtom atomSelection) {
}
void ScintillaGTK::Paste() {
- RequestSelection(atomClipboard);
+ RequestSelection(GDK_SELECTION_CLIPBOARD);
}
void ScintillaGTK::CreateCallTipWindow(PRectangle rc) {
@@ -1439,7 +1438,7 @@ GObject *ScintillaGTK::MainObject() const noexcept {
void ScintillaGTK::ReceivedSelection(GtkSelectionData *selection_data) {
try {
- if ((SelectionOfGSD(selection_data) == atomClipboard) ||
+ if ((SelectionOfGSD(selection_data) == GDK_SELECTION_CLIPBOARD) ||
(SelectionOfGSD(selection_data) == GDK_SELECTION_PRIMARY)) {
if ((atomSought == atomUTF8) && (LengthOfGSD(selection_data) <= 0)) {
atomSought = atomString;
@@ -1540,7 +1539,7 @@ void ScintillaGTK::GetSelection(GtkSelectionData *selection_data, guint info, Se
void ScintillaGTK::StoreOnClipboard(SelectionText *clipText) {
GtkClipboard *clipBoard =
- gtk_widget_get_clipboard(GTK_WIDGET(PWidget(wMain)), atomClipboard);
+ gtk_widget_get_clipboard(GTK_WIDGET(PWidget(wMain)), GDK_SELECTION_CLIPBOARD);
if (clipBoard == nullptr) // Occurs if widget isn't in a toplevel
return;
@@ -3032,7 +3031,6 @@ void ScintillaGTK::ClassInit(OBJECT_CLASS *object_class, GtkWidgetClass *widget_
#ifdef SCI_LEXER
Scintilla_LinkLexers();
#endif
- atomClipboard = gdk_atom_intern("CLIPBOARD", FALSE);
atomUTF8 = gdk_atom_intern("UTF8_STRING", FALSE);
atomString = GDK_SELECTION_TYPE_STRING;
atomUriList = gdk_atom_intern("text/uri-list", FALSE);
diff --git a/gtk/ScintillaGTK.h b/gtk/ScintillaGTK.h
index c175192f9..27f900455 100644
--- a/gtk/ScintillaGTK.h
+++ b/gtk/ScintillaGTK.h
@@ -36,7 +36,6 @@ class ScintillaGTK : public ScintillaBase {
GtkWidgetClass *parentClass;
- static GdkAtom atomClipboard;
static GdkAtom atomUTF8;
static GdkAtom atomString;
static GdkAtom atomUriList;