Add shortcuts window
This commit is contained in:
parent
11c18cdf72
commit
97647f9b52
|
@ -61,6 +61,7 @@ set(RESOURCE_LIST
|
|||
occupant_list_item.ui
|
||||
search_autocomplete.ui
|
||||
settings_dialog.ui
|
||||
shortcuts.ui
|
||||
unified_main_content.ui
|
||||
unified_window_placeholder.ui
|
||||
|
||||
|
|
|
@ -11,5 +11,11 @@
|
|||
<attribute name="label" translatable="yes">Settings</attribute>
|
||||
</item>
|
||||
</section>
|
||||
<section>
|
||||
<item>
|
||||
<attribute name="action">app.open_shortcuts</attribute>
|
||||
<attribute name="label" translatable="yes">Keyboard Shortcuts</attribute>
|
||||
</item>
|
||||
</section>
|
||||
</menu>
|
||||
</interface>
|
||||
|
|
52
main/data/shortcuts.ui
Normal file
52
main/data/shortcuts.ui
Normal file
|
@ -0,0 +1,52 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkShortcutsWindow" id="shortcuts-window">
|
||||
<property name="modal">True</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsSection">
|
||||
<property name="visible">True</property>
|
||||
<property name="section-name">shortcuts</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsGroup">
|
||||
<property name="visible">True</property>
|
||||
<property name="title" translatable="yes">General</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">True</property>
|
||||
<property name="accelerator"><ctrl>T</property>
|
||||
<property name="title" translatable="yes">Start Conversation</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">True</property>
|
||||
<property name="accelerator"><ctrl>G</property>
|
||||
<property name="title" translatable="yes">Join Channel</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsGroup">
|
||||
<property name="visible">True</property>
|
||||
<property name="title" translatable="yes">Navigation</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">True</property>
|
||||
<property name="accelerator"><ctrl>Tab</property>
|
||||
<property name="title" translatable="yes">Jump to next conversation</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">True</property>
|
||||
<property name="accelerator"><ctrl><Shift>Tab</property>
|
||||
<property name="title" translatable="yes">Jump to previous conversation</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
|
@ -678,6 +678,10 @@ msgstr ""
|
|||
msgid "Unencrypted"
|
||||
msgstr ""
|
||||
|
||||
#: main/data/menu_app.ui:17
|
||||
msgid "Keyboard Shortcuts"
|
||||
msgstr ""
|
||||
|
||||
#: main/data/im.dino.Dino.appdata.xml.in:8
|
||||
msgid "Modern XMPP Chat Client"
|
||||
msgstr ""
|
||||
|
@ -726,6 +730,22 @@ msgstr ""
|
|||
msgid "Add Contact"
|
||||
msgstr ""
|
||||
|
||||
#: main/data/shortcuts.ui:12
|
||||
msgid "General"
|
||||
msgstr ""
|
||||
|
||||
#: main/data/shortcuts.ui:32
|
||||
msgid "Navigation"
|
||||
msgstr ""
|
||||
|
||||
#: main/data/shortcuts.ui:37
|
||||
msgid "Jump to next conversation"
|
||||
msgstr ""
|
||||
|
||||
#: main/data/shortcuts.ui:44
|
||||
msgid "Jump to previous conversation"
|
||||
msgstr ""
|
||||
|
||||
#: main/data/global_search.ui:37
|
||||
msgid "No active search"
|
||||
msgstr ""
|
||||
|
|
|
@ -140,6 +140,15 @@ public class Dino.Ui.Application : Gtk.Application, Dino.Application {
|
|||
loop_conversations_bw_action.activate.connect(() => { window.loop_conversations(true); });
|
||||
add_action(loop_conversations_bw_action);
|
||||
set_accels_for_action("app.loop_conversations_bw", new string[]{"<Ctrl><Shift>Tab"});
|
||||
|
||||
SimpleAction open_shortcuts_action = new SimpleAction("open_shortcuts", null);
|
||||
open_shortcuts_action.activate.connect((variant) => {
|
||||
Builder builder = new Builder.from_resource("/im/dino/Dino/shortcuts.ui");
|
||||
var dialog = (ShortcutsWindow) builder.get_object("shortcuts-window");
|
||||
dialog.set_transient_for(get_active_window());
|
||||
dialog.present();
|
||||
});
|
||||
add_action(open_shortcuts_action);
|
||||
}
|
||||
|
||||
public bool use_csd() {
|
||||
|
|
Loading…
Reference in a new issue