diff -Naur --exclude='*.pyc' -x '*.bak' -x 'trayicon*' /home/fito/nicotine+-1.2.8/pynicotine/config.py nicotine+-1.2.8/pynicotine/config.py
|
old
|
new
|
|
| 50 | 50 | \ |
| 51 | 51 | "transfers":{"downloaddir":None,"sharedownloaddir":1,"shared":None, "buddyshared": [],\ |
| 52 | 52 | "uploadbandwidth":10, "uselimit":0,"uploadlimit":150, "preferfriends":0, \ |
| 53 | | "useupslots":0, "uploadslots":2, "incompletedir":"", "afterfinish":"", \ |
| | 53 | "useupslots":0, "uploadslots":2, "incompletedir":"", "shownotification":0, "afterfinish":"", \ |
| 54 | 54 | "afterfolder":"", "lock":1, "fifoqueue": 0, "usecustomban":0, "limitby":1, \ |
| 55 | 55 | "customban":"Banned, don't bother retrying","queuelimit":100,"friendsonly":0, \ |
| 56 | 56 | "friendsnolimits":0, "enablebuddyshares": 0, "enabletransferbuttons": 1, \ |
diff -Naur --exclude='*.pyc' -x '*.bak' -x 'trayicon*' /home/fito/nicotine+-1.2.8/pynicotine/gtkgui/settings_glade.py nicotine+-1.2.8/pynicotine/gtkgui/settings_glade.py
|
old
|
new
|
|
| 3227 | 3227 | self.label214.show() |
| 3228 | 3228 | self.vbox96.pack_start(self.label214, False, False, 0) |
| 3229 | 3229 | |
| | 3230 | self.ShowNotification = gtk.CheckButton() |
| | 3231 | self.ShowNotification.set_active(False) |
| | 3232 | self.ShowNotification.set_label(_("Show notification after download")) |
| | 3233 | self.ShowNotification.show() |
| | 3234 | self.vbox96.pack_start(self.ShowNotification, False, False, 0) |
| | 3235 | |
| 3230 | 3236 | self.AfterDownload = gtk.Entry() |
| 3231 | 3237 | self.AfterDownload.set_size_request(313, -1) |
| 3232 | 3238 | self.AfterDownload.set_text("") |
diff -Naur --exclude='*.pyc' -x '*.bak' -x 'trayicon*' /home/fito/nicotine+-1.2.8/pynicotine/gtkgui/settingswindow.py nicotine+-1.2.8/pynicotine/gtkgui/settingswindow.py
|
old
|
new
|
|
| 1139 | 1139 | def SetSettings(self, config): |
| 1140 | 1140 | |
| 1141 | 1141 | transfers = config["transfers"] |
| | 1142 | if transfers["shownotification"] is not None: |
| | 1143 | self.ShowNotification.set_active(transfers["shownotification"]) |
| 1142 | 1144 | if transfers["afterfinish"] is not None: |
| 1143 | 1145 | self.AfterDownload.set_text(transfers["afterfinish"]) |
| 1144 | 1146 | if transfers["afterfolder"] is not None: |
| … |
… |
|
| 1150 | 1152 | def GetSettings(self): |
| 1151 | 1153 | return { |
| 1152 | 1154 | "transfers": { |
| | 1155 | "shownotification" : self.ShowNotification.get_active(), |
| 1153 | 1156 | "afterfinish": self.AfterDownload.get_text(), |
| 1154 | 1157 | "afterfolder": self.AfterFolder.get_text(), |
| 1155 | 1158 | |
diff -Naur --exclude='*.pyc' -x '*.bak' -x 'trayicon*' /home/fito/nicotine+-1.2.8/pynicotine/transfers.py nicotine+-1.2.8/pynicotine/transfers.py
|
old
|
new
|
|
| 111 | 111 | self.geoip = _GeoIP.new(_GeoIP.GEOIP_STANDARD) |
| 112 | 112 | except: |
| 113 | 113 | self.geoip = None |
| | 114 | |
| | 115 | try: |
| | 116 | import pynotify |
| | 117 | pynotify.init("Nicotine+") |
| | 118 | self.pynotify = pynotify |
| | 119 | except ImportError: |
| | 120 | self.pynotify = None |
| 114 | 121 | |
| 115 | 122 | def setTransferPanels(self, downloads, uploads): |
| 116 | 123 | self.downloadspanel = downloads |
| … |
… |
|
| 772 | 779 | self.eventprocessor.sendNumSharedFoldersFiles() |
| 773 | 780 | self.SaveDownloads() |
| 774 | 781 | self.downloadspanel.update(i) |
| | 782 | if self.eventprocessor.config.sections["transfers"]["shownotification"] and self.pynotify != None: |
| | 783 | n = self.pynotify.Notification("Nicotine+", _("%s downloaded" % newname)) |
| | 784 | n.set_icon_from_pixbuf(self.eventprocessor.frame.images["n"]) |
| | 785 | try: n.attach_to_status_icon(self.eventprocessor.frame.TrayApp.trayicon_module) |
| | 786 | except: |
| | 787 | try: n.attach_to_widget(self.eventprocessor.frame.TrayApp.trayicon_module) |
| | 788 | except: pass |
| | 789 | n.show() |
| 775 | 790 | if self.eventprocessor.config.sections["transfers"]["afterfinish"]: |
| 776 | 791 | command = self.eventprocessor.config.sections["transfers"]["afterfinish"].replace("$", utils.escapeCommand(newname)) |
| 777 | 792 | os.system(command) |