[gnote] Remove keybinder



commit 15e7e1706dbf9fd51063df2e674accdce1b55841
Author: Aurimas Černius <aurisc4 gmail com>
Date:   Sun Jan 11 21:19:13 2015 +0200

    Remove keybinder

 data/org.gnome.gnote.gschema.xml.in |   10 +-
 src/Makefile.am                     |    7 -
 src/gnote.cpp                       |   13 --
 src/gnote.hpp                       |   13 --
 src/keybinder.hpp                   |   51 --------
 src/preferencesdialog.cpp           |  114 -----------------
 src/preferencesdialog.hpp           |    3 +-
 src/prefskeybinder.cpp              |  239 -----------------------------------
 src/prefskeybinder.hpp              |   74 -----------
 src/xkeybinder.cpp                  |  107 ----------------
 src/xkeybinder.hpp                  |   57 ---------
 11 files changed, 6 insertions(+), 682 deletions(-)
---
diff --git a/data/org.gnome.gnote.gschema.xml.in b/data/org.gnome.gnote.gschema.xml.in
index 0837a89..3ddadb3 100644
--- a/data/org.gnome.gnote.gschema.xml.in
+++ b/data/org.gnome.gnote.gschema.xml.in
@@ -145,27 +145,27 @@
     <key name="show-note-menu" type="s">
       <default>'&lt;Alt&gt;F12'</default>
       <_summary>Show applet menu</_summary>
-      <_description>The global keybinding for showing the Gnote applet's menu. The format looks like 
"&lt;Control&gt;a" or "&lt;Shift&gt;&lt;Alt&gt;F1". The parser is fairly liberal and allows lower or upper 
case, and also abbreviations such as "&lt;Ctl&gt;" and "&lt;Ctrl&gt;". If you set the option to the special 
string "disabled", then there will be no keybinding for this action.</_description>
+      <_description>Deprecated, has no effect.</_description>
     </key>
     <key name="open-start-here" type="s">
       <default>'&lt;Alt&gt;F11'</default>
       <_summary>Open Start Here</_summary>
-      <_description>The global keybinding for opening the "Start Here" note. The format looks like 
"&lt;Control&gt;a" or "&lt;Shift&gt;&lt;Alt&gt;F1". The parser is fairly liberal and allows lower or upper 
case, and also abbreviations such as "&lt;Ctl&gt;" and "&lt;Ctrl&gt;". If you set the option to the special 
string "disabled", then there will be no keybinding for this action.</_description>
+      <_description>Deprecated, has no effect.</_description>
     </key>
     <key name="create-new-note" type="s">
       <default>'disabled'</default>
       <_summary>Create a new Note</_summary>
-      <_description>The global keybinding for creating and displaying a new Note. The format looks like 
"&lt;Control&gt;a" or "&lt;Shift&gt;&lt;Alt&gt;F1". The parser is fairly liberal and allows lower or upper 
case, and also abbreviations such as "&lt;Ctl&gt;" and "&lt;Ctrl&gt;". If you set the option to the special 
string "disabled", then there will be no keybinding for this action.</_description>
+      <_description>Deprecated, has no effect.</_description>
     </key>
     <key name="open-search" type="s">
       <default>'disabled'</default>
       <_summary>Open Search Dialog</_summary>
-      <_description>The global keybinding for opening the Note Search dialog. The format looks like 
"&lt;Control&gt;a" or "&lt;Shift&gt;&lt;Alt&gt;F1". The parser is fairly liberal and allows lower or upper 
case, and also abbreviations such as "&lt;Ctl&gt;" and "&lt;Ctrl&gt;". If you set the option to the special 
string "disabled", then there will be no keybinding for this action.</_description>
+      <_description>Deprecated, has no effect.</_description>
     </key>
     <key name="open-recent-changes" type="s">
       <default>'disabled'</default>
       <_summary>Open Recent Changes</_summary>
-      <_description>The global keybinding for opening the Recent Changes dialog. The format looks like 
"&lt;Control&gt;a" or "&lt;Shift&gt;&lt;Alt&gt;F1". The parser is fairly liberal and allows lower or upper 
case, and also abbreviations such as "&lt;Ctl&gt;" and "&lt;Ctrl&gt;". If you set the option to the special 
string "disabled", then there will be no keybinding for this action.</_description>
+      <_description>Deprecated, has no effect.</_description>
     </key>
   </schema>
   <schema id="org.gnome.gnote.export-html" path="/org/gnome/gnote/export-html/">
diff --git a/src/Makefile.am b/src/Makefile.am
index 3709b86..3d67979 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -84,12 +84,6 @@ DBUS_SOURCES=remotecontrolproxy.hpp remotecontrolproxy.cpp \
        dbus/searchprovider.hpp dbus/searchprovider.cpp \
        $(NULL)
 
-if HAVE_X11_SUPPORT
-KEYBINDER_SOURCES=keybinder.hpp \
-       prefskeybinder.hpp prefskeybinder.cpp \
-       xkeybinder.hpp xkeybinder.cpp
-endif
-
 libgnote_la_LDFLAGS = -release @LIBGNOTE_RELEASE@ -version-info @LIBGNOTE_VERSION_INFO@
 libgnote_la_LIBADD = $(LIBGNOTE_LIBS)
 libgnote_la_SOURCES = \
@@ -186,7 +180,6 @@ gnote_SOURCES = \
        synchronization/syncdialog.hpp synchronization/syncdialog.cpp \
        synchronization/syncmanager.hpp synchronization/syncmanager.cpp \
        $(DBUS_SOURCES) \
-       $(KEYBINDER_SOURCES) \
        main.cpp \
        $(NULL)
 
diff --git a/src/gnote.cpp b/src/gnote.cpp
index 41a3edd..e6c8a95 100644
--- a/src/gnote.cpp
+++ b/src/gnote.cpp
@@ -56,10 +56,6 @@
 #include "notebooks/notebookmanager.hpp"
 #include "synchronization/syncmanager.hpp"
 
-#ifdef HAVE_X11_SUPPORT
-#include "xkeybinder.hpp"
-#endif
-
 
 namespace gnote {
 
@@ -69,9 +65,6 @@ namespace gnote {
     , m_is_background(false)
     , m_is_shell_search(false)
     , m_prefsdlg(NULL)
-#ifdef HAVE_X11_SUPPORT
-    , m_keybinder(NULL)
-#endif
   {
   }
 
@@ -81,9 +74,6 @@ namespace gnote {
       delete m_prefsdlg;
     }
     delete m_manager;
-#ifdef HAVE_X11_SUPPORT
-    delete m_keybinder;
-#endif
   }
 
 
@@ -151,9 +141,6 @@ namespace gnote {
     new Preferences;
     m_manager = new NoteManager(note_path);
     new notebooks::NotebookManager(default_note_manager());
-#ifdef HAVE_X11_SUPPORT
-    m_keybinder = new XKeybinder();
-#endif
     new ActionManager;
     sync::SyncManager::init(default_note_manager());
 
diff --git a/src/gnote.hpp b/src/gnote.hpp
index 76220f5..4dcb146 100644
--- a/src/gnote.hpp
+++ b/src/gnote.hpp
@@ -37,10 +37,6 @@
 #include "remotecontrolproxy.hpp"
 #include "synchronization/syncdialog.hpp"
 
-#ifdef HAVE_X11_SUPPORT
-#include "keybinder.hpp"
-#endif
-
 namespace gnote {
 
 class PreferencesDialog;
@@ -121,12 +117,6 @@ public:
     {
       return *m_manager;
     }
-#ifdef HAVE_X11_SUPPORT
-  IKeybinder & keybinder()
-    {
-      return *m_keybinder;
-    }
-#endif
 
   void setup_global_actions();
 
@@ -176,9 +166,6 @@ private:
   PreferencesDialog *m_prefsdlg;
   GnoteCommandLine cmd_line;
   sync::SyncDialog::Ptr m_sync_dlg;
-#ifdef HAVE_X11_SUPPORT
-  IKeybinder  *m_keybinder;
-#endif
 };
 
 
diff --git a/src/preferencesdialog.cpp b/src/preferencesdialog.cpp
index b9dcd3a..e6be910 100644
--- a/src/preferencesdialog.cpp
+++ b/src/preferencesdialog.cpp
@@ -120,10 +120,6 @@ namespace gnote {
     notebook->append_page (*manage(make_editing_pane()),
                            _("General"));
     notebook->append_page(*manage(make_links_pane()), _("Links"));
-#ifdef HAVE_X11_SUPPORT
-    notebook->append_page (*manage(make_hotkeys_pane()),
-                           _("Hotkeys"));
-#endif
 //      }
     notebook->append_page(*manage(make_sync_pane()),
                           _("Synchronization"));
@@ -409,116 +405,6 @@ namespace gnote {
     return vbox;
   }
 
-    // List of Hotkey options
-  Gtk::Widget *PreferencesDialog::make_hotkeys_pane()
-  {
-    Gtk::Label* label;
-    Gtk::CheckButton* check;
-    Gtk::Alignment* align;
-    Gtk::Entry* entry;
-    sharp::PropertyEditorBool *keybind_peditor;
-    sharp::PropertyEditor *peditor;
-    Glib::RefPtr<Gio::Settings> settings = Preferences::obj().get_schema_settings(Preferences::SCHEMA_GNOTE);
-    Glib::RefPtr<Gio::Settings> keybindings_settings = Preferences::obj()
-      .get_schema_settings(Preferences::SCHEMA_KEYBINDINGS);
-
-    Gtk::Grid* hotkeys_list = new Gtk::Grid;
-    hotkeys_list->set_border_width(12);
-    hotkeys_list->show ();
-    int hotkeys_list_row = 0;
-
-
-    // Hotkeys...
-
-    check = manage(make_check_button (_("Listen for _hotkeys")));
-    set_widget_tooltip(*check, _("Hotkeys allow you to quickly access "
-                                 "your notes from anywhere with a keypress. "
-                                 "Example Hotkeys: <b>&lt;Control&gt;&lt;Shift&gt;F11</b>, "
-                                 "<b>&lt;Alt&gt;N</b>"));
-    hotkeys_list->attach(*check, 0, hotkeys_list_row++, 1, 1);
-
-    keybind_peditor = new sharp::PropertyEditorBool(settings, Preferences::ENABLE_KEYBINDINGS, *check);
-    keybind_peditor->setup();
-
-    align = manage(new Gtk::Alignment (0.5f, 0.5f, 0.0f, 1.0f));
-    align->show ();
-    hotkeys_list->attach(*align, 0, hotkeys_list_row++, 1, 1);
-
-    Gtk::Table *table = manage(new Gtk::Table (4, 2, false));
-    table->set_col_spacings(6);
-    table->set_row_spacings(6);
-    table->show ();
-    align->add(*table);
-
-
-    // Show notes menu keybinding...
-
-    label = manage(make_label (_("Show notes _menu")));
-    table->attach (*label, 0, 1, 0, 1);
-
-    entry = manage(new Gtk::Entry ());
-    label->set_mnemonic_widget(*entry);
-    entry->show ();
-    table->attach (*entry, 1, 2, 0, 1);
-
-    peditor = new sharp::PropertyEditor(keybindings_settings,
-                                        Preferences::KEYBINDING_SHOW_NOTE_MENU,
-                                        *entry);
-    peditor->setup();
-    keybind_peditor->add_guard (entry);
-
-
-    // Open Start Here keybinding...
-
-    label = manage(make_label (_("Open \"_Start Here\"")));
-    table->attach (*label, 0, 1, 1, 2);
-
-    entry = manage(new Gtk::Entry ());
-    label->set_mnemonic_widget(*entry);
-    entry->show ();
-    table->attach (*entry, 1, 2, 1, 2);
-
-    peditor = new sharp::PropertyEditor(keybindings_settings,
-                                        Preferences::KEYBINDING_OPEN_START_HERE,
-                                        *entry);
-    peditor->setup();
-    keybind_peditor->add_guard (entry);
-
-    // Create new note keybinding...
-
-    label = manage(make_label (_("Create _new note")));
-    table->attach (*label, 0, 1, 2, 3);
-
-    entry = manage(new Gtk::Entry ());
-    label->set_mnemonic_widget(*entry);
-    entry->show ();
-    table->attach (*entry, 1, 2, 2, 3);
-    
-    peditor = new sharp::PropertyEditor(keybindings_settings,
-                                        Preferences::KEYBINDING_CREATE_NEW_NOTE,
-                                        *entry);
-    peditor->setup();
-    keybind_peditor->add_guard (entry);
-
-    // Open Search window keybinding...
-
-    label = manage(make_label (_("Open Search _Window")));
-    table->attach (*label, 0, 1, 3, 4);
-
-    entry = manage(new Gtk::Entry ());
-    label->set_mnemonic_widget(*entry);
-    entry->show ();
-    table->attach(*entry, 1, 2, 3, 4);
-
-    peditor = new sharp::PropertyEditor(keybindings_settings,
-                                        Preferences::KEYBINDING_OPEN_RECENT_CHANGES,
-                                        *entry);
-    peditor->setup();
-    keybind_peditor->add_guard (entry);
-
-    return hotkeys_list;
-  }
-
 
   void PreferencesDialog::combo_box_text_data_func(const Gtk::TreeIter & iter)
   {
diff --git a/src/preferencesdialog.hpp b/src/preferencesdialog.hpp
index 0a0f4b9..3f53de7 100644
--- a/src/preferencesdialog.hpp
+++ b/src/preferencesdialog.hpp
@@ -1,7 +1,7 @@
 /*
  * gnote
  *
- * Copyright (C) 2011-2013 Aurimas Cernius
+ * Copyright (C) 2011-2013,2015 Aurimas Cernius
  * Copyright (C) 2009 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
@@ -50,7 +50,6 @@ public:
 
   Gtk::Widget *make_editing_pane();
   Gtk::Widget *make_links_pane();
-  Gtk::Widget *make_hotkeys_pane();
   Gtk::Widget *make_sync_pane();
   Gtk::Widget *make_addins_pane();
 


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