~ubuntu-branches/ubuntu/trusty/kdeplasma-addons/trusty

« back to all changes in this revision

Viewing changes to applets/lancelot/tools/puck/Modules/Widgets/Lancelot__PopupList.py

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Thomas
  • Date: 2010-05-25 09:50:14 UTC
  • mfrom: (1.1.28 upstream)
  • Revision ID: james.westby@ubuntu.com-20100525095014-6mlrm9z9bkws0zkt
Tags: 4:4.4.80-0ubuntu1
* New upstream beta release:
  - Bump kde-sc-dev-latest build-dep version to 4.4.80
  - Refresh kubuntu_04_kimpanel_disable_scim.diff
  - Update various .install files
  - Drop liblancelot0a and liblancelot-dev packages; Upstream has broken ABI
    without an .so version bump, and after discussion with Debian it was
    decided it was not worth it to ship an unstable library.
  - Add liblancelot files to plasma-widget-lancelot, adding appropriate
    Replaces: entries
* Switch to source format 3.0 (quilt):
  - Bump debhelper build-depend version to 7.3.16 or greater

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
from .. import WidgetHandlerManager
 
2
from .. import AbstractItem
 
3
from . import Plasma__Dialog
 
4
 
 
5
class Lancelot__PopupListHandler(Plasma__Dialog.Plasma__DialogHandler):
 
6
    def name(self):
 
7
        return "Lancelot::PopupList"
 
8
 
 
9
    def include(self):
 
10
        includes = "".split(" ")
 
11
        includesCode = ""
 
12
        for include in includes:
 
13
            if (include != ""):
 
14
                includesCode += "#include<" + include + ">\n"
 
15
        return includesCode
 
16
 
 
17
 
 
18
    def setup(self):
 
19
        setup = Plasma__Dialog.Plasma__DialogHandler.setup(self)
 
20
 
 
21
 
 
22
        if self.hasAttribute('closeTimeout'):
 
23
            setup += self.attribute('name') \
 
24
                  + '->setCloseTimeout(' + self.attribute('closeTimeout') + ');'
 
25
 
 
26
        if self.hasAttribute('sublevelOpenAction'):
 
27
            setup += self.attribute('name') \
 
28
                  + '->setSublevelOpenAction(' + self.attribute('sublevelOpenAction') + ');'
 
29
 
 
30
 
 
31
        return setup;
 
32
 
 
33
WidgetHandlerManager.addHandler(Lancelot__PopupListHandler())
 
34
 
 
35