Bug #1489 » 1489-S3_1+S3_2.patch
client/gui-gtk-3.22/editgui.c | ||
---|---|---|
/************************************************************************//**
|
||
Handle ctrl+[key] combinations.
|
||
Mac only - Handle meta+[key] combinations.
|
||
****************************************************************************/
|
||
static gboolean handle_edit_key_press_with_ctrl(GdkEventKey *ev)
|
||
{
|
||
... | ... | |
{
|
||
enum editor_tool_type ett, new_ett = NUM_EDITOR_TOOL_TYPES;
|
||
/* Check ctrl before shift - this is correct also for the case where
|
||
/* Check ctrl/meta before shift - this is correct also for the case where
|
||
* they are both active. */
|
||
if (ev->state & GDK_CONTROL_MASK) {
|
||
/* ACCL_MOD_KEY is GDK_META_MASK on Mac, else GDK_CONTROL_MASK */
|
||
if (ev->state & ACCL_MOD_KEY) {
|
||
return handle_edit_key_press_with_ctrl(ev);
|
||
}
|
||
client/gui-gtk-3.22/gui_main.h | ||
---|---|---|
#include "gui_main_g.h"
|
||
#include "options.h"
|
||
/* Mac uses "command"/"meta" key for menu accelerator modifier key */
|
||
#ifdef __APPLE__
|
||
#define ACCL_MOD_KEY GDK_META_MASK
|
||
#else
|
||
#define ACCL_MOD_KEY GDK_CONTROL_MASK
|
||
#endif
|
||
#define GUI_NAME_FULL "gui-gtk-3.22"
|
||
#define GUI_NAME_SHORT "gtk3.22"
|
||
client/gui-gtk-3.22/menu.c | ||
---|---|---|
#define GTK_STOCK_EDIT NULL
|
||
#endif
|
||
/* Mac uses "command"/"meta" key for menu accelerator modifier key */
|
||
#ifdef __APPLE__
|
||
#define ACCL_MOD_KEY GDK_META_MASK
|
||
#else
|
||
#define ACCL_MOD_KEY GDK_CONTROL_MASK
|
||
#endif
|
||
static GtkBuilder *ui_builder = NULL;
|
||
static void menu_entry_set_active(const char *key,
|
client/gui-gtk-4.0/editgui.c | ||
---|---|---|
/************************************************************************//**
|
||
Handle ctrl+[key] combinations.
|
||
Mac only - Handle meta+[key] combinations.
|
||
****************************************************************************/
|
||
static gboolean handle_edit_key_press_with_ctrl(guint keyval)
|
||
{
|
||
... | ... | |
/* Check ctrl before shift - this is correct also for the case where
|
||
* they are both active. */
|
||
if (state & GDK_CONTROL_MASK) {
|
||
/* ACCL_MOD_MASK is GDK_META_MASK on Mac, else GDK_CONTROL_MASK */
|
||
if (state & ACCL_MOD_MASK) {
|
||
return handle_edit_key_press_with_ctrl(keyval);
|
||
}
|
||
client/gui-gtk-4.0/gui_main.h | ||
---|---|---|
#include "gui_main_g.h"
|
||
#include "options.h"
|
||
/* Mac uses "command"/"meta" key for menu accelerator modifier key */
|
||
#ifdef __APPLE__
|
||
#define ACCL_MOD_KEY "<Meta>"
|
||
#define ACCL_MOD_MASK GDK_META_MASK
|
||
#else
|
||
#define ACCL_MOD_KEY "<ctrl>"
|
||
#define ACCL_MOD_MASK GDK_CONTROL_MASK
|
||
#endif
|
||
#define GUI_NAME_FULL "gui-gtk-4.0"
|
||
#define GUI_NAME_SHORT "gtk4"
|
||
client/gui-gtk-4.0/menu.c | ||
---|---|---|
#include "menu.h"
|
||
/* Mac uses "command"/"meta" key for menu accelerator modifier key */
|
||
#ifdef __APPLE__
|
||
#define ACCL_MOD_KEY "<Meta>"
|
||
#else
|
||
#define ACCL_MOD_KEY "<ctrl>"
|
||
#endif
|
||
static GMenu *main_menubar = NULL;
|
||
static bool menus_built = FALSE;
|
||