All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hob/hig: Hob doesn't save properly proxy settings
@ 2012-10-26  9:24 Cristian Iorga
  2012-10-27  8:57 ` Richard Purdie
  0 siblings, 1 reply; 2+ messages in thread
From: Cristian Iorga @ 2012-10-26  9:24 UTC (permalink / raw)
  To: bitbake-devel

User introduced proxy settings were not saved
when a proxy details input dialog was opened.
The proxy settings were lost upon return, and
restored from the previously stored one.

Also:
Code cleanup:
details_cb() function duplicate definition
removed

Fixes [YOCTO #3240]

Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
---
 bitbake/lib/bb/ui/crumbs/hig.py |   17 +----------------
 1 file changed, 1 insertion(+), 16 deletions(-)

diff --git a/bitbake/lib/bb/ui/crumbs/hig.py b/bitbake/lib/bb/ui/crumbs/hig.py
index 4f4fecb..f96fa4d 100644
--- a/bitbake/lib/bb/ui/crumbs/hig.py
+++ b/bitbake/lib/bb/ui/crumbs/hig.py
@@ -381,22 +381,6 @@ class SimpleSettingsDialog (CrumbsDialog, SettingsUIHelper):
             data += (key + ": " + self._get_sorted_value(self.configuration.extra_setting[key]))
         return hashlib.md5(data).hexdigest()
 
-    def details_cb(self, button, parent, protocol):
-        dialog = ProxyDetailsDialog(title = protocol.upper() + " Proxy Details",
-            user = self.configuration.proxies[protocol][1],
-            passwd = self.configuration.proxies[protocol][2],
-            parent = parent,
-            flags = gtk.DIALOG_MODAL
-                    | gtk.DIALOG_DESTROY_WITH_PARENT
-                    | gtk.DIALOG_NO_SEPARATOR)
-        dialog.add_button(gtk.STOCK_CLOSE, gtk.RESPONSE_OK)
-        response = dialog.run()
-        if response == gtk.RESPONSE_OK:
-            self.configuration.proxies[protocol][1] = dialog.user
-            self.configuration.proxies[protocol][2] = dialog.passwd
-            self.refresh_proxy_components()
-        dialog.destroy()
-
     def gen_proxy_entry_widget(self, protocol, parent, need_button=True, line=0):
         label = gtk.Label(protocol.upper() + " proxy")
         self.proxy_table.attach(label, 0, 1, line, line+1, xpadding=24)
@@ -826,6 +810,7 @@ class SimpleSettingsDialog (CrumbsDialog, SettingsUIHelper):
         self.nb.set_current_page(page_id)
 
     def details_cb(self, button, parent, protocol):
+        self.save_proxy_data()
         dialog = ProxyDetailsDialog(title = protocol.upper() + " Proxy Details",
             user = self.configuration.proxies[protocol][1],
             passwd = self.configuration.proxies[protocol][2],
-- 
1.7.10.4




^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-10-27  9:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-26  9:24 [PATCH] hob/hig: Hob doesn't save properly proxy settings Cristian Iorga
2012-10-27  8:57 ` Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.