~ubuntu-branches/ubuntu/raring/unity-mail/raring

« back to all changes in this revision

Viewing changes to unity-mail

  • Committer: Package Import Robot
  • Author(s): Dmitry Shachnev
  • Date: 2012-05-25 15:07:39 UTC
  • Revision ID: package-import@ubuntu.com-20120525150739-sd7auo2bdm0lc6zd
Tags: 0.92.3
* New bugfix release (LP: #1002802)
  - Use #!/usr/bin/python3 instead of #!/usr/bin/env python3
  - Do not use "<int> or <bool>" construction when updating the
    launcher item status
  - Use any desktop file that contains "unity-mail" in the name
    (work-around for SC issue; LP: #990689)
* debian/control:
  - Rewrite the long description, now it is more clear and displays
    correctly in the Software Center (LP: #1004433)
  - Set priority to optional instead of extra
* debian/clean: Remove, not needed
* Update translations for desktop files

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/env python3
 
1
#!/usr/bin/python3
2
2
# -*- coding: utf-8 -*-
3
3
 
4
4
# Unity Mail
7
7
# License: GNU GPL 3 or higher; http://www.gnu.org/licenses/gpl.html
8
8
 
9
9
app_name = 'unity-mail'
10
 
app_version = '0.92.2'
 
10
app_version = '0.92.3'
11
11
 
12
12
import imaplib
13
13
import email
355
355
                self.mail_client = [None]*self.l
356
356
                self.notinit = [True]*self.l
357
357
                self.unread_messages = [] # [accountid, number, indicator, isactive, folder, message-id]
358
 
                self.launcher = Unity.LauncherEntry.get_for_desktop_id('unity-mail.desktop')
 
358
                desktop_id = 'unity-mail.desktop'
 
359
                favorites = Unity.LauncherFavorites.get_default().enumerate_ids()
 
360
                for i in favorites:
 
361
                        if 'unity-mail' in i: desktop_id = i
 
362
                self.launcher = Unity.LauncherEntry.get_for_desktop_id(desktop_id)
359
363
                self.first_run = True
360
364
                
361
365
                self.mm = Indicate.Server.ref_default() # Messaging Menu server
709
713
                        # None of the connections is working
710
714
                        count_visible = False
711
715
                else:
712
 
                        count_visible = number_of_mails or not self.hide_count
 
716
                        count_visible = (number_of_mails > 0) or not self.hide_count
713
717
                self.launcher.set_property('count_visible', count_visible)
714
718
                return True
715
719