~desrt/libvalmynd/master

« back to all changes in this revision

Viewing changes to valmynd/menuitem.vala

  • Committer: Ryan Lortie
  • Date: 2011-04-22 05:27:05 UTC
  • Revision ID: git-v1:868585efa7e56529f90d2a239fe4a04be5b07ac0
rename Valmynd.ItemType to Valmynd.MenuItemType

'ItemType' is almost as bad as 'Item'.

Show diffs side-by-side

added added

removed removed

Lines of Context:
115
115
                        set_qattribute_value (type_quark, type != null ? new Variant.string (type) : null);
116
116
                }
117
117
 
118
 
                public void set_type (ItemType type) {
 
118
                public void set_type (MenuItemType type) {
119
119
                        switch (type) {
120
 
                        case ItemType.ITEM:
 
120
                        case MenuItemType.ITEM:
121
121
                                set_type_name (null);
122
122
                                break;
123
123
 
124
 
                        case ItemType.SECTION:
 
124
                        case MenuItemType.SECTION:
125
125
                                set_type_name ("section");
126
126
                                break;
127
127
                        
128
 
                        case ItemType.SUBMENU:
 
128
                        case MenuItemType.SUBMENU:
129
129
                                set_type_name ("submenu");
130
130
                                break;
131
131
                        
132
 
                        case ItemType.SEPARATOR:
 
132
                        case MenuItemType.SEPARATOR:
133
133
                                set_type_name ("separator");
134
134
                                break;
135
135
 
136
 
                        case ItemType.OTHER:
137
 
                                return_if_fail (type != ItemType.OTHER);
 
136
                        case MenuItemType.OTHER:
 
137
                                return_if_fail (type != MenuItemType.OTHER);
138
138
                                break;
139
139
                        }
140
140
                }
159
159
                public MenuItem.submenu (string label, Model menu) {
160
160
                        initialise ();
161
161
 
162
 
                        set_type (ItemType.SUBMENU);
 
162
                        set_type (MenuItemType.SUBMENU);
163
163
 
164
164
                        set_label (label);
165
165
                        set_menu (menu);
168
168
                public MenuItem.section (string? label, Model menu) {
169
169
                        initialise ();
170
170
 
171
 
                        set_type (ItemType.SECTION);
 
171
                        set_type (MenuItemType.SECTION);
172
172
 
173
173
                        if (label != null) {
174
174
                                set_label (label);