Changeset e1752222d4ab14465888fcefbbb5b1751865da56


Ignore:
Timestamp:
23/04/11 22:12:18 (2 years ago)
Author:
Matias De la Puente <mfpuente.ar@…>
Children:
b077dbd65cab68e8f2bd96e1f8678c40cbb8a93c
Parents:
19b0a7cc6e80e13ec0384081c823ed704723ac73
git-committer:
Matias De la Puente <mfpuente.ar@…> (23/04/11 22:12:18)
Message:

Hide 'extra options' expander when there's no extra options

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • gtkfrontend/optionsview.vala

    r3df7a35 re175222  
    2727        private VBox _extra_options_vbox = new VBox (false, 5); 
    2828         
     29        public bool extra_options_visible { set; get; } 
     30         
    2931        public OptionsView () 
    3032        { 
     
    3638                pack_start (_options_vbox, false, false, 5); 
    3739                pack_end (_extra_options_expander, false, false, 5); 
     40                 
     41                bind_property ("extra-options-visible", _extra_options_expander, "visible", BindingFlags.BIDIRECTIONAL); 
    3842        } 
    3943         
     
    6670                } 
    6771                if (most_used) 
     72                { 
    6873                        _options_vbox.pack_start (option, false, false, 4); 
     74                        _options_vbox.show_all (); 
     75                } 
    6976                else 
     77                { 
    7078                        _extra_options_vbox.pack_start (option, false, false, 4); 
    71                 show_all (); 
     79                        _extra_options_vbox.show_all (); 
     80                } 
    7281                return option; 
    7382        } 
  • libi4uccore/optionslogic.vala

    r1c352f0 re175222  
    4040        { 
    4141                _view = view; 
     42                _view.extra_options_visible = false; 
    4243        } 
    4344         
     
    5859                        _view.clear_options (); 
    5960                } 
     61                _view.extra_options_visible = false; 
    6062                foreach (var option in _options) 
    6163                { 
    6264                        var option_view = _view.add_option (option.name, option.locale_label, option.value_type, option.optional, option.most_used); 
     65                         
     66                        if (!option.most_used) 
     67                                _view.extra_options_visible = true; 
    6368                         
    6469                        // Add a detailed tooltip 
  • libi4uccore/optionsview.vala

    r9ab0cbf re175222  
    2222public interface I4uc.Core.OptionsView : GLib.Object 
    2323{ 
     24        public abstract bool extra_options_visible { set; get; } 
     25         
    2426        public abstract OptionView add_option (string name, string label, string value_type, bool optional, bool most_used); 
    2527        public abstract void clear_options (); 
Note: See TracChangeset for help on using the changeset viewer.