[gparted] Remove redundant Gtk::Entry calls in Create New Partition dialog



commit 650f4c7f20bae5236be1bacd6f79a4f1b2a69e13
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date:   Wed Mar 18 11:55:15 2015 +0000

    Remove redundant Gtk::Entry calls in Create New Partition dialog
    
    This is a small tidy-up to remove Gtk::Entry method calls on the file
    system label entry box in the Create New Partition dialog which serve no
    purpose.
    
    filesystem_label_entry.set_activates_default( true );
        It trying to make the Create New Partition dialog automatically
        close  when Enter is pressed with focus in the label entry box.
        However this doesn't work, presumably because the default widget for
        the dialog is not the Add button.  Remove.
    
    filesystem_label_entry.set_text( partition.get_filesystem_label() );
        Initialises the text in the entry box with the file system label
        from the passed partition object.  The label is blank and the entry
        box defaults to blank.  Achieves nothing.  Remove.
    
    filesystem_label_entry.select_region( 0, filesystem_label_entry.get_text_length() );
        Highlights the empty text in the entry box.  Achieves nothing.
        Remove.
    
    NOTE:
    The same set of Gtk::Entry method calls in Dialog_FileSystem_Label() and
    Dialog_Partition_Name, which are editing the existing file system label
    and partition name respectively, do work and have a useful effect so
    shouldn't be removed.

 src/Dialog_Partition_New.cc |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)
---
diff --git a/src/Dialog_Partition_New.cc b/src/Dialog_Partition_New.cc
index 287b40d..b9f4c2a 100644
--- a/src/Dialog_Partition_New.cc
+++ b/src/Dialog_Partition_New.cc
@@ -132,9 +132,6 @@ void Dialog_Partition_New::Set_Data( const Partition & partition,
                        0, 1, 3, 4,     Gtk::FILL ) ;
        //Create Text entry box
        filesystem_label_entry.set_width_chars( 20 );
-       filesystem_label_entry.set_activates_default( true );
-       filesystem_label_entry.set_text( partition.get_filesystem_label() );
-       filesystem_label_entry.select_region( 0, filesystem_label_entry.get_text_length() );
        //Add entry box to table
        table_create.attach( filesystem_label_entry, 1, 2, 3, 4, Gtk::FILL );
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]