~elementary-apps/pantheon-files/trunk

« back to all changes in this revision

Viewing changes to src/Bookmark.vala

  • Committer: Jeremy Wootten
  • Date: 2014-01-05 13:33:56 UTC
  • mto: This revision was merged to the branch mainline in revision 1446.
  • Revision ID: jeremywootten@gmail.com-20140105133356-z3vaofuuoavbgu7v
Fix error in initializing FREE_SPACE and DISK_SIZE columns, some refactoring

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
namespace Marlin {
22
22
    public class Bookmark {
23
23
 
24
 
        public bool has_custom_name = false;
25
24
        public signal void contents_changed ();
26
25
        public signal void deleted ();
27
26
 
28
 
        private string custom_name;
 
27
        private string custom_name = "";
29
28
        public string label {
30
29
            get {
31
 
                    if (custom_name != null)
32
 
                        return custom_name;
33
 
                    else
34
 
                        return this.gof_file.get_display_name ();
 
30
                if (custom_name != "")
 
31
                    return custom_name;
 
32
                else
 
33
                    return this.gof_file.get_display_name ();
35
34
            }
36
35
 
37
36
            set {
38
 
                    if (value != "" && value != custom_name) {
39
 
                        custom_name = value;
40
 
                        has_custom_name = true;
41
 
                    }
 
37
                custom_name = value;
 
38
                contents_changed ();
42
39
            }
43
40
        }
44
41