~ubuntu-branches/ubuntu/saucy/geary/saucy-updates

« back to all changes in this revision

Viewing changes to src/client/notification/unity-launcher.vala

  • Committer: Package Import Robot
  • Author(s): Sebastien Bacher
  • Date: 2013-03-14 13:48:23 UTC
  • mfrom: (1.1.3)
  • Revision ID: package-import@ubuntu.com-20130314134823-gyk5av1g508zyj8a
Tags: 0.3.0~pr1-0ubuntu1
New upstream version (FFE lp: #1154316), supports multiple account as
well as full conversation views with inline replies

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
        entry = Unity.LauncherEntry.get_for_desktop_id("geary.desktop");
16
16
        set_count(0);
17
17
        
18
 
        monitor.notify["count"].connect(on_new_messages_changed);
 
18
        monitor.notify["total-count"].connect(on_new_messages_changed);
19
19
    }
20
20
    
21
21
    ~UnityLauncher() {
22
 
        monitor.notify["count"].disconnect(on_new_messages_changed);
 
22
        monitor.notify["total-count"].disconnect(on_new_messages_changed);
23
23
    }
24
24
    
25
25
    private void set_count(int count) {
29
29
    }
30
30
    
31
31
    private void on_new_messages_changed() {
32
 
        set_count(monitor.count);
 
32
        if (monitor.total_count == 0 || monitor.should_notify_new_messages())
 
33
            set_count(monitor.total_count);
33
34
    }
34
35
#else
35
36
    public UnityLauncher(NewMessagesMonitor monitor) {