summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile4
-rw-r--r--UConfig.pas4
-rw-r--r--UFileAssoc.pas12
-rw-r--r--libgtk_kylix/GTKStdCtrls.pas16
4 files changed, 18 insertions, 18 deletions
diff --git a/Makefile b/Makefile
index cd72bc1..5b5ca89 100644
--- a/Makefile
+++ b/Makefile
@@ -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);