~ubuntu-branches/ubuntu/vivid/liferea/vivid-proposed

« back to all changes in this revision

Viewing changes to src/item_state.c

  • Committer: Package Import Robot
  • Author(s): bojo42
  • Date: 2012-03-29 14:17:21 UTC
  • mfrom: (1.3.9) (3.2.5 sid)
  • Revision ID: package-import@ubuntu.com-20120329141721-tbfopcrc5797wxt7
Tags: 1.8.3-0.1ubuntu1
* New upstream release (LP: #290666, #371754, #741543, #716688)
* Merge from Debian unstable (LP: #935147), remaining changes:
* debian/patches:
  - drop gtk-status-icon.patch & notification-append as in upstream
  - drop fix_systray_behavior as mostly upstreamed and rest seems unused
  - 01_ubuntu_feedlists: update & rename, move planets to "Open Source"  
  - add_X-Ubuntu-Gettext-Domain: rebase
  - libunity.patch: rebase, apply before indicator patch (liferea_shell.c)
  - libindicate_increase_version.patch: exclude from libindicate.patch
  - deactivate libindicate.patch, seems partly upstreamed and needs rework
* debian/control: libindicate-dev, libindicate-gtk-dev & libunity-dev
* debian/liferea.indicate & liferea.install: ship indicator desktop file
* debian/rules: enable libindicate

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/**
2
2
 * @file item_state.c   item state controller interface
3
3
 * 
4
 
 * Copyright (C) 2007-2008 Lars Lindner <lars.lindner@gmail.com>
 
4
 * Copyright (C) 2007-2010 Lars Lindner <lars.lindner@gmail.com>
5
5
 *
6
6
 * This program is free software; you can redistribute it and/or modify
7
7
 * it under the terms of the GNU General Public License as published by
48
48
void
49
49
item_flag_state_changed (itemPtr item, gboolean newState)
50
50
{
51
 
        /* 1. No propagation because we recount search folders in step 3... */
52
 
 
53
 
        /* 2. save state to DB */
 
51
        /* 1. set value in memory */    
54
52
        item->flagStatus = newState;
 
53
 
 
54
        /* 2. propagate to vfolders */
 
55
        vfolder_foreach_data (vfolder_merge_item, item);
 
56
        vfolder_foreach (node_update_counters);
 
57
 
 
58
        /* 3. save state to DB */
55
59
        db_item_state_update (item);
56
60
 
57
 
        /* 3. update item list GUI state */
 
61
        /* 4. update item list GUI state */
58
62
        itemlist_update_item (item);
59
63
 
60
 
        /* 4. no update of feed list necessary... */
61
 
        vfolder_foreach (vfolder_update_counters);
62
 
 
63
64
        /* 5. update notification statistics */
64
65
        feedlist_reset_new_item_count ();
65
66
 
88
89
 
89
90
        debug_start_measurement (DEBUG_GUI);
90
91
 
91
 
        /* 1. apply to DB */
 
92
        /* 1. set values in memory */   
92
93
        item->readStatus = newState;
93
94
        item->updateStatus = FALSE;
 
95
 
 
96
        /* 2. propagate to vfolders */
 
97
        vfolder_foreach_data (vfolder_merge_item, item);
 
98
        vfolder_foreach (node_update_counters);
 
99
        
 
100
        /* 3. apply to DB */
94
101
        db_item_state_update (item);
95
102
 
96
 
        /* 2. add propagate to vfolders (must happen after changing the item state) */
97
 
        vfolder_foreach (vfolder_update_counters);
98
 
 
99
 
        /* 3. update item list GUI state */
 
103
        /* 4. update item list GUI state */
100
104
        itemlist_update_item (item);
101
105
 
102
 
        /* 4. updated feed list unread counters */
 
106
        /* 5. updated feed list unread counters */
103
107
        node = node_from_id (item->nodeId);
104
108
        node_update_counters (node);
105
109
 
106
 
        /* 5. update notification statistics */
 
110
        /* 6. update notification statistics */
107
111
        feedlist_reset_new_item_count ();
108
112
 
109
 
        /* 6. duplicate state propagation */
 
113
        /* 7. duplicate state propagation */
110
114
        if (item->validGuid) {
111
115
                GSList *duplicates, *iter;
112
116
 
184
188
                }
185
189
                iter = g_list_next (iter);
186
190
        }
187
 
                
188
 
        /* we surely have changed the search folder states... */
189
 
        vfolder_foreach (item_state_set_recount_flag);
190
191
}
191
192
 
192
193
void