Skip to content

Commit

Permalink
nautilus: fix overlay bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Chilledheart committed May 16, 2015
1 parent 7cf5c18 commit 60cfd42
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions nautilus-seafile/nautilus-seafile.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,16 @@ static __inline gboolean update_file_status_by_name (SearpcClient *client, const

static __inline void set_nautilus_file_info (NautilusFileInfo *file, const char *status)
{
char *old_status = nautilus_file_info_get_string_attribute (file, "SeafileExtension::sync_status");
if (old_status && strcmp (old_status, status) == 0)
{
g_free (old_status);
return;
}
if (old_status)
{
nautilus_file_info_invalidate_extension_info (file);
}
if (strlen(status) == 0)
{
nautilus_file_info_add_emblem (file, "");
Expand All @@ -287,9 +297,9 @@ static __inline void set_nautilus_file_info (NautilusFileInfo *file, const char
g_free (emblem_name);
}

nautilus_file_info_add_string_attribute (file,
"SeafileExtension::sync_status",
status);
nautilus_file_info_add_string_attribute (file, "SeafileExtension::sync_status", status);

g_free (old_status);
}

static gboolean update_file_status_by_file (SearpcClient *client, NautilusFileInfo *file)
Expand Down

0 comments on commit 60cfd42

Please sign in to comment.