summaryrefslogtreecommitdiff
path: root/portato
diff options
context:
space:
mode:
Diffstat (limited to 'portato')
-rw-r--r--portato/gui/dialogs.py8
-rw-r--r--portato/gui/windows/main.py6
-rw-r--r--portato/session.py13
3 files changed, 21 insertions, 6 deletions
diff --git a/portato/gui/dialogs.py b/portato/gui/dialogs.py
index 0313cae..8f0c78c 100644
--- a/portato/gui/dialogs.py
+++ b/portato/gui/dialogs.py
@@ -57,11 +57,15 @@ def nothing_found_dialog ():
return ret
def changed_flags_dialog (what = "flags"):
+ check = gtk.CheckButton(_("Do not show this dialog again."))
hintMB = gtk.MessageDialog(None, gtk.DIALOG_MODAL, gtk.MESSAGE_INFO, gtk.BUTTONS_OK,
- _("You have changed %s. Portato will write these changes into the appropriate files. Please backup them if you think it is necessairy.") % what)
+ _("You have changed %s.\nPortato will write these changes into the appropriate files.\nPlease backup them if you think it is necessairy.") % what)
+ hintMB.vbox.add(check)
+ hintMB.vbox.show_all()
ret = hintMB.run()
hintMB.destroy()
- return ret
+
+ return ret, check.get_active()
def remove_deps_dialog ():
infoMB = gtk.MessageDialog(None, gtk.DIALOG_MODAL, gtk.MESSAGE_INFO, gtk.BUTTONS_OK, _("You cannot remove dependencies. :)"))
diff --git a/portato/gui/windows/main.py b/portato/gui/windows/main.py
index 8e5eafb..364810d 100644
--- a/portato/gui/windows/main.py
+++ b/portato/gui/windows/main.py
@@ -1357,7 +1357,8 @@ class MainWindow (Window):
"""Execute the current queue."""
if len(flags.newUseFlags) > 0:
- changed_flags_dialog(_("use flags"))
+ if not self.session.get_boolean("useflags", "dialogs"):
+ self.session.set("useflags", changed_flags_dialog(_("use flags"))[1], "dialogs")
try:
flags.write_use_flags()
except IOError, e:
@@ -1368,7 +1369,8 @@ class MainWindow (Window):
debug("new masked: %s",flags.new_masked)
debug("new unmasked: %s", flags.new_unmasked)
debug("new testing: %s", flags.newTesting)
- changed_flags_dialog(_("masking keywords"))
+ if not self.session.get_boolean("keywords", "dialogs"):
+ self.session.set("keywords", changed_flags_dialog(_("masking keywords"))[1], "dialogs")
try:
flags.write_masked()
flags.write_testing()
diff --git a/portato/session.py b/portato/session.py
index da15171..5d1a640 100644
--- a/portato/session.py
+++ b/portato/session.py
@@ -105,9 +105,18 @@ class Session (object):
except SectionNotFoundException:
self._cfg.add_section(section)
self._cfg.add(key, value, section, with_blankline = False)
-
+
def get (self, key, section):
- return self._cfg.get(key, section)
+ try:
+ return self._cfg.get(key, section)
+ except KeyError:
+ return None
+
+ def get_boolean (self, key, section):
+ try:
+ return self._cfg.get_boolean(key, section)
+ except KeyError:
+ return None
def check_version (self, vers):
pass # do nothing atm
ollow=1'>Update READMERené 'Necoro' Neumann1-5/+44 2020-05-10Ignore 'dist' folder and build productsRené 'Necoro' Neumann1-0/+2 2020-05-08Print item hashes in debug modeRené 'Necoro' Neumann1-1/+7 2020-05-07Improve html renderingRené 'Necoro' Neumann2-53/+32 2020-05-07Do not assume items to be new when their published date is newer than the las...René 'Necoro' Neumann2-7/+1 2020-05-07Updating some depsRené 'Necoro' Neumann2-2/+7 2020-05-07Better detection if a text starts with html or notRené 'Necoro' Neumann2-4/+13 2020-05-07go fmtRené 'Necoro' Neumann1-3/+2 2020-05-07Add header X-Feed2Imap-GUIDRené 'Necoro' Neumann3-1/+7 2020-05-07update changelogRené 'Necoro' Neumann1-0/+1 2020-05-07FixRené 'Necoro' Neumann1-1/+1 2020-05-07Unified publishedDate and updatedDate into one (just as the old feed2imap...)René 'Necoro' Neumann5-21/+32 2020-05-06Print version during startupRené 'Necoro' Neumann1-1/+1 2020-05-06Improve templateRené 'Necoro' Neumann3-20/+28 2020-05-05Fix pipelineRené 'Necoro' Neumann1-2/+5 2020-05-05Make changelog a part of the release pipeline (untested)René 'Necoro' Neumann2-0/+12