aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Gallo <tonicucoz@gmail.com>2011-05-16 07:53:39 +0000
committerAntonio Gallo <tonicucoz@gmail.com>2011-05-16 07:53:39 +0000
commit662b118fcc6daaf7379b681749e2513bf8072134 (patch)
tree177e1652c9cecb03b5053bb3ff843f72965976b8
parentbe74e4d659f9af9990b12943e3b2ae1dbbef7ddd (diff)
h-client:added other_names entry - part 2
-rw-r--r--h-client/hclient.py76
1 files changed, 51 insertions, 25 deletions
diff --git a/h-client/hclient.py b/h-client/hclient.py
index 1e64f16..f1fbfbc 100644
--- a/h-client/hclient.py
+++ b/h-client/hclient.py
@@ -782,18 +782,18 @@ class hclient:
self.bigIcon.set_from_file("img/devices/big/unknown.png")
self.tihbox.pack_end(self.bigIcon, False, True, 0)
- self.deviceInfoLabel = gtk.Label("rrr")
+ self.deviceInfoLabel = gtk.Label("")
self.deviceInfoLabel.set_use_markup(True)
self.tihbox.pack_start(self.deviceInfoLabel, False, True, 3)
#create the entries
- self.rightTable = gtk.Table(8, 2, True)
+ self.rightTable = gtk.Table(8, 2, False)
### model
#model name label
self.modelNameLabel = gtk.Label("Model name:")
- self.modelNameLabel.set_alignment(0.95,0.5)
+ self.modelNameLabel.set_alignment(0.94,0.5)
#add the label
self.rightTable.attach(self.modelNameLabel, 0, 1, 0, 1)
@@ -802,54 +802,80 @@ class hclient:
#add the input to the table
self.rightTable.attach(self.modelNameEntry, 1, 2, 0, 1)
+
+ ### other names
+ #other names label
+ self.otherNamesLabel = gtk.Label("Possible other names of the device:\n(<i> write a name per row </i>)")
+ self.otherNamesLabel.set_use_markup(True)
+ self.otherNamesLabel.set_alignment(0.5,0.5)
+ self.otherNamesLabel.set_justify(gtk.JUSTIFY_RIGHT)
+ self.rightTable.attach(self.otherNamesLabel, 0, 1, 1, 2)
+
+ #other names text area
+ s = gtk.ScrolledWindow()
+ s.set_shadow_type(gtk.SHADOW_ETCHED_IN)
+ s.set_size_request(-1,40)
+ s.set_policy(gtk.POLICY_NEVER, gtk.POLICY_AUTOMATIC)
+
+ self.otherNamesText = gtk.TextView()
+ #self.otherNamesText.set_size_request(-1,60)
+ self.otherNamesText.set_wrap_mode(gtk.WRAP_CHAR)
+ #self.otherNamesText.set_left_margin(5)
+ #self.otherNamesText.set_right_margin(5)
+
+ s.add(self.otherNamesText)
+ s.show()
+ s.show_all()
+ self.rightTable.attach(s, 1, 2, 1, 2)
+
### vendorid:productid
#vendorid:productid label
self.vendorIdProductIdLabel = gtk.Label("VendorID:productID code:")
- self.vendorIdProductIdLabel.set_alignment(0.95,0.5)
+ self.vendorIdProductIdLabel.set_alignment(0.86,0.5)
#add the label
- self.rightTable.attach(self.vendorIdProductIdLabel, 0, 1, 1, 2)
+ self.rightTable.attach(self.vendorIdProductIdLabel, 0, 1, 2, 3)
#vendorid:productid input
self.vendorIdProductIdEntry = gtk.Entry()
#set as not editable
self.vendorIdProductIdEntry.set_editable(False)
#add the input to the table
- self.rightTable.attach(self.vendorIdProductIdEntry, 1, 2, 1, 2)
+ self.rightTable.attach(self.vendorIdProductIdEntry, 1, 2, 2, 3)
###subtype
#subtype label
self.subtypeLabel = gtk.Label("Subtype:")
- self.subtypeLabel.set_alignment(0.95,0.5)
+ self.subtypeLabel.set_alignment(0.94,0.5)
#add the label
- self.rightTable.attach(self.subtypeLabel, 0, 1, 2, 3)
+ self.rightTable.attach(self.subtypeLabel, 0, 1, 3, 4)
#subtype input
self.subtypeCombo = gtk.combo_box_new_text()
#add the input to the table
- self.rightTable.attach(self.subtypeCombo, 1, 2, 2, 3)
+ self.rightTable.attach(self.subtypeCombo, 1, 2, 3, 4)
###year of commercialization
#year of commercialization label
self.commYearLabel = gtk.Label("Year of commercialization:")
- self.commYearLabel.set_alignment(0.95,0.5)
+ self.commYearLabel.set_alignment(0.87,0.5)
#add the label
- self.rightTable.attach(self.commYearLabel, 0, 1, 3, 4)
+ self.rightTable.attach(self.commYearLabel, 0, 1, 4, 5)
self.commYearCombo = gtk.combo_box_new_text()
#add the combo to the table
- self.rightTable.attach(self.commYearCombo, 1, 2, 3, 4)
+ self.rightTable.attach(self.commYearCombo, 1, 2, 4, 5)
###interface
#interface label
self.interfaceLabel = gtk.Label("Interface:")
- self.interfaceLabel.set_alignment(0.95,0.5)
+ self.interfaceLabel.set_alignment(0.94,0.5)
#add the label
- self.rightTable.attach(self.interfaceLabel, 0, 1, 4, 5)
+ self.rightTable.attach(self.interfaceLabel, 0, 1, 5, 6)
self.interfaceCombo = gtk.combo_box_new_text()
@@ -858,7 +884,7 @@ class hclient:
self.interfaceCombo.set_active(0)
#add the combo to the table
- self.rightTable.attach(self.interfaceCombo, 1, 2, 4, 5)
+ self.rightTable.attach(self.interfaceCombo, 1, 2, 5, 6)
### distribution
@@ -866,7 +892,7 @@ class hclient:
self.distributionLabel = gtk.Label("Distribution used: ")
self.distributionLabel.set_alignment(0.95,0.5)
#add the label
- self.rightTable.attach(self.distributionLabel, 0, 1, 5, 6)
+ self.rightTable.attach(self.distributionLabel, 0, 1, 6, 7)
#distribution input
self.distributionEntry = gtk.Entry()
@@ -874,20 +900,20 @@ class hclient:
#add the input
- self.rightTable.attach(self.distributionEntry, 1, 2, 5, 6)
+ self.rightTable.attach(self.distributionEntry, 1, 2, 6, 7)
### kernel
#kernel label
self.kernelLabel = gtk.Label("Kernel libre version:")
- self.kernelLabel.set_alignment(0.95,0.5)
+ self.kernelLabel.set_alignment(0.92,0.5)
#add the label
- self.rightTable.attach(self.kernelLabel, 0, 1, 6, 7)
+ self.rightTable.attach(self.kernelLabel, 0, 1, 7, 8)
#kernel input
self.kernelEntry = gtk.Entry()
#add the input
- self.rightTable.attach(self.kernelEntry, 1, 2, 6, 7)
+ self.rightTable.attach(self.kernelEntry, 1, 2, 7, 8)
###how it works
@@ -895,25 +921,25 @@ class hclient:
self.howItWorksLabel = gtk.Label("Does it work?")
self.howItWorksLabel.set_alignment(0.95,0.5)
#add the label
- self.rightTable.attach(self.howItWorksLabel, 0, 1, 7, 8)
+ self.rightTable.attach(self.howItWorksLabel, 0, 1, 8, 9)
self.howItWorksCombo = gtk.combo_box_new_text()
#add the combo to the table
- self.rightTable.attach(self.howItWorksCombo, 1, 2, 7, 8)
+ self.rightTable.attach(self.howItWorksCombo, 1, 2, 8, 9)
### driver
#driver label
self.driverLabel = gtk.Label("Free driver used:")
- self.driverLabel.set_alignment(0.95,0.5)
+ self.driverLabel.set_alignment(0.94,0.5)
#add the label
- self.rightTable.attach(self.driverLabel, 0, 1, 8, 9)
+ self.rightTable.attach(self.driverLabel, 0, 1, 9, 10)
#driver input
self.driverEntry = gtk.Entry()
#add the input
- self.rightTable.attach(self.driverEntry, 1, 2, 8, 9)
+ self.rightTable.attach(self.driverEntry, 1, 2, 9, 10)
### description