Changeset 8451
- Timestamp:
- 08/06/07 00:57:04 (17 months ago)
- Location:
- trunk/src
- Files:
-
- 7 modified
-
common/configpaths.py (modified) (1 diff)
-
common/gajim.py (modified) (1 diff)
-
common/helpers.py (modified) (1 diff)
-
config.py (modified) (3 diffs)
-
roster_window.py (modified) (10 diffs)
-
systray.py (modified) (1 diff)
-
tooltips.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/common/configpaths.py
r8435 r8451 79 79 80 80 # LOG is deprecated 81 k = ( 'LOG', 'LOG_DB', 'VCARD', 'AVATAR', 'MY_EMOTS' ) 82 v = (u'logs', u'logs.db', u'vcards', u'avatars', u'emoticons') 81 k = ( 'LOG', 'LOG_DB', 'VCARD', 'AVATAR', 'MY_EMOTS', 82 'MY_ICONSETS' ) 83 v = (u'logs', u'logs.db', u'vcards', u'avatars', u'emoticons', 84 u'iconsets') 83 85 84 86 if os.name == 'nt': -
trunk/src/common/gajim.py
r8112 r8451 72 72 AVATAR_PATH = gajimpaths['AVATAR'] 73 73 MY_EMOTS_PATH = gajimpaths['MY_EMOTS'] 74 MY_ICONSETS_PATH = gajimpaths['MY_ICONSETS'] 74 75 TMP = gajimpaths['TMP'] 75 76 DATA_DIR = gajimpaths['DATA'] -
trunk/src/common/helpers.py
r8445 r8451 1045 1045 from time import strptime 1046 1046 return strptime(timestamp, '%Y%m%dT%H:%M:%S') 1047 1048 def get_iconset_path(iconset): 1049 if os.path.isdir(os.path.join(gajim.DATA_DIR, 'iconsets', iconset)): 1050 return os.path.join(gajim.DATA_DIR, 'iconsets', iconset) 1051 elif os.path.isdir(os.path.join(gajim.MY_ICONSETS_PATH, iconset)): 1052 return os.path.join(gajim.MY_ICONSETS_PATH, iconset) -
trunk/src/config.py
r8439 r8451 147 147 # iconset 148 148 iconsets_list = os.listdir(os.path.join(gajim.DATA_DIR, 'iconsets')) 149 if os.path.isdir(gajim.MY_ICONSETS_PATH): 150 iconsets_list += os.listdir(gajim.MY_ICONSETS_PATH) 149 151 # new model, image in 0, string in 1 150 152 model = gtk.ListStore(gtk.Image, str) … … 159 161 l = [] 160 162 for dir in iconsets_list: 161 if not os.path.isdir(os.path.join(gajim.DATA_DIR, 'iconsets', dir)): 163 if not os.path.isdir(os.path.join(gajim.DATA_DIR, 'iconsets', dir)) \ 164 and not os.path.isdir(os.path.join(gajim.MY_ICONSETS_PATH, dir)): 162 165 continue 163 166 if dir != '.svn' and dir != 'transports': … … 168 171 preview = gtk.Image() 169 172 files = [] 170 files.append(os.path.join( gajim.DATA_DIR, 'iconsets', l[i], '16x16',173 files.append(os.path.join(helpers.get_iconset_path(l[i]), '16x16', 171 174 'online.png')) 172 files.append(os.path.join( gajim.DATA_DIR, 'iconsets', l[i], '16x16',175 files.append(os.path.join(helpers.get_iconset_path(l[i]), '16x16', 173 176 'online.gif')) 174 177 for file in files: -
trunk/src/roster_window.py
r8447 r8451 1984 1984 1985 1985 iconset = gajim.config.get('iconset') 1986 path = os.path.join( gajim.DATA_DIR, 'iconsets', iconset, '16x16')1986 path = os.path.join(helpers.get_iconset_path(iconset), '16x16') 1987 1987 for c in contacts: 1988 1988 # icon MUST be different instance for every item … … 2171 2171 send_custom_status_menuitem.set_submenu(status_menuitems) 2172 2172 iconset = gajim.config.get('iconset') 2173 path = os.path.join( gajim.DATA_DIR, 'iconsets', iconset, '16x16')2173 path = os.path.join(helpers.get_iconset_path(iconset), '16x16') 2174 2174 for s in ['online', 'chat', 'away', 'xa', 'dnd', 'offline']: 2175 2175 # icon MUST be different instance for every item … … 2190 2190 if not iconset: 2191 2191 iconset = gajim.config.DEFAULT_ICONSET 2192 path = os.path.join( gajim.DATA_DIR, 'iconsets', iconset, '16x16')2192 path = os.path.join(helpers.get_iconset_path(iconset), '16x16') 2193 2193 for c in contacts: 2194 2194 # icon MUST be different instance for every item … … 2669 2669 send_custom_status_menuitem.set_submenu(status_menuitems) 2670 2670 iconset = gajim.config.get('iconset') 2671 path = os.path.join( gajim.DATA_DIR, 'iconsets', iconset, '16x16')2671 path = os.path.join(helpers.get_iconset_path(iconset), '16x16') 2672 2672 for s in ['online', 'chat', 'away', 'xa', 'dnd', 'offline']: 2673 2673 # icon MUST be different instance for every item … … 2861 2861 # using self.jabber_status_images is poopoo 2862 2862 iconset = gajim.config.get('iconset') 2863 path = os.path.join( gajim.DATA_DIR, 'iconsets', iconset, '16x16')2863 path = os.path.join(helpers.get_iconset_path(iconset), '16x16') 2864 2864 state_images = self.load_iconset(path) 2865 2865 … … 3007 3007 menu = gtk.Menu() 3008 3008 iconset = gajim.config.get('iconset') 3009 path = os.path.join( gajim.DATA_DIR, 'iconsets', iconset, '16x16')3009 path = os.path.join(helpers.get_iconset_path(iconset), '16x16') 3010 3010 accounts = [] # Put accounts in a list to sort them 3011 3011 for account in gajim.connections: … … 3604 3604 pass 3605 3605 iconset = gajim.config.get('iconset') 3606 prefix = os.path.join( gajim.DATA_DIR, 'iconsets', iconset, '32x32')3606 prefix = os.path.join(helpers.get_iconset_path(iconset), '32x32') 3607 3607 if status in ('chat', 'away', 'xa', 'dnd', 'invisible', 'offline'): 3608 3608 status = status + '.png' … … 4301 4301 '''load an icon from the iconset in 16x16''' 4302 4302 iconset = gajim.config.get('iconset') 4303 path = os.path.join( gajim.DATA_DIR, 'iconsets', iconset, '16x16'+ '/')4303 path = os.path.join(helpers.get_iconset_path(iconset), '16x16'+ '/') 4304 4304 icon_list = self._load_icon_list([icon_name], path) 4305 4305 return icon_list[icon_name] … … 4336 4336 iconset = gajim.config.get('iconset') 4337 4337 if iconset: 4338 path = os.path.join( gajim.DATA_DIR, 'iconsets', iconset, '16x16')4338 path = os.path.join(helpers.get_iconset_path(iconset), '16x16') 4339 4339 if not os.path.exists(path): 4340 4340 iconset = gajim.config.DEFAULT_ICONSET … … 4342 4342 iconset = gajim.config.DEFAULT_ICONSET 4343 4343 4344 path = os.path.join( gajim.DATA_DIR, 'iconsets', iconset, '32x32')4344 path = os.path.join(helpers.get_iconset_path(iconset), '32x32') 4345 4345 self.jabber_state_images['32'] = self.load_iconset(path) 4346 4346 4347 path = os.path.join( gajim.DATA_DIR, 'iconsets', iconset, '16x16')4347 path = os.path.join(helpers.get_iconset_path(iconset), '16x16') 4348 4348 self.jabber_state_images['16'] = self.load_iconset(path) 4349 4349 # try to find opened_meta.png file, else opened.png else nopixbuf merge -
trunk/src/systray.py
r8393 r8451 146 146 # We need our own set of status icons, let's make 'em! 147 147 iconset = gajim.config.get('iconset') 148 path = os.path.join( gajim.DATA_DIR, 'iconsets', iconset, '16x16')148 path = os.path.join(helpers.get_iconset_path(iconset), '16x16') 149 149 state_images = gajim.interface.roster.load_iconset(path) 150 150 -
trunk/src/tooltips.py
r8386 r8451 229 229 if not iconset: 230 230 iconset = 'dcraven' 231 file_path = os.path.join( gajim.DATA_DIR, 'iconsets', iconset, '16x16')231 file_path = os.path.join(helpers.get_iconset_path(iconset), '16x16') 232 232 for acct in accounts: 233 233 message = acct['message'] … … 442 442 if not iconset: 443 443 iconset = 'dcraven' 444 file_path = os.path.join( gajim.DATA_DIR,445 ' iconsets', iconset, '16x16')444 file_path = os.path.join(helpers.get_iconset_path(iconsets), 445 '16x16') 446 446 447 447 contact_keys = contacts_dict.keys()
