diff options
| author | Tomas Bzatek <tbzatek@tbzatek.englab.brq.redhat.com> | 2008-08-22 10:41:31 +0200 |
|---|---|---|
| committer | Tomas Bzatek <tbzatek@tbzatek.englab.brq.redhat.com> | 2008-08-22 10:41:31 +0200 |
| commit | b5af37db7650be18ac54c8ca7fe3cf476a2315ee (patch) | |
| tree | 55720d7b523352dac330e849a54683ba89dcfbf7 | |
| parent | 16550e8c907165d1305fc4b58f2b05554ea671a0 (diff) | |
| parent | f8012d552a33d5615e5711c82bf22bc3bcdc3d23 (diff) | |
| download | tuxcmd-b5af37db7650be18ac54c8ca7fe3cf476a2315ee.tar.xz | |
Merge branch 'master' of ssh://tomas@git.bzatek.net/projects/git/tuxcmd
| -rw-r--r-- | Makefile | 4 | ||||
| -rw-r--r-- | UConfig.pas | 4 | ||||
| -rw-r--r-- | UFileAssoc.pas | 12 | ||||
| -rw-r--r-- | libgtk_kylix/GTKStdCtrls.pas | 16 |
4 files changed, 18 insertions, 18 deletions
@@ -38,7 +38,9 @@ LIB_SUFFIX=`if test \`uname -m\` = x86_64; then echo 64; fi` # -Ct must be disabled here, causes unneeded crashes # -CR and -Cr must be disabled here, causes range check errors with gnome-power-manager # -Cg generates internal compiler errors on i386 -CFLAGS= -vweh -Un -Ci -Co +# -XX prevents linking errors of unresolved and unused symbols +# "-k-z noexecstack" (with quotes as a single parameter) avoids marking stack as executable, allowing to work correctly with SELinux in Enforcing mode +CFLAGS= -vweh -Un -Ci -Co -XX "-k-z noexecstack" diff --git a/UConfig.pas b/UConfig.pas index 98c1938..f66c732 100644 --- a/UConfig.pas +++ b/UConfig.pas @@ -25,8 +25,8 @@ uses Classes, ULocale; resourcestring ConstAppTitle = 'Tux Commander'; - ConstAboutVersion = '0.6.45-dev'; - ConstAboutBuildDate = '2008-06-18'; + ConstAboutVersion = '0.6.46-dev'; + ConstAboutBuildDate = '2008-08-21'; {$IFDEF FPC} {$INCLUDE fpcver.inc} diff --git a/UFileAssoc.pas b/UFileAssoc.pas index 10d0f73..923ecac 100644 --- a/UFileAssoc.pas +++ b/UFileAssoc.pas @@ -21,7 +21,7 @@ unit UFileAssoc; interface -uses Classes, SysUtils, GTKPixbuf, GTKClasses, GTKUtils, UEngines, UVFSCore, UCoreUtils; +uses Classes, SysUtils, StrUtils, GTKPixbuf, GTKClasses, GTKUtils, UEngines, UVFSCore, UCoreUtils; type TAssocAction = class ActionName, ActionCommand: string; @@ -164,9 +164,8 @@ end; function FindVFSPlugin(Filename: string): TVFSPlugin; var Ext, s: string; b: boolean; - i, j, Last, MaxFound: integer; + i, j, MaxFound: integer; begin - b := False; Result := nil; MaxFound := 0; if (Pos('.', Filename) > 1) and (LastDelimiter('.', Filename) < Length(Filename)) then begin @@ -181,7 +180,7 @@ begin s := ANSIUpperCase(IncludeLeadingDot(Extensions[j])); if Length(Ext) = Length(s) then b := (Ext = s) and (Length(s) > MaxFound) - else b := (Pos(s, Ext) > 0) and (Pos(s, Ext) = (Length(Ext) - Length(s) + 1)) and (Length(s) > MaxFound); + else b := (Pos(s, Ext) > 0) and (RightStr(Ext, Length(s)) = s) and (Length(s) > MaxFound); if b then Break; end; if b then begin @@ -195,9 +194,8 @@ end; function FindAssoc(Filename: string): TFileAssoc; var Ext, s: string; b: boolean; - i, j, Last, MaxFound: integer; + i, j, MaxFound: integer; begin - b := False; Result := nil; MaxFound := 0; if (Pos('.', Filename) > 1) and (LastDelimiter('.', Filename) < Length(Filename)) then begin @@ -212,7 +210,7 @@ begin s := ANSIUpperCase(IncludeLeadingDot(Extensions[j])); if Length(Ext) = Length(s) then b := (Ext = s) and (Length(s) > MaxFound) - else b := (Pos(s, Ext) > 0) and (Pos(s, Ext) = (Length(Ext) - Length(s) + 1)) and (Length(s) > MaxFound); + else b := (Pos(s, Ext) > 0) and (RightStr(Ext, Length(s)) = s) and (Length(s) > MaxFound); if b then Break; end; if b then begin diff --git a/libgtk_kylix/GTKStdCtrls.pas b/libgtk_kylix/GTKStdCtrls.pas index 1d4157a..1cccdf8 100644 --- a/libgtk_kylix/GTKStdCtrls.pas +++ b/libgtk_kylix/GTKStdCtrls.pas @@ -420,12 +420,13 @@ begin gtk_misc_set_padding(PGtkMisc(FWidget), XPadding, YPadding); end; +procedure x_gtk_misc_get_padding(misc:PGtkMisc; xpad:Pgint; ypad:Pgint); cdecl; external gtklib name 'gtk_misc_get_padding'; + function TGTKMisc.GetXPadding: integer; -var xpad, ypad: pgint; +var xpad, ypad: gint; begin - gtk_misc_get_padding(PGtkMisc(FWidget), xpad, ypad); - if Assigned(xpad) then Result := Integer(xpad) - else Result := 0; + x_gtk_misc_get_padding(PGtkMisc(FWidget), @xpad, @ypad); + Result := xpad; end; procedure TGTKMisc.SetXPadding(Value: integer); @@ -434,11 +435,10 @@ begin end; function TGTKMisc.GetYPadding: integer; -var xpad, ypad: pgint; +var xpad, ypad: gint; begin - gtk_misc_get_padding(PGtkMisc(FWidget), xpad, ypad); - if Assigned(ypad) then Result := Integer(ypad) - else Result := 0; + x_gtk_misc_get_padding(PGtkMisc(FWidget), @xpad, @ypad); + Result := ypad; end; procedure TGTKMisc.SetYPadding(Value: integer); |
