[kupfer: 64/67] icons: Update directly when chosen icon_renderer changes
- From: Ulrik Sverdrup <usverdrup src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [kupfer: 64/67] icons: Update directly when chosen icon_renderer changes
- Date: Sat, 19 Mar 2011 01:03:07 +0000 (UTC)
commit 7d24952805154dadc476acd5933d3fd2a3f32154
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date: Sat Mar 19 01:53:41 2011 +0100
icons: Update directly when chosen icon_renderer changes
kupfer/icons.py | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/kupfer/icons.py b/kupfer/icons.py
index a65d0c2..caaa686 100644
--- a/kupfer/icons.py
+++ b/kupfer/icons.py
@@ -236,17 +236,15 @@ def _get_icon_for_standard_gicon(gicon, icon_size):
def _setup_icon_renderer(sched):
from kupfer.core import settings
setctl = settings.GetSettingsController()
- setctl.connect("alternatives-changed", _icon_render_change)
- _icon_render_change(setctl, 'icon_renderer')
+ setctl.connect("alternatives-changed::icon_renderer", _icon_render_change)
+ setctl.connect("value-changed::tools.icon_renderer", _icon_render_change)
+ _icon_render_change(setctl)
-def _icon_render_change(setctl, category_key):
+def _icon_render_change(setctl, *arguments):
global _IconRenderer
- print "_icon_render_change"
- if category_key != 'icon_renderer':
- return
renderer_dict = setctl.get_preferred_alternative('icon_renderer')
renderer = renderer_dict.get("renderer")
- if not renderer:
+ if not renderer or renderer is _IconRenderer:
return
pretty.print_debug(__name__, "Using", renderer)
_icon_theme_changed(None)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]