From 221dea1f1a59df21958cd7c586d05aea51dd5826 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Mon, 6 Jun 2011 17:45:51 +0100 Subject: [PATCH] GTK UI. Center the custom speed dialog on parent(statusbar). --- deluge/ui/gtkui/common.py | 1 + deluge/ui/gtkui/statusbar.py | 6 +----- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/deluge/ui/gtkui/common.py b/deluge/ui/gtkui/common.py index 08d55e417..ee0aa372c 100644 --- a/deluge/ui/gtkui/common.py +++ b/deluge/ui/gtkui/common.py @@ -156,6 +156,7 @@ def show_other_dialog(header, type_str, image_stockid=None, image_filename=None, ) dialog = glade.get_widget("other_dialog") dialog.set_transient_for(component.get("MainWindow").window) + dialog.set_position(gtk.WIN_POS_CENTER_ON_PARENT) dialog.set_title("") glade.get_widget("label_header").set_markup("" + header + "") glade.get_widget("label_type").set_text(type_str) diff --git a/deluge/ui/gtkui/statusbar.py b/deluge/ui/gtkui/statusbar.py index 60202a213..244656cab 100644 --- a/deluge/ui/gtkui/statusbar.py +++ b/deluge/ui/gtkui/statusbar.py @@ -273,11 +273,7 @@ class StatusBar(component.Component): def send_status_request(self): # Sends an async request for data from the core client.core.get_num_connections().addCallback(self._on_get_num_connections) - keys = [ - "upload_rate", - "download_rate", - "payload_upload_rate", - "payload_download_rate"] + keys = ["upload_rate", "download_rate", "payload_upload_rate", "payload_download_rate"] if self.dht_status: keys.append("dht_nodes")