Check-in [4fbffabae1]
Overview
| Comment: | Fix file copying. |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
4fbffabae1c8b6bba22c9ab3b8541a45 |
| User & Date: | mario on 2016-12-04 17:34:15 |
| Other Links: | manifest | tags |
Context
|
2016-12-09
| ||
| 18:36 | Fix incorrect timespec format warning check-in: e332cd9fe0 user: mario tags: trunk | |
|
2016-12-04
| ||
| 17:34 | Fix file copying. check-in: 4fbffabae1 user: mario tags: trunk | |
| 16:39 | Bundle librezlooks.dll for default Windows PyGtk install. check-in: 8d9c22d6bb user: mario tags: trunk | |
Changes
Modified contrib/disabled/win_theme_rezlooks.py from [0098cea19a] to [ea515c3cab].
| ︙ | ︙ | |||
14 15 16 17 18 19 20 | # uncheck this plugin. The standard rendering will take hold after # a restart. # Other themes can be used with the `gtk_theme` plugin easily. # # (!) Only works with `librezlooks.dll` in place however. | | | > | > > > | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# uncheck this plugin. The standard rendering will take hold after
# a restart.
# Other themes can be used with the `gtk_theme` plugin easily.
#
# (!) Only works with `librezlooks.dll` in place however.
import os, shutil
from config import *
from uikit import gtk
from compat2and3 import *
# register a key
class win_theme_rezlooks(object):
# plugin info
module = "win_theme_rezlooks"
meta = plugin_meta()
gtk_dll = 'C:\\Python27\\Lib\\site-packages\\gtk-2.0\\runtime\\lib\\gtk-2.0\\2.10.0\\engines\\librezlooks.dll'
gtk_dll_src = '%s/dev/librezlooks.dll' % conf.share
# use builtin .GTKRC
def __init__(self, parent):
# assert gtk-engine is there, else copy it over
if not os.path.exists(self.gtk_dll):
if os.path.exists(self.gtk_dll_src):
try:
shutil.copyfile(self.gtk_dll_src, self.gtk_dll)
except:
log.ERR("could not copy librezlooks.dll")
return
else:
return
# apply theme
gtk.rc_parse_string(self.gtkrc)
gtk.rc_reparse_all()
# probably redundant:
gtk.rc_reset_styles(gtk.settings_get_for_screen(gtk.gdk.screen_get_default()))
|
| ︙ | ︙ |