SF.net SVN: morphix: [2361] trunk/morphixinstaller2

[email protected] Tue, 18 Jul 2006 17:18:58 -0700
Newsgroups gmane.linux.morphix.cvs
Message-ID <[email protected]>
Revision: 2361
Author:   alextreme
Date:     2006-07-18 17:18:53 -0700 (Tue, 18 Jul 2006)
ViewCVS:  http://svn.sourceforge.net/morphix/?rev=2361&view=rev

Log Message:
-----------
  * in todays tutorial, we look at GtkComboBox, which replaces 
GtkOptionList. GtkComboBox makes it even more complicated to make a 
simple drop-down list, which Gtk developers consider a feature. You can 
add text, icons, widgets and running movies to a GtkComboBox, however no 
one stopped to consider why someone would actually want this. End rant.

Modified Paths:
--------------
    trunk/morphixinstaller2/morphixinstaller.glade
    trunk/morphixinstaller2/morphixinstaller.py
Modified: trunk/morphixinstaller2/morphixinstaller.glade
===================================================================
--- trunk/morphixinstaller2/morphixinstaller.glade	2006-07-18 18:24:49 UTC (rev 2360)
+++ trunk/morphixinstaller2/morphixinstaller.glade	2006-07-19 00:18:53 UTC (rev 2361)
@@ -604,27 +604,6 @@
 		      </child>
 
 		      <child>
-			<widget class="GtkOptionMenu" id="optionmenupartitioners">
-			  <property name="visible">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="history">-1</property>
-
-			  <child>
-			    <widget class="GtkMenu" id="menu4">
-			    </widget>
-			  </child>
-			</widget>
-			<packing>
-			  <property name="left_attach">1</property>
-			  <property name="right_attach">2</property>
-			  <property name="top_attach">1</property>
-			  <property name="bottom_attach">2</property>
-			  <property name="x_options">fill</property>
-			  <property name="y_options"></property>
-			</packing>
-		      </child>
-
-		      <child>
 			<widget class="GtkLabel" id="label46">
 			  <property name="visible">True</property>
 			  <property name="label" translatable="yes">Partitioner: </property>
@@ -651,6 +630,22 @@
 			  <property name="y_options"></property>
 			</packing>
 		      </child>
+
+		      <child>
+			<widget class="GtkComboBox" id="optionmenupartitioners">
+			  <property name="visible">True</property>
+			  <property name="add_tearoffs">False</property>
+			  <property name="focus_on_click">True</property>
+			</widget>
+			<packing>
+			  <property name="left_attach">1</property>
+			  <property name="right_attach">2</property>
+			  <property name="top_attach">1</property>
+			  <property name="bottom_attach">2</property>
+			  <property name="x_options">fill</property>
+			  <property name="y_options">fill</property>
+			</packing>
+		      </child>
 		    </widget>
 		    <packing>
 		      <property name="padding">0</property>

Modified: trunk/morphixinstaller2/morphixinstaller.py
===================================================================
--- trunk/morphixinstaller2/morphixinstaller.py	2006-07-18 18:24:49 UTC (rev 2360)
+++ trunk/morphixinstaller2/morphixinstaller.py	2006-07-19 00:18:53 UTC (rev 2361)
@@ -10,6 +10,7 @@
 try:
 	import gtk
   	import gtk.glade
+	import gobject
 except:
 	sys.exit(1)
 
@@ -61,6 +62,7 @@
 
 		next = self.SelectHarddisk.get_widget("okbuttonHarddisk")
 		combo = self.SelectHarddisk.get_widget("comboHarddisk")
+		options = self.SelectHarddisk.get_widget("optionmenupartitioners")
 
 		hdd_list = self.installer.getHarddiskList()
 		if len(hdd_list) == 0:
@@ -72,6 +74,22 @@
 			print hdd_strings
 			combo.set_popdown_strings(hdd_strings)
 
+		pr = self.installer.getPartitioners(True)
+		liststore = gtk.ListStore(gobject.TYPE_STRING)
+		cell = gtk.CellRendererText()
+		options.set_model(liststore)
+		options.pack_start(cell, True)
+		options.add_attribute(cell, 'text', 0)
+		partition_strings = []
+		liststore.clear()
+		for pr_item in pr:
+			partition_strings += [pr_item[0]]
+			liststore.append([pr_item[0]])
+		options.set_active(0)
+		print partition_strings
+		
+		
+
 	def displaySelectSwap(self, widget):
 
 		screen = self.SelectHarddisk.get_widget("SelectHarddisk")


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV