コード例 #1
0
    def __init__(self, uistate, dbstate):
        ''' this replaces the GrampsPreferences __init__
        It includes the patching fixes and calls my version of the Theme panel
        '''
        # Patching in the methods
        self.add_themes_panel = types.MethodType(MyPrefs.add_themes_panel,
                                                 self)
        self.gtk_css = types.MethodType(MyPrefs.gtk_css, self)
        self.theme_changed = types.MethodType(MyPrefs.theme_changed, self)
        self.dark_variant_changed = types.MethodType(
            MyPrefs.dark_variant_changed, self)
        self.t_text_changed = types.MethodType(MyPrefs.t_text_changed, self)
        self.font_changed = types.MethodType(MyPrefs.font_changed, self)
        self.font_filter = types.MethodType(MyPrefs.font_filter, self)
        self.default_clicked = types.MethodType(MyPrefs.default_clicked, self)
        self.scroll_changed = types.MethodType(MyPrefs.scroll_changed, self)
        # Copy of original __init__
        if hasattr(self, 'add_ptypes_panel'):
            page_funcs = (self.add_behavior_panel, self.add_famtree_panel,
                          self.add_formats_panel, self.add_text_panel,
                          self.add_prefix_panel, self.add_date_panel,
                          self.add_researcher_panel, self.add_ptypes_panel,
                          self.add_advanced_panel, self.add_color_panel,
                          self.add_symbols_panel, self.add_themes_panel)
            ConfigureDialog.__init__(self,
                                     uistate,
                                     dbstate,
                                     page_funcs,
                                     GrampsPreferences,
                                     config,
                                     on_close=self._close)
        else:
            page_funcs = (self.add_behavior_panel, self.add_famtree_panel,
                          self.add_formats_panel, self.add_text_panel,
                          self.add_prefix_panel, self.add_date_panel,
                          self.add_researcher_panel, self.add_advanced_panel,
                          self.add_color_panel, self.add_symbols_panel,
                          self.add_themes_panel)
            ConfigureDialog.__init__(self,
                                     uistate,
                                     dbstate,
                                     page_funcs,
                                     GrampsPreferences,
                                     config,
                                     on_close=update_constants)

        help_btn = self.window.add_button(_('_Help'), Gtk.ResponseType.HELP)
        help_btn.connect('clicked',
                         lambda x: display_help(WIKI_HELP_PAGE, WIKI_HELP_SEC))
        self.setup_configs('interface.grampspreferences', 700, 450)
コード例 #2
0
    def on_help_clicked(self, obj):
        """Display the relevant portion of Gramps manual"""

        display_help(WIKI_HELP_PAGE, WIKI_HELP_SEC)
コード例 #3
0
ファイル: patchnames.py プロジェクト: wmbr/gramps
 def on_help_clicked(self, obj):
     """Display the relevant portion of GRAMPS manual"""
     display_help(webpage=WIKI_HELP_PAGE, section=WIKI_HELP_SEC)
コード例 #4
0
 def _web_help(self):
     display_help(WIKI_PAGE)
コード例 #5
0
 def __on_help_button_clicked(self, widget=None):
     """ display the relevant portion of Gramps manual """
     display_help(webpage=WIKI_HELP_PAGE, section=WIKI_HELP_SEC)
コード例 #6
0
ファイル: dbman.py プロジェクト: toxn/gramps
 def define_help_button(self, button, webpage='', section=''):
     button.connect('clicked', lambda x: display_help(webpage, section))
コード例 #7
0
ファイル: findloop.py プロジェクト: SNoiraud/gramps
 def on_help_clicked(self, obj):
     """
     Display the relevant portion of Gramps manual.
     """
     display_help(webpage=WIKI_HELP_PAGE, section=WIKI_HELP_SEC)
コード例 #8
0
 def _web_help(self):
     display_help(WIKI_PAGE)
コード例 #9
0
ファイル: editform.py プロジェクト: uli22/addons-source
 def help_clicked(self, obj):
     """
     Display the relevant portion of Gramps manual
     """
     display_help(webpage='Form_Addons')
コード例 #10
0
ファイル: reorderids.py プロジェクト: prculley/gramps
 def __on_help_button_clicked(self, widget=None):
     """ display the relevant portion of Gramps manual """
     display_help(webpage=WIKI_HELP_PAGE, section=WIKI_HELP_SEC)
コード例 #11
0
 def on_help_clicked(self, obj):
     """Display the relevant portion of GRAMPS manual"""
     display_help()
コード例 #12
0
ファイル: editform.py プロジェクト: daleathan/addons-source
 def help_clicked(self, obj):
     """
     Display the relevant portion of Gramps manual
     """
     display_help(webpage='Form_Addons')
コード例 #13
0
ファイル: relcalc.py プロジェクト: naciohr/gramps-official
    def __init__(self, dbstate, user, options_class, name, callback=None):
        uistate = user.uistate
        """
        Relationship calculator class.
        """

        tool.Tool.__init__(self, dbstate, options_class, name)
        ManagedWindow.__init__(self,uistate,[],self.__class__)

        #set the columns to see
        for data in BasePersonView.CONFIGSETTINGS:
            if data[0] == 'columns.rank':
                colord = data[1]
            elif data[0] == 'columns.visible':
                colvis = data[1]
            elif data[0] == 'columns.size':
                colsize = data[1]
        self.colord = []
        for col, size in zip(colord, colsize):
            if col in colvis:
                self.colord.append((1, col, size))
            else:
                self.colord.append((0, col, size))

        self.dbstate = dbstate
        self.relationship = get_relationship_calculator(glocale)
        self.relationship.connect_db_signals(dbstate)

        self.glade = Glade()
        self.person = self.db.get_person_from_handle(
                                            uistate.get_active('Person'))
        name = ''
        if self.person:
            name = name_displayer.display(self.person)
        self.title = _('Relationship calculator: %(person_name)s'
                       ) % {'person_name' : name}
        window = self.glade.toplevel
        self.titlelabel = self.glade.get_object('title')
        self.set_window(window, self.titlelabel,
                        _('Relationship to %(person_name)s'
                          ) % {'person_name' : name},
                        self.title)
        self.setup_configs('interface.relcalc', 600, 400)

        self.tree = self.glade.get_object("peopleList")
        self.text = self.glade.get_object("text1")
        self.textbuffer = Gtk.TextBuffer()
        self.text.set_buffer(self.textbuffer)

        self.model = PersonTreeModel(self.db, uistate)
        self.tree.set_model(self.model)

        self.tree.connect('key-press-event', self._key_press)
        self.selection = self.tree.get_selection()
        self.selection.set_mode(Gtk.SelectionMode.SINGLE)

        #keep reference of column so garbage collection works
        self.columns = []
        for pair in self.colord:
            if not pair[0]:
                continue
            name = column_names[pair[1]]
            column = Gtk.TreeViewColumn(name, Gtk.CellRendererText(),
                                        markup=pair[1])
            column.set_resizable(True)
            column.set_min_width(60)
            column.set_sizing(Gtk.TreeViewColumnSizing.GROW_ONLY)
            self.tree.append_column(column)
            #keep reference of column so garbage collection works
            self.columns.append(column)

        self.sel = self.tree.get_selection()
        self.changedkey = self.sel.connect('changed',self.on_apply_clicked)
        self.closebtn = self.glade.get_object("button5")
        self.closebtn.connect('clicked', self.close)
        help_btn = self.glade.get_object("help_btn")
        help_btn.connect('clicked', lambda x: display_help(WIKI_HELP_PAGE,
                                                           WIKI_HELP_SEC))

        if not self.person:
            self.window.hide()
            ErrorDialog(_('Active person has not been set'),
                        _('You must select an active person for this '
                          'tool to work properly.'),
                        parent=uistate.window)
            self.close()
            return

        self.show()
コード例 #14
0
ファイル: dbman.py プロジェクト: doczkal/gramps
 def define_help_button(self, button, webpage="", section=""):
     button.connect("clicked", lambda x: display_help(webpage, section))
コード例 #15
0
ファイル: dbman.py プロジェクト: dmccubbing/gramps
 def define_help_button(self, button, webpage='', section=''):
     button.connect('clicked', lambda x: display_help(webpage, section))
コード例 #16
0
ファイル: ownereditor.py プロジェクト: goetzk/gramps
 def on_help_button_clicked(self, obj):
     """Display the relevant portion of GRAMPS manual"""
     display_help(webpage=WIKI_HELP_PAGE, section=WIKI_HELP_SEC)
コード例 #17
0
ファイル: changenames.py プロジェクト: DaAwesomeP/gramps
 def on_help_clicked(self, obj):
     """Display the relevant portion of GRAMPS manual"""
     display_help(WIKI_HELP_PAGE , WIKI_HELP_SEC)
コード例 #18
0
 def help_clicked(self, obj):
     """
     Display the relevant portion of GRAMPS manual
     """
     display_help(webpage='Census_Addons')