Debian Codegraph @

src/devedeng/help.py

raw
1 #!/usr/bin/env python3
2
3 # Copyright 2014 (C) Raster Software Vigo (Sergio Costas)
4 #
5 # This file is part of DeVeDe-NG
6 #
7 # DeVeDe-NG is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License version 3
9 # as published by the Free Software Foundation.
10 #
11 # DeVeDe-NG is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with this program. If not, see <http://www.gnu.org/licenses/>
18
19
20 from gi.repository import Gtk, Gdk
21 import devedeng.configuration_data
22 import os
23
24
25 class help:
26
27 def __init__(self, help_page):
28
29 self.config = devedeng.configuration_data.configuration.get_config()
30
31 file = "file://" + \
32 os.path.join(self.config.help_path, help_page)
33
34 retval = Gtk.show_uri(None, file, Gdk.CURRENT_TIME)
35 if retval == False:
36 msg = devede_dialogs.show_error(
37 gladefile, _("Can't open the help files."))