1. Ronny Pfannschmidt
  2. pida-patches

Commits

Ronny Pfannschmidt  committed 609a441

finish some patches

  • Participants
  • Parent commits 1f10929
  • Branches default

Comments (0)

Files changed (6)

File kill-pidagladeview

-# HG changeset patch
-# Parent d39781b7e7163c2d530949b4d2bcce36c05c8716
-kill the PidaGladeView alias of PidaView
-
-diff --git a/pida-plugins/filesearch/filesearch.py b/pida-plugins/filesearch/filesearch.py
---- a/pida-plugins/filesearch/filesearch.py
-+++ b/pida-plugins/filesearch/filesearch.py
-@@ -19,7 +19,7 @@ from os import path
- from kiwi.ui.objectlist import Column
- 
- from pida.core.locale import Locale
--from pida.ui.views import PidaGladeView, WindowConfig
-+from pida.ui.views import PidaView, WindowConfig
- from pida.core.service import Service
- from pida.core.events import EventsConfig
- from pida.core.actions import ActionsConfig
-@@ -36,7 +36,7 @@ locale = Locale('filesearch')
- _ = locale.gettext
- 
- 
--class SearchView(PidaGladeView):
-+class SearchView(PidaView):
- 
-     key = 'filesearch.form'
- 
-diff --git a/pida-plugins/library/library.py b/pida-plugins/library/library.py
---- a/pida-plugins/library/library.py
-+++ b/pida-plugins/library/library.py
-@@ -42,7 +42,7 @@ from pida.core.actions import ActionsCon
- from pida.core.actions import (TYPE_NORMAL, TYPE_MENUTOOL, TYPE_RADIO, 
-                                TYPE_REMEMBER_TOGGLE)
- 
--from pida.ui.views import PidaGladeView, WindowConfig
-+from pida.ui.views import PidaView, WindowConfig
- 
- from pygtkhelpers.gthreads import GeneratorTask, AsyncTask
- 
-@@ -51,7 +51,7 @@ from pida.core.locale import Locale
- locale = Locale('library')
- _ = locale.gettext
- 
--class LibraryView(PidaGladeView):
-+class LibraryView(PidaView):
- 
-     key = 'library.list'
-     
-diff --git a/pida-plugins/nosetest/nosetest.py b/pida-plugins/nosetest/nosetest.py
---- a/pida-plugins/nosetest/nosetest.py
-+++ b/pida-plugins/nosetest/nosetest.py
-@@ -38,7 +38,7 @@ from pida.core.actions import ActionsCon
- from pida.core.pdbus import DbusConfig, EXPORT
- 
- # ui
--from pida.ui.views import PidaView, PidaGladeView
-+from pida.ui.views import PidaView
- 
- # utils
- from pygtkhelpers.gthreads import GeneratorTask, AsyncTask
-@@ -142,7 +142,7 @@ class TestItem(object):
-     def output(self):
-         return getattr(self, trace, 'Nothing is wrong directly here, i think')
- 
--class TestResultBrowser(PidaGladeView):
-+class TestResultBrowser(PidaView):
- 
-     key = 'nosetests.results'
- 
-@@ -152,7 +152,7 @@ class TestResultBrowser(PidaGladeView):
-     label_text = _('TestResults')
- 
-     def __init__(self,* k,**kw):
--        PidaGladeView.__init__(self,*k,**kw)
-+        PidaView.__init__(self,*k,**kw)
-         self.clear()
- 
-     def create_ui(self):
-diff --git a/pida-plugins/pastebin/pastebin.py b/pida-plugins/pastebin/pastebin.py
---- a/pida-plugins/pastebin/pastebin.py
-+++ b/pida-plugins/pastebin/pastebin.py
-@@ -33,7 +33,7 @@ from pida.core.actions import ActionsCon
- from pida.core.actions import (TYPE_NORMAL, TYPE_MENUTOOL, TYPE_RADIO, 
-                                TYPE_REMEMBER_TOGGLE)
- 
--from pida.ui.views import PidaGladeView, PidaView
-+from pida.ui.views import PidaView
- 
- from pida.utils.web import fetch_url
- 
-@@ -264,7 +264,7 @@ class HPaste(Bin):
-             ("sqlite3con", "sqlite3"),
-         ]
- 
--class PastebinEditorView(PidaGladeView):
-+class PastebinEditorView(PidaView):
- 
-     key = 'pastebin.editor'
-     gladefile = 'paste_editor'
-diff --git a/pida-plugins/quickopen/quickopen.py b/pida-plugins/quickopen/quickopen.py
---- a/pida-plugins/quickopen/quickopen.py
-+++ b/pida-plugins/quickopen/quickopen.py
-@@ -22,7 +22,7 @@ from pida.core.features import FeaturesC
- from pida.core.events import EventsConfig
- from pida.core.actions import (ActionsConfig, TYPE_NORMAL)
- from pida.core.options import OptionsConfig
--from pida.ui.views import PidaGladeView, WindowConfig
-+from pida.ui.views import PidaView, WindowConfig
- from pida.services.language import DOCTYPES
- from pida.core.indexer import Result
- from pygtkhelpers.gthreads import gcall
-@@ -38,7 +38,7 @@ class QItem(object):
-     name = ''
-     path = ''
- 
--class QOpenView(PidaGladeView):
-+class QOpenView(PidaView):
- 
-     key = 'qopen.view'
-     gladefile = 'qopen'
-diff --git a/pida-plugins/regextoolkit/regextoolkit.py b/pida-plugins/regextoolkit/regextoolkit.py
---- a/pida-plugins/regextoolkit/regextoolkit.py
-+++ b/pida-plugins/regextoolkit/regextoolkit.py
-@@ -32,7 +32,7 @@ from pida.core.actions import ActionsCon
- from pida.core.options import OptionsConfig
- from pida.core.actions import TYPE_NORMAL, TYPE_MENUTOOL, TYPE_RADIO, TYPE_TOGGLE, TYPE_REMEMBER_TOGGLE
- 
--from pida.ui.views import PidaGladeView
-+from pida.ui.views import PidaView
- from regextoolkitlib import flags_from_dict, all_matches, capture_groups
- import re
- import gtk
-@@ -46,7 +46,7 @@ locale = Locale('regextoolkit')
- _ = locale.gettext
- 
- 
--class RegextoolkitView(PidaGladeView):
-+class RegextoolkitView(PidaView):
-     key="gregextoolkitwindow.form"
-     gladefile="gregextoolkitwindow"
-     locale = locale
-diff --git a/pida-plugins/trac/trac.py b/pida-plugins/trac/trac.py
---- a/pida-plugins/trac/trac.py
-+++ b/pida-plugins/trac/trac.py
-@@ -35,7 +35,7 @@ from pida.core.actions import ActionsCon
- from pida.core.actions import (TYPE_NORMAL, TYPE_MENUTOOL, TYPE_RADIO, 
-                                TYPE_REMEMBER_TOGGLE)
- 
--from pida.ui.views import PidaGladeView, WindowConfig
-+from pida.ui.views import PidaView, WindowConfig
- from pida.ui.htmltextview import HtmlTextView
- 
- from pida.utils.web import fetch_url
-@@ -46,7 +46,7 @@ from pida.core.locale import Locale
- locale = Locale('trac')
- _ = locale.gettext
- 
--class TracView(PidaGladeView):
-+class TracView(PidaView):
- 
-     key = 'trac.browser'
- 
-diff --git a/pida/services/language/gui.py b/pida/services/language/gui.py
---- a/pida/services/language/gui.py
-+++ b/pida/services/language/gui.py
-@@ -28,7 +28,7 @@ from pida.core.log import get_logger
- from pygtkhelpers.gthreads import GeneratorTask
- 
- # ui
--from pida.ui.views import PidaView, PidaGladeView
-+from pida.ui.views import PidaView
- from pida.ui.prioritywindow import Category, Entry, PriorityEditorView
- from pida.core.languages import (PRIO_DEFAULT, PRIO_FOREGROUND, 
-                                  PRIO_FOREGROUND_HIGH, PRIO_LOW)
-@@ -299,7 +299,7 @@ class ValidatorView(PidaView):
-         self.svc.get_action('show_validator').set_active(False)
- 
- 
--class BrowserView(PidaGladeView):
-+class BrowserView(PidaView):
-     """
-     Window with the outliner
-     """
-@@ -576,7 +576,7 @@ class BrowserView(PidaGladeView):
- #    def read_options(self):
- #        return {}
- 
--class DefinitionView(PidaGladeView):
-+class DefinitionView(PidaView):
-     """
-     List of Definitions if language plugin returns more then one result
-     """
-diff --git a/pida/services/openwith/openwith.py b/pida/services/openwith/openwith.py
---- a/pida/services/openwith/openwith.py
-+++ b/pida/services/openwith/openwith.py
-@@ -23,7 +23,7 @@ from pida.core.actions import TYPE_NORMA
- 
- from pida.core.environment import pida_home
- 
--from pida.ui.views import PidaGladeView
-+from pida.ui.views import PidaView
- 
- from .__init__ import OpenWithItem
- 
-@@ -40,7 +40,7 @@ default = {
-     'terminal': True
-     }
- 
--class OpenWithEditor(PidaGladeView):
-+class OpenWithEditor(PidaView):
- 
-     key = 'openwith.editor'
- 
-diff --git a/pida/services/optionsmanager/optionsmanager.py b/pida/services/optionsmanager/optionsmanager.py
---- a/pida/services/optionsmanager/optionsmanager.py
-+++ b/pida/services/optionsmanager/optionsmanager.py
-@@ -14,7 +14,7 @@ from pida.core.events import EventsConfi
- from pida.core.actions import ActionsConfig
- from pida.core.actions import TYPE_TOGGLE
- 
--from pida.ui.views import PidaGladeView
-+from pida.ui.views import PidaView
- from pida.ui.widgets import get_widget_for_type, get_proxy_for_widget
- 
- 
-@@ -105,7 +105,7 @@ class OptionsPage(gtk.VBox):
-         if optval != widgval:
-             self.proxies[option.name].update(option.value)
- 
--class PidaOptionsView(PidaGladeView):
-+class PidaOptionsView(PidaView):
- 
-     key = 'optionsmanager.editor'
- 
-diff --git a/pida/services/plugins/plugins.py b/pida/services/plugins/plugins.py
---- a/pida/services/plugins/plugins.py
-+++ b/pida/services/plugins/plugins.py
-@@ -28,7 +28,7 @@ import shutil
- import pida.plugins
- 
- from pygtkhelpers.ui.objectlist import Column
--from pida.ui.views import PidaGladeView, WindowConfig
-+from pida.ui.views import PidaView, WindowConfig
- from pida.core.commands import CommandsConfig
- from pida.core.service import Service
- from pida.core.events import EventsConfig
-@@ -60,7 +60,7 @@ class PluginsEditItem(object):
-         self.name = name
-         self.value = value
- 
--class PluginsEditView(PidaGladeView):
-+class PluginsEditView(PidaView):
- 
-     key = 'plugins.editor'
- 
-@@ -106,7 +106,7 @@ class PluginsEditView(PidaGladeView):
-         self.svc.hide_plugins_edit()
- 
- 
--class PluginsView(PidaGladeView):
-+class PluginsView(PidaView):
- 
-     key = 'plugins.view'
- 
-diff --git a/pida/services/versioncontrol/views.py b/pida/services/versioncontrol/views.py
---- a/pida/services/versioncontrol/views.py
-+++ b/pida/services/versioncontrol/views.py
-@@ -9,7 +9,7 @@ from pygtkhelpers.gthreads import gcall
- 
- from pida.ui.htmltextview import HtmlTextView
- from pida.ui.besttextview import BestTextView
--from pida.ui.views import PidaView, PidaGladeView
-+from pida.ui.views import PidaView
- 
- from .versioncontrol import _
- 
-@@ -89,7 +89,7 @@ else:
-     DiffViewer = TextDiffViewer
- 
- 
--class VersionControlLog(PidaGladeView):
-+class VersionControlLog(PidaView):
- 
-     key = 'versioncontrol.log'
- 
-@@ -143,7 +143,7 @@ class VersionControlLog(PidaGladeView):
-         self.svc.get_action('show_vc_log').set_active(False)
- 
- 
--class CommitViewer(PidaGladeView):
-+class CommitViewer(PidaView):
- 
-     key = 'versioncontrol.commit'
- 
-diff --git a/pida/ui/prioritywindow.py b/pida/ui/prioritywindow.py
---- a/pida/ui/prioritywindow.py
-+++ b/pida/ui/prioritywindow.py
-@@ -5,7 +5,7 @@
- """
- 
- import gtk
--from pida.ui.views import PidaGladeView
-+from pida.ui.views import PidaView
- from pygtkhelpers.ui.objectlist import Column
- 
- # locale
-@@ -75,7 +75,7 @@ def edited(obj):
-     return 'edited' if obj else 'unedited'
- 
- 
--class PriorityEditorView(PidaGladeView):
-+class PriorityEditorView(PidaView):
-     gladefile = 'priority_editor'
-     locale = locale
- 
-diff --git a/pida/ui/views.py b/pida/ui/views.py
---- a/pida/ui/views.py
-+++ b/pida/ui/views.py
-@@ -64,9 +64,6 @@ class PidaView(SlaveView):
-         self.widget.pack_start(widget, *args, **kw)
- 
- 
--PidaGladeView = PidaView
--
--
- class WindowConfig(object):
-     """
-     WindowConfig objects are used to register

File nosetest-imports

-# HG changeset patch
-# Parent d6baf9ca10cdc96640290858d36c5c9c6a0ca811
-diff --git a/pida-plugins/nosetest/nosetest.py b/pida-plugins/nosetest/nosetest.py
---- a/pida-plugins/nosetest/nosetest.py
-+++ b/pida-plugins/nosetest/nosetest.py
-@@ -23,9 +23,7 @@
- # stdlib
- import subprocess
- import os
--from xml.sax.saxutils import escape
- 
--from xml.etree.ElementTree import iterparse
- # gtk
- import gtk
- 

File pdbus-remove-export-name

-# HG changeset patch
-# Parent a1525b07592d201ee8e97e7d8ed04086a2b68458
-always use service names instead of export names for dbus configs
-
-diff --git a/pida/core/pdbus.py b/pida/core/pdbus.py
---- a/pida/core/pdbus.py
-+++ b/pida/core/pdbus.py
-@@ -51,12 +51,8 @@ class DbusConfigReal(Object):
- 
-     def __init__(self, service):
-         self.svc = service
--        if hasattr(self, 'export_name'):
--            path = DBUS_PATH(self.export_name)
--            ns = DBUS_NS(self.export_name)
--        else:
--            path = DBUS_PATH(service.get_name())
--            ns = DBUS_NS(service.get_name())
-+        path = DBUS_PATH(service.get_name())
-+        ns = DBUS_NS(service.get_name())
-         self.dbus_ns = ns
-         Object.__init__(self, BUS_NAME, path)
- 
-@@ -82,12 +78,8 @@ class DbusOptionsManagerReal(Object):
- 
-     def __init__(self, service):
-         self.svc = service
--        if hasattr(self, 'export_name'):
--            path = DBUS_PATH(self.export_name, self.dbus_path)
--            ns = DBUS_NS(self.export_name, self.dbus_path)
--        else:
--            path = DBUS_PATH(service.get_name(), self.dbus_path)
--            ns = DBUS_NS(service.get_name(), self.dbus_path)
-+        path = DBUS_PATH(service.get_name(), self.dbus_path)
-+        ns = DBUS_NS(service.get_name(), self.dbus_path)
-         self.dbus_ns = ns
-         self.dbus_path = path
-         Object.__init__(self, BUS_NAME, path)

File remove-extra-match-signal-handler

-# HG changeset patch
-# Parent d76042a64bb3f751160d89cdef6bc7cf9feb6772
-also remove the extra option match signal handler
-
-diff --git a/pida/core/pdbus.py b/pida/core/pdbus.py
---- a/pida/core/pdbus.py
-+++ b/pida/core/pdbus.py
-@@ -85,6 +85,7 @@ class DbusOptionsManager(Object):
- 
-     def unload(self):
-         self.config_match.remove()
-+        self.config_extra_match.remove()
-         self.remove_from_connection()
- 
-     def on_config_changed(self, workspace, name, value, sender=None):

File series

View file
-nosetest-imports
-kill-pidagladeview
-pdbus-remove-export-name
-uil-pdbus-cleanup
-core-pdbus-pyxml-introspect
+core-pdbus-pyxml-introspect #-xml
 non-optional-core-pdbus #-dbus
-remove-extra-match-signal-handler
 test-workpsace-window #-dbus
 reenable-dbus-support

File uil-pdbus-cleanup

-# HG changeset patch
-# Parent a1525b07592d201ee8e97e7d8ed04086a2b68458
-small code cleanup in util.pdbus
-
-diff --git a/pida/utils/pdbus.py b/pida/utils/pdbus.py
---- a/pida/utils/pdbus.py
-+++ b/pida/utils/pdbus.py
-@@ -13,7 +13,7 @@ from dbus.lowlevel import MethodCallMess
- from json import loads
- 
- DBUS_NS_PREFIX = 'uk.co.pida.pida'
--DBUS_PATH_PREFIX = '/uk/co/pida/pida'
-+DBUS_PATH_PREFIX = '/uk/co/pida/pida',
- 
- BUS = dbus.SessionBus()
- UUID = "p" + str(os.getpid())
-@@ -22,7 +22,7 @@ def DBUS_NS(*path):
-     return ".".join((DBUS_NS_PREFIX, ) + path)
- 
- def DBUS_PATH(*path, **kwargs):
--    return "/".join((DBUS_PATH_PREFIX,) + path)
-+    return "/".join(DBUS_PATH_PREFIX + path)
- 
- 
- def _dbus_decorator(f, ns=None, suffix=None):
-@@ -44,11 +44,6 @@ def _dbus_decorator(f, ns=None, suffix=N
- EXPORT = partial(_dbus_decorator, dbus.service.method)
- SIGNAL = partial(_dbus_decorator, dbus.service.signal)
- 
--def rec_pida_pong(*args):
--    global _ACTIVE_PIDAS
--    _ACTIVE_PIDAS[str(args[0])] = args
--
--
- 
- def list_pida_bus_names(include_self=False):
-     session = dbus.SessionBus()
-@@ -70,7 +65,7 @@ def list_pida_instances(include_this=Fal
-     result = []
-     for name in pida_names:
-         #XXX: this is sync, that may be evil
--        # we asume that only active and 
-+        # we asume that only active and
-         # working instances expose the object
-         try:
-             app = session.get_object(