summaryrefslogtreecommitdiff
path: root/kberylsettings/lib.py
diff options
context:
space:
mode:
authornatural <natural>2006-12-31 06:16:43 +0000
committernatural <natural>2006-12-31 06:16:43 +0000
commit0aa170e67595b83e49e72d78f41c27a48d3059ad (patch)
treec53db324e8a6b068846d55bdc163afbb634bd1df /kberylsettings/lib.py
parentb3bd6e4163a79f03edf2c2c6935b530d2af21e14 (diff)
downloadkberylsettings-0aa170e67595b83e49e72d78f41c27a48d3059ad.tar.gz
kberylsettings-0aa170e67595b83e49e72d78f41c27a48d3059ad.tar.bz2
Support for a nifty "about beryl" and "about plugin" page. Again,
kcontrol is the example. Adding png versions of each svg; KHTML won't display svg icons. Also including a script to convert from svg to png.
Diffstat (limited to 'kberylsettings/lib.py')
-rw-r--r--kberylsettings/lib.py31
1 files changed, 3 insertions, 28 deletions
diff --git a/kberylsettings/lib.py b/kberylsettings/lib.py
index 2251e51..c6e0e09 100644
--- a/kberylsettings/lib.py
+++ b/kberylsettings/lib.py
@@ -6,13 +6,9 @@
from os import environ
from os.path import abspath, dirname
-from qt import PYSIGNAL, SIGNAL, SLOT, QPixmap, QImage
-
+from qt import PYSIGNAL, QPixmap, QImage, SIGNAL, SLOT
from kdecore import KGlobal, KIcon, KShortcut, i18n
from kdeui import KAction, KStdAction
-from kio import KTrader
-from khtml import KHTMLPart # without this, the KHTMLParts aren't created.
-from kparts import createReadOnlyPart, createReadWritePart
##
@@ -50,7 +46,8 @@ class Signals:
itemClicked = SIGNAL('clicked(QListViewItem *)')
itemSelected = SIGNAL('selectionChanged(QListViewItem *)')
okClicked = SIGNAL('okClicked()')
- quitSelected = SIGNAL("quitSelected()")
+ partURL = PYSIGNAL('partURL')
+ quitSelected = SIGNAL('quitSelected()')
searchInput = PYSIGNAL('searchInput')
selectItem = PYSIGNAL('selectItem')
selectPrevious = PYSIGNAL('selectPrevious')
@@ -157,25 +154,3 @@ def stdAction(attr, slot, collection, name, pluggable=None):
if pluggable:
action.plug(pluggable)
return action
-
-
-def buildPart(parent, servicetype, constraint, writable=False):
- """ build a KDE part
-
- @param parent parent object of created part
- @param servicetype mime type as string, or other service name
- @param constraint value to limit KTrader query
- @keyparam writable=False if True, creates read-write part
- @return KParts.ReadOnlyPart or KParts.ReadWritePart instance
- """
- offers = KTrader.self().query(servicetype, constraint)
- part = None
- for ptr in offers:
- if writable:
- builder = createReadWritePart
- else:
- builder = createReadOnlyPart
- part = builder(ptr.library(), parent, ptr.name())
- if part:
- break
- return part