Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 302126
Collapse All | Expand All

(-)deluge-1.1.9/deluge/ui/gtkui/glade/preferences_dialog.glade (-2 / +2 lines)
Lines 3740-3746 Link Here
3740
                                                <property name="n_rows">3</property>
3740
                                                <property name="n_rows">3</property>
3741
                                                <property name="n_columns">2</property>
3741
                                                <property name="n_columns">2</property>
3742
                                                <property name="column_spacing">5</property>
3742
                                                <property name="column_spacing">5</property>
3743
                                                <child>
3743
                                                <!-- <child>
3744
                                                  <widget class="GtkCheckButton" id="chk_ntf_sound">
3744
                                                  <widget class="GtkCheckButton" id="chk_ntf_sound">
3745
                                                    <property name="visible">True</property>
3745
                                                    <property name="visible">True</property>
3746
                                                    <property name="can_focus">True</property>
3746
                                                    <property name="can_focus">True</property>
Lines 3755-3761 Link Here
3755
                                                    <property name="bottom_attach">3</property>
3755
                                                    <property name="bottom_attach">3</property>
3756
                                                    <property name="x_options">GTK_FILL</property>
3756
                                                    <property name="x_options">GTK_FILL</property>
3757
                                                  </packing>
3757
                                                  </packing>
3758
                                                </child>
3758
                                                </child>-->
3759
                                                <child>
3759
                                                <child>
3760
                                                  <widget class="GtkCheckButton" id="chk_ntf_popup">
3760
                                                  <widget class="GtkCheckButton" id="chk_ntf_popup">
3761
                                                    <property name="visible">True</property>
3761
                                                    <property name="visible">True</property>
(-)deluge-1.1.9/deluge/ui/gtkui/gtkui.py (-2 / +2 lines)
Lines 104-111 Link Here
104
    "show_new_releases": True,
104
    "show_new_releases": True,
105
    "signal_port": 40000,
105
    "signal_port": 40000,
106
    "ntf_tray_blink": True,
106
    "ntf_tray_blink": True,
107
    "ntf_sound": False,
107
    # "ntf_sound": False,
108
    "ntf_sound_path": deluge.common.get_default_download_dir(),
108
    # "ntf_sound_path": deluge.common.get_default_download_dir(),
109
    "ntf_popup": False,
109
    "ntf_popup": False,
110
    "ntf_email": False,
110
    "ntf_email": False,
111
    "ntf_email_add": "",
111
    "ntf_email_add": "",
(-)deluge-1.1.9/deluge/ui/gtkui/notification.py (-14 / +14 lines)
Lines 84-103 Link Here
84
84
85
    def sound(self):
85
    def sound(self):
86
        """plays a sound when a torrent finishes"""
86
        """plays a sound when a torrent finishes"""
87
        try:
87
        # try:
88
            import pygame
88
            # import pygame
89
        except:
89
        # except:
90
            log.warning("pygame is not installed")
90
            # log.warning("pygame is not installed")
91
        else:
91
        # else:
92
            pygame.init()
92
            # pygame.init()
93
            try:
93
            # try:
94
                alert_sound = pygame.mixer.music
94
            #    alert_sound = pygame.mixer.music
95
                alert_sound.load(self.config["ntf_sound_path"])
95
            #    alert_sound.load(self.config["ntf_sound_path"])
96
                alert_sound.play()
96
            #    alert_sound.play()
97
            except pygame.error, message:
97
            # except pygame.error, message:
98
                log.warning("pygame failed to play because %s" % (message))
98
            #    log.warning("pygame failed to play because %s" % (message))
99
            else:
99
            # else:
100
                log.info("sound notification played successfully")
100
            #    log.info("sound notification played successfully")
101
101
102
    def email(self, status):
102
    def email(self, status):
103
        """sends email notification of finished torrent"""
103
        """sends email notification of finished torrent"""
(-)deluge-1.1.9/deluge/ui/gtkui/preferences.py (-8 / +8 lines)
Lines 452-461 Link Here
452
                self.gtkui_config["ntf_popup"])
452
                self.gtkui_config["ntf_popup"])
453
        self.glade.get_widget("chk_ntf_email").set_active(
453
        self.glade.get_widget("chk_ntf_email").set_active(
454
            self.gtkui_config["ntf_email"])
454
            self.gtkui_config["ntf_email"])
455
        self.glade.get_widget("chk_ntf_sound").set_active(
455
        # self.glade.get_widget("chk_ntf_sound").set_active(
456
            self.gtkui_config["ntf_sound"])
456
        #    self.gtkui_config["ntf_sound"])
457
        if self.gtkui_config["ntf_sound_path"]:
457
        # if self.gtkui_config["ntf_sound_path"]:
458
            self.glade.get_widget("combo_ntf_sound_path").set_filename(self.gtkui_config["ntf_sound_path"])
458
        #    self.glade.get_widget("combo_ntf_sound_path").set_filename(self.gtkui_config["ntf_sound_path"])
459
        self.glade.get_widget("txt_ntf_email").set_text(
459
        self.glade.get_widget("txt_ntf_email").set_text(
460
            self.gtkui_config["ntf_email_add"])
460
            self.gtkui_config["ntf_email_add"])
461
        self.glade.get_widget("txt_ntf_server").set_text(
461
        self.glade.get_widget("txt_ntf_server").set_text(
Lines 632-639 Link Here
632
            self.glade.get_widget("chk_ntf_tray_blink").get_active()
632
            self.glade.get_widget("chk_ntf_tray_blink").get_active()
633
        new_gtkui_config["ntf_popup"] = \
633
        new_gtkui_config["ntf_popup"] = \
634
            self.glade.get_widget("chk_ntf_popup").get_active()
634
            self.glade.get_widget("chk_ntf_popup").get_active()
635
        new_gtkui_config["ntf_sound"] = \
635
        # new_gtkui_config["ntf_sound"] = \
636
            self.glade.get_widget("chk_ntf_sound").get_active()
636
        #    self.glade.get_widget("chk_ntf_sound").get_active()
637
        new_gtkui_config["ntf_email"] = \
637
        new_gtkui_config["ntf_email"] = \
638
            self.glade.get_widget("chk_ntf_email").get_active()
638
            self.glade.get_widget("chk_ntf_email").get_active()
639
        new_gtkui_config["ntf_email_add"] = \
639
        new_gtkui_config["ntf_email_add"] = \
Lines 644-651 Link Here
644
            self.glade.get_widget("txt_ntf_pass").get_text()
644
            self.glade.get_widget("txt_ntf_pass").get_text()
645
        new_gtkui_config["ntf_server"] = \
645
        new_gtkui_config["ntf_server"] = \
646
            self.glade.get_widget("txt_ntf_server").get_text()
646
            self.glade.get_widget("txt_ntf_server").get_text()
647
        new_gtkui_config["ntf_sound_path"] = \
647
        # new_gtkui_config["ntf_sound_path"] = \
648
                self.glade.get_widget("combo_ntf_sound_path").get_filename()
648
        #        self.glade.get_widget("combo_ntf_sound_path").get_filename()
649
        if self.glade.get_widget("rad_ntf_none").get_active():
649
        if self.glade.get_widget("rad_ntf_none").get_active():
650
            new_gtkui_config["ntf_security"] = None
650
            new_gtkui_config["ntf_security"] = None
651
        elif self.glade.get_widget("rad_ntf_ssl").get_active():
651
        elif self.glade.get_widget("rad_ntf_ssl").get_active():

Return to bug 302126