diff options
| -rw-r--r-- | UConfig.pas | 11 | ||||
| -rw-r--r-- | UCoreUtils.pas | 4 | ||||
| -rw-r--r-- | UGTKLoader.pas | 62 | ||||
| -rw-r--r-- | tuxcmd.dpr | 1 |
4 files changed, 12 insertions, 66 deletions
diff --git a/UConfig.pas b/UConfig.pas index 40af4ed..980c387 100644 --- a/UConfig.pas +++ b/UConfig.pas @@ -25,8 +25,8 @@ uses Classes, ULocale; resourcestring ConstAppTitle = 'Tux Commander'; - ConstAboutVersion = '0.6.55-dev'; - ConstAboutBuildDate = '2008-11-09'; + ConstAboutVersion = '0.6.56-dev'; + ConstAboutBuildDate = '2008-11-11'; {$IFDEF FPC} {$INCLUDE fpcver.inc} @@ -68,12 +68,17 @@ const ConfDefaultNormalItemFGColor = '#000000'; ConfTerminalApps: array[1..4] of string = (ConstTerminalCommand_xterm, ConstTerminalCommand_rxvt, ConstTerminalCommand_rxvt2, ConstTerminalCommand_gnometerminal); ConfTerminalAppsWParam: array[1..4] of string = ('xterm', 'rxvt', 'rxvt', 'gnome-terminal'); + const SMOOTH_SCROLL_STEPS = 5; SMOOTH_SCROLL_DURATION = 45; SMOOTH_SCROLL_STEPS_PAGE = 10; SMOOTH_SCROLL_DURATION_PAGE = 120; - +const tuxcmd_rc_file = 'style "treeview-style" {'#10 + + ' GtkTreeView::horizontal_separator = 0'#10 + + ' GtkTreeView::vertical_separator = 0'#10 + + '}'#10 + + 'class "GtkTreeView" style "treeview-style"'; var ConfPanelSep, ConfRowHeight, ConfRowHeightReal, ConfNumHistoryItems, diff --git a/UCoreUtils.pas b/UCoreUtils.pas index 240bea6..ed326a5 100644 --- a/UCoreUtils.pas +++ b/UCoreUtils.pas @@ -1764,6 +1764,10 @@ end; initialization InternalLockInit(True); SetupSignals; + + // Parse tuxcmd rc file + gtk_rc_parse_string(tuxcmd_rc_file); + AppPath := IncludeTrailingPathDelimiter(GetHomePath); IconPath := IncludeTrailingPathDelimiter(GetHomePath); end. diff --git a/UGTKLoader.pas b/UGTKLoader.pas deleted file mode 100644 index b135f6b..0000000 --- a/UGTKLoader.pas +++ /dev/null @@ -1,62 +0,0 @@ -(* - UGTKLoader - Special unit, which has to be loaded before gtk_init in GTKForms - Copyright (C) 2004 Tomas Bzatek <tbzatek@users.sourceforge.net>
- Check for updates on tuxcmd.sourceforge.net
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*) - -unit UGTKLoader; - -interface - -implementation - -uses glib2, gtk2, Classes, SysUtils; - -const ConfDefaultSettingsDir = '.tuxcmd'; - - -procedure WriteGTKRCTreeViewFix; -var s, s2: string; - StringList: TStringList; -begin - s := IncludeTrailingPathDelimiter(g_get_home_dir) + ConfDefaultSettingsDir; - s2 := IncludeTrailingPathDelimiter(s) + 'gtkrc'; - if not FileExists(s2) then begin - StringList := TStringList.Create; - StringList.Add('style "treeview-style" {'); - StringList.Add(' GtkTreeView::horizontal_separator = 0');
- StringList.Add(' GtkTreeView::vertical_separator = 0');
- StringList.Add('}');
- StringList.Add('class "GtkTreeView" style "treeview-style"');
- try
- if not DirectoryExists(s) then
- if not ForceDirectories(s) then begin - WriteLn('*** Error: Cannot make homedir'); - Exit; - end; - StringList.SaveToFile(s2);
- StringList.Free;
- except
- on E: Exception do WriteLn('*** Error: Cannot save .gtkrc in your home (', E.ClassName, '): ', E.Message);
- end; - end; - if gtk_check_version(2, 4, 0) = nil then gtk_rc_add_default_file(PChar(s2)); -end;
- -initialization - WriteGTKRCTreeViewFix; -end. @@ -28,7 +28,6 @@ uses cthreads, cwstring, {$ENDIF} - UGTKLoader in 'UGTKLoader.pas', GTKForms, UConfig in 'UConfig.pas', UGnome in 'UGnome.pas', |
