X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fgtk%2FGWorkArea.C;h=9b4e3585fbe2d00fcd1b4607e2101c5348414422;hb=063994371eb9d3465ddeda0a41aa450f891043be;hp=3867841a25708c5104ad9a1f417841998abde050;hpb=ebaaff58fad6299f19bfd65157b5deabf6925fcf;p=lyx.git diff --git a/src/frontends/gtk/GWorkArea.C b/src/frontends/gtk/GWorkArea.C index 3867841a25..9b4e3585fb 100644 --- a/src/frontends/gtk/GWorkArea.C +++ b/src/frontends/gtk/GWorkArea.C @@ -493,36 +493,5 @@ bool GWorkArea::onKeyPress(GdkEventKey * event) return true; } - -void GWorkArea::onClipboardGet(Gtk::SelectionData & /*selection_data*/, - guint /*info*/) -{ - lyx::docstring const sel = view_.view()->requestSelection(); - if (!sel.empty()) - view_.gui().selection().put(sel); -} - - -void GWorkArea::onClipboardClear() -{ -// clearSelection(); -} - - -void GWorkArea::haveSelection(bool toHave) -{ - if (toHave) { - Glib::RefPtr clipboard = - Gtk::Clipboard::get(GDK_SELECTION_PRIMARY); - std::vector listTargets; - listTargets.push_back(Gtk::TargetEntry("UTF8_STRING")); - clipboard->set(listTargets, - sigc::mem_fun(const_cast(*this), - &GWorkArea::onClipboardGet), - sigc::mem_fun(const_cast(*this), - &GWorkArea::onClipboardClear)); - } -} - } // namespace frontend } // namespace lyx