Changeset 97723d935a134b7982b3d0dd20b8c39386715d9e


Ignore:
Timestamp:
28/08/10 12:21:53 (3 years ago)
Author:
Matias De la Puente <mfpuente.ar@…>
Children:
e0bc27329f7c848d56231cc0bf7e47320b970f31
Parents:
8ec236a8f17b525f52787f9fa65522d9ec15ced5
git-committer:
Matias De la Puente <mfpuente.ar@…> (28/08/10 12:21:53)
Message:

Projects: Disable profile edit button if NO or NONE profile is selected

Location:
libi4uc
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • libi4uc/i4ucitemscombo.vala

    rcf139ae r97723d9  
    2727        private ListStore _items_store; 
    2828        private ComboBox _items_view; 
     29        private Button _button = new Button (); 
    2930        private string _current_item_label; 
    3031 
     
    7172         
    7273        public string current_item_label { get { return _current_item_label; } } 
     74         
     75        public bool button_sensitive 
     76        { 
     77                set { _button.sensitive = value; } 
     78                get { return _button.sensitive; } 
     79        } 
    7380 
    7481        public signal void item_changed (); 
     
    8693                init_widgets (label); 
    8794                 
    88                 var button = new Button (); 
    89                 button.add (new Image.from_stock (stock_icon, IconSize.MENU)); 
     95                _button.add (new Image.from_stock (stock_icon, IconSize.MENU)); 
    9096                 
    9197                var hbox = new HBox (false, 0); 
    9298                hbox.pack_start (_items_view, true, true, 0); 
    93                 hbox.pack_start (button, false, false, 0); 
     99                hbox.pack_start (_button, false, false, 0); 
    94100                 
    95101                pack_start (_label, false, false, 0); 
     
    97103                 
    98104                //signals 
    99                 button.clicked.connect (() => this.button_clicked ()); 
     105                _button.clicked.connect (() => this.button_clicked ()); 
    100106        } 
    101107 
  • libi4uc/i4ucprojectspresenter.vala

    r65b3a06 r97723d9  
    4343                _view.add_profile_sensitive = false; 
    4444                _view.edit_profile_sensitive = false; 
     45                _view.side_page_view.profile_edit_sensitive = false; 
    4546                _view.duplicate_profile_sensitive = false; 
    4647                _view.remove_profile_sensitive = false; 
     
    279280                _view.remove_file_from_profile_sensitive = profile_selected && file_selected; 
    280281                _view.edit_profile_sensitive = profile_selected; 
     282                _view.side_page_view.profile_edit_sensitive = profile_selected; 
    281283                _view.duplicate_profile_sensitive = profile_selected; 
    282284                _view.remove_profile_sensitive = profile_selected; 
  • libi4uc/i4ucprojectssidepagepresenter.vala

    r65b3a06 r97723d9  
    174174        private void on_profile_edit_clicked () 
    175175        { 
    176                 if (_view.current_profile != "__NONE__") 
    177                         show_current_profile_dialog (); 
     176                show_current_profile_dialog (); 
    178177        } 
    179178 
  • libi4uc/i4ucprojectssidepageview.vala

    r65b3a06 r97723d9  
    6565                set { _builders_expander.visible = value; } 
    6666                get { return _builders_expander.visible; } 
     67        } 
     68         
     69        public bool profile_edit_sensitive 
     70        { 
     71                set { _profiles_combo.button_sensitive = value; } 
     72                get { return _profiles_combo.button_sensitive; } 
    6773        } 
    6874 
  • libi4uc/i4ucprojectssidepageviewiface.vala

    r65b3a06 r97723d9  
    3030        public abstract bool builders_list_sensitive { set; get; } 
    3131        public abstract bool builders_list_visible { set; get; } 
     32        public abstract bool profile_edit_sensitive { set; get; } 
    3233 
    3334        public signal void project_changed (); 
Note: See TracChangeset for help on using the changeset viewer.