diff options
author | Alexey Yakovenko <waker@users.sourceforge.net> | 2014-01-19 13:58:56 +0100 |
---|---|---|
committer | Alexey Yakovenko <waker@users.sourceforge.net> | 2014-01-19 13:58:56 +0100 |
commit | a28632ec78486dbc3cd9c011810f96cfe2738f1e (patch) | |
tree | 48ed0d851151a4624329ad38f6350faf26fa9f97 /plugins/gtkui/hotkeys.c | |
parent | b9bfcd5b01a8d222ab7c2b421b73c00bf484dd83 (diff) |
gtkui: hide hotkeys tab in preferences, if the hotkeys plugin is not available
Diffstat (limited to 'plugins/gtkui/hotkeys.c')
-rw-r--r-- | plugins/gtkui/hotkeys.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/plugins/gtkui/hotkeys.c b/plugins/gtkui/hotkeys.c index 10caec85..7111703f 100644 --- a/plugins/gtkui/hotkeys.c +++ b/plugins/gtkui/hotkeys.c @@ -421,9 +421,15 @@ on_hotkeys_actions_clicked (GtkButton *button, gtk_widget_destroy (dlg); } - void prefwin_init_hotkeys (GtkWidget *_prefwin) { + DB_plugin_t *hkplug = deadbeef->plug_get_for_id ("hotkeys"); + if (!hkplug) { + // remove hotkeys tab + gtk_notebook_remove_page (GTK_NOTEBOOK (lookup_widget (_prefwin, "notebook")), 6); + return; + } + gtkui_hotkeys_changed = 0; ctx_names[DDB_ACTION_CTX_MAIN] = _("Main"); ctx_names[DDB_ACTION_CTX_SELECTION] = _("Selection"); |