~lubuntu-software-center-team/light-software-center/trunk

« back to all changes in this revision

Viewing changes to src/Widgets/Toolbar.vala

  • Committer: Stephen Smally
  • Date: 2012-08-02 10:29:41 UTC
  • Revision ID: eco.stefi@fastwebnet.it-20120802102941-94fvjygw5pt7war0
Visual fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
        // Widgets
25
25
        private ToolItem tool;
26
26
        public EventBox back;
 
27
        public Image icon;
27
28
        public Button label;
28
29
        public SearchBar searchbar;
29
30
        
30
31
        public void update_label (Notebook nb, Widget pg, uint page_n) {
31
 
                        PageType page_t = (PageType) page_n;
 
32
            PageType page_t = (PageType) page_n;
32
33
            switch (page_t) {
33
 
                                case PageType.HOMEPAGE:
34
 
                                    label.label = page_t.to_string();
35
 
                                    break;
36
 
                                case PageType.APPSVIEW:
37
 
                                    label.label = last_category.name;
38
 
                                    break;
39
 
                                case PageType.APPSINFO:
40
 
                                    label.label = last_app.name;
41
 
                                    break;
42
 
                        }
 
34
                case PageType.HOMEPAGE:
 
35
                    label.label = page_t.to_string();
 
36
                    icon.set_from_stock (Stock.HOME, IconSize.MENU);
 
37
                    break;
 
38
                case PageType.APPSVIEW:
 
39
                    label.label = last_category.name;
 
40
                    icon.set_from_icon_name (last_category.icon, IconSize.MENU);
 
41
                    break;
 
42
                case PageType.APPSINFO:
 
43
                    label.label = last_app.name;
 
44
                    icon.set_from_icon_name (last_app.icon, IconSize.MENU);
 
45
                    break;
 
46
            }
43
47
        }
44
48
        
45
49
        private void insert_with_tool (Widget widget, int pos) {
61
65
            back = new EventBox ();
62
66
            back.visible_window = false;
63
67
            back.add (back_image);
 
68
            icon = new Image ();
64
69
            label = new Button.with_label(PageType.HOMEPAGE.to_string());
 
70
            label.image = icon;
 
71
            label.image_position = PositionType.LEFT;
65
72
            label.can_focus = false;
66
73
            label.valign = Align.CENTER;
67
74
            label.vexpand = false;