diff -ur cherrytree-0.19/modules/config.py cherrytree-0.19_mod/modules/config.py --- cherrytree-0.19/modules/config.py 2010-12-28 23:20:27.000000000 +0100 +++ cherrytree-0.19_mod/modules/config.py 2011-01-04 22:55:45.478512112 +0100 @@ -21,6 +21,7 @@ import os, sys, xml.dom.minidom, gtk, pango, subprocess import cons +from cons_gtk_dep import ICONS_SIZE def config_file_load(inst): @@ -116,7 +117,7 @@ else: inst.table_columns = 3 if dom_iter.hasAttribute("toolbar_icon_size"): inst.toolbar_icon_size = int( dom_iter.attributes["toolbar_icon_size"].value ) - if inst.toolbar_icon_size not in cons.ICONS_SIZE: inst.toolbar_icon_size = 1 + if inst.toolbar_icon_size not in ICONS_SIZE: inst.toolbar_icon_size = 1 else: inst.toolbar_icon_size = 1 if dom_iter.hasAttribute("table_column_mode"): inst.table_column_mode = dom_iter.attributes["table_column_mode"].value @@ -248,7 +249,7 @@ inst.renderer_text.set_property('wrap-width', inst.cherry_wrap_width) inst.ui.get_widget("/ToolBar").set_property("visible", inst.toolbar_visible) inst.ui.get_widget("/ToolBar").set_style(gtk.TOOLBAR_ICONS) - inst.ui.get_widget("/ToolBar").set_property("icon-size", cons.ICONS_SIZE[inst.toolbar_icon_size]) + inst.ui.get_widget("/ToolBar").set_property("icon-size", ICONS_SIZE[inst.toolbar_icon_size]) if inst.autosave[0]: inst.autosave_timer_start() inst.user_active = True Nur in cherrytree-0.19_mod/modules: cons_gtk_dep.py. diff -ur cherrytree-0.19/modules/cons.py cherrytree-0.19_mod/modules/cons.py --- cherrytree-0.19/modules/cons.py 2011-01-01 00:03:00.000000000 +0100 +++ cherrytree-0.19_mod/modules/cons.py 2011-01-04 22:38:20.139481798 +0100 @@ -19,7 +19,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, # MA 02110-1301, USA. -import os, sys, gtk +import os, sys VERSION = "0.19" @@ -51,8 +51,6 @@ TAG_PROPERTIES = ["weight", "foreground", "background", "style", "underline", "strikethrough", "scale", "justification", "link"] CUSTOM_COLORS_ID = "custom-colors" -ICONS_SIZE = {1: gtk.ICON_SIZE_MENU, 2: gtk.ICON_SIZE_SMALL_TOOLBAR, 3: gtk.ICON_SIZE_LARGE_TOOLBAR, - 4: gtk.ICON_SIZE_DND, 5: gtk.ICON_SIZE_DIALOG} ANCHOR_CHAR = GLADE_PATH + 'anchor_char.png' NODES_ICONS = {0:'Red Cherry', 1:'Blue Cherry', 2:'Orange Cherry', 3:'Cyan Cherry', 4:'Orange Dark Cherry', 5:'Sherbert Cherry', 6:'Yellow Cherry'} diff -ur cherrytree-0.19/modules/core.py cherrytree-0.19_mod/modules/core.py --- cherrytree-0.19/modules/core.py 2011-01-01 00:13:44.000000000 +0100 +++ cherrytree-0.19_mod/modules/core.py 2011-01-04 22:56:27.270481128 +0100 @@ -22,6 +22,7 @@ import gtk, pango, gtksourceview2, gobject import sys, os, re, subprocess, webbrowser, base64, cgi, urllib2, shutil import cons, support, config, machines, clipboard, imports, exports, printing, tablez, lists, findreplace, codeboxes +from cons_gtk_dep import ICONS_SIZE class GladeWidgetsWrapper: @@ -1777,7 +1778,7 @@ support.dialog_info(_("The Size of the Toolbar Icons is already at the Maximum Value"), self.window) return self.toolbar_icon_size += 1 - self.ui.get_widget("/ToolBar").set_property("icon-size", cons.ICONS_SIZE[self.toolbar_icon_size]) + self.ui.get_widget("/ToolBar").set_property("icon-size", ICONS_SIZE[self.toolbar_icon_size]) def toolbar_icons_size_decrease(self, *args): """Decrease the Size of the Toolbar Icons""" @@ -1785,7 +1786,7 @@ support.dialog_info(_("The Size of the Toolbar Icons is already at the Minimum Value"), self.window) return self.toolbar_icon_size -= 1 - self.ui.get_widget("/ToolBar").set_property("icon-size", cons.ICONS_SIZE[self.toolbar_icon_size]) + self.ui.get_widget("/ToolBar").set_property("icon-size", ICONS_SIZE[self.toolbar_icon_size]) def toggle_show_hide_toolbar(self, *args): """Toggle Show/Hide the Toolbar""" --- /dev/null 2011-01-04 21:22:30.982563976 +0100 +++ cherrytree-0.19_mod/modules/cons_gtk_dep.py 2011-01-04 22:53:46.311492804 +0100 @@ -0,0 +1,3 @@ +import gtk +ICONS_SIZE = {1: gtk.ICON_SIZE_MENU, 2: gtk.ICON_SIZE_SMALL_TOOLBAR, 3: gtk.ICON_SIZE_LARGE_TOOLBAR, + 4: gtk.ICON_SIZE_DND, 5: gtk.ICON_SIZE_DIALOG}