Exemplo n.º 1
0
 def on_button_edit_subscription_clicked(self, Event=None, a=None, col=None):
     key = get_value_in_selected_row(self.subscriptions_treeview, self.subscriptions_store)
     if key:
         if col and col.get_title() == 'Active':
             self.subscriptions[key]["active"] = not self.subscriptions[key]["active"]
             self.save_subscription(self.subscriptions[key])
         else:
             edit_subscription_dialog = DialogSubscription(self,
                                                           self.log,
                                                           self.subscriptions[key],
                                                           self.rssfeeds,
                                                           self.get_move_completed_list(),
                                                           self.get_download_location_list(),
                                                           self.email_messages,
                                                           self.cookies)
             edit_subscription_dialog.show()
Exemplo n.º 2
0
 def on_button_edit_subscription_clicked(self,
                                         Event=None,
                                         a=None,
                                         col=None):
     key = get_value_in_selected_row(self.subscriptions_treeview,
                                     self.subscriptions_store)
     if key:
         if col and col.get_title() == 'Active':
             self.subscriptions[key][
                 "active"] = not self.subscriptions[key]["active"]
             self.save_subscription(self.subscriptions[key])
         else:
             edit_subscription_dialog = DialogSubscription(
                 self, self.log, self.subscriptions[key], self.rssfeeds,
                 self.get_move_completed_list(),
                 self.get_download_location_list(), self.email_messages,
                 self.cookies)
             edit_subscription_dialog.show()
Exemplo n.º 3
0
    def on_button_add_subscription_clicked(self, Event=None, a=None, col=None):
        # Check if any RSS Feeds exists, if not, show popup
        if len(self.rssfeeds.keys()) == 0:
            md = gtk.MessageDialog(
                component.get("Preferences").pref_dialog,
                gtk.DIALOG_DESTROY_WITH_PARENT, gtk.MESSAGE_INFO,
                gtk.BUTTONS_CLOSE,
                "You need to add a RSS Feed before creating subscriptions!")
            md.run()
            md.destroy()
            return

        fresh_subscription_config = yarss_config.get_fresh_subscription_config(
        )
        subscription_dialog = DialogSubscription(
            self, self.log, fresh_subscription_config, self.rssfeeds,
            self.get_move_completed_list(), self.get_download_location_list(),
            self.email_messages, self.cookies)
        subscription_dialog.show()
Exemplo n.º 4
0
    def on_button_add_subscription_clicked(self, Event=None, a=None, col=None):
        # Check if any RSS Feeds exists, if not, show popup
        if len(self.rssfeeds.keys()) == 0:
            md = gtk.MessageDialog(component.get("Preferences").pref_dialog,
                                   gtk.DIALOG_DESTROY_WITH_PARENT, gtk.MESSAGE_INFO,
                                   gtk.BUTTONS_CLOSE,
                                   "You need to add a RSS Feed before creating subscriptions!")
            md.run()
            md.destroy()
            return

        fresh_subscription_config = yarss_config.get_fresh_subscription_config()
        subscription_dialog = DialogSubscription(self,
                                                 self.log,
                                                 fresh_subscription_config,
                                                 self.rssfeeds,
                                                 self.get_move_completed_list(),
                                                 self.get_download_location_list(),
                                                 self.email_messages,
                                                 self.cookies)
        subscription_dialog.show()