Changes for issue #125
This commit is contained in:
+44
-3
@@ -1225,6 +1225,11 @@ Public Class frmMain
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Sub UpdateLog(sLogUpdate As String, Optional bTrayUpdate As Boolean = True, Optional objIcon As System.Windows.Forms.ToolTipIcon = ToolTipIcon.Info, Optional bTimeStamp As Boolean = True) Handles oBackup.UpdateLog, oRestore.UpdateLog
|
Public Sub UpdateLog(sLogUpdate As String, Optional bTrayUpdate As Boolean = True, Optional objIcon As System.Windows.Forms.ToolTipIcon = ToolTipIcon.Info, Optional bTimeStamp As Boolean = True) Handles oBackup.UpdateLog, oRestore.UpdateLog
|
||||||
|
Dim prsNotify As Process
|
||||||
|
Dim sUrgency As String
|
||||||
|
Dim sIconLocation As String
|
||||||
|
Dim sNotifyArgs As String
|
||||||
|
|
||||||
'Thread Safe (If one control requires an invoke assume they all do)
|
'Thread Safe (If one control requires an invoke assume they all do)
|
||||||
If txtLog.InvokeRequired = True Then
|
If txtLog.InvokeRequired = True Then
|
||||||
Dim d As New UpdateLogCallBack(AddressOf UpdateLog)
|
Dim d As New UpdateLogCallBack(AddressOf UpdateLog)
|
||||||
@@ -1260,9 +1265,45 @@ Public Class frmMain
|
|||||||
|
|
||||||
txtLog.Select(txtLog.TextLength, 0)
|
txtLog.Select(txtLog.TextLength, 0)
|
||||||
txtLog.ScrollToCaret()
|
txtLog.ScrollToCaret()
|
||||||
gMonTray.BalloonTipText = sLogUpdate
|
|
||||||
gMonTray.BalloonTipIcon = objIcon
|
If bTrayUpdate Then
|
||||||
If bTrayUpdate Then gMonTray.ShowBalloonTip(10000)
|
If mgrCommon.IsUnix Then
|
||||||
|
'Build args for notify-send
|
||||||
|
Select Case objIcon
|
||||||
|
Case ToolTipIcon.Error
|
||||||
|
sUrgency = "critical"
|
||||||
|
Case ToolTipIcon.Warning
|
||||||
|
sUrgency = "normal"
|
||||||
|
Case ToolTipIcon.Info
|
||||||
|
sUrgency = "low"
|
||||||
|
Case Else
|
||||||
|
sUrgency = "low"
|
||||||
|
End Select
|
||||||
|
|
||||||
|
sIconLocation = "/usr/share/icons/hicolor/256x256/apps/gbm.png"
|
||||||
|
sNotifyArgs = "-i " & sIconLocation & " -u " & sUrgency & " -t 10000 """ & App_NameLong & """ """ & sLogUpdate.Replace("""", "\""") & """"
|
||||||
|
|
||||||
|
Try
|
||||||
|
'Execute notify-send
|
||||||
|
prsNotify = New Process
|
||||||
|
prsNotify.StartInfo.FileName = "/usr/bin/notify-send"
|
||||||
|
prsNotify.StartInfo.Arguments = sNotifyArgs
|
||||||
|
prsNotify.StartInfo.UseShellExecute = False
|
||||||
|
prsNotify.StartInfo.RedirectStandardOutput = True
|
||||||
|
prsNotify.StartInfo.CreateNoWindow = True
|
||||||
|
prsNotify.Start()
|
||||||
|
Catch ex As Exception
|
||||||
|
'Show default notification style
|
||||||
|
gMonTray.BalloonTipText = sLogUpdate
|
||||||
|
gMonTray.BalloonTipIcon = objIcon
|
||||||
|
gMonTray.ShowBalloonTip(10000)
|
||||||
|
End Try
|
||||||
|
Else
|
||||||
|
gMonTray.BalloonTipText = sLogUpdate
|
||||||
|
gMonTray.BalloonTipIcon = objIcon
|
||||||
|
gMonTray.ShowBalloonTip(10000)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
Application.DoEvents()
|
Application.DoEvents()
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ Package: gbm
|
|||||||
Architecture: all
|
Architecture: all
|
||||||
Maintainer: Sebastian Riedel <git@basxto.de>
|
Maintainer: Sebastian Riedel <git@basxto.de>
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Version: 1.0.5
|
Version: 1.0.8
|
||||||
Homepage: https://mikemaximus.github.io/gbm-web/
|
Homepage: https://mikemaximus.github.io/gbm-web/
|
||||||
Bugs: https://github.com/MikeMaximus/gbm/issues
|
Bugs: https://github.com/MikeMaximus/gbm/issues
|
||||||
Depends: mono-vbnc, libsqlite3-0, p7zip-full
|
Depends: mono-vbnc, libsqlite3-0, p7zip-full, libnotify-bin
|
||||||
Description: Automatically backup your saved games!
|
Description: Automatically backup your saved games!
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
#check for all dependencies
|
#check for all dependencies
|
||||||
for prog in mono readlink df 7za;do
|
for prog in mono readlink df 7za notify-send;do
|
||||||
[ -n "`whereis -b ${prog} | cut -sd' ' -f2`" ] || (echo "Please install ${prog}" && exit 1);
|
[ -n "`whereis -b ${prog} | cut -sd' ' -f2`" ] || (echo "Please install ${prog}" && exit 1);
|
||||||
done
|
done
|
||||||
for lib in libsqlite3;do
|
for lib in libsqlite3;do
|
||||||
|
|||||||
Reference in New Issue
Block a user