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
commit229b4a6da49ad9a6f4345ef2181f55a0659b6456 (patch)
treebc27d266010a244139b6616b28d905071550519b
parent92c99362cd2e5e579fff7bac1bd18b62f391f534 (diff)
downloadscintilla-mirror-229b4a6da49ad9a6f4345ef2181f55a0659b6456.tar.gz
Backport: Use standard GDK_SELECTION_CLIPBOARD instead of interning "CLIPBOARD".
Backport of changeset 7346:5e3a239e7484.
-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 dae9f2861..121d76309 100644
--- a/gtk/ScintillaGTK.cxx
+++ b/gtk/ScintillaGTK.cxx
@@ -130,7 +130,6 @@ enum {
TARGET_URI
};
-GdkAtom ScintillaGTK::atomClipboard = nullptr;
GdkAtom ScintillaGTK::atomUTF8 = nullptr;
GdkAtom ScintillaGTK::atomString = nullptr;
GdkAtom ScintillaGTK::atomUriList = nullptr;
@@ -1301,7 +1300,7 @@ void ScintillaGTK::RequestSelection(GdkAtom atomSelection) {
}
void ScintillaGTK::Paste() {
- RequestSelection(atomClipboard);
+ RequestSelection(GDK_SELECTION_CLIPBOARD);
}
void ScintillaGTK::CreateCallTipWindow(PRectangle rc) {
@@ -1438,7 +1437,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;
@@ -1539,7 +1538,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;
@@ -3031,7 +3030,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;