Commit 058562b9 authored by Tomasz Miąsko's avatar Tomasz Miąsko

Backward compatible keyboard shortcuts information.

Use GtkShortcutsWindow if supported, otherwise just point the user to
the wiki page with keyboard shortcuts.
parent 6f6a8d3f
......@@ -16,8 +16,13 @@
## along with Gajim. If not, see <http://www.gnu.org/licenses/>.
##
from gi.repository import Gtk
import gtkgui_helpers
from common import helpers
__all__ = ['show']
class ShortcutsWindow:
def __init__(self):
......@@ -35,4 +40,11 @@ class ShortcutsWindow:
def _on_window_destroy(self, widget):
self.window = None
show = ShortcutsWindow().show
def show_shortcuts_webpage(self, parent=None):
helpers.launch_browser_mailer('url',
'https://dev.gajim.org/gajim/gajim/wikis/help/keyboardshortcuts')
if (3, 19) <= (Gtk.get_major_version(), Gtk.get_minor_version()):
show = ShortcutsWindow().show
else:
show = show_shortcuts_webpage
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment