~facundo/ubuntuone-client/lr-file-deletion-564774

« back to all changes in this revision

Viewing changes to nautilus/ubuntuone-nautilus.c

  • Committer: Tarmac
  • Author(s): Rodney Dawes
  • Date: 2010-04-12 21:18:24 UTC
  • mfrom: (487.1.1 inhome-udf)
  • Revision ID: dobey@wayofthemonkey.com-20100412211824-axxa7soc3hhdw7u8
Check that the folder is inside $HOME for showing the "Synchronize on" option

Show diffs side-by-side

added added

removed removed

Lines of Context:
677
677
  GList * items = NULL;
678
678
  gchar * path;
679
679
  gchar * item;
 
680
  gchar * homedir_path;
680
681
  gboolean is_managed, is_root, is_udf, is_public, is_shared, is_pending;
 
682
  gboolean is_inhome;
681
683
  struct _CBData * cb_data;
682
684
 
683
685
  is_managed = is_root = is_udf = is_public = is_shared = is_pending = FALSE;
 
686
  is_inhome = FALSE;
684
687
 
685
688
  if (g_list_length (files) != 1)
686
689
    return NULL;
699
702
  if (ubuntuone_is_storagefs (uon, path))
700
703
    is_managed = TRUE;
701
704
 
 
705
  homedir_path = g_strdup_printf ("%s/", g_get_home_dir());
 
706
  if (strncmp (path, homedir_path, strlen (homedir_path)) == 0)
 
707
        is_inhome = TRUE;
 
708
  g_free (homedir_path);
 
709
 
702
710
  if ((item = g_hash_table_lookup (uon->udfs, path)) != NULL) {
703
711
    is_udf = TRUE;
704
712
        if (strcmp (item, UPDATE_PENDING) == 0)
769
777
    items = g_list_append (items, item);
770
778
  }
771
779
 
772
 
  if (!is_managed && !is_udf && nautilus_file_info_is_directory (file) && (nautilus_file_info_get_file_type (file) != G_FILE_TYPE_SYMBOLIC_LINK)) {
 
780
  if (is_inhome && !is_managed && !is_udf &&
 
781
          nautilus_file_info_is_directory (file) &&
 
782
          (nautilus_file_info_get_file_type (file) != G_FILE_TYPE_SYMBOLIC_LINK)) {
773
783
    NautilusMenuItem * item;
774
784
 
775
785
    item = nautilus_menu_item_new ("ubuntuone-udf-create",