diff --git a/data/ui/App_menu.ui b/data/ui/App_menu.ui index 9846d72..e43b1b6 100644 --- a/data/ui/App_menu.ui +++ b/data/ui/App_menu.ui @@ -20,9 +20,8 @@ -->
- + app.shortcuts _Shortcuts diff --git a/data/ui/UberwriterWindow.ui b/data/ui/UberwriterWindow.ui index 80388fc..725700c 100644 --- a/data/ui/UberwriterWindow.ui +++ b/data/ui/UberwriterWindow.ui @@ -1,5 +1,5 @@ - + @@ -57,353 +57,344 @@ True False - + + True + False + + True False - - + _File + True + + True False - _File - True - - + + + _New True False - - - _New + True + False + + + + + + + _Open + True + False + True + False + + + + + + + True + False + Open Recent File + True + + + + + Open examples + True + False + False + + True False - True - False - - - - - - - _Open - True - False - True - False - - - - - - - True - False - Open Recent File - True - - - - - Open examples - True - False - False - - + + True False - - - True - False - _Quick markdown tutorial - True - - - + _Quick markdown tutorial + True + - - - True - False - - - - - _Save - True - False - True - False - - - - - - - Save _As - True - False - True - False - - - - - - - True - False - - - - - Export as HTML - True - False - False - - - - - - Export as PDF - True - False - False - - - - - - Export as ODT - True - False - False - - - - - - True - False - Advanced Export... - True - - - - - - True - False - - - - - True - False - Copy Raw HTML to Clipboard - True - - - - - - True - False - - - - - _Quit - True - False - True - False - - - - - - - - True - False - _View - True - - + + True False - - - True - False - Focus Mode - - - - - - - True - False - Fullscreen - - - - - - - False - Sidebar - - - - - - True - False - Light text on a dark background - Dark Mode - - - - - - True - False - Switch to preview mode - Preview - - - - - - - True - False - Open Search and Replace - Search and Replace ... - True - - - - - - - False - - - - - False - Use Typewritermode (experimental) - True - True - - - - - - False - - - - - False - Auto _Spellcheck - True - True - - - - - - - - - True - False - _Help - True - - + + + _Save True False - - - True - False - Contents - - - - - - True - False - - - - - True - False - Short Markdown Tutorial - - - - - - True - False - Open Pandoc Online Markdown Help ... - - - - - - True - False - Get Help Online... - True - - - - - - True - False - Translate This Application... - True - - - - - - True - False - - - - - gtk-about - True - False - True - False - - + True + False + + + + + + + Save _As + True + False + True + False + + + + + + + True + False + + + + + Export as HTML + True + False + False + + + + + + Export as PDF + True + False + False + + + + + + Export as ODT + True + False + False + + + + + + True + False + Advanced Export... + True + + + + + + True + False + + + + + True + False + Copy Raw HTML to Clipboard + True + + + + + + True + False + + + + + _Quit + True + False + True + False + + + + + True + False + _View + True + + + True + False + + + True + False + Focus Mode + + + + + + + True + False + Fullscreen + + + + + + + False + Sidebar + + + + + + True + False + Light text on a dark background + Dark Mode + + + + + + True + False + Switch to preview mode + Preview + + + + + + + True + False + Open Search and Replace + Search and Replace ... + True + + + + + + + False + + + + + False + Use Typewritermode (experimental) + True + True + + + + + + False + + + + + False + Auto _Spellcheck + True + True + + + + + + + + + + + True + False + _Help + True + + + True + False + + + True + False + Contents + + + + + + True + False + + + + + True + False + Short Markdown Tutorial + + + + + + True + False + Open Pandoc Online Markdown Help ... + + + + + + True + False + Translate This Application... + True + + + + + + True + False + + + + + gtk-about + True + False + True + False + + + + + + + 0 0 diff --git a/uberwriter/UberwriterWindow.py b/uberwriter/UberwriterWindow.py index 8fa0506..c98d2ef 100644 --- a/uberwriter/UberwriterWindow.py +++ b/uberwriter/UberwriterWindow.py @@ -791,9 +791,6 @@ class UberwriterWindow(Window): def open_launchpad_translation(self, widget, data=None): webbrowser.open("https://translations.launchpad.net/uberwriter") - def open_launchpad_help(self, widget, data=None): - webbrowser.open("https://answers.launchpad.net/uberwriter") - def open_pandoc_markdown(self, widget, data=None): webbrowser.open("http://johnmacfarlane.net/pandoc/README.html#pandocs-markdown") diff --git a/uberwriter_lib/AppWindow.py b/uberwriter_lib/AppWindow.py index da87507..68e61ab 100644 --- a/uberwriter_lib/AppWindow.py +++ b/uberwriter_lib/AppWindow.py @@ -108,7 +108,11 @@ class Application(Gtk.Application): Gtk.Application.do_startup(self) action = Gio.SimpleAction.new("help", None) - action.connect("activate", self.on_quit) + action.connect("activate", self.on_help) + self.add_action(action) + + action = Gio.SimpleAction.new("shortcuts", None) + action.connect("activate", self.on_shortcuts) self.add_action(action) action = Gio.SimpleAction.new("about", None) @@ -158,7 +162,15 @@ class Application(Gtk.Application): about_dialog.set_logo(logo) about_dialog.present() - + + def on_help(self, action, param): + self.window.open_pandoc_markdown(self) + + def on_shortcuts(self, action, param): + builder = get_builder('Shortcuts') + builder.get_object("shortcuts").set_transient_for(self.window) + builder.get_object("shortcuts").show() + def on_quit(self, action, param): self.quit()