Author: andar

Revision: 5316

Log:
        Show hosts as Offline when they are initially added to the listview
Select the first host in the list on show

Diff:
Modified: trunk/deluge/ui/gtkui/connectionmanager.py
===================================================================
--- trunk/deluge/ui/gtkui/connectionmanager.py  2009-05-27 19:18:13 UTC (rev 
5315)
+++ trunk/deluge/ui/gtkui/connectionmanager.py  2009-05-28 01:15:38 UTC (rev 
5316)
@@ -155,6 +155,10 @@
         self.__load_hostlist()
         self.__load_options()
 
+        # Select the first host if possible
+        if len(self.liststore) > 0:
+            self.hostlist.get_selection().select_path("0")
+            
         # Connect the signals to the handlers
         self.glade.signal_autoconnect(self)
         self.hostlist.get_selection().connect("changed", 
self.on_hostlist_selection_changed)
@@ -200,6 +204,7 @@
         self.liststore[row][HOSTLIST_COL_PORT] = port
         self.liststore[row][HOSTLIST_COL_USER] = username
         self.liststore[row][HOSTLIST_COL_PASS] = password
+        self.liststore[row][HOSTLIST_COL_STATUS] = "Offline"
 
         # Save the host list to file
         self.__save_hostlist()
@@ -230,6 +235,7 @@
             self.liststore[new_row][HOSTLIST_COL_PORT] = host[2]
             self.liststore[new_row][HOSTLIST_COL_USER] = host[3]
             self.liststore[new_row][HOSTLIST_COL_PASS] = host[4]
+            self.liststore[new_row][HOSTLIST_COL_STATUS] = "Offline"
 
     def __get_host_row(self, host_id):
         """



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"deluge-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/deluge-commit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to