[kupfer: 62/67] Setup default 'terminal' and 'icon_renderer' alternatives
- From: Ulrik Sverdrup <usverdrup src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [kupfer: 62/67] Setup default 'terminal' and 'icon_renderer' alternatives
- Date: Sat, 19 Mar 2011 01:02:57 +0000 (UTC)
commit a148335fb1e215d21e12d1667480bac015b389b2
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date: Sat Mar 19 01:53:41 2011 +0100
Setup default 'terminal' and 'icon_renderer' alternatives
Configure for using the default gnome-terminal and gtk alternatives
data/defaults.cfg | 3 ++-
kupfer/plugin/core/__init__.py | 3 ++-
.../plugin/core/{terminals.py => alternatives.py} | 13 +++++++------
3 files changed, 11 insertions(+), 8 deletions(-)
---
diff --git a/data/defaults.cfg b/data/defaults.cfg
index 647649e..4f9268f 100644
--- a/data/defaults.cfg
+++ b/data/defaults.cfg
@@ -27,7 +27,8 @@ switch_to_source = <Control>s
toggle_text_mode_quick = <Control>period
[Tools]
-terminal = gnome-terminal
+terminal = kupfer.plugin.core.gnome-terminal
+icon_renderer = kupfer.plugin.core.gtk
# Catalog: The sources of the plugin are included
diff --git a/kupfer/plugin/core/__init__.py b/kupfer/plugin/core/__init__.py
index 611575b..7310be6 100644
--- a/kupfer/plugin/core/__init__.py
+++ b/kupfer/plugin/core/__init__.py
@@ -54,7 +54,8 @@ if _is_debug():
register_subplugin(debug)
def initialize_plugin(x):
- from kupfer.plugin.core import terminals
+ from kupfer.plugin.core import alternatives
+ alternatives.initialize_alternatives(__name__)
class _MultiSource (MultiSource):
diff --git a/kupfer/plugin/core/terminals.py b/kupfer/plugin/core/alternatives.py
similarity index 65%
rename from kupfer/plugin/core/terminals.py
rename to kupfer/plugin/core/alternatives.py
index befe95a..9b2e325 100644
--- a/kupfer/plugin/core/terminals.py
+++ b/kupfer/plugin/core/alternatives.py
@@ -1,13 +1,14 @@
from kupfer import plugin_support
from kupfer import icons
-plugin_support.register_alternative(__name__, 'icon_renderer', 'gtk',
+def initialize_alternatives(__name__):
+ plugin_support.register_alternative(__name__, 'icon_renderer', 'gtk',
**{
'name': _("GTK+"),
'renderer': icons.IconRenderer,
})
-plugin_support.register_alternative(__name__, 'terminal', 'gnome-terminal',
+ plugin_support.register_alternative(__name__, 'terminal', 'gnome-terminal',
**{
'name': _("GNOME Terminal"),
'argv': ['gnome-terminal'],
@@ -16,7 +17,7 @@ plugin_support.register_alternative(__name__, 'terminal', 'gnome-terminal',
'startup_notify': True,
})
-plugin_support.register_alternative(__name__, 'terminal', 'xfce4-terminal',
+ plugin_support.register_alternative(__name__, 'terminal', 'xfce4-terminal',
**{
'name': _("XFCE Terminal"),
'argv': ['xfce4-terminal'],
@@ -25,7 +26,7 @@ plugin_support.register_alternative(__name__, 'terminal', 'xfce4-terminal',
'startup_notify': True,
})
-plugin_support.register_alternative(__name__, 'terminal', 'lxterminal',
+ plugin_support.register_alternative(__name__, 'terminal', 'lxterminal',
**{
'name': _("LXTerminal"),
'argv': ['lxterminal'],
@@ -34,7 +35,7 @@ plugin_support.register_alternative(__name__, 'terminal', 'lxterminal',
'startup_notify': False,
})
-plugin_support.register_alternative(__name__, 'terminal', 'xterm',
+ plugin_support.register_alternative(__name__, 'terminal', 'xterm',
**{
'name': _("X Terminal"),
'argv': ['xterm'],
@@ -43,7 +44,7 @@ plugin_support.register_alternative(__name__, 'terminal', 'xterm',
'startup_notify': False,
})
-plugin_support.register_alternative(__name__, 'terminal', 'urxvt',
+ plugin_support.register_alternative(__name__, 'terminal', 'urxvt',
**{
'name': _("Urxvt"),
'argv': ['urxvt'],
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]