2006-05-17 Don Allingham <don@gramps-project.org>

* src/GrampsCfg.py: pychecker fixes
	* src/GrampsWidgets.py: pychecker fixes
	* src/glade/gramps.glade: fix text entry -> label
	* src/NameDisplay.py: pychecker fixes
	* src/DisplayState.py: pychecker fixes
	* src/GrampsDisplay.py: pychecker fixes
	* src/DateEdit.py: pychecker fixes
	* src/gramps_main.py: pychecker fixes
	* src/DbLoader.py: pychecker fixes



svn: r6701
This commit is contained in:
Don Allingham 2006-05-18 01:39:50 +00:00
parent ae8ec93201
commit ae6da05e4b
10 changed files with 121 additions and 323 deletions

View File

@ -1,3 +1,14 @@
2006-05-17 Don Allingham <don@gramps-project.org>
* src/GrampsCfg.py: pychecker fixes
* src/GrampsWidgets.py: pychecker fixes
* src/glade/gramps.glade: fix text entry -> label
* src/NameDisplay.py: pychecker fixes
* src/DisplayState.py: pychecker fixes
* src/GrampsDisplay.py: pychecker fixes
* src/DateEdit.py: pychecker fixes
* src/gramps_main.py: pychecker fixes
* src/DbLoader.py: pychecker fixes
2006-05-17 Alex Roitman <shura@gramps-project.org>
* src/ArgHandler.py: Adapt to recent changes.
* src/BasicUtils.py (update_empty): Clean up callback.

View File

@ -68,7 +68,6 @@ import gtk.glade
from RelLib import Date
import DateHandler
import const
import Utils
import GrampsDisplay
import ManagedWindow

View File

@ -48,7 +48,6 @@ import gtk
#-------------------------------------------------------------------------
import const
import Config
import Errors
import Mime
import GrampsDb
import Utils

View File

@ -26,6 +26,7 @@
#
#-------------------------------------------------------------------------
from cStringIO import StringIO
from gettext import gettext as _
#-------------------------------------------------------------------------
#

View File

@ -25,7 +25,6 @@
# Standard python modules
#
#-------------------------------------------------------------------------
import sets
from gettext import gettext as _
#-------------------------------------------------------------------------
@ -43,7 +42,6 @@ import gtk.glade
#-------------------------------------------------------------------------
import Config
import DateHandler
import GrampsDisplay
import ManagedWindow
from GrampsWidgets import *
@ -60,8 +58,6 @@ _surname_styles = [
_("Icelandic style"),
]
_pallette = "#fce94f:#edd400:#c4a000:#facf3e:#f57900:#ce5c00:#e9b96e:#c17d11:#8f5902:#8ae234:#73d216:#4e9a06:#729fcf:#3465a4:#204a87:#ad7fa8:#7ff07b:#5c3566:#ef2929:#cc0000:#a40000"
def set_calendar_date_format():
format_list = DateHandler.get_date_formats()
DateHandler.set_format(Config.get_date_format(format_list))
@ -320,7 +316,4 @@ class GrampsPreferences(ManagedWindow.ManagedWindow):
def build_menu_names(self,obj):
return (_('Preferences'),None)
if __name__ == "__main__":
GrampsPreferences(None,None)
gtk.main()

View File

@ -18,7 +18,6 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
import gobject
from QuestionDialog import ErrorDialog
def help(target):

View File

@ -21,7 +21,6 @@
# $Id$
import cgi
import locale
import os
from gettext import gettext as _

View File

@ -173,7 +173,7 @@ class NameDisplay:
else:
return "%s, %s" % (last, first)
def _fnln(self,name,nickname=""):
def _fnln(self,name):
"""
Prints the Western style first name, last name style.
Typically this is::
@ -233,7 +233,7 @@ class NameDisplay:
else:
return "%s %s" % (first, last)
def _lnfn(self,name,nickname=u""):
def _lnfn(self,name):
"""
Prints the Western style last name, first name style.
Typically this is::
@ -318,9 +318,9 @@ class NameDisplay:
"""
name = person.get_primary_name()
if name.display_as == Name.LNFN:
return self._lnfn(name,"")
return self._lnfn(name)
else:
return self._fnln(name,"")
return self._fnln(name)
def display_formal(self,person):
"""
@ -336,9 +336,9 @@ class NameDisplay:
"""
name = person.get_primary_name()
if name.display_as == Name.LNFN:
return self._lnfn(name,'')
return self._lnfn(name)
else:
return self._fnln(name,'')
return self._fnln(name)
def display_name(self,name):
"""

View File

@ -1330,22 +1330,6 @@
</packing>
</child>
<child>
<widget class="GtkComboBoxEntry" id="marriage_type">
<property name="visible">True</property>
<property name="add_tearoffs">False</property>
<property name="has_frame">True</property>
<property name="focus_on_click">True</property>
</widget>
<packing>
<property name="left_attach">4</property>
<property name="right_attach">5</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="y_options">fill</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label590">
<property name="visible">True</property>
@ -1374,22 +1358,6 @@
</packing>
</child>
<child>
<widget class="GtkComboBoxEntry" id="marker">
<property name="visible">True</property>
<property name="add_tearoffs">False</property>
<property name="has_frame">True</property>
<property name="focus_on_click">True</property>
</widget>
<packing>
<property name="left_attach">6</property>
<property name="right_attach">7</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="y_options">fill</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label542">
<property name="visible">True</property>
@ -1449,6 +1417,38 @@
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkComboBoxEntry" id="marriage_type">
<property name="visible">True</property>
<property name="add_tearoffs">False</property>
<property name="has_frame">True</property>
<property name="focus_on_click">True</property>
</widget>
<packing>
<property name="left_attach">4</property>
<property name="right_attach">5</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkComboBoxEntry" id="marker">
<property name="visible">True</property>
<property name="add_tearoffs">False</property>
<property name="has_frame">True</property>
<property name="focus_on_click">True</property>
</widget>
<packing>
<property name="left_attach">6</property>
<property name="right_attach">7</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="y_options"></property>
</packing>
</child>
</widget>
<packing>
<property name="padding">0</property>
@ -8523,23 +8523,6 @@ Text Beside Icons</property>
</packing>
</child>
<child>
<widget class="GtkComboBoxEntry" id="personal_events">
<property name="visible">True</property>
<property name="add_tearoffs">False</property>
<property name="has_frame">True</property>
<property name="focus_on_click">True</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">0</property>
<property name="bottom_attach">1</property>
<property name="x_options">fill</property>
<property name="y_options">fill</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label155">
<property name="visible">True</property>
@ -8889,6 +8872,23 @@ Text Beside Icons</property>
<property name="y_options">fill</property>
</packing>
</child>
<child>
<widget class="GtkComboBoxEntry" id="personal_events">
<property name="visible">True</property>
<property name="add_tearoffs">False</property>
<property name="has_frame">True</property>
<property name="focus_on_click">True</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">0</property>
<property name="bottom_attach">1</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
</widget>
<packing>
<property name="padding">0</property>
@ -9889,23 +9889,6 @@ Text Beside Icons</property>
</packing>
</child>
<child>
<widget class="GtkComboBoxEntry" id="type">
<property name="visible">True</property>
<property name="add_tearoffs">False</property>
<property name="has_frame">True</property>
<property name="focus_on_click">True</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">0</property>
<property name="bottom_attach">1</property>
<property name="x_options">fill</property>
<property name="y_options">fill</property>
</packing>
</child>
<child>
<widget class="GtkToggleButton" id="priv">
<property name="visible">True</property>
@ -9980,6 +9963,23 @@ Text Beside Icons</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkComboBoxEntry" id="type">
<property name="visible">True</property>
<property name="add_tearoffs">False</property>
<property name="has_frame">True</property>
<property name="focus_on_click">True</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">0</property>
<property name="bottom_attach">1</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
</widget>
<packing>
<property name="padding">0</property>
@ -11891,205 +11891,6 @@ Text Beside Icons</property>
</child>
</widget>
<widget class="GtkDialog" id="note_edit">
<property name="visible">True</property>
<property name="title" translatable="yes"></property>
<property name="type">GTK_WINDOW_TOPLEVEL</property>
<property name="window_position">GTK_WIN_POS_NONE</property>
<property name="modal">False</property>
<property name="default_width">500</property>
<property name="default_height">450</property>
<property name="resizable">True</property>
<property name="destroy_with_parent">False</property>
<property name="decorated">True</property>
<property name="skip_taskbar_hint">False</property>
<property name="skip_pager_hint">False</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<property name="focus_on_map">True</property>
<property name="urgency_hint">False</property>
<property name="has_separator">False</property>
<child internal-child="vbox">
<widget class="GtkVBox" id="dialog-vbox19">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">0</property>
<child internal-child="action_area">
<widget class="GtkHButtonBox" id="dialog-action_area19">
<property name="visible">True</property>
<property name="layout_style">GTK_BUTTONBOX_END</property>
<child>
<widget class="GtkButton" id="cancel">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label">gtk-cancel</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="response_id">-6</property>
</widget>
</child>
<child>
<widget class="GtkButton" id="ok">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label">gtk-ok</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="response_id">-5</property>
</widget>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">GTK_PACK_END</property>
</packing>
</child>
<child>
<widget class="GtkVBox" id="vbox90">
<property name="border_width">6</property>
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">6</property>
<child>
<widget class="GtkLabel" id="title_msg">
<property name="visible">True</property>
<property name="label" translatable="yes"></property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
<property name="width_chars">-1</property>
<property name="single_line_mode">False</property>
<property name="angle">0</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkHBox" id="tbox">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">6</property>
<child>
<widget class="GtkLabel" id="label434">
<property name="visible">True</property>
<property name="label" translatable="yes">Title:</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
<property name="width_chars">-1</property>
<property name="single_line_mode">False</property>
<property name="angle">0</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkEntry" id="title">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">True</property>
<property name="visibility">True</property>
<property name="max_length">0</property>
<property name="text" translatable="yes"></property>
<property name="has_frame">True</property>
<property name="invisible_char">*</property>
<property name="activates_default">False</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">True</property>
</packing>
</child>
<child>
<widget class="GtkScrolledWindow" id="scrolledwindow84">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
<property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
<property name="shadow_type">GTK_SHADOW_IN</property>
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
<child>
<widget class="GtkTextView" id="note">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">True</property>
<property name="overwrite">False</property>
<property name="accepts_tab">True</property>
<property name="justification">GTK_JUSTIFY_LEFT</property>
<property name="wrap_mode">GTK_WRAP_NONE</property>
<property name="cursor_visible">True</property>
<property name="pixels_above_lines">0</property>
<property name="pixels_below_lines">0</property>
<property name="pixels_inside_wrap">0</property>
<property name="left_margin">0</property>
<property name="right_margin">0</property>
<property name="indent">0</property>
<property name="text" translatable="yes"></property>
</widget>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
</widget>
</child>
</widget>
<widget class="GtkDialog" id="scrollmsg">
<property name="visible">True</property>
<property name="title" translatable="yes">GRAMPS</property>
@ -12697,7 +12498,7 @@ Text Beside Icons</property>
<property name="right_attach">3</property>
<property name="top_attach">0</property>
<property name="bottom_attach">1</property>
<property name="y_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
</widget>
@ -13171,16 +12972,22 @@ Text Beside Icons</property>
<property name="spacing">0</property>
<child>
<widget class="GtkEntry" id="eer_place">
<widget class="GtkLabel" id="eer_place">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">True</property>
<property name="visibility">True</property>
<property name="max_length">0</property>
<property name="text" translatable="yes"></property>
<property name="has_frame">True</property>
<property name="invisible_char">*</property>
<property name="activates_default">False</property>
<property name="label" translatable="yes"></property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
<property name="width_chars">-1</property>
<property name="single_line_mode">False</property>
<property name="angle">0</property>
</widget>
<packing>
<property name="padding">0</property>
@ -13673,27 +13480,6 @@ Text Beside Icons</property>
</packing>
</child>
<child>
<widget class="GtkComboBox" id="confidence">
<property name="visible">True</property>
<property name="items" translatable="yes">Very Low
Low
Normal
High
Very High</property>
<property name="add_tearoffs">False</property>
<property name="focus_on_click">True</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options">fill</property>
<property name="y_options">fill</property>
</packing>
</child>
<child>
<widget class="GtkToggleButton" id="privacy">
<property name="visible">True</property>
@ -13724,6 +13510,27 @@ Very High</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkComboBox" id="confidence">
<property name="visible">True</property>
<property name="items" translatable="yes">Very Low
Low
Normal
High
Very High</property>
<property name="add_tearoffs">False</property>
<property name="focus_on_click">True</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
</widget>
<packing>
<property name="tab_expand">False</property>

View File

@ -40,7 +40,6 @@ import ViewManager
import GrampsDb
import ArgHandler
import Config
import GrampsCfg
import const
import Errors
import TipOfDay
@ -62,7 +61,6 @@ else:
relation_icon = "relation.svg"
def register_stock_icons ():
import os
items = [
(os.path.join(const.image_dir,person_icon),
('gramps-person',_('Person'),gtk.gdk.CONTROL_MASK,0,'')),
@ -192,8 +190,6 @@ class Gramps:
self.researcher_key_update)
Config.client.notify_add("/apps/gramps/interface/statusbar",
self.statusbar_key_update)
Config.client.notify_add("/apps/gramps/interface/toolbar",
self.toolbar_key_update)
if Config.get(Config.USE_TIPS):
TipOfDay.TipOfDay(self.vm.uistate)
@ -237,10 +233,4 @@ class Gramps:
def statusbar_key_update(self,client,cnxn_id,entry,data):
self.vm.uistate.modify_statusbar()
def toolbar_key_update(self,client,cnxn_id,entry,data):
the_style = Config.get(Config.TOOLBAR)
if the_style == -1:
self.vm.toolbar.unset_style()
else:
self.vm.toolbar.set_style(the_style)