summaryrefslogtreecommitdiff
path: root/UCoreUtils.pas
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@redhat.com>2024-12-24 12:41:48 +0100
committerTomas Bzatek <tbzatek@redhat.com>2025-11-27 19:39:51 +0100
commit1b2b4bb4f3ecc034a6e9364d8768e50b167a9680 (patch)
tree065ddde53b64f7957a30b7dc9d83a748f309868c /UCoreUtils.pas
parentb9703b29819b619037cc282d719c187e51bacd30 (diff)
downloadtuxcmd-1b2b4bb4f3ecc034a6e9364d8768e50b167a9680.tar.xz
Rough GTK3 port
Diffstat (limited to 'UCoreUtils.pas')
-rw-r--r--UCoreUtils.pas35
1 files changed, 20 insertions, 15 deletions
diff --git a/UCoreUtils.pas b/UCoreUtils.pas
index c204d4e..1e531a3 100644
--- a/UCoreUtils.pas
+++ b/UCoreUtils.pas
@@ -21,7 +21,7 @@ unit UCoreUtils;
interface
-uses gtk2, gdk2, glib2, lazglib2, SysUtils, Classes, ULibc, GTKClasses, UEngines;
+uses SysUtils, Classes, lazglib2, lazgdk3, lazgtk3, GTKClasses, UEngines, ULibc;
type
PIntArray = ^TIntArray;
@@ -819,17 +819,19 @@ const Authors : array[0..1] of PChar = ('Tomáš Bžatek <tbzatek@users.sourcefo
'Jozef Štaffen <jozef.staffen@gmail.com> - Slovak'#10 +
'Américo Monteiro <a_monteiro@netcabo.pt> - Portuguese'#10 +
'Sewon Jang <jangblue@gmail.com> - Korean';
-var AboutBox: PGtkWidget;
+var about_dialog: PGtkWidget;
begin
- if (libGnomeUI2Handle = nil) or (gnome_about_new = nil)
- then Application.MessageBox(Format(LANGAboutString, [ConstAboutVersion, ConstAboutBuildDate]))
- else begin
- AboutBox := gnome_about_new('Tux Commander', nil, 'Copyright © 2002-2024 Tomáš Bžatek',
- PChar(Format(LANGAboutStringGnome, [ConstAboutVersion, ConstAboutBuildDate])),
- @Authors, nil, Translations, AppIcon128.FPixbuf);
- gtk_window_set_transient_for(GTK_WINDOW(AboutBox), GTK_WINDOW(FMain.FWidget));
- gtk_dialog_run(GTK_DIALOG(AboutBox));
- end;
+ about_dialog := gtk_about_dialog_new();
+ gtk_about_dialog_set_program_name(PGtkAboutDialog(about_dialog), PChar('Tux Commander'));
+ gtk_about_dialog_set_version(PGtkAboutDialog(about_dialog), PChar(Format(LANGAboutStringGnome, [ConstAboutVersion, ConstAboutBuildDate])));
+ gtk_about_dialog_set_copyright(PGtkAboutDialog(about_dialog), PChar('Copyright © 2002-2024 Tomáš Bžatek'));
+ gtk_about_dialog_set_website(PGtkAboutDialog(about_dialog), PChar('https://tuxcmd.sourceforge.net/'));
+ gtk_about_dialog_set_authors(PGtkAboutDialog(about_dialog), @Authors);
+ gtk_about_dialog_set_translator_credits(PGtkAboutDialog(about_dialog), Translations);
+ // TODO
+// gtk_about_dialog_set_logo(PGtkAboutDialog(about_dialog), AppIcon128.FPixbuf);
+ gtk_window_set_transient_for(PGtkWindow(about_dialog), PGtkWindow(FMain.FWidget));
+ gtk_dialog_run(PGtkDialog(about_dialog));
end;
procedure SetupAppIcon;
@@ -842,7 +844,7 @@ begin
List := g_list_append(List, AppIcon48.FPixbuf);
List := g_list_append(List, AppIcon64.FPixbuf);
List := g_list_append(List, AppIcon128.FPixbuf);
- gtk_window_set_default_icon_list(GLIB2.PGList(List));
+ gtk_window_set_default_icon_list(List);
g_list_free(List);
end;
@@ -1721,6 +1723,8 @@ procedure SetupColors;
var Color: TGDKColor;
LocalListView: TGTKListView;
begin
+ // TODO
+{
LocalListView := TGTKListView.Create(Application);
try
if ConfNormalItemDefaultColors then begin
@@ -1763,7 +1767,7 @@ begin
except InactiveItemBGColorNum := $D0D0D0FF; end;
finally
LocalListView.Free;
- end;
+ end;}
end;
(********************************************************************************************************************************)
@@ -1865,8 +1869,9 @@ initialization
SetupSignals;
// Parse tuxcmd rc file
- gtk_rc_parse_string(tuxcmd_rc_file);
-
+ // TODO
+// gtk_rc_parse_string(tuxcmd_rc_file);
+
AppPath := IncludeTrailingPathDelimiter(GetHomePath);
IconPath := IncludeTrailingPathDelimiter(GetHomePath);
end.