diff options
-rw-r--r-- | h-client/credits.txt | 12 | ||||
-rw-r--r-- | h-client/hclient.py | 46 | ||||
-rwxr-xr-x | h-client/img/devices/small/soundcard.png (renamed from h-client/img/devices/soundcard.png) | bin | 1051 -> 1051 bytes | |||
-rwxr-xr-x | h-client/img/devices/small/unknown.png (renamed from h-client/img/devices/unknown.png) | bin | 1222 -> 1222 bytes | |||
-rwxr-xr-x | h-client/img/devices/small/videocard.png (renamed from h-client/img/devices/videocard.png) | bin | 3855 -> 3855 bytes | |||
-rwxr-xr-x | h-client/img/devices/small/wifi.png (renamed from h-client/img/devices/wifi.png) | bin | 1331 -> 1331 bytes | |||
-rw-r--r-- | h-client/img/title_png.png | bin | 0 -> 1071 bytes |
7 files changed, 39 insertions, 19 deletions
diff --git a/h-client/credits.txt b/h-client/credits.txt index 59a467d..e89d30b 100644 --- a/h-client/credits.txt +++ b/h-client/credits.txt @@ -2,12 +2,16 @@ Icons: icons taken from the H2O Icon Theme 0.0.5 (http://kde-look.org/content/show.php/ACUN+Simgeleri?content=83018), licensed under the GNU GPL license: -img/devices/unknown.png -img/devices/soundcard.png -img/devices/wifi.png +img/devices/small/unknown.png +img/devices/small/soundcard.png +img/devices/small/wifi.png + +img/devices/big/unknown.png +img/devices/big/soundcard.png +img/devices/big/wifi.png icons taken from the Crystal Projects icons (http://www.everaldo.com/crystal/?action=downloads), licensed under the LGPL license -img/devices/videocard.png +img/devices/small/videocard.png diff --git a/h-client/hclient.py b/h-client/hclient.py index ebb0907..2679640 100644 --- a/h-client/hclient.py +++ b/h-client/hclient.py @@ -88,8 +88,9 @@ class hclient: #make sensitive the apply button self.applyButton.set_sensitive(True) self.resetButton.set_sensitive(True) + self.submitButton.set_sensitive(True) - self.updateStatus() + #self.updateStatus() else: #make non sensitive the apply button @@ -98,7 +99,7 @@ class hclient: self.submitButton.set_sensitive(False) self.currentDevice = None self.currentDeviceCode = None - self.updateStatus() + #self.updateStatus() #set the pyGTK device entries @@ -211,23 +212,34 @@ class hclient: def login(self,widget): self.client.login(self.usernameEntry.get_text(),self.passwordEntry.get_text()) self.updateStatus() + + if self._submitFlag: + if self.client.isLogged() != -2: + if self.client.isLogged(): + self.applyChanges(None) + self.client.submit(self.currentDeviceCode) + self.printErrors() + + self._submitFlag = False + #self.printErrors() self.loginWindow.destroy() #submit data to the server def submit(self,widget): self.applyChanges(None) + self.licenseNoticeWindow.destroy() - if self.client.isLogged() == True: - result = self.client.submit(self.currentDeviceCode) - self.printErrors() - else: - self.client.errors.append("you are not logged") - self.updateStatus() + if self.client.isLogged() != -2: + if self.client.isLogged(): + self.client.submit(self.currentDeviceCode) + else: + self._submitFlag = True + self.openLoginWindow(None) + + self.printErrors() - self.licenseNoticeWindow.destroy() - #logout to the server def logout(self,widget): self.client.logout() @@ -236,6 +248,8 @@ class hclient: #close the login window def closeLoginWindow(self,widget): + self._submitFlag = False + self.updateStatus() self.loginWindow.destroy() #close the license notice window @@ -479,7 +493,6 @@ class hclient: self.loginButton.show() self.logoutButton.hide() self.statusLabel.set_markup("<i>you are not logged in</i>") - self.submitButton.set_sensitive(False) #def setTreeViewCell(self,column, cell_renderer, model, iter): ##img = model.get_value(iter, 3) @@ -499,8 +512,11 @@ class hclient: def __init__(self): + #does it have to submit after the login? + self._submitFlag = False + #start the client object - self.client = Client('http://www.h-node.com/') + self.client = Client('h-source') self.client.createDevices() # Create the main window @@ -592,13 +608,13 @@ class hclient: self.devices.add_attribute(device_name, "weight", 2) - self.treestore = gtk.TreeStore(str,str,int,gtk.gdk.Pixbuf,int,str) + self.treestore = gtk.TreeStore(str,str,int,gtk.gdk.Pixbuf,int) - pci = self.treestore.append(None, ["Your PCI Devices","",800,gtk.gdk.pixbuf_new_from_file('img/devices/unknown.png'),4,'no_image']) + pci = self.treestore.append(None, ["Your PCI Devices","",800,gtk.gdk.pixbuf_new_from_file('img/title_png.png'),4]) for key,dev in self.client.devices.iteritems(): if key[0] == 'p': - self.treestore.append(pci, [dev[0].getType(),key,400,gtk.gdk.pixbuf_new_from_file('img/devices/'+dev[0].getIcon()),4,'image']) + self.treestore.append(pci, [dev[0].getType(),key,400,gtk.gdk.pixbuf_new_from_file('img/devices/small/'+dev[0].getIcon()),4]) selection = self.tree.get_selection() selection.connect('changed', self.setCurrentDevice) diff --git a/h-client/img/devices/soundcard.png b/h-client/img/devices/small/soundcard.png Binary files differindex d5a7ad4..d5a7ad4 100755 --- a/h-client/img/devices/soundcard.png +++ b/h-client/img/devices/small/soundcard.png diff --git a/h-client/img/devices/unknown.png b/h-client/img/devices/small/unknown.png Binary files differindex 86b6407..86b6407 100755 --- a/h-client/img/devices/unknown.png +++ b/h-client/img/devices/small/unknown.png diff --git a/h-client/img/devices/videocard.png b/h-client/img/devices/small/videocard.png Binary files differindex efffd46..efffd46 100755 --- a/h-client/img/devices/videocard.png +++ b/h-client/img/devices/small/videocard.png diff --git a/h-client/img/devices/wifi.png b/h-client/img/devices/small/wifi.png Binary files differindex 94c4058..94c4058 100755 --- a/h-client/img/devices/wifi.png +++ b/h-client/img/devices/small/wifi.png diff --git a/h-client/img/title_png.png b/h-client/img/title_png.png Binary files differnew file mode 100644 index 0000000..8184ebd --- /dev/null +++ b/h-client/img/title_png.png |