8888 'Family Tree(manager)' add help url & button
This commit is contained in:
parent
a73c2e4738
commit
a6f4c7993d
@ -70,7 +70,8 @@ from gi.repository import Pango
|
|||||||
from gramps.gen.const import GRAMPS_LOCALE as glocale
|
from gramps.gen.const import GRAMPS_LOCALE as glocale
|
||||||
from gramps.gen.plug import BasePluginManager
|
from gramps.gen.plug import BasePluginManager
|
||||||
_ = glocale.translation.gettext
|
_ = glocale.translation.gettext
|
||||||
from gramps.gen.const import URL_WIKISTRING
|
from gramps.gui.display import display_help
|
||||||
|
from gramps.gen.const import URL_WIKISTRING, URL_MANUAL_PAGE
|
||||||
from .user import User
|
from .user import User
|
||||||
from .dialog import ErrorDialog, QuestionDialog, QuestionDialog2, ICON
|
from .dialog import ErrorDialog, QuestionDialog, QuestionDialog2, ICON
|
||||||
from .pluginmanager import GuiPluginManager
|
from .pluginmanager import GuiPluginManager
|
||||||
@ -92,6 +93,8 @@ _KP_ENTER = Gdk.keyval_from_name("KP_Enter")
|
|||||||
# constants
|
# constants
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
WIKI_HELP_PAGE = _('%s_-_Manage_Family_Trees') % URL_MANUAL_PAGE
|
||||||
|
WIKI_HELP_SEC = _('Family_Trees_manager_window')
|
||||||
|
|
||||||
ARCHIVE = "rev.gramps"
|
ARCHIVE = "rev.gramps"
|
||||||
ARCHIVE_V = "rev.gramps,v"
|
ARCHIVE_V = "rev.gramps,v"
|
||||||
@ -199,10 +202,16 @@ class DbManager(CLIDbManager):
|
|||||||
self.top.connect('drag_data_received', self.__drag_data_received)
|
self.top.connect('drag_data_received', self.__drag_data_received)
|
||||||
self.top.connect('drag_motion', drag_motion)
|
self.top.connect('drag_motion', drag_motion)
|
||||||
self.top.connect('drag_drop', drop_cb)
|
self.top.connect('drag_drop', drop_cb)
|
||||||
|
self.define_help_button(self.glade.get_object('help'),
|
||||||
|
WIKI_HELP_PAGE, WIKI_HELP_SEC)
|
||||||
|
|
||||||
if _RCS_FOUND:
|
if _RCS_FOUND:
|
||||||
self.rcs.connect('clicked', self.__rcs)
|
self.rcs.connect('clicked', self.__rcs)
|
||||||
|
|
||||||
|
def define_help_button(self, button, webpage='', section=''):
|
||||||
|
button.connect('clicked', lambda x: display_help(webpage,
|
||||||
|
section))
|
||||||
|
|
||||||
def __button_press(self, obj, event):
|
def __button_press(self, obj, event):
|
||||||
"""
|
"""
|
||||||
Checks for a double click event. In the tree view, we want to
|
Checks for a double click event. In the tree view, we want to
|
||||||
|
@ -63,6 +63,8 @@
|
|||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">1</property>
|
<property name="left_attach">1</property>
|
||||||
<property name="top_attach">0</property>
|
<property name="top_attach">0</property>
|
||||||
|
<property name="width">1</property>
|
||||||
|
<property name="height">1</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
@ -76,6 +78,8 @@
|
|||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">1</property>
|
<property name="left_attach">1</property>
|
||||||
<property name="top_attach">1</property>
|
<property name="top_attach">1</property>
|
||||||
|
<property name="width">1</property>
|
||||||
|
<property name="height">1</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
@ -148,6 +152,22 @@
|
|||||||
<property name="position">1</property>
|
<property name="position">1</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="help">
|
||||||
|
<property name="label" translatable="yes">_Help</property>
|
||||||
|
<property name="use_action_appearance">False</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="can_default">True</property>
|
||||||
|
<property name="receives_default">False</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">False</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
@ -330,6 +350,7 @@
|
|||||||
<action-widgets>
|
<action-widgets>
|
||||||
<action-widget response="-7">cancel</action-widget>
|
<action-widget response="-7">cancel</action-widget>
|
||||||
<action-widget response="-5">connect</action-widget>
|
<action-widget response="-5">connect</action-widget>
|
||||||
|
<action-widget response="-11">help</action-widget>
|
||||||
</action-widgets>
|
</action-widgets>
|
||||||
</object>
|
</object>
|
||||||
</interface>
|
</interface>
|
||||||
|
Loading…
Reference in New Issue
Block a user