Remove marker color preferences
svn: r16029
This commit is contained in:
parent
e1097d1a53
commit
63999b2aa6
@ -259,8 +259,6 @@ register('paths.quick-backup-directory', const.USER_HOME)
|
||||
register('paths.quick-backup-filename',
|
||||
"%(filename)s_%(year)d-%(month)02d-%(day)02d.%(extension)s")
|
||||
|
||||
register('preferences.complete-color', '#008b00')
|
||||
register('preferences.custom-marker-color', '#8b008b')
|
||||
register('preferences.date-format', 0)
|
||||
register('preferences.calendar-format-report', 0)
|
||||
register('preferences.default-source', False)
|
||||
@ -285,7 +283,6 @@ register('preferences.private-record-text', "[%s]" % _("Private Record"))
|
||||
register('preferences.private-surname-text', "[%s]" % _("Living"))
|
||||
register('preferences.rprefix', 'R%04d')
|
||||
register('preferences.sprefix', 'S%04d')
|
||||
register('preferences.todo-color', '#ff0000')
|
||||
register('preferences.use-last-view', True)
|
||||
register('preferences.last-view', '')
|
||||
register('preferences.last-views', [])
|
||||
|
@ -407,7 +407,6 @@ class GrampsPreferences(ConfigureDialog):
|
||||
self.add_date_panel,
|
||||
self.add_advanced_panel,
|
||||
self.add_researcher_panel,
|
||||
self.add_color_panel
|
||||
)
|
||||
ConfigureDialog.__init__(self, uistate, dbstate, page_funcs,
|
||||
GrampsPreferences, config,
|
||||
@ -478,40 +477,6 @@ class GrampsPreferences(ConfigureDialog):
|
||||
|
||||
return _('Warnings'), table
|
||||
|
||||
def add_color_panel(self, configdialog):
|
||||
table = gtk.Table(3, 8)
|
||||
table.set_border_width(12)
|
||||
table.set_col_spacings(12)
|
||||
table.set_row_spacings(6)
|
||||
|
||||
self.comp_color = self.add_color(table, _("Complete"), 0,
|
||||
'preferences.complete-color')
|
||||
self.todo_color = self.add_color(table, _("ToDo"), 1,
|
||||
'preferences.todo-color')
|
||||
self.custom_color = self.add_color(table, _("Custom"), 2,
|
||||
'preferences.custom-marker-color')
|
||||
|
||||
button = gtk.Button(stock=gtk.STOCK_REVERT_TO_SAVED)
|
||||
button.connect('clicked', self.reset_colors)
|
||||
table.attach(button, 1, 2, 3, 4, yoptions=0, xoptions=0)
|
||||
return _('Marker Colors'), table
|
||||
|
||||
def reset_colors(self, obj):
|
||||
|
||||
def_comp = config.get_default('preferences.complete-color')
|
||||
def_todo = config.get_default('preferences.todo-color')
|
||||
def_cust = config.get_default('preferences.custom-marker-color')
|
||||
|
||||
config.set('preferences.complete-color', def_comp)
|
||||
config.set('preferences.todo-color', def_todo)
|
||||
config.set('preferences.custom-marker-color', def_cust)
|
||||
|
||||
self.comp_color.set_color(gtk.gdk.color_parse(def_comp))
|
||||
self.todo_color.set_color(gtk.gdk.color_parse(def_todo))
|
||||
self.custom_color.set_color(gtk.gdk.color_parse(def_cust))
|
||||
for widget in [self.comp_color, self.todo_color, self.custom_color]:
|
||||
widget.emit('color-set')
|
||||
|
||||
def _build_name_format_model(self, active):
|
||||
"""
|
||||
Create a common model for ComboBox and TreeView
|
||||
|
@ -74,7 +74,6 @@ import gtk
|
||||
#-------------------------------------------------------------------------
|
||||
from Filters import SearchFilter
|
||||
from Filters import ExactSearchFilter
|
||||
import config
|
||||
from Utils import conv_unicode_tosrtkey_ongtk
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
@ -405,16 +404,6 @@ class FlatBaseModel(gtk.GenericTreeModel):
|
||||
self._reverse = (order == gtk.SORT_DESCENDING)
|
||||
self._tooltip_column = tooltip_column
|
||||
|
||||
config.connect("preferences.todo-color",
|
||||
self.__update_todo)
|
||||
config.connect("preferences.custom-marker-color",
|
||||
self.__update_custom)
|
||||
config.connect("preferences.complete-color",
|
||||
self.__update_complete)
|
||||
|
||||
self.complete_color = config.get('preferences.complete-color')
|
||||
self.todo_color = config.get('preferences.todo-color')
|
||||
self.custom_color = config.get('preferences.custom-marker-color')
|
||||
self.rebuild_data()
|
||||
_LOG.debug(self.__class__.__name__ + ' __init__ ' +
|
||||
str(time.clock() - cput) + ' sec')
|
||||
@ -451,24 +440,6 @@ class FlatBaseModel(gtk.GenericTreeModel):
|
||||
self.search = None
|
||||
self.rebuild_data = self._rebuild_search
|
||||
|
||||
def __update_todo(self, client, cnxn_id, entry, data):
|
||||
"""
|
||||
Callback if preferences todo color changes
|
||||
"""
|
||||
self.todo_color = config.get('preferences.todo-color')
|
||||
|
||||
def __update_custom(self, client, cnxn_id, entry, data):
|
||||
"""
|
||||
Callback if preferences todo color changes
|
||||
"""
|
||||
self.custom_color = config.get('preferences.custom-marker-color')
|
||||
|
||||
def __update_complete(self, client, cnxn_id, entry, data):
|
||||
"""
|
||||
Callback if preferences todo color changes
|
||||
"""
|
||||
self.complete_color = config.get('preferences.complete-color')
|
||||
|
||||
def total(self):
|
||||
"""
|
||||
Total number of items that maximally can be shown
|
||||
|
@ -50,7 +50,6 @@ import gtk
|
||||
# GRAMPS modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
import config
|
||||
from Utils import conv_unicode_tosrtkey_ongtk
|
||||
import gui.widgets.progressdialog as progressdlg
|
||||
from Lru import LRU
|
||||
@ -300,17 +299,6 @@ class TreeBaseModel(gtk.GenericTreeModel):
|
||||
|
||||
self.lru_data = LRU(TreeBaseModel._CACHE_SIZE)
|
||||
|
||||
config.connect("preferences.todo-color",
|
||||
self.__update_todo)
|
||||
config.connect("preferences.custom-marker-color",
|
||||
self.__update_custom)
|
||||
config.connect("preferences.complete-color",
|
||||
self.__update_complete)
|
||||
|
||||
self.complete_color = config.get('preferences.complete-color')
|
||||
self.todo_color = config.get('preferences.todo-color')
|
||||
self.custom_color = config.get('preferences.custom-marker-color')
|
||||
|
||||
self._tooltip_column = tooltip_column
|
||||
|
||||
self.__total = 0
|
||||
@ -343,24 +331,6 @@ class TreeBaseModel(gtk.GenericTreeModel):
|
||||
self.fmap = None
|
||||
self.hmap = None
|
||||
|
||||
def __update_todo(self, *args):
|
||||
"""
|
||||
Update the todo color when the preferences change.
|
||||
"""
|
||||
self.todo_color = config.get('preferences.todo-color')
|
||||
|
||||
def __update_custom(self, *args):
|
||||
"""
|
||||
Update the custom color when the preferences change.
|
||||
"""
|
||||
self.custom_color = config.get('preferences.custom-marker-color')
|
||||
|
||||
def __update_complete(self, *args):
|
||||
"""
|
||||
Update the complete color when the preferences change.
|
||||
"""
|
||||
self.complete_color = config.get('preferences.complete-color')
|
||||
|
||||
def displayed(self):
|
||||
"""
|
||||
Return the number of rows displayed.
|
||||
|
Loading…
Reference in New Issue
Block a user