Merge lp:~georgeyk/stoq/cookie into lp:~stoq-dev/stoq/master-old

Proposed by George Kussumoto
Status: Merged
Merged at revision: not available
Proposed branch: lp:~georgeyk/stoq/cookie
Merge into: lp:~stoq-dev/stoq/master-old
Diff against target: None lines
To merge this branch: bzr merge lp:~georgeyk/stoq/cookie
Reviewer Review Type Date Requested Status
Ronaldo Maia Pending
Review via email: mp+10065@code.launchpad.net
To post a comment you must log in.
Revision history for this message
George Kussumoto (georgeyk) wrote :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'stoq/gui/application.py'
2--- stoq/gui/application.py 2009-07-02 15:34:41 +0000
3+++ stoq/gui/application.py 2009-08-12 20:58:14 +0000
4@@ -35,6 +35,7 @@
5 from stoqlib.database.runtime import (get_current_user, new_transaction,
6 finish_transaction, get_connection)
7 from stoqlib.lib.interfaces import ICookieFile
8+from stoqlib.lib.parameters import sysparam
9 from stoqlib.gui.base.application import BaseApp, BaseAppWindow
10 from stoqlib.gui.base.search import StoqlibSearchSlaveDelegate
11 from stoqlib.gui.dialogs.csvexporterdialog import CSVExporterDialog
12@@ -203,6 +204,13 @@
13 self.menu_hbox.pack_start(menubar, expand=False)
14 menubar.show_all()
15
16+ if sysparam(self.conn).DISABLE_COOKIES:
17+ self._clear_cookie()
18+ store_cookie = self._ui.get_widget('/Menubar/UserMenu/StoreCookie')
19+ store_cookie.hide()
20+ clear_cookie = self._ui.get_widget('/Menubar/UserMenu/ClearCookie')
21+ clear_cookie.hide()
22+
23 def _create_debug_menu(self):
24 ui_string = """<ui>
25 <menubar name="menubar">

Subscribers

People subscribed via source and target branches