kuuko pushed a commit to branch master.

http://git.enlightenment.org/apps/epour.git/commit/?id=522959b225bee6b2c4096221541a151d18a9f56b

commit 522959b225bee6b2c4096221541a151d18a9f56b
Author: Kai Huuhko <kai.huu...@gmail.com>
Date:   Wed Apr 22 05:31:26 2015 +0300

    Add dialog: Convert flags to bool before use, disallow dups by default
    
    Flags are converted to bool before using them as Check state since
    Eina_Bool doesn't accept values >sizeof(uchar)
---
 epour/gui/TorrentSelector.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/epour/gui/TorrentSelector.py b/epour/gui/TorrentSelector.py
index 92176e6..197af88 100644
--- a/epour/gui/TorrentSelector.py
+++ b/epour/gui/TorrentSelector.py
@@ -143,6 +143,7 @@ class TorrentSelector(StandardWindow):
         self.add_dict["flags"] = \
             add_torrent_params_flags_t.flag_apply_ip_filter + \
             add_torrent_params_flags_t.flag_update_subscribe + \
+            add_torrent_params_flags_t.flag_duplicate_is_error + \
             add_torrent_params_flags_t.flag_auto_managed
 
         def option_flag_cb(c, flag):
@@ -154,7 +155,7 @@ class TorrentSelector(StandardWindow):
             c = Check(
                 opt_box, size_hint_align=(0.0, 0.5),
                 text=" ".join(name.split("_")[1:]).capitalize(),
-                state=self.add_dict["flags"] & int(flag)
+                state=bool(self.add_dict["flags"] & int(flag))
                 )
             c.callback_changed_add(option_flag_cb, int(flag))
             opt_box.pack_end(c)

-- 


Reply via email to