2
# -*- coding: utf-8 -*-
4
# Copyright (C) Martijn Voncken 2008 <mvoncken@gmail.com>
6
# This program is free software; you can redistribute it and/or modify
7
# it under the terms of the GNU General Public License as published by
8
# the Free Software Foundation; either version 3, or (at your option)
11
# This program is distributed in the hope that it will be useful,
12
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
# GNU General Public License for more details.
16
# You should have received a copy of the GNU General Public License
17
# along with this program. If not, write to:
18
# The Free Software Foundation, Inc.,
19
# 51 Franklin Street, Fifth Floor
20
# Boston, MA 02110-1301, USA.
22
# In addition, as a special exception, the copyright holders give
23
# permission to link the code of portions of this program with the OpenSSL
25
# You must obey the GNU General Public License in all respects for all of
26
# the code used other than OpenSSL. If you modify file(s) with this
27
# exception, you may extend this exception to your version of the file(s),
28
# but you are not obligated to do so. If you do not wish to do so, delete
29
# this exception statement from your version. If you delete this exception
30
# statement from all source files in the program, then also delete it here.
36
copy icons from kde icon set.
37
Edit ICON_SET and TARGET_DIR before running this file.
38
#perl -pi -w -e 's/tango/16/g;' *.html
42
from shutil import copyfile
44
ICON_SET = "/home/martijn/prj/oxygen/oxygen"
45
TARGET_DIR = "/home/martijn/src/deluge/deluge/ui/webui"
47
def copy_icons(source_dir , target_dir , mapping):
48
for target, source in mapping.iteritems():
49
source = path.join(source_dir, source) + ".png"
50
target = path.join(target_dir, target) + ".png"
51
print "%s -> %s" % (source, target)
52
copyfile(source, target)
55
"down":"actions/1downarrow",
56
"up":"actions/1downarrow",
57
"connections":"apps/preferences_system_network_sharing",
58
"details":"actions/object_edit",
59
"edit-clear":"actions/clear_left",
60
"edit-redo":"actions/edit_redo",
61
"go-bottom":"actions/2downarrow",
62
"go-top":"actions/2uparrow",
63
"label":"actions/rss_tag",
64
"list-add":"actions/add",
65
"list-remove":"actions/fileclose",
66
"move":"actions/filesaveas",
67
"pause":"actions/media_playback_pause",
68
"preferences-system":"apps/preferences_system",
69
"process-stop":"actions/process_stop",
70
"queue-down":"actions/1downarrow",
71
"queue-up":"actions/1uparrow",
72
"start":"actions/media_playback_start",
73
"stop":"actions/media_playback_stop",
74
"system-log-out":"actions/system_log_out",
75
"user-trash":"actions/edittrash",
76
"view-refresh":"actions/view_refresh",
77
"gtk-yes":"actions/flag_green",
78
"drive-harddisk":"devices/drive_harddisk",
79
"select-all":"actions/edit_select_all"
83
"gtk-edit":"actions/object_edit",
84
"gtk-yes":"actions/flag_green",
85
"network-idle":"apps/preferences_system_network_sharing",
86
"view-refresh":"actions/view_refresh",
87
"view-sort-ascending":"actions/view_sort_ascending",
88
"view-sort-descending":"actions/view_sort_descending"
93
"connections":"apps/preferences_system_network_sharing",
94
"down":"actions/1downarrow",
95
"up":"actions/1uparrow",
96
"new":"actions/document_new",
97
"options":"apps/preferences_system",
98
"pause":"actions/media_playback_pause",
99
"remove":"actions/fileclose",
100
"resume":"actions/media_playback_start"
104
copy_icons( path.join(ICON_SET, "16x16"), path.join(TARGET_DIR, "static/images/16"), map_static16)
105
copy_icons( path.join(ICON_SET, "16x16"), path.join(TARGET_DIR, "templates/ajax/static/icons/16"), map_ajax16)
106
copy_icons( path.join(ICON_SET, "32x32"), path.join(TARGET_DIR, "templates/ajax/static/icons/32"), map_ajax32)