~ubuntu-branches/ubuntu/raring/nautilus/raring

« back to all changes in this revision

Viewing changes to libnautilus-private/nautilus-icon-info.c

  • Committer: Package Import Robot
  • Author(s): Sebastien Bacher, Jeremy Bicha
  • Date: 2012-01-31 13:45:01 UTC
  • mfrom: (1.17.25)
  • Revision ID: package-import@ubuntu.com-20120131134501-yn7mqny7fgzx9fao
Tags: 1:3.3.4-0ubuntu1
* New upstream version which fixes:
  - "Opening Popupmenu in Context of Folder with List-View impossible?"
    (lp: #126540)
  - "'Create folder in here' context menu option for nautilus" (lp: #61786)
  - the file count and the size count change in opposite direction.
    (lp: #503330)
  - the mounts in the place menu should have a properties entry.
    (lp: #846289)
  - add command line option to select file (lp: #575719)
  - Media in 'Places' side bar should have same context menu as in 
    'Computer' (lp: #230098)
* debian/nautilus-data.install:
  - updated, ui and icons have been moved into gresources
* debian/patches/05_desktop_menu_export.patch:
   - updated to correctly include the gresources desktop definition

[ Jeremy Bicha ]
* New upstream release.
* debian/control.in:
  - Bump minimum GTK and glib
* Refreshed patches
* Dropped upstream patches:
  - 17_dont_allow_new_tab_on_desktop.patch
  - 18_fix_crash_in_get_current_uri.patch
  - 19_lazily_initialize_notification_service.patch
  - git_sideplace_sorting.patch
  - git_next_row.patch
  - git_dont_document_browser_option.patch
  - git_browser_compat.patch
  - git_bookmarks_reordering.patch
  - git_listview_context_menus.patch
  - git_use_gtk_grid.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
        GObject parent;
32
32
 
33
33
        gboolean sole_owner;
34
 
        guint64 last_use_time;
 
34
        gint64 last_use_time;
35
35
        GdkPixbuf *pixbuf;
36
36
        
37
37
        gboolean got_embedded_rect;
56
56
static void
57
57
nautilus_icon_info_init (NautilusIconInfo *icon)
58
58
{
59
 
        icon->last_use_time = g_thread_gettime ();
 
59
        icon->last_use_time = g_get_monotonic_time ();
60
60
        icon->sole_owner = TRUE;
61
61
}
62
62
 
78
78
                g_object_remove_toggle_ref (object,
79
79
                                            pixbuf_toggle_notify,
80
80
                                            info);
81
 
                icon->last_use_time = g_thread_gettime ();
 
81
                icon->last_use_time = g_get_monotonic_time ();
82
82
                schedule_reap_cache ();
83
83
        }
84
84
}
182
182
static GHashTable *themed_icon_cache = NULL;
183
183
static guint reap_cache_timeout = 0;
184
184
 
185
 
#define NSEC_PER_SEC ((guint64)1000000000L)
 
185
#define MICROSEC_PER_SEC ((guint64)1000000L)
186
186
 
187
187
static guint time_now;
188
188
 
195
195
        gboolean *reapable_icons_left = user_info;
196
196
 
197
197
        if (icon->sole_owner) {
198
 
                if (time_now - icon->last_use_time > 30 * NSEC_PER_SEC) {
 
198
                if (time_now - icon->last_use_time > 30 * MICROSEC_PER_SEC) {
199
199
                        /* This went unused 30 secs ago. reap */
200
200
                        return TRUE;
201
201
                } else {
214
214
 
215
215
        reapable_icons_left = TRUE;
216
216
 
217
 
        time_now = g_thread_gettime ();
 
217
        time_now = g_get_monotonic_time ();
218
218
        
219
219
        if (loadable_icon_cache) {
220
220
                g_hash_table_foreach_remove (loadable_icon_cache,