~mfisch/brasero/update-to-3.8.0

« back to all changes in this revision

Viewing changes to src/brasero-file-node.c

  • Committer: Bazaar Package Importer
  • Author(s): Pedro Fragoso
  • Date: 2008-08-10 01:16:00 UTC
  • mto: (1.4.1 experimental)
  • mto: This revision was merged to the branch mainline in revision 26.
  • Revision ID: james.westby@ubuntu.com-20080810011600-bfb87m1rs6n0qx16
Tags: upstream-0.8.1
ImportĀ upstreamĀ versionĀ 0.8.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
 ****************************************************************************/
8
8
 
9
9
/*
10
 
 * This program is free software; you can redistribute it and/or modify
 
10
 * Brasero is free software; you can redistribute it and/or modify
11
11
 * it under the terms of the GNU General Public License as published by
12
12
 * the Free Software Foundation; either version 2 of the License, or
13
13
 * (at your option) any later version.
14
14
 * 
15
 
 * This program is distributed in the hope that it will be useful,
 
15
 * Brasero is distributed in the hope that it will be useful,
16
16
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17
17
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
18
 * GNU Library General Public License for more details.
690
690
 
691
691
        node->parent = parent;
692
692
        if (!node->is_imported) {
693
 
                BraseroFileTreeStats *stats;
694
693
                guint depth = 0;
695
694
 
696
695
                if (!node->is_grafted) {
702
701
                        }
703
702
                }
704
703
 
705
 
                stats = brasero_file_node_get_tree_stats (parent, &depth);
706
 
                if (node->is_file) {
707
 
                        /* only count files */
708
 
                        stats->children ++;
709
 
                }
710
 
 
711
704
                if (depth > 6)
712
705
                        node->is_deep = TRUE;
713
706
        }
723
716
         * creation of a graft). If someone wants to set a new name,
724
717
         * then rename_node is the function. */
725
718
 
 
719
        /* update the stats since a file could have been added to the tree but
 
720
         * at this point we didn't know what it was (a file or a directory).
 
721
         * Only do this if it wasn't a file before. */
 
722
        if (!node->is_file
 
723
        && (g_file_info_get_file_type (info) != G_FILE_TYPE_DIRECTORY)) {
 
724
                /* only count files */
 
725
                stats->children ++;
 
726
        }
 
727
 
726
728
        /* update :
727
729
         * - the mime type
728
730
         * - the size (and possibly the one of his parent)