comparison src/view_file_list.c @ 803:764fd82dd099

better check for notify type
author nadvornik
date Sun, 08 Jun 2008 19:09:44 +0000
parents 3cfc54c77b30
children 7c12beef474a
comparison
equal deleted inserted replaced
802:3cfc54c77b30 803:764fd82dd099
1907 gchar *base = remove_level_from_path(fd->path); 1907 gchar *base = remove_level_from_path(fd->path);
1908 refresh = (strcmp(base, vf->dir_fd->path) == 0); 1908 refresh = (strcmp(base, vf->dir_fd->path) == 0);
1909 g_free(base); 1909 g_free(base);
1910 } 1910 }
1911 1911
1912 if (!refresh && fd->change && fd->change->dest) 1912 if (type == NOTIFY_TYPE_CHANGE && fd->change)
1913 { 1913 {
1914 gchar *dest_base = remove_level_from_path(fd->change->dest); 1914 if (!refresh && fd->change->dest)
1915 refresh = (strcmp(dest_base, vf->dir_fd->path) == 0); 1915 {
1916 g_free(dest_base); 1916 gchar *dest_base = remove_level_from_path(fd->change->dest);
1917 } 1917 refresh = (strcmp(dest_base, vf->dir_fd->path) == 0);
1918 1918 g_free(dest_base);
1919 if (!refresh && fd->change && fd->change->source) 1919 }
1920 { 1920
1921 gchar *source_base = remove_level_from_path(fd->change->source); 1921 if (!refresh && fd->change->source)
1922 refresh = (strcmp(source_base, vf->dir_fd->path) == 0); 1922 {
1923 g_free(source_base); 1923 gchar *source_base = remove_level_from_path(fd->change->source);
1924 refresh = (strcmp(source_base, vf->dir_fd->path) == 0);
1925 g_free(source_base);
1926 }
1924 } 1927 }
1925 1928
1926 if (refresh) 1929 if (refresh)
1927 { 1930 {
1928 vf->refresh_idle_id = g_idle_add(vflist_refresh_idle_cb, vf); 1931 vf->refresh_idle_id = g_idle_add(vflist_refresh_idle_cb, vf);