diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 8151c18b2..96fb243f7 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,6 +1,17 @@ 2003-10-13 Alex Roitman * configure.in, configure: Change version and release numbers. * TODO: Remove completed items. + * src/plugins.glade: Switch from GtkDialog to GtkWindow (prevents it + from always being on top under metacity). Remove extra button. + * src/Plugins.py (PluginDialog.__init__): Provide custom labels and + tooltips for reports (Generate) and tools (Run); + (ReportPlugins.__init__, ToolPlugins.__init__): call PluginDialog + with appropriate labels and tooltips. + * src/Report.py (BareReportDialog.__init__): Change button back to OK. + * src/plugins/rel_ru.py (getallancestors): Replace with existing + apply_filter from Relationship.py. + * src/gramps.glade: Correct tooltips in Family Views (make parents an + active family). 2003-10-12 Alex Roitman * src/gramps_main.py (edit_button_clicked): Modify edit person call diff --git a/gramps2/src/Plugins.py b/gramps2/src/Plugins.py index c3045b90a..e7a052452 100644 --- a/gramps2/src/Plugins.py +++ b/gramps2/src/Plugins.py @@ -17,6 +17,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +# $Id$ """ The core of the GRAMPS plugin system. This module provides tasks to load @@ -116,7 +117,7 @@ class PluginDialog: """Displays the dialog box that allows the user to select the report that is desired.""" - def __init__(self,db,active,list,msg,label=None): + def __init__(self,db,active,list,msg,label=None,button_label=None,tool_tip=None): """Display the dialog box, and build up the list of available reports. This is used to build the selection tree on the left hand side of the dailog box.""" @@ -158,6 +159,17 @@ class PluginDialog: self.author_email = self.dialog.get_widget("author_email") self.statbox = self.dialog.get_widget("statbox") + self.apply_button = self.dialog.get_widget("apply") + if button_label: + self.apply_button.set_label(button_label) + else: + self.apply_button.set_label(_("_Apply")) + self.apply_button.set_use_underline(gtk.TRUE) + if tool_tip: + tt = gtk.gtk_tooltips_data_get(self.apply_button) + if tt: + tt[0].set_tip(self.apply_button,tool_tip) + self.run_tool = None self.build_tree(list) @@ -261,7 +273,9 @@ class ReportPlugins(PluginDialog): """Display the dialog box, and build up the list of available reports. This is used to build the selection tree on the left hand side of the dailog box.""" - PluginDialog.__init__(self,db,active,_reports,_("Report Selection")) + PluginDialog.__init__(self,db,active,_reports,_("Report Selection"), + _("Select a report from those available on the left."), + _("_Generate"), _("Generate selected report")) #------------------------------------------------------------------------- # @@ -278,7 +292,8 @@ class ToolPlugins(PluginDialog): hand side of the dailog box.""" PluginDialog.__init__(self,db,active,_tools,_("Tool Selection"), - _("Select a tool from those available on the left.")) + _("Select a tool from those available on the left."), + _("_Run"), _("Run selected tool")) self.update = update #------------------------------------------------------------------------- diff --git a/gramps2/src/Report.py b/gramps2/src/Report.py index 8868380dc..d077ae0d8 100644 --- a/gramps2/src/Report.py +++ b/gramps2/src/Report.py @@ -214,7 +214,7 @@ class BareReportDialog: self.window = gtk.Dialog('GRAMPS') self.window.set_has_separator(gtk.FALSE) self.cancel = self.window.add_button(gtk.STOCK_CANCEL,1) - self.ok = self.window.add_button(_('_Generate report'),0) + self.ok = self.window.add_button(gtk.STOCK_OK,0) self.ok.connect('clicked',self.on_ok_clicked) self.cancel.connect('clicked',self.on_cancel) diff --git a/gramps2/src/gramps.glade b/gramps2/src/gramps.glade index aa0d19da6..bd4eb0ca6 100644 --- a/gramps2/src/gramps.glade +++ b/gramps2/src/gramps.glade @@ -1644,7 +1644,7 @@ True - Make the active person's family the active family + Make the active person's parents the active family True GTK_RELIEF_NORMAL @@ -1768,7 +1768,7 @@ True - Make the selected spouse's family the active family + Make the selected spouse's parents the active family True GTK_RELIEF_NORMAL @@ -2575,7 +2575,7 @@ True - Make the selected spouse's family the active family + Make the selected spouse's parents the active family True GTK_RELIEF_NORMAL @@ -2835,7 +2835,7 @@ True - Make the active person's family the active family + Make the active person's parents the active family True GTK_RELIEF_NORMAL diff --git a/gramps2/src/plugins.glade b/gramps2/src/plugins.glade index a9010952a..0c581caa2 100644 --- a/gramps2/src/plugins.glade +++ b/gramps2/src/plugins.glade @@ -2,33 +2,32 @@ + - + True GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False - 600 - 400 True False gramps.png False - + True False - 0 + 8 - + True GTK_BUTTONBOX_END - + True True True @@ -39,34 +38,6 @@ - - - - True - Perform selected action - True - True - gtk-apply - True - GTK_RELIEF_NORMAL - 0 - - - - - - - True - Perform selected action and close this dialog - True - True - gtk-ok - True - GTK_RELIEF_NORMAL - 0 - - - 0 @@ -77,13 +48,109 @@ - + + 450 + 400 + True + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT + + + + True + True + False + GTK_JUSTIFY_LEFT + GTK_WRAP_NONE + False + 0 + 0 + 0 + 0 + 0 + 0 + + + + + + 0 + True + True + + + + + + + + True + + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + 600 + 400 + True + False + gramps.png + + + + True + False + 0 + + + + True + GTK_BUTTONBOX_END + 6 + + + + True + True + True + gtk-close + True + GTK_RELIEF_NORMAL + + + + + + + True + Perform selected action + True + True + + True + GTK_RELIEF_NORMAL + + + + + + 6 + False + True + GTK_PACK_END + + + + + True True 0 - + True GTK_POLICY_AUTOMATIC GTK_POLICY_AUTOMATIC @@ -109,13 +176,13 @@ - + True False 0 - + True False 0 @@ -165,7 +232,7 @@ - + True @@ -252,7 +319,7 @@ - + True Author: False @@ -276,7 +343,7 @@ - + True Author's email: False @@ -370,86 +437,4 @@ - - True - - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - True - False - gramps.png - False - - - - True - False - 8 - - - - True - GTK_BUTTONBOX_END - - - - True - True - True - gtk-close - True - GTK_RELIEF_NORMAL - 0 - - - - - - 0 - False - True - GTK_PACK_END - - - - - - 450 - 400 - True - True - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - GTK_SHADOW_IN - GTK_CORNER_TOP_LEFT - - - - True - True - False - GTK_JUSTIFY_LEFT - GTK_WRAP_NONE - False - 0 - 0 - 0 - 0 - 0 - 0 - - - - - - 0 - True - True - - - - - - diff --git a/gramps2/src/plugins/rel_ru.py b/gramps2/src/plugins/rel_ru.py index 6481a2560..63873aa70 100644 --- a/gramps2/src/plugins/rel_ru.py +++ b/gramps2/src/plugins/rel_ru.py @@ -31,6 +31,7 @@ import RelLib import GrampsCfg +from Relationship import apply_filter as getallancestors #------------------------------------------------------------------------- # @@ -104,16 +105,6 @@ _niece_level = [ # # #------------------------------------------------------------------------- -def getallancestors(person,index,ancestorlist,ancestormap): - if person == None: - return - ancestorlist.append(person) - ancestormap[person.getId()] = index - - family = person.getMainParents() - if family != None: - getallancestors(family.getFather(),index+1,ancestorlist,ancestormap) - getallancestors(family.getMother(),index+1,ancestorlist,ancestormap) def get_junior_male_cousin(level,removed): if removed > len(_junior_male_removed_level)-1 or level>len(_male_cousin_level)-1: