From 650f4c7f20bae5236be1bacd6f79a4f1b2a69e13 Mon Sep 17 00:00:00 2001 From: Mike Fleetwood Date: Wed, 18 Mar 2015 11:55:15 +0000 Subject: [PATCH] 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 file changed, 3 deletions(-) diff --git a/src/Dialog_Partition_New.cc b/src/Dialog_Partition_New.cc index 287b40d7..b9f4c2a7 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 );