NO-OP: clang format
This commit is contained in:
parent
696e05c3e5
commit
f1eb45e129
|
@ -24,23 +24,24 @@
|
||||||
#define __libgtkmm2ext_keyboard_h__
|
#define __libgtkmm2ext_keyboard_h__
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <vector>
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
#include <gtkmm/accelkey.h>
|
#include <gtkmm/accelkey.h>
|
||||||
|
|
||||||
#include "pbd/stateful.h"
|
|
||||||
#include "pbd/signals.h"
|
#include "pbd/signals.h"
|
||||||
|
#include "pbd/stateful.h"
|
||||||
|
|
||||||
#include "gtkmm2ext/visibility.h"
|
#include "gtkmm2ext/visibility.h"
|
||||||
|
|
||||||
namespace Gtk {
|
namespace Gtk
|
||||||
|
{
|
||||||
class Window;
|
class Window;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace Gtkmm2ext {
|
namespace Gtkmm2ext
|
||||||
|
{
|
||||||
class Bindings;
|
class Bindings;
|
||||||
class ActionMap;
|
class ActionMap;
|
||||||
|
|
||||||
|
@ -87,22 +88,28 @@ class LIBGTKMM2EXT_API Keyboard : public sigc::trackable, PBD::Stateful
|
||||||
static const char* tertiary_modifier_short_name ();
|
static const char* tertiary_modifier_short_name ();
|
||||||
static const char* level4_modifier_short_name ();
|
static const char* level4_modifier_short_name ();
|
||||||
|
|
||||||
static void set_primary_modifier (uint32_t newval) {
|
static void set_primary_modifier (uint32_t newval)
|
||||||
|
{
|
||||||
set_modifier (newval, PrimaryModifier);
|
set_modifier (newval, PrimaryModifier);
|
||||||
}
|
}
|
||||||
static void set_secondary_modifier (uint32_t newval) {
|
static void set_secondary_modifier (uint32_t newval)
|
||||||
|
{
|
||||||
set_modifier (newval, SecondaryModifier);
|
set_modifier (newval, SecondaryModifier);
|
||||||
}
|
}
|
||||||
static void set_tertiary_modifier (uint32_t newval) {
|
static void set_tertiary_modifier (uint32_t newval)
|
||||||
|
{
|
||||||
set_modifier (newval, TertiaryModifier);
|
set_modifier (newval, TertiaryModifier);
|
||||||
}
|
}
|
||||||
static void set_level4_modifier (uint32_t newval) {
|
static void set_level4_modifier (uint32_t newval)
|
||||||
|
{
|
||||||
set_modifier (newval, Level4Modifier);
|
set_modifier (newval, Level4Modifier);
|
||||||
}
|
}
|
||||||
static void set_copy_modifier (uint32_t newval) {
|
static void set_copy_modifier (uint32_t newval)
|
||||||
|
{
|
||||||
set_modifier (newval, CopyModifier);
|
set_modifier (newval, CopyModifier);
|
||||||
}
|
}
|
||||||
static void set_range_select_modifier (uint32_t newval) {
|
static void set_range_select_modifier (uint32_t newval)
|
||||||
|
{
|
||||||
set_modifier (newval, RangeSelectModifier);
|
set_modifier (newval, RangeSelectModifier);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -110,11 +117,13 @@ class LIBGTKMM2EXT_API Keyboard : public sigc::trackable, PBD::Stateful
|
||||||
|
|
||||||
static GdkModifierType RelevantModifierKeyMask;
|
static GdkModifierType RelevantModifierKeyMask;
|
||||||
|
|
||||||
static bool no_modifier_keys_pressed(GdkEventButton* ev) {
|
static bool no_modifier_keys_pressed (GdkEventButton* ev)
|
||||||
|
{
|
||||||
return (ev->state & RelevantModifierKeyMask) == 0;
|
return (ev->state & RelevantModifierKeyMask) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool no_modifier_keys_pressed(GdkEventKey* ev) {
|
static bool no_modifier_keys_pressed (GdkEventKey* ev)
|
||||||
|
{
|
||||||
return (ev->state & RelevantModifierKeyMask) == 0;
|
return (ev->state & RelevantModifierKeyMask) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -129,13 +138,23 @@ class LIBGTKMM2EXT_API Keyboard : public sigc::trackable, PBD::Stateful
|
||||||
static bool no_modifiers_active (guint state);
|
static bool no_modifiers_active (guint state);
|
||||||
|
|
||||||
static void set_snap_modifier (guint);
|
static void set_snap_modifier (guint);
|
||||||
|
static void set_snap_delta_modifier (guint);
|
||||||
|
static void set_edit_button (guint);
|
||||||
|
static void set_edit_modifier (guint);
|
||||||
|
static void set_delete_button (guint);
|
||||||
|
static void set_delete_modifier (guint);
|
||||||
|
static void set_insert_note_button (guint);
|
||||||
|
static void set_insert_note_modifier (guint);
|
||||||
|
|
||||||
/** @return Modifier mask to temporarily toggle grid setting; with this modifier
|
/** @return Modifier mask to temporarily toggle grid setting; with this modifier
|
||||||
* - magnetic or normal grid should become no grid and
|
* - magnetic or normal grid should become no grid and
|
||||||
* - no grid should become normal grid
|
* - no grid should become normal grid
|
||||||
*/
|
*/
|
||||||
static ModifierMask snap_modifier () { return ModifierMask (snap_mod); }
|
static ModifierMask snap_modifier ()
|
||||||
|
{
|
||||||
|
return ModifierMask (snap_mod);
|
||||||
|
}
|
||||||
|
|
||||||
static void set_snap_delta_modifier (guint);
|
|
||||||
/** @return Modifier mask to temporarily toggle between relative and absolute grid setting.
|
/** @return Modifier mask to temporarily toggle between relative and absolute grid setting.
|
||||||
* Absolute grid is for aligning objects with the grid lines.
|
* Absolute grid is for aligning objects with the grid lines.
|
||||||
* Relative grid is for maintaining an initial position relative to the grid lines.
|
* Relative grid is for maintaining an initial position relative to the grid lines.
|
||||||
|
@ -143,22 +162,35 @@ class LIBGTKMM2EXT_API Keyboard : public sigc::trackable, PBD::Stateful
|
||||||
* - magnetic or normal grid should snap relative to an initial grid offset
|
* - magnetic or normal grid should snap relative to an initial grid offset
|
||||||
* - no grid should snap relative to the grid.
|
* - no grid should snap relative to the grid.
|
||||||
*/
|
*/
|
||||||
static ModifierMask snap_delta_modifier () { return ModifierMask (snap_delta_mod); }
|
static ModifierMask snap_delta_modifier ()
|
||||||
|
{
|
||||||
|
return ModifierMask (snap_delta_mod);
|
||||||
|
}
|
||||||
|
|
||||||
static guint edit_button() { return edit_but; }
|
static guint edit_button ()
|
||||||
static void set_edit_button (guint);
|
{
|
||||||
static guint edit_modifier() { return edit_mod; }
|
return edit_but;
|
||||||
static void set_edit_modifier(guint);
|
}
|
||||||
|
static guint edit_modifier ()
|
||||||
static guint delete_button() { return delete_but; }
|
{
|
||||||
static void set_delete_button(guint);
|
return edit_mod;
|
||||||
static guint delete_modifier() { return delete_mod; }
|
}
|
||||||
static void set_delete_modifier(guint);
|
static guint delete_button ()
|
||||||
|
{
|
||||||
static guint insert_note_button() { return insert_note_but; }
|
return delete_but;
|
||||||
static void set_insert_note_button (guint);
|
}
|
||||||
static guint insert_note_modifier() { return insert_note_mod; }
|
static guint delete_modifier ()
|
||||||
static void set_insert_note_modifier(guint);
|
{
|
||||||
|
return delete_mod;
|
||||||
|
}
|
||||||
|
static guint insert_note_button ()
|
||||||
|
{
|
||||||
|
return insert_note_but;
|
||||||
|
}
|
||||||
|
static guint insert_note_modifier ()
|
||||||
|
{
|
||||||
|
return insert_note_mod;
|
||||||
|
}
|
||||||
|
|
||||||
static bool is_edit_event (GdkEventButton*);
|
static bool is_edit_event (GdkEventButton*);
|
||||||
static bool is_delete_event (GdkEventButton*);
|
static bool is_delete_event (GdkEventButton*);
|
||||||
|
@ -168,19 +200,28 @@ class LIBGTKMM2EXT_API Keyboard : public sigc::trackable, PBD::Stateful
|
||||||
static bool is_momentary_push_event (GdkEventButton*);
|
static bool is_momentary_push_event (GdkEventButton*);
|
||||||
static bool is_group_override_event (GdkEventButton*);
|
static bool is_group_override_event (GdkEventButton*);
|
||||||
|
|
||||||
static Keyboard& the_keyboard() { return *_the_keyboard; }
|
static Keyboard& the_keyboard ()
|
||||||
|
{
|
||||||
|
return *_the_keyboard;
|
||||||
|
}
|
||||||
|
|
||||||
static bool some_magic_widget_has_focus ();
|
static bool some_magic_widget_has_focus ();
|
||||||
static void magic_widget_grab_focus ();
|
static void magic_widget_grab_focus ();
|
||||||
static void magic_widget_drop_focus ();
|
static void magic_widget_drop_focus ();
|
||||||
static Gtk::Window* get_current_window () { return current_window; };
|
static Gtk::Window* get_current_window ()
|
||||||
|
{
|
||||||
|
return current_window;
|
||||||
|
};
|
||||||
|
|
||||||
static bool close_current_dialog ();
|
static bool close_current_dialog ();
|
||||||
|
|
||||||
static void keybindings_changed ();
|
static void keybindings_changed ();
|
||||||
static void save_keybindings ();
|
static void save_keybindings ();
|
||||||
static void set_can_save_keybindings (bool yn);
|
static void set_can_save_keybindings (bool yn);
|
||||||
static std::string current_binding_name () { return _current_binding_name; }
|
static std::string current_binding_name ()
|
||||||
|
{
|
||||||
|
return _current_binding_name;
|
||||||
|
}
|
||||||
static std::map<std::string, std::string> binding_files;
|
static std::map<std::string, std::string> binding_files;
|
||||||
|
|
||||||
static bool catch_user_event_for_pre_dialog_focus (GdkEvent* ev, Gtk::Window* w);
|
static bool catch_user_event_for_pre_dialog_focus (GdkEvent* ev, Gtk::Window* w);
|
||||||
|
@ -236,6 +277,6 @@ class LIBGTKMM2EXT_API Keyboard : public sigc::trackable, PBD::Stateful
|
||||||
static int store_keybindings (std::string const& path);
|
static int store_keybindings (std::string const& path);
|
||||||
};
|
};
|
||||||
|
|
||||||
} /* namespace */
|
} // namespace Gtkmm2ext
|
||||||
|
|
||||||
#endif /* __libgtkmm2ext_keyboard_h__ */
|
#endif /* __libgtkmm2ext_keyboard_h__ */
|
||||||
|
|
|
@ -29,23 +29,23 @@
|
||||||
|
|
||||||
#include "pbd/gstdio_compat.h"
|
#include "pbd/gstdio_compat.h"
|
||||||
|
|
||||||
|
#include <gdk/gdkkeysyms.h>
|
||||||
|
#include <gtkmm/accelmap.h>
|
||||||
#include <gtkmm/widget.h>
|
#include <gtkmm/widget.h>
|
||||||
#include <gtkmm/window.h>
|
#include <gtkmm/window.h>
|
||||||
#include <gtkmm/accelmap.h>
|
|
||||||
#include <gdk/gdkkeysyms.h>
|
|
||||||
|
|
||||||
#include "pbd/error.h"
|
|
||||||
#include "pbd/convert.h"
|
#include "pbd/convert.h"
|
||||||
|
#include "pbd/debug.h"
|
||||||
|
#include "pbd/error.h"
|
||||||
#include "pbd/file_utils.h"
|
#include "pbd/file_utils.h"
|
||||||
#include "pbd/search_path.h"
|
#include "pbd/search_path.h"
|
||||||
#include "pbd/xml++.h"
|
|
||||||
#include "pbd/debug.h"
|
|
||||||
#include "pbd/unwind.h"
|
#include "pbd/unwind.h"
|
||||||
|
#include "pbd/xml++.h"
|
||||||
|
|
||||||
#include "gtkmm2ext/actions.h"
|
#include "gtkmm2ext/actions.h"
|
||||||
#include "gtkmm2ext/bindings.h"
|
#include "gtkmm2ext/bindings.h"
|
||||||
#include "gtkmm2ext/keyboard.h"
|
|
||||||
#include "gtkmm2ext/debug.h"
|
#include "gtkmm2ext/debug.h"
|
||||||
|
#include "gtkmm2ext/keyboard.h"
|
||||||
#include "gtkmm2ext/utils.h"
|
#include "gtkmm2ext/utils.h"
|
||||||
|
|
||||||
#include "pbd/i18n.h"
|
#include "pbd/i18n.h"
|
||||||
|
@ -73,18 +73,56 @@ guint Keyboard::RangeSelectModifier = GDK_SHIFT_MASK;
|
||||||
guint Keyboard::button2_modifiers = Keyboard::SecondaryModifier | Keyboard::Level4Modifier;
|
guint Keyboard::button2_modifiers = Keyboard::SecondaryModifier | Keyboard::Level4Modifier;
|
||||||
guint Keyboard::momentary_push_modifiers = Keyboard::PrimaryModifier;
|
guint Keyboard::momentary_push_modifiers = Keyboard::PrimaryModifier;
|
||||||
|
|
||||||
const char* Keyboard::primary_modifier_name() { return _("Command"); }
|
const char*
|
||||||
const char* Keyboard::secondary_modifier_name() { return _("Control"); }
|
Keyboard::primary_modifier_name ()
|
||||||
const char* Keyboard::tertiary_modifier_name() { return S_("Key|Shift"); }
|
{
|
||||||
const char* Keyboard::level4_modifier_name() { return _("Option"); }
|
return _("Command");
|
||||||
|
}
|
||||||
const char* Keyboard::button2_name() { return _("Middle Click (or Ctrl+Alt+Click)"); } // TODO build dynamically depending on Keyboard::button2_modifiers
|
const char*
|
||||||
const char* Keyboard::momentary_push_name() { return _("Cmd+Click (or Middle-Click)"); } // TODO formay dynamically depending on Keyboard::momentary_push_modifiers -- Keyboard::tertiary_modifier_name
|
Keyboard::secondary_modifier_name ()
|
||||||
|
{
|
||||||
const char* Keyboard::primary_modifier_short_name() { return _("Cmd"); }
|
return _("Control");
|
||||||
const char* Keyboard::secondary_modifier_short_name() { return _("Ctrl"); }
|
}
|
||||||
const char* Keyboard::tertiary_modifier_short_name() { return S_("Key|Shift"); }
|
const char*
|
||||||
const char* Keyboard::level4_modifier_short_name() { return _("Opt"); }
|
Keyboard::tertiary_modifier_name ()
|
||||||
|
{
|
||||||
|
return S_("Key|Shift");
|
||||||
|
}
|
||||||
|
const char*
|
||||||
|
Keyboard::level4_modifier_name ()
|
||||||
|
{
|
||||||
|
return _("Option");
|
||||||
|
}
|
||||||
|
const char*
|
||||||
|
Keyboard::button2_name ()
|
||||||
|
{
|
||||||
|
return _("Middle Click (or Ctrl+Alt+Click)");
|
||||||
|
}
|
||||||
|
const char*
|
||||||
|
Keyboard::momentary_push_name ()
|
||||||
|
{
|
||||||
|
return _("Cmd+Click (or Middle-Click)");
|
||||||
|
}
|
||||||
|
const char*
|
||||||
|
Keyboard::primary_modifier_short_name ()
|
||||||
|
{
|
||||||
|
return _("Cmd");
|
||||||
|
}
|
||||||
|
const char*
|
||||||
|
Keyboard::secondary_modifier_short_name ()
|
||||||
|
{
|
||||||
|
return _("Ctrl");
|
||||||
|
}
|
||||||
|
const char*
|
||||||
|
Keyboard::tertiary_modifier_short_name ()
|
||||||
|
{
|
||||||
|
return S_("Key|Shift");
|
||||||
|
}
|
||||||
|
const char*
|
||||||
|
Keyboard::level4_modifier_short_name ()
|
||||||
|
{
|
||||||
|
return _("Opt");
|
||||||
|
}
|
||||||
|
|
||||||
guint Keyboard::snap_mod = Keyboard::Level4Modifier | Keyboard::TertiaryModifier; // XXX this is probably completely wrong
|
guint Keyboard::snap_mod = Keyboard::Level4Modifier | Keyboard::TertiaryModifier; // XXX this is probably completely wrong
|
||||||
guint Keyboard::snap_delta_mod = Keyboard::Level4Modifier;
|
guint Keyboard::snap_delta_mod = Keyboard::Level4Modifier;
|
||||||
|
@ -100,18 +138,56 @@ guint Keyboard::RangeSelectModifier = GDK_SHIFT_MASK;
|
||||||
guint Keyboard::button2_modifiers = 0; /* not used */
|
guint Keyboard::button2_modifiers = 0; /* not used */
|
||||||
guint Keyboard::momentary_push_modifiers = 0; /* not used */
|
guint Keyboard::momentary_push_modifiers = 0; /* not used */
|
||||||
|
|
||||||
const char* Keyboard::primary_modifier_name() { return _("Control"); }
|
const char*
|
||||||
const char* Keyboard::secondary_modifier_name() { return _("Alt"); }
|
Keyboard::primary_modifier_name ()
|
||||||
const char* Keyboard::tertiary_modifier_name() { return S_("Key|Shift"); }
|
{
|
||||||
const char* Keyboard::level4_modifier_name() { return _("Windows"); }
|
return _("Control");
|
||||||
|
}
|
||||||
const char* Keyboard::button2_name() { return _("Middle-Click"); }
|
const char*
|
||||||
const char* Keyboard::momentary_push_name() { return _("Middle-Click"); }
|
Keyboard::secondary_modifier_name ()
|
||||||
|
{
|
||||||
const char* Keyboard::primary_modifier_short_name() { return _("Ctrl"); }
|
return _("Alt");
|
||||||
const char* Keyboard::secondary_modifier_short_name() { return _("Alt"); }
|
}
|
||||||
const char* Keyboard::tertiary_modifier_short_name() { return S_("Key|Shift"); }
|
const char*
|
||||||
const char* Keyboard::level4_modifier_short_name() { return _("Win"); }
|
Keyboard::tertiary_modifier_name ()
|
||||||
|
{
|
||||||
|
return S_("Key|Shift");
|
||||||
|
}
|
||||||
|
const char*
|
||||||
|
Keyboard::level4_modifier_name ()
|
||||||
|
{
|
||||||
|
return _("Windows");
|
||||||
|
}
|
||||||
|
const char*
|
||||||
|
Keyboard::button2_name ()
|
||||||
|
{
|
||||||
|
return _("Middle-Click");
|
||||||
|
}
|
||||||
|
const char*
|
||||||
|
Keyboard::momentary_push_name ()
|
||||||
|
{
|
||||||
|
return _("Middle-Click");
|
||||||
|
}
|
||||||
|
const char*
|
||||||
|
Keyboard::primary_modifier_short_name ()
|
||||||
|
{
|
||||||
|
return _("Ctrl");
|
||||||
|
}
|
||||||
|
const char*
|
||||||
|
Keyboard::secondary_modifier_short_name ()
|
||||||
|
{
|
||||||
|
return _("Alt");
|
||||||
|
}
|
||||||
|
const char*
|
||||||
|
Keyboard::tertiary_modifier_short_name ()
|
||||||
|
{
|
||||||
|
return S_("Key|Shift");
|
||||||
|
}
|
||||||
|
const char*
|
||||||
|
Keyboard::level4_modifier_short_name ()
|
||||||
|
{
|
||||||
|
return _("Win");
|
||||||
|
}
|
||||||
|
|
||||||
guint Keyboard::snap_mod = Keyboard::SecondaryModifier;
|
guint Keyboard::snap_mod = Keyboard::SecondaryModifier;
|
||||||
guint Keyboard::snap_delta_mod = Keyboard::SecondaryModifier | Keyboard::Level4Modifier;
|
guint Keyboard::snap_delta_mod = Keyboard::SecondaryModifier | Keyboard::Level4Modifier;
|
||||||
|
@ -119,7 +195,11 @@ guint Keyboard::snap_delta_mod = Keyboard::SecondaryModifier|Keyboard::Level4Mod
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
guint Keyboard::group_override_modifiers = Keyboard::TertiaryModifier;
|
guint Keyboard::group_override_modifiers = Keyboard::TertiaryModifier;
|
||||||
const char* Keyboard::group_override_event_name() { return tertiary_modifier_name(); }
|
const char*
|
||||||
|
Keyboard::group_override_event_name ()
|
||||||
|
{
|
||||||
|
return tertiary_modifier_name ();
|
||||||
|
}
|
||||||
|
|
||||||
guint Keyboard::GainFineScaleModifier = Keyboard::PrimaryModifier;
|
guint Keyboard::GainFineScaleModifier = Keyboard::PrimaryModifier;
|
||||||
guint Keyboard::GainExtraFineScaleModifier = Keyboard::SecondaryModifier;
|
guint Keyboard::GainExtraFineScaleModifier = Keyboard::SecondaryModifier;
|
||||||
|
@ -223,7 +303,6 @@ Keyboard::_snooper (GtkWidget *widget, GdkEventKey *event, gpointer data)
|
||||||
return ((Keyboard*)data)->snooper (widget, event);
|
return ((Keyboard*)data)->snooper (widget, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
gint
|
gint
|
||||||
Keyboard::snooper (GtkWidget* widget, GdkEventKey* event)
|
Keyboard::snooper (GtkWidget* widget, GdkEventKey* event)
|
||||||
{
|
{
|
||||||
|
@ -235,9 +314,7 @@ Keyboard::snooper (GtkWidget *widget, GdkEventKey *event)
|
||||||
string_compose (
|
string_compose (
|
||||||
"Snoop widget %1 name: [%6] key %2 [%8] type %3 state %4 [%7] magic %5\n",
|
"Snoop widget %1 name: [%6] key %2 [%8] type %3 state %4 [%7] magic %5\n",
|
||||||
widget, event->keyval, event->type, event->state, _some_magic_widget_has_focus,
|
widget, event->keyval, event->type, event->state, _some_magic_widget_has_focus,
|
||||||
gtk_widget_get_name (widget), show_gdk_event_state (event->state), gdk_keyval_name (event->keyval)
|
gtk_widget_get_name (widget), show_gdk_event_state (event->state), gdk_keyval_name (event->keyval)));
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
if (event->keyval == GDK_Shift_R) {
|
if (event->keyval == GDK_Shift_R) {
|
||||||
keyval = GDK_Shift_L;
|
keyval = GDK_Shift_L;
|
||||||
|
@ -261,13 +338,11 @@ Keyboard::snooper (GtkWidget *widget, GdkEventKey *event)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event->type == GDK_KEY_PRESS) {
|
if (event->type == GDK_KEY_PRESS) {
|
||||||
|
|
||||||
if (find (state.begin (), state.end (), keyval) == state.end ()) {
|
if (find (state.begin (), state.end (), keyval) == state.end ()) {
|
||||||
state.push_back (keyval);
|
state.push_back (keyval);
|
||||||
sort (state.begin (), state.end ());
|
sort (state.begin (), state.end ());
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
/* key is already down. if its also used for release,
|
/* key is already down. if its also used for release,
|
||||||
prevent auto-repeat events.
|
prevent auto-repeat events.
|
||||||
*/
|
*/
|
||||||
|
@ -291,7 +366,6 @@ Keyboard::snooper (GtkWidget *widget, GdkEventKey *event)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event->type == GDK_KEY_RELEASE) {
|
if (event->type == GDK_KEY_RELEASE) {
|
||||||
|
|
||||||
State::iterator k = find (state.begin (), state.end (), keyval);
|
State::iterator k = find (state.begin (), state.end (), keyval);
|
||||||
|
|
||||||
if (k != state.end ()) {
|
if (k != state.end ()) {
|
||||||
|
@ -316,7 +390,6 @@ Keyboard::snooper (GtkWidget *widget, GdkEventKey *event)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (modifier_state_equals (event->state, PrimaryModifier)) {
|
if (modifier_state_equals (event->state, PrimaryModifier)) {
|
||||||
|
|
||||||
/* Special keys that we want to handle in
|
/* Special keys that we want to handle in
|
||||||
any dialog, no matter whether it uses
|
any dialog, no matter whether it uses
|
||||||
the regular set of accelerators or not
|
the regular set of accelerators or not
|
||||||
|
@ -358,7 +431,6 @@ bool
|
||||||
Keyboard::close_current_dialog ()
|
Keyboard::close_current_dialog ()
|
||||||
{
|
{
|
||||||
if (current_window) {
|
if (current_window) {
|
||||||
|
|
||||||
HideMightMeanQuit (current_window); /* EMIT SIGNAL */
|
HideMightMeanQuit (current_window); /* EMIT SIGNAL */
|
||||||
|
|
||||||
current_window->hide ();
|
current_window->hide ();
|
||||||
|
@ -503,7 +575,6 @@ Keyboard::set_insert_note_modifier (guint mod)
|
||||||
reset_relevant_modifier_key_mask ();
|
reset_relevant_modifier_key_mask ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Keyboard::set_modifier (uint32_t newval, uint32_t& var)
|
Keyboard::set_modifier (uint32_t newval, uint32_t& var)
|
||||||
{
|
{
|
||||||
|
@ -640,7 +711,6 @@ Keyboard::load_keybindings (string const & path)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
error << string_compose (_("key bindings file not found at \"%2\" or contains errors."), path)
|
error << string_compose (_("key bindings file not found at \"%2\" or contains errors."), path)
|
||||||
<< endmsg;
|
<< endmsg;
|
||||||
|
@ -711,7 +781,6 @@ int
|
||||||
Keyboard::reset_bindings ()
|
Keyboard::reset_bindings ()
|
||||||
{
|
{
|
||||||
if (Glib::file_test (user_keybindings_path, Glib::FILE_TEST_EXISTS)) {
|
if (Glib::file_test (user_keybindings_path, Glib::FILE_TEST_EXISTS)) {
|
||||||
|
|
||||||
string new_path = user_keybindings_path;
|
string new_path = user_keybindings_path;
|
||||||
new_path += ".old";
|
new_path += ".old";
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user