~codygarver/slingshot/update-exec-name

« back to all changes in this revision

Viewing changes to src/Widgets/Sidebar.vala

  • Committer: David Gomes
  • Date: 2012-08-21 17:22:55 UTC
  • mfrom: (254.1.1 slingshot)
  • Revision ID: davidrafagomes@gmail.com-20120821172255-2ul7vc2l0b1pnwm1
Merged fix-trailing-whitespace.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
// -*- Mode: vala; indent-tabs-mode: nil; tab-width: 4 -*-
2
 
//  
 
2
//
3
3
//  Copyright (C) 2011-2012 Giulio Collura
4
 
// 
 
4
//
5
5
//  This program is free software: you can redistribute it and/or modify
6
6
//  it under the terms of the GNU General Public License as published by
7
7
//  the Free Software Foundation, either version 3 of the License, or
8
8
//  (at your option) any later version.
9
 
// 
 
9
//
10
10
//  This program is distributed in the hope that it will be useful,
11
11
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
12
12
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
13
//  GNU General Public License for more details.
14
 
// 
 
14
//
15
15
//  You should have received a copy of the GNU General Public License
16
16
//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
17
//
23
23
    public class Sidebar : TreeView {
24
24
 
25
25
        private TreeStore store;
26
 
        
 
26
 
27
27
        private TreeIter entry_iter;
28
28
 
29
29
        public int cat_size {
31
31
                return store.iter_n_children (null);
32
32
            }
33
33
        }
34
 
        
 
34
 
35
35
        private int _selected;
36
36
        public int selected {
37
37
            get {
82
82
 
83
83
            store.append (out entry_iter, null);
84
84
            store.set (entry_iter, Columns.INT, cat_size - 1, Columns.TEXT, entry_name, -1);
85
 
            
 
85
 
86
86
            expand_all ();
87
87
 
88
88
        }
117
117
        }
118
118
 
119
119
        protected override bool scroll_event (Gdk.EventScroll event) {
120
 
        
 
120
 
121
121
            switch (event.direction.to_string ()) {
122
122
                case "GDK_SCROLL_UP":
123
123
                case "GDK_SCROLL_LEFT":