[gparted] Make the File System Support dialog resizable (#342682)
- From: Curtis Gedak <gedakc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gparted] Make the File System Support dialog resizable (#342682)
- Date: Mon, 27 Jan 2014 18:10:36 +0000 (UTC)
commit 6f9b99f13822aa6beedff301d398995271756ce5
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date: Tue Dec 3 20:14:56 2013 +0000
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
include/DialogFeatures.h | 2 ++
src/DialogFeatures.cc | 9 +++++++--
2 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/include/DialogFeatures.h b/include/DialogFeatures.h
index 475a39e..f7c0071 100644
--- a/include/DialogFeatures.h
+++ b/include/DialogFeatures.h
@@ -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
diff --git a/src/DialogFeatures.cc b/src/DialogFeatures.cc
index 10f5fc7..231f077 100644
--- a/src/DialogFeatures.cc
+++ b/src/DialogFeatures.cc
@@ -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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]