Commits (25)
......@@ -530,6 +530,10 @@ Private Function GetRealValue(hProp As CPropertyInfo, vVal As Variant) As Varian
Else
vRealVal = Picture.Load(File.Dir(Project.Path) &/ vRealVal)
Endif
Case "Image"
vRealVal = Image.Load(File.Dir(Project.Path) &/ vRealVal)
Case "Animation"
......
......@@ -285,10 +285,12 @@ End
Public Sub btnPrint_Click()
Printer1.OutputFile = "~/print.pdf"
$bPrint = False
If Printer1.Configure() Then Return
webHelp.Current.Print(Printer1)
' Printer1.OutputFile = "~/print.pdf"
' $bPrint = False
' If Printer1.Configure() Then Return
' webHelp.Current.Print(Printer1)
webHelp.ExecJavascript("window.print();")
End
......
......@@ -73,11 +73,12 @@
#Translate = False
ToolTip = "Gambas web site"
AutoResize = True
Text = "http://gambas.sourceforge.net"
Text = "Gambas web site"
Picture = Picture["icon:/small/gambas"]
}
{ btnPrint ToolButton
MoveScaled(84,0,8,4)
Visible = False
AutoResize = True
Text = ("Print")
Picture = Picture["icon:/small/print"]
......
......@@ -9,7 +9,7 @@ Static Public Sub _init()
Dim hFic As File
Dim sLig As String
hFic = Open "tips/tips.en"
hFic = Open "tips/tips.en.txt"
While Not Eof(hFic)
Line Input #hFic, sLig
......@@ -61,7 +61,7 @@ Private Function GetNextTip(Optional bPrev As Boolean) As String
iPos = RInStr(sLang, ".")
If iPos Then sLang = Left(sLang, iPos - 1)
sFile = "tips/tips." & sLang
sFile = "tips/tips." & sLang & ".txt"
If Not Exist(sFile) Then
iPos = InStr(sLang, "_")
If iPos Then
......@@ -70,13 +70,13 @@ Private Function GetNextTip(Optional bPrev As Boolean) As String
Endif
Endif
If Not Exist(sFile) Then
sFile = "tips/tips.en"
sFile = "tips/tips.en.txt"
Endif
sTip = File.Load(sFile)
iPos = InStr(sTip, "[" & $aOrder[$iTip - 1] & "]")
If iPos = 0 Then
sTip = File.Load("tips/tips.en")
sTip = File.Load("tips/tips.en.txt")
Endif
iPos = InStr(sTip, "[" & $aOrder[$iTip - 1] & "]")
If iPos = 0 Then Return
......
......@@ -561,8 +561,8 @@ where <tt>&lt;MyApplication&gt;</tt> is the name of your project.
<h3>Two Types Of Comments</h3>
<pre>' Normal comment</pre>
<b><pre>'' Bold comment</pre></b>
<tt>' Normal comment</tt><br>
<b><tt>'' Bold comment</tt></b>
<p>Bold comments are used for documenting your code.</p>
......
......@@ -571,8 +571,8 @@ où <tt>&lt;MonApplication&gt;</tt> est le nom de votre projet.
<h3>Deux types de commentaires</h3>
<pre>' Commentaire normal</pre>
<b><pre>'' Commentaire en gras</pre></b>
<tt>' Commentaire normal</tt><br>
<b><tt>'' Commentaire en gras</tt></b>
<p>Les commentaires en gras sont utilisés pour documenter votre code.
......@@ -586,7 +586,7 @@ locale de type <b>String</b> est insérée automatiquement, et vous pouvez saisi
de la variable immédiatement.
<p>Les fragments code sont intégralement configurables depuis la boîte de dialogue des
options globales de l'environnement de développement.
options globales de l'environnement de développement.</p>
[END]
......
......@@ -32,7 +32,7 @@ Private $hMenu As DBusStatusIconMenu
Private $hIcon As Picture
Private $sMenu As String
Private $sText As String
Private $bIconDirty As Boolean
Private $iIconId As Integer
Private $vTag As Variant
Public Sub _new()
......@@ -177,17 +177,24 @@ End
Private Sub Picture_Write(Value As Picture)
If $hIcon = Value Then Return
$hIcon = Value
If $bAppIndicator Then
$bIconDirty = True
Try Kill _GetIconThemePath() &/ GetIconFile()
Inc $iIconId
If $bVisible Then
Hide
Show
Endif
Endif
If $bVisible Or If $bAppIndicator Then DBus[GetServiceName()].Raise($hObject, "org.kde.StatusNotifierItem.NewIcon")
If $bVisible Or If $bAppIndicator Then
DBus[GetServiceName()].Raise($hObject, "org.kde.StatusNotifierItem.NewIcon")
'DBus[GetServiceName()].Raise($hObject, "org.freedesktop.DBus.Properties.PropertiesChanged", ["org.kde.StatusNotifierItem", Object.New("Collection"), ["IconPixmap"]])
Endif
End
......@@ -254,6 +261,13 @@ Private Sub Text_Write(Value As String)
End
Private Sub GetIconFile() As String
Return "icon-" & CStr($iId) & ":" & CStr($iIconId) & ".png"
End
Public Sub _GetIconName() As String
Dim hPict As Picture
......@@ -263,13 +277,12 @@ Public Sub _GetIconName() As String
If $bAppIndicator Then
sPath = _GetIconThemePath()
sName = "icon-" & CStr($iId) & ".png"
sName = GetIconFile()
If Not Exist(sPath &/ sName) Or If $bIconDirty Then
If Not Exist(sPath &/ sName) Then
hPict = $hIcon
If Not hPict Then hPict = Picture["default.png"]
hPict.Save(sPath &/ sName)
$bIconDirty = False
Endif
Return File.BaseName(sName)
......