diff options
author | natural <natural> | 2006-12-31 06:16:43 +0000 |
---|---|---|
committer | natural <natural> | 2006-12-31 06:16:43 +0000 |
commit | 0aa170e67595b83e49e72d78f41c27a48d3059ad (patch) | |
tree | c53db324e8a6b068846d55bdc163afbb634bd1df /kberylsettings/contentframe.py | |
parent | b3bd6e4163a79f03edf2c2c6935b530d2af21e14 (diff) | |
download | kberylsettings-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/contentframe.py')
-rw-r--r-- | kberylsettings/contentframe.py | 36 |
1 files changed, 6 insertions, 30 deletions
diff --git a/kberylsettings/contentframe.py b/kberylsettings/contentframe.py index edab4f9..208005f 100644 --- a/kberylsettings/contentframe.py +++ b/kberylsettings/contentframe.py @@ -9,8 +9,9 @@ from kdeui import KDialog, KMessageBox, KPassivePopup, \ from qt import Qt, QFrame, QHBoxLayout, QLabel, QScrollView, QSize, \ QSizePolicy, QStringList, QToolTip, QVBoxLayout +from kberylsettings.aboutpage import AboutPage from kberylsettings.beryl import Setting -from kberylsettings.lib import App, Signals, buildPart, icon, iconLoader, iconSet +from kberylsettings.lib import App, Signals, icon, iconLoader, iconSet from kberylsettings.widget import Frame, SmallPushButton, WidgetStack, guiButton from kberylsettings.settingwidget import settingWidget @@ -51,14 +52,16 @@ class ContentFrame(WidgetStack): connect(root, Signals.showAbout, self.showAboutPage) connect(root, Signals.showSettings, self.showSinglePage) connect(root, Signals.showGroups, self.showTabPage) + connect(aboutPage, Signals.selectPrevious, + root, Signals.selectPrevious) - def showAboutPage(self, plugin): + def showAboutPage(self, context, plugin): """ displays the about page @param plugin berylsettings Plugin instance @return None """ - self.aboutPage.showAbout(plugin) + self.aboutPage.showAbout(context, plugin) self.raiseWidget(self.aboutPageId) def showSinglePage(self, plugin, arg): @@ -80,33 +83,6 @@ class ContentFrame(WidgetStack): self.raiseWidget(self.tabPageId) -class AboutPage(Frame): - """ AboutPage -> frame to display a bit of info about a plugin - - """ - def __init__(self, parent): - Frame.__init__(self, parent) - self.infoHtml = buildPart(self, 'text/html', "Type == 'Service'", True) - - def showAbout(self, plugin): - """ displays the About Plugin page with information from the plugin - - @param plugin berylsettings Plugin instance - @return None - """ - logofile = 'file://%s' % App.basedir + '/html/beryl-manager.png' - htmlsrc = open(App.basedir + '/html/plugin.html').read() - if plugin is None: - pluginname = 'Beryl Settings' - plugindesc = 'Beryl Settings - Get Your Effects On!' - else: - pluginname = plugin.ShortDesc - plugindesc = plugin.LongDesc - self.infoHtml.begin() - self.infoHtml.write(htmlsrc % locals()) - self.infoHtml.end() - - class SettingPage: """ SettingPage -> mixin with methods common to both the SinglePage and the TabPage types. |