Re: [PATCH 12/30] Put "Hide" checkbox next to the action buttons.

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

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Code looks fine, but I second clumens' request that we just remove this
checkbox entirely.

On Wed, 16 Sep 2009, Joel Granados Moreno wrote:

Some changes were also done to increase readability in getScreen.

* iw/partition_gui.py (getScreen):  Remove the unneeded spaces.  Replace
the \t where needed.  Put the "Hide" checkbox in the same level as the
buttons.
---
iw/partition_gui.py |   92 +++++++++++++++++++++++++++------------------------
1 files changed, 49 insertions(+), 43 deletions(-)

diff --git a/iw/partition_gui.py b/iw/partition_gui.py
index ac926f7..a96b14c 100644
--- a/iw/partition_gui.py
+++ b/iw/partition_gui.py
@@ -1395,16 +1395,14 @@ class PartitionWindow(InstallWindow):
        self.anaconda = anaconda
        self.storage = anaconda.id.storage
        self.intf = anaconda.intf
-
-	self.show_uneditable = 1
-
-        checkForSwapNoMatch(anaconda)
-
-        # load up checkmark & lock
+        self.show_uneditable = 1
        self.checkmark_pixbuf = gui.getPixbuf("checkMark.png")
        self.lock_pixbuf = gui.getPixbuf("gnome-lock.png")

-        # operational buttons
+        checkForSwapNoMatch(anaconda)
+
+        # Beginning of the GTK stuff.
+        # create the operational buttons
        buttonBox = gtk.HButtonBox()
        buttonBox.set_spacing(10)
        buttonBox.set_layout(gtk.BUTTONBOX_END)
@@ -1419,49 +1417,57 @@ class PartitionWindow(InstallWindow):
            buttonBox.add (button)
            button.connect ("clicked", cb)

+        # create the Hide checkbox
+        self.toggleViewButton = gtk.CheckButton(_("Hide RAID device/LVM Volume _Group members"))
+        self.toggleViewButton.set_active(not self.show_uneditable)
+        self.toggleViewButton.connect("toggled", self.viewButtonCB)
+
+        # Put the check box & the buttons in a horizontal box.
+        actionbox = gtk.HBox()
+        actionbox.pack_start(self.toggleViewButton)
+        actionbox.pack_start(buttonBox)
+        actionbox.set_spacing(10)
+
+        # Create the disk tree
        self.tree = DiskTreeModel()
        self.treeView = self.tree.getTreeView()
        self.treeView.connect('row-activated', self.treeActivateCB)
        self.treeViewSelection = self.treeView.get_selection()
        self.treeViewSelection.connect("changed", self.treeSelectCB)
-
-        # set up the canvas
        self.diskStripeGraph = DiskStripeGraph(self.tree, self.editCB)
-
-        # do the initial population of the tree and the graph
        self.populate(initial = 1)

-	vpaned = gtk.VPaned()
-
+        # Create the top scroll window
        hadj = gtk.Adjustment(step_incr = 5.0)
        vadj = gtk.Adjustment(step_incr = 5.0)
-        sw = gtk.ScrolledWindow(hadjustment = hadj, vadjustment = vadj)
-        sw.add(self.diskStripeGraph.getCanvas())
-        sw.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
-        sw.set_shadow_type(gtk.SHADOW_IN)
-
-        frame = gtk.Frame()
-        frame.add(sw)
-	vpaned.add1(frame)
-
-        box = gtk.VBox(False, 5)
-        sw = gtk.ScrolledWindow()
-        sw.add(self.treeView)
-        sw.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
-	sw.set_shadow_type(gtk.SHADOW_IN)
-
-        box.pack_start(sw, True)
-
-	self.toggleViewButton = gtk.CheckButton(_("Hide RAID device/LVM Volume _Group members"))
-	self.toggleViewButton.set_active(not self.show_uneditable)
-	self.toggleViewButton.connect("toggled", self.viewButtonCB)
-	box.pack_start(self.toggleViewButton, False, False)
-        box.pack_start(buttonBox, False)
-        box.pack_start(gtk.HSeparator(), False)
-
-	vpaned.add2(box)
-
-	# XXX should probably be set according to height
-	vpaned.set_position(175)
-
-	return vpaned
+        swt = gtk.ScrolledWindow(hadjustment = hadj, vadjustment = vadj)
+        swt.add(self.diskStripeGraph.getCanvas())
+        swt.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
+        swt.set_shadow_type(gtk.SHADOW_IN)
+
+        # Add the top scroll window to a frame
+        tframe = gtk.Frame()
+        tframe.add(swt)
+
+        # Create the bottom scroll window
+        swb = gtk.ScrolledWindow()
+        swb.add(self.treeView)
+        swb.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
+        swb.set_shadow_type(gtk.SHADOW_IN)
+
+        # Create main vertical box and add everything.
+        MVbox = gtk.VBox(False, 5)
+        MVbox.pack_start(swt, True)
+        MVbox.pack_start(swb, True)
+        MVbox.pack_start(actionbox, False, False)
+        MVbox.pack_start(gtk.HSeparator(), False)
+
+        # Create Vpaned and add the top frame and main vertical box.
+        vpaned = gtk.VPaned()
+        vpaned.add1(tframe)
+        vpaned.add2(MVbox)
+
+        # XXX should probably be set according to height
+        vpaned.set_position(175)
+
+        return vpaned


- -- David Cantrell <dcantrell@xxxxxxxxxx>
Red Hat / Honolulu, HI

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkq9UZIACgkQ5hsjjIy1VknFGACglELqNDr98n91VjFxXeFGfwkt
RQUAoJ+II9nL8+p3ndyfm+hgOocww3Iu
=g/eV
-----END PGP SIGNATURE-----

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux