summaryrefslogtreecommitdiff
path: root/portato/gui/windows/main.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--portato/gui/windows/main.py36
1 files changed, 7 insertions, 29 deletions
diff --git a/portato/gui/windows/main.py b/portato/gui/windows/main.py
index 290fe6a..1758033 100644
--- a/portato/gui/windows/main.py
+++ b/portato/gui/windows/main.py
@@ -23,13 +23,17 @@ from collections import defaultdict
# our backend stuff
from ...backend import flags, system # must be the first to avoid circular deps
-from ... import get_listener, plugin
+from ... import get_listener
from ...helper import debug, warning, error, info
from ...session import Session
from ...db import Database
from ...constants import CONFIG_LOCATION, VERSION, APP_ICON
from ...backend.exceptions import PackageNotFoundException, BlockedException, VersionsNotFoundException
+# plugin stuff
+from ... import plugin
+from .. import slots
+
# more GUI stuff
from ..utils import Config, GtkThread, get_color
from ..queue import EmergeQueue
@@ -50,32 +54,6 @@ from .preference import PreferenceWindow
from .search import SearchWindow
from .update import UpdateWindow
-class PluginMenuSlot (plugin.WidgetSlot):
-
- def __init__ (self, tree):
- plugin.WidgetSlot.__init__(self, self.create_action, "Plugin Menu")
-
- self.ctr = 0 # counter for the plugin actions
- self.uim = tree.get_widget("uimanager")
- self.ag = tree.get_widget("pluginActionGroup")
-
- def create_action (self, label):
- aname = "plugin%d" % self.ctr
- a = gtk.Action(aname, label, None, None)
- self.ctr += 1
-
- return a
-
- def add (self, widget):
- action = widget.widget
- self.ag.add_action(action)
-
- # add to UI
- mid = self.uim.new_merge_id()
- self.uim.add_ui(mid, "ui/menubar/pluginMenu", action.get_name(), action.get_name(), gtk.UI_MANAGER_MENUITEM, False)
-
- self.uim.ensure_update()
-
class PackageTable:
"""A window with data about a specfic package."""
@@ -586,9 +564,9 @@ class MainWindow (Window):
splash(_("Loading Plugins"))
optionsHB = self.tree.get_widget("optionsHB")
- plugin.WidgetSlot(gtk.CheckButton, "Emerge Options", add = lambda w: optionsHB.pack_end(w.widget))
+ slots.WidgetSlot(gtk.CheckButton, "Emerge Options", add = lambda w: optionsHB.pack_end(w.widget))
- PluginMenuSlot(self.tree)
+ slots.PluginMenuSlot(self.tree)
plugin.load_plugins()
# session
class='nohover-highlight'> 2014-05-28MOAR fontsRené 'Necoro' Neumann1-12/+3 2014-05-08[vim] vsplit on rightRené 'Necoro' Neumann1-0/+3 2014-05-07Update vundleRené 'Necoro' Neumann1-0/+0 2014-05-04[i3] TypoRené 'Necoro' Neumann1-1/+1 2014-04-14Remove our 'pass' wrapperRené 'Necoro' Neumann1-96/+0 2014-04-14[i3] Automatically move firefox to 0:ff.René 'Necoro' Neumann1-0/+1 2014-04-14Use hgview instead of hgk.René 'Necoro' Neumann1-1/+1 2013-12-09Fix start_pidgin.sh to not have lurking dbus-monitor processesRené 'Necoro' Neumann1-2/+8 2013-12-03Again one more webfont.René 'Necoro' Neumann1-0/+9 2013-12-03zsh: Make up-/down- to only use local history and Ctrl-R/-S to use globalRené 'Necoro' Neumann1-1/+13 history. 2013-12-02One more new webfontRené 'Necoro' Neumann1-0/+9 2013-11-21IE: Remove isub/isup: they are not supported anymoreRené 'Necoro' Neumann1-1/+1 2013-11-21IE/IJ: Session logicRené 'Necoro' Neumann1-2/+15 2013-11-06Colorscheme for virtual console.René 'Necoro' Neumann1-1/+5 2013-11-01Do not try to set window title and stuff in linux consoleRené 'Necoro' Neumann1-0/+3 2013-10-30Set terminal title not only on path change, but for each new prompt.René 'Necoro' Neumann1-2/+2 2013-10-22cwd-spawn: Use M-Return instead of M-o for consistency.René 'Necoro' Neumann1-2/+2 2013-10-22Add cwd-spawn to urxvt to allow spawning a new terminal from the currentRené 'Necoro' Neumann3-2/+199 working dir. 2013-10-22Use chpwd_functions and precmd_functions instead of putting everything inRené 'Necoro' Neumann1-19/+23 precmd(). 2013-09-30urxvt: execute the wgetpaste check each timeRené 'Necoro' Neumann1-2/+5 2013-09-30urxvt: wgetpaste fixRené 'Necoro' Neumann1-4/+4 2013-09-30Allow HOME variable in .Xresources.René 'Necoro' Neumann2-3/+3 2013-09-30wgetpaste support for urxvt.René 'Necoro' Neumann2-1/+28 2013-09-30Urxvt autotransform for <filename>:<line>.René 'Necoro' Neumann1-1/+4 2013-09-30Remove tabbed(x) from urxvt. We use i3 -- no need for it.René 'Necoro' Neumann1-9/+0 2013-09-30Do not display icon in urxvt. It's not supported by i3 anyway.René 'Necoro' Neumann1-1/+1 2013-09-29Remove wrong monitors lineRené 'Necoro' Neumann1-1/+0 2013-09-29Delete vimperator paste plugin -- seems not to work anymore with new FFRené 'Necoro' Neumann1-266/+0 versions. And it wasn't used anyway. 2013-09-29Use $HOST instead of Cauchiy in titleRené 'Necoro' Neumann1-1/+1 2013-09-24Remove herbstluftwmRené 'Necoro' Neumann1-1/+0 2013-09-24Conky changesRené 'Necoro' Neumann2-5/+13 2013-09-15Remove trailing slash from \~ulpRené 'Necoro' Neumann1-1/+1 2013-09-15Make cci explicitly use python2René 'Necoro' Neumann1-1/+1 2013-09-10Node/NPM preparationRené 'Necoro' Neumann3-1/+13