diff -Naur --exclude='*.pyc' -x '*.bak' /home/fito/bin/nicotine+-1.2.7.1/pynicotine/config.py nicotine+-1.2.7.1/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' /home/fito/bin/nicotine+-1.2.7.1/pynicotine/gtkgui/nicotine-settings.glade nicotine+-1.2.7.1/pynicotine/gtkgui/nicotine-settings.glade
|
old
|
new
|
|
| 8481 | 8481 | <property name="spacing">10</property> |
| 8482 | 8482 | |
| 8483 | 8483 | <child> |
| | 8484 | <widget class="GtkCheckButton" id="notificationtogglebutton"> |
| | 8485 | <property name="visible">True</property> |
| | 8486 | <property name="can_focus">True</property> |
| | 8487 | <property name="label" translatable="yes">Show notification when a file is downloaded</property> |
| | 8488 | <property name="use_underline">True</property> |
| | 8489 | <property name="relief">GTK_RELIEF_NORMAL</property> |
| | 8490 | <property name="focus_on_click">True</property> |
| | 8491 | <property name="active">False</property> |
| | 8492 | <property name="inconsistent">False</property> |
| | 8493 | <property name="draw_indicator">True</property> |
| | 8494 | </widget> |
| | 8495 | <packing> |
| | 8496 | <property name="padding">0</property> |
| | 8497 | <property name="expand">False</property> |
| | 8498 | <property name="fill">False</property> |
| | 8499 | </packing> |
| | 8500 | </child> |
| | 8501 | |
| | 8502 | <child> |
| 8484 | 8503 | <widget class="GtkVBox" id="vbox87"> |
| 8485 | 8504 | <property name="visible">True</property> |
| 8486 | 8505 | <property name="homogeneous">False</property> |
| … |
… |
|
| 8631 | 8650 | </widget> |
| 8632 | 8651 | <packing> |
| 8633 | 8652 | <property name="padding">0</property> |
| 8634 | | <property name="expand">False</property> |
| | 8653 | <property name="expand">True</property> |
| 8635 | 8654 | <property name="fill">True</property> |
| 8636 | 8655 | </packing> |
| 8637 | 8656 | </child> |
diff -Naur --exclude='*.pyc' -x '*.bak' /home/fito/bin/nicotine+-1.2.7.1/pynicotine/gtkgui/settings_glade.py nicotine+-1.2.7.1/pynicotine/gtkgui/settings_glade.py
|
old
|
new
|
|
| 3398 | 3398 | self.vbox87 = gtk.VBox(False, 0) |
| 3399 | 3399 | self.vbox87.show() |
| 3400 | 3400 | self.vbox87.set_spacing(0) |
| | 3401 | |
| | 3402 | self.ShowNotification = gtk.CheckButton() |
| | 3403 | self.ShowNotification.set_active(False) |
| | 3404 | self.ShowNotification.set_label(_("Show notification after download")) |
| | 3405 | self.ShowNotification.show() |
| | 3406 | self.vbox87.pack_start(self.ShowNotification, False, False, 0) |
| 3401 | 3407 | |
| 3402 | 3408 | self.label214 = gtk.Label(_("Run command after download finishes ($ for filename):")) |
| 3403 | 3409 | self.label214.set_alignment(0, 0.5) |
diff -Naur --exclude='*.pyc' -x '*.bak' /home/fito/bin/nicotine+-1.2.7.1/pynicotine/gtkgui/settingswindow.py nicotine+-1.2.7.1/pynicotine/gtkgui/settingswindow.py
|
old
|
new
|
|
| 1033 | 1033 | |
| 1034 | 1034 | def SetSettings(self, config): |
| 1035 | 1035 | transfers = config["transfers"] |
| | 1036 | if transfers["shownotification"] is not None: |
| | 1037 | self.ShowNotification.set_active(transfers["shownotification"]) |
| 1036 | 1038 | if transfers["afterfinish"] is not None: |
| 1037 | 1039 | self.AfterDownload.set_text(transfers["afterfinish"]) |
| 1038 | 1040 | if transfers["afterfolder"] is not None: |
| … |
… |
|
| 1040 | 1042 | if config["players"]["default"] is not None: |
| 1041 | 1043 | self.audioPlayerCombo.child.set_text(config["players"]["default"]) |
| 1042 | 1044 | self.audioPlayerCombo.append_text( config["players"]["default"] ) |
| | 1045 | |
| 1043 | 1046 | def GetSettings(self): |
| 1044 | 1047 | return { |
| 1045 | 1048 | "transfers": { |
| | 1049 | "shownotification" : self.ShowNotification.get_active(), |
| 1046 | 1050 | "afterfinish": self.AfterDownload.get_text(), |
| 1047 | 1051 | "afterfolder": self.AfterFolder.get_text(), |
| 1048 | 1052 | |
diff -Naur --exclude='*.pyc' -x '*.bak' /home/fito/bin/nicotine+-1.2.7.1/pynicotine/transfers.py nicotine+-1.2.7.1/pynicotine/transfers.py
|
old
|
new
|
|
| 22 | 22 | from utils import _ |
| 23 | 23 | from gtkgui.utils import recode2 |
| 24 | 24 | |
| | 25 | |
| 25 | 26 | class Transfer: |
| 26 | 27 | """ This class holds information about a single transfer. """ |
| 27 | 28 | def __init__(self, conn = None, user = None, filename = None, path = None, status = None, req=None, size = None, file = None, starttime = None, offset = None, currentbytes = None, speed = None,timeelapsed = None, timeleft = None, timequeued = None, transfertimer = None, requestconn = None, modifier = None, place = 0): |
| … |
… |
|
| 105 | 106 | self.geoip = _GeoIP.new(_GeoIP.GEOIP_STANDARD) |
| 106 | 107 | except: |
| 107 | 108 | self.geoip = None |
| | 109 | |
| | 110 | |
| | 111 | try: |
| | 112 | import pynotify |
| | 113 | pynotify.init("Nicotine+") |
| | 114 | self.pynotify = pynotify |
| | 115 | except ImportError: |
| | 116 | self.pynotify = None |
| | 117 | |
| 108 | 118 | |
| 109 | 119 | def setTransferPanels(self, downloads, uploads): |
| 110 | 120 | self.downloadspanel = downloads |
| … |
… |
|
| 762 | 772 | self.eventprocessor.sendNumSharedFoldersFiles() |
| 763 | 773 | self.SaveDownloads() |
| 764 | 774 | self.downloadspanel.update(i) |
| | 775 | if self.eventprocessor.config.sections["transfers"]["shownotification"] and self.pynotify != None: |
| | 776 | n = self.pynotify.Notification("Nicotine+", _("%s downloaded" % newname)) |
| | 777 | n.set_icon_from_pixbuf(self.eventprocessor.frame.images["n"]) |
| | 778 | try: n.attach_to_widget(self.eventprocessor.frame.trayicon) |
| | 779 | except: pass |
| | 780 | n.show() |
| | 781 | |
| 765 | 782 | if self.eventprocessor.config.sections["transfers"]["afterfinish"]: |
| 766 | 783 | command = self.eventprocessor.config.sections["transfers"]["afterfinish"].replace("$", utils.escapeCommand(newname)) |
| 767 | 784 | os.system(command) |