Code for shortcuts dialog. More...
Go to the source code of this file.
Macros | |
#define | ACCELL_FILE |
The file name for the shortcut keylist. More... | |
Functions | |
SUB_CDECL | populateShortcuts (BYVAL_AS_gpointer Act, BYVAL_AS_gpointer Store) |
Populate the list of shortcuts (GFunc callback) More... | |
FUNCTION_CDECL_AS_gboolean | evaluateShortcuts (BYVAL_AS_GtkTreeModel_PTR Tree, BYVAL_AS_GtkTreePath_PTR Path, BYVAL_AS_GtkTreeIter_PTR Iter, BYVAL_AS_gpointer user_data) |
Evaluate the list of shortcuts (GFunc callback) More... | |
SUB | ShortcutsForm (BYVAL_AS_gint Mo=1) |
Populate or evaluate the shortcuts dialog. More... | |
SUB_CDECL_ALIAS | act_Shortcut (BYVAL_AS_GtkAction_PTR Action, BYVAL_AS_gpointer Dialog) |
Run the shortcuts dialog (GtkAction id="action024") More... | |
SUB_CDECL_ALIAS | on_accel_cleared (BYVAL_AS_GtkCellRendererAccel_PTR Accel, BYVAL_AS_gchar_PTR PathString, BYVAL_AS_gpointer Store) |
Signal handler for clearing a GtkCellRendererAccel (id="cellrendereraccel601") More... | |
SUB_CDECL_ALIAS | on_accel_edited (BYVAL_AS_GtkCellRendererAccel_PTR Accel, BYVAL_AS_gchar_PTR PathString, BYVAL_AS_guint AccelKey, BYVAL_AS_GdkModifierType AccelMods, BYVAL_AS_guint HardwareKeycode, BYVAL_AS_gpointer Store) |
Signal handler for editing a GtkCellRendererAccel (id="cellrendereraccel601") More... | |
Code for shortcuts dialog.
This file contains the code to handle the shortcut key list and edit dialog and some auxiliary code. Shortcuts are stored in file dat/accelerators.rc*.
The actions in file fbdbg.ui are grouped after their appereance
Definition in file shortcuts.bas.
#define ACCELL_FILE |
The file name for the shortcut keylist.
Definition at line 26 of file shortcuts.bas.
SUB_CDECL_ALIAS act_Shortcut | ( | BYVAL_AS_GtkAction_PTR | Action, |
BYVAL_AS_gpointer | Dialog | ||
) |
Run the shortcuts dialog (GtkAction id="action024")
Action | The GtkAction that triggered the signal |
Dialog | The GtkWidget PTR of the dialog window |
This signal handler shows the settings dialog in modal mode. Depending on the user action it either cancels all changes or reads the new data.
Definition at line 138 of file shortcuts.bas.
FUNCTION_CDECL_AS_gboolean evaluateShortcuts | ( | BYVAL_AS_GtkTreeModel_PTR | Tree, |
BYVAL_AS_GtkTreePath_PTR | Path, | ||
BYVAL_AS_GtkTreeIter_PTR | Iter, | ||
BYVAL_AS_gpointer | user_data | ||
) |
Evaluate the list of shortcuts (GFunc callback)
Tree | The tree model to get the data |
Path | The path (unused) |
Iter | The tree model iter where to read from |
user_data | unused |
The callback gets called by gtk_tree_model_foreach() on all members of the list store. It gets a current shortcut setting and changes its entry in the GtkAccelMap.
Definition at line 72 of file shortcuts.bas.
SUB_CDECL_ALIAS on_accel_cleared | ( | BYVAL_AS_GtkCellRendererAccel_PTR | Accel, |
BYVAL_AS_gchar_PTR | PathString, | ||
BYVAL_AS_gpointer | Store | ||
) |
Signal handler for clearing a GtkCellRendererAccel (id="cellrendereraccel601")
Accel | The widget that triggers the signal (unused) |
PathString | The path in the GtkTreeModel |
Store | The GtkListStore where to change the data (user_data) |
This signal handler gets called when the user cleared a keyboard shortcut in the shortcuts dialog (by pressing backspace key). It up-dates the data in the related list store.
Definition at line 167 of file shortcuts.bas.
SUB_CDECL_ALIAS on_accel_edited | ( | BYVAL_AS_GtkCellRendererAccel_PTR | Accel, |
BYVAL_AS_gchar_PTR | PathString, | ||
BYVAL_AS_guint | AccelKey, | ||
BYVAL_AS_GdkModifierType | AccelMods, | ||
BYVAL_AS_guint | HardwareKeycode, | ||
BYVAL_AS_gpointer | Store | ||
) |
Signal handler for editing a GtkCellRendererAccel (id="cellrendereraccel601")
Accel | The widget that triggers the signal (unused) |
PathString | The path in the GtkTreeModel |
AccelKey | The key number of the shortcut |
AccelMods | The modifier mask (GdkModifierType) |
HardwareKeycode | A hardware keycode (unused) |
Store | The GtkListStore where to change the data (user_data) |
This signal handler gets called when the user edited a keyboard shortcut in the shortcuts dialog. It checks for double-tees and up-dates the data in the related list store.
Definition at line 198 of file shortcuts.bas.
SUB_CDECL populateShortcuts | ( | BYVAL_AS_gpointer | Act, |
BYVAL_AS_gpointer | Store | ||
) |
Populate the list of shortcuts (GFunc callback)
Act | The GtkAction to handle |
Store | The GtkListStore to use |
The callback gets called by g_list_foreach() on all GtkActions in 'actiongroup1'. It gets the shortcut and reads the label and the tooltip to store that context in the list. A hidden column (4) is used to store the accell path for easy evaluation.
Definition at line 39 of file shortcuts.bas.
SUB ShortcutsForm | ( | BYVAL_AS_gint | Mo = 1 | ) |
Populate or evaluate the shortcuts dialog.
Mo | The modus (0 = read, 1 = write) |
Handle the data in the shortcuts dialog. The SUB either
When called first, the widgets get searched in the GUI description file.
Definition at line 104 of file shortcuts.bas.