~ubuntu-branches/ubuntu/lucid/awn-extras-applets/lucid

« back to all changes in this revision

Viewing changes to applets/maintained/slickswitcher/switch.py

  • Committer: Bazaar Package Importer
  • Author(s): Julien Lavergne
  • Date: 2010-03-30 20:26:40 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20100330202640-vza3bdnv9gc9bg5z
Tags: 0.4.0~rc1-0ubuntu1
* New upstream release (rc1) (LP: #551309)
 - Stack applet close on click (LP: #261520)
* debian/patches/
 - 03-remove-cairo-menu-pref.patch: From upstream (r1244 + r1245 + r1252),
   remove menu entry for cairo-menu preferences, it's not implemented
   (LP: #511254)
 - 04-tomboy-threading-free.patch: From upstream (r1246), remove threading to
   make the applet working. 
* debian/*.install: Update installation location of comics and digital 
  applets.
* debian/control: 
 - Move digital applet from python to C, and add proper Replaces.
 - Add Replaces for awn-applets-c-core to handle migration from 0.3.2.2.
   (LP: #524559)

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
        self.height = self.screen.get_height()
37
37
 
38
38
        #Connect to signals from Wnck
 
39
        self.screen.connect('active-window-changed', self.emitted)
 
40
        self.screen.connect('active-workspace-changed', self.emitted)
 
41
        self.screen.connect('window-manager-changed', self.emitted)
39
42
        self.screen.connect('window-stacking-changed', self.emitted)
40
43
        self.screen.connect('viewports-changed', self.emitted)
41
44
 
78
81
        if current_workspace is None:
79
82
            current_workspace = self.screen.get_active_workspace()
80
83
 
 
84
        if not current_workspace.is_virtual():
 
85
            return current_workspace.get_number() + 1
 
86
 
81
87
        #Get the workspace dimensions
82
88
        workspace_width = current_workspace.get_width()
83
89
        workspace_height = current_workspace.get_height()
96
102
        #Put all this together to get the current workspace number
97
103
        return current_row * num_columns + current_column + 1
98
104
 
99
 
    #Show desktop functionality
100
 
    def show_desktop(self):
101
 
        self.screen.toggle_showing_desktop(not self.screen.get_showing_desktop())
102
 
 
103
105
    #Move, either forward or backwards
104
106
    def move(self, direction):
105
107
        #Get the current workspace