Changeset 3771

Show
Ignore:
Timestamp:
08/28/08 20:42:19 (4 months ago)
Author:
andar
Message:

Fix add torrent dialog closing preventing another dialog from being
shown

Files:
3 modified

Legend:

Unmodified
Added
Removed
  • branches/1.0.0_RC/ChangeLog

    r3763 r3771  
     1Deluge 0.9.09 - "1.0.0_RC9" (In Development) 
     2 GtkUI: 
     3  * Fix add torrent dialog closing preventing another dialog from being shown 
     4 
    15Deluge 0.9.08 - "1.0.0_RC8" (27 August 2008) 
    26 Core: 
  • branches/1.0.0_RC/deluge/ui/gtkui/addtorrentdialog.py

    r3738 r3771  
    5555         
    5656        self.dialog = self.glade.get_widget("dialog_add_torrent") 
    57          
     57 
     58        self.dialog.connect("delete-event", self._on_delete_event) 
     59 
    5860        self.glade.signal_autoconnect({ 
    5961            "on_button_file_clicked": self._on_button_file_clicked, 
     
    615617        del self.options[model.get_value(row, 0)] 
    616618        self.set_default_options() 
     619 
     620    def _on_delete_event(self, widget, event): 
     621        self.hide() 
     622        return True 
  • trunk/deluge/ui/gtkui/addtorrentdialog.py

    r3738 r3771  
    5656        self.dialog = self.glade.get_widget("dialog_add_torrent") 
    5757         
     58        self.dialog.connect("delete-event", self._on_delete_event) 
     59         
    5860        self.glade.signal_autoconnect({ 
    5961            "on_button_file_clicked": self._on_button_file_clicked, 
     
    299301            options["compact_allocation"]) 
    300302        self.glade.get_widget("spin_maxdown").set_value( 
    301             options["max_download_speed_per_torrent"]) 
     303            options["max_download_speed"]) 
    302304        self.glade.get_widget("spin_maxup").set_value( 
    303             options["max_upload_speed_per_torrent"]) 
     305            options["max_upload_speed"]) 
    304306        self.glade.get_widget("spin_maxconnections").set_value( 
    305             options["max_connections_per_torrent"]) 
     307            options["max_connections"]) 
    306308        self.glade.get_widget("spin_maxupslots").set_value( 
    307             options["max_upload_slots_per_torrent"]) 
     309            options["max_upload_slots"]) 
    308310        self.glade.get_widget("chk_paused").set_active( 
    309311            options["add_paused"]) 
     
    330332        options["compact_allocation"] = \ 
    331333            self.glade.get_widget("radio_compact").get_active() 
    332         options["max_download_speed_per_torrent"] = \ 
     334        options["max_download_speed"] = \ 
    333335            self.glade.get_widget("spin_maxdown").get_value() 
    334         options["max_upload_speed_per_torrent"] = \ 
     336        options["max_upload_speed"] = \ 
    335337            self.glade.get_widget("spin_maxup").get_value() 
    336         options["max_connections_per_torrent"] = \ 
     338        options["max_connections"] = \ 
    337339            self.glade.get_widget("spin_maxconnections").get_value_as_int() 
    338         options["max_upload_slots_per_torrent"] = \ 
     340        options["max_upload_slots"] = \ 
    339341            self.glade.get_widget("spin_maxupslots").get_value_as_int() 
    340342        options["add_paused"] = \ 
     
    615617        del self.options[model.get_value(row, 0)] 
    616618        self.set_default_options() 
     619 
     620    def _on_delete_event(self, widget, event): 
     621        self.hide() 
     622        return True