Make the File System Support dialog resizable (#342682)

Make the dialog resizable, add a vertical scrollbar and set the minimum
(and therefore initial) height to 500 pixels.  This is so that the
dialog entirely fits on an 800x600 screen, thus allowing the rescan
button to be pressed.

100 pixel difference is to account for the size of the top and bottom
GNOME 2 panels and two sets of title bars.  Two sets of title bars
because the window manager tries to place the top of dialog title bars
in line with the bottom of the main window title bar.

Bug #342682 - too much information in 'features' dialog
This commit is contained in:
Mike Fleetwood 2013-12-03 20:14:56 +00:00 committed by Curtis Gedak
parent cb8ce9caea
commit 6f9b99f138
2 changed files with 9 additions and 2 deletions

View file

@ -24,6 +24,7 @@
#include <gtkmm/frame.h>
#include <gtkmm/treeview.h>
#include <gtkmm/liststore.h>
#include <gtkmm/scrolledwindow.h>
#include <gtkmm/image.h>
namespace GParted
@ -43,6 +44,7 @@ private:
Gtk::Frame legend_frame ;
Gtk::TreeView treeview_filesystems;
Gtk::TreeRow treerow;
Gtk::ScrolledWindow filesystems_scrolled ;
Glib::RefPtr<Gtk::ListStore> liststore_filesystems;
struct treeview_filesystems_Columns : public Gtk::TreeModelColumnRecord

View file

@ -26,7 +26,8 @@ DialogFeatures::DialogFeatures()
{
set_title( _("File System Support") ) ;
set_has_separator( false ) ;
set_resizable( false ) ;
//Set minimum dialog height so it fits on an 800x600 screen
set_size_request( -1, 500 ) ;
//initialize icons
icon_yes = render_icon( Gtk::Stock::APPLY, Gtk::ICON_SIZE_LARGE_TOOLBAR );
@ -58,9 +59,13 @@ DialogFeatures::DialogFeatures()
treeview_filesystems .get_selection() ->set_mode( Gtk::SELECTION_NONE );
treeview_filesystems .set_rules_hint( true ) ;
//scrollable file system list
filesystems_scrolled .set_policy( Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC ) ;
filesystems_scrolled .add( treeview_filesystems ) ;
Gtk::HBox *filesystems_hbox( manage( new Gtk::HBox() ) ) ;
filesystems_hbox ->set_border_width( 6 ) ;
filesystems_hbox ->pack_start( treeview_filesystems ) ;
filesystems_hbox ->pack_start( filesystems_scrolled ) ;
this ->get_vbox() ->pack_start( *filesystems_hbox ) ;
//file system support legend