Skip to content
  • Mike Fleetwood's avatar
    Rename member variable to default_fs · a11c1644
    Mike Fleetwood authored and Curtis Gedak's avatar Curtis Gedak committed
    ... in class Dialog_Partition_New and slightly refactor the code in
    build_filesystems_combo() method which sets it.
    
    Change the name from first_creatable_fs to default_fs to be more
    immediately obvious what the variable represents.  As default_fs is used
    to index the items in the combo_filesystem derived ComboBox, make it's
    type an int to match the type of the parameter passed to
    Gtk::ComboBox::set_active() [1].  Initialise default_fs to -1 (no
    selection) in the class constructor [2], which also allows removal of
    local variable set_first just used to track whether first_creatable_fs
    had been assigned yet or not.
    
    [1] gtkmm: Gtk::ComboBox Class Reference, set_active()
        https://developer.gnome.org/gtkmm/stable/classGtk_1_1ComboBox.html#a4f23cf08e85733d23f120935b235096d
    
    [2] C++ FAQ / Should my constructors use "initialization lists" or
        "assignment"?
        https://isocpp.org/wiki/faq/ctors#init-lists
    a11c1644