~elementary-apps/pantheon-files/trunk

« back to all changes in this revision

Viewing changes to src/View/Chrome/CompactMenu.vala

  • Committer: am.monkeyd at gmail
  • Date: 2010-11-08 13:17:02 UTC
  • Revision ID: am.monkeyd@gmail.com-20101108131702-rqeywh4r5pyx2ycz
let's roll

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//  
 
2
//  CompactMenu.cs
 
3
//  
 
4
//  Author:
 
5
//       mathijshenquet <${AuthorEmail}>
 
6
// 
 
7
//  Copyright (c) 2010 mathijshenquet
 
8
// 
 
9
//  This program is free software: you can redistribute it and/or modify
 
10
//  it under the terms of the GNU General Public License as published by
 
11
//  the Free Software Foundation, either version 3 of the License, or
 
12
//  (at your option) any later version.
 
13
// 
 
14
//  This program is distributed in the hope that it will be useful,
 
15
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
16
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
17
//  GNU General Public License for more details.
 
18
// 
 
19
//  You should have received a copy of the GNU General Public License
 
20
//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
21
 
 
22
using Gtk;
 
23
 
 
24
namespace Marlin.View.Chrome
 
25
{
 
26
        public class CompactMenu : Gtk.Menu
 
27
        {
 
28
                public CheckMenuItem show_menu_bar;
 
29
                public CheckMenuItem show_hidden_items;
 
30
                public ImageMenuItem about;
 
31
                
 
32
                public CompactMenu (/*Settings settings*/)
 
33
                {
 
34
                        //
 
35
                        // Compact Menu
 
36
                        //
 
37
                        
 
38
                        show_menu_bar = new CheckMenuItem.with_mnemonic ("Show _Menubar");
 
39
                        //ShowMenuBar.active = settings.ShowMenuBar;
 
40
                        
 
41
                        show_menu_bar.toggled.connect(() => {
 
42
                                //settings.ShowMenuBar = ShowMenuBar.Active;    
 
43
                        });
 
44
                        /*settings.ShowMenuBarChanged.connect(() => {
 
45
                                ShowMenuBar.Active = (bool) e.Value;
 
46
                        });*/
 
47
                        
 
48
                        show_hidden_items = new CheckMenuItem.with_mnemonic ("Show _Hidden Items");
 
49
                        //ShowHiddenItems.Active = settings.ShowHiddenItems;
 
50
                        
 
51
                show_hidden_items.toggled.connect( () => {
 
52
                                //settings.ShowHiddenItems = ShowHiddenItems.Active;    
 
53
                        });
 
54
                        /*settings.ShowHiddenItemsChanged.connect( (value) => {
 
55
                                ShowHiddenItems.Active = (bool) e.Value;
 
56
                        });*/
 
57
                        
 
58
                        about = new ImageMenuItem.with_mnemonic ("_About") {
 
59
                        image = new Image.from_stock (Stock.ABOUT, IconSize.MENU)
 
60
                        };
 
61
                        about.activate.connect(() => { });
 
62
                        
 
63
                        append (show_menu_bar);
 
64
                        append (new SeparatorMenuItem());
 
65
                        append (show_hidden_items);
 
66
                        append (new SeparatorMenuItem());
 
67
                        append (about);
 
68
                        
 
69
                        show_all();
 
70
                }
 
71
        }
 
72
}
 
73