~ubuntu-branches/ubuntu/hardy/emesene/hardy-updates

« back to all changes in this revision

Viewing changes to UserMenu.py

  • Committer: Bazaar Package Importer
  • Author(s): Emilio Pozuelo Monfort
  • Date: 2008-03-29 21:48:29 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20080329214829-spbg3uej5aozf2c1
Tags: 1.0-dist-1
* New upstream stable release from the emesene-1.0-dist upstream tarball
  (which contains setup.py and misc/ ).
* debian/patches/01_setup_py_update_get_orig_source.patch:
  - Removed, not needed anymore as we aren't using get-orig-source.
* debian/rules:
  - Remove get-orig-source rule, as from now on we will use upstream
    tarballs.
  - Remove python-patchsys include.
  - Run dh_icons and dh_desktop
  - Build the package with python2.5 since it FTBFS with python2.4 due to
    an issue with distutils.
* debian/copyright:
  - Updated.
* debian/watch:
  - Updated so that it reports 1.* as the newer versions.
* debian/emesene-launcher:
  - Update for the new Controller.py location.
* debian/control:
  - Build-Depend on python2.5 since the package is built with python2.5,
    as it fails with python2.4's distutils.
  - Wrap Build-Depends.
  - Build-Depend on debhelper >= 5.0.51~ for dh_icons

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
import gtk
20
20
import desktop
21
 
import webbrowser
22
21
from Parser import Url
23
22
 
24
23
class UserMenu(gtk.Menu):
61
60
        
62
61
        self.controller.emit("usermenu-item-add", self)
63
62
        
64
 
        parser = controller.getUnifiedParser()
 
63
        parser = controller.unifiedParser
65
64
        sep = False
66
65
 
67
66
        for i in user.nick, user.personalMessage:
173
172
        return mi
174
173
 
175
174
    def on_PMurl(self, widget, url):
176
 
        try:
177
 
            desktop.open(str(url))
178
 
        except OSError:
179
 
            webbrowser.open(str(url))
 
175
        desktop.open(str(url))
180
176
 
181
177
    def moveToActivate(self, _menuItem, group):
182
 
        self.controller.contact_manager.move_to_group(self.user.email, 
 
178
        self.controller.contacts.move_to_group(self.user.email, 
183
179
            self.group.name, group)
184
180
 
185
181
    def copyToActivate(self, _menuItem, group):
186
 
        self.controller.contact_manager.add_to_group(self.user.email, group)
 
182
        self.controller.contacts.add_to_group(self.user.email, group)
187
183
 
188
184
    def removeFromActivate(self, _menuItem):
189
 
        self.controller.contact_manager.remove_from_group(self.user.email, 
 
185
        self.controller.contacts.remove_from_group(self.user.email, 
190
186
            self.group.name)
191
187
        
192
188
    def on_add_user_activate(self, *args):
193
189
        self.controller.addUserDialog()
194
190
 
195
191
    def on_delete_user_activate(self, *args):
196
 
        self.controller.contact_manager.remove(self.user.email)
 
192
        self.controller.contacts.remove(self.user.email)
197
193
 
198
194
    def on_rename_user_activate(self, *args):
199
 
        self.controller.contact_manager.set_alias_dialog(self.user.email)
 
195
        self.controller.contacts.set_alias_dialog(self.user.email)
200
196
 
201
197
    def on_block_user_activate(self, *args):
202
 
        self.controller.contact_manager.block(self.user.email)
 
198
        self.controller.contacts.block(self.user.email)
203
199
 
204
200
    def on_unblock_user_activate(self, *args):
205
 
        self.controller.contact_manager.unblock(self.user.email)
 
201
        self.controller.contacts.unblock(self.user.email)
206
202
 
207
203
    def on_space_user_activate(self, *args):
208
204
        self.controller.seeSpace(self.user.email)