Commit b1ab0b36 authored by Cédric Bellegarde's avatar Cédric Bellegarde

Update donation setting allowing me to force dialog on update

parent c0e27e7f
Pipeline #42240 passed with stage
in 7 minutes and 55 seconds
......@@ -24,9 +24,9 @@
<summary>Show Firefox Sync debug messages</summary>
<description />
</key>
<key type="b" name="show-donation">
<default>true</default>
<summary>Allow user to donate to the project</summary>
<key type="i" name="donation">
<default>0</default>
<summary>INTERNAL</summary>
<description></description>
</key>
<key type="b" name="show-sidebar">
......
......@@ -73,6 +73,8 @@ class Container(Gtk.Overlay):
Main Eolie view
"""
__DONATION = 1
def __init__(self, window):
"""
Ini.container
......@@ -117,8 +119,8 @@ class Container(Gtk.Overlay):
self.__expose_stack.add_named(self.__stack, "stack")
self.__expose_stack.add_named(self.__pages_manager, "expose")
self.add(paned)
# Show donation notification
if App().settings.get_value("show-donation"):
# Show donation notification after one hour
if App().settings.get_value("donation").get_int32() != self.__DONATION:
GLib.timeout_add_seconds(randint(3600, 7200),
self.__show_donation)
......@@ -524,8 +526,8 @@ class Container(Gtk.Overlay):
self.add_overlay(notification)
notification.show()
notification.set_reveal_child(True)
App().settings.set_value("show-donation",
GLib.Variant("b", False))
App().settings.set_value("donation",
GLib.Variant("i", self.__DONATION))
def __on_paned_notify_position(self, paned, ignore):
"""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment