summaryrefslogtreecommitdiff
path: root/UCoreUtils.pas
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@users.sourceforge.net>2009-10-24 20:49:55 +0200
committerTomas Bzatek <tbzatek@users.sourceforge.net>2009-10-24 20:49:55 +0200
commitbed9af405db67aff779cece9b72029b7b22b0c1e (patch)
tree4abc7c8132946ef54842a17064a584e11c0b6c83 /UCoreUtils.pas
parent5d416e8e2f2d56552d3b70855522353888269d65 (diff)
downloadtuxcmd-bed9af405db67aff779cece9b72029b7b22b0c1e.tar.xz
Icon and desktop file
Finally, an icon! Viewer uses different one though (from icon theme). We install desktop file and icons by default now. Artwork courtesy of Spajr Gvorcek
Diffstat (limited to 'UCoreUtils.pas')
-rw-r--r--UCoreUtils.pas19
1 files changed, 17 insertions, 2 deletions
diff --git a/UCoreUtils.pas b/UCoreUtils.pas
index f3617f6..02cb4e5 100644
--- a/UCoreUtils.pas
+++ b/UCoreUtils.pas
@@ -74,6 +74,7 @@ procedure DeleteFromArray(Index: integer; var SubStrings: TOpenStringArray);
function ProcessPattern(Engine: TPanelEngine; Pattern, APath, FileName: string; const Directory: boolean): string;
// Processess pattern with FileName located in APath and return destination path+filename
procedure ShowAbout;
+procedure SetupAppIcon;
procedure TrimCRLFESC(var s: string);
procedure TrimQuotes(var s: string);
@@ -141,7 +142,7 @@ var ChildExitStatus: sig_atomic_t;
implementation
-uses DateUtils, GTKForms, GTKUtils, GTKView, ULocale, UConfig, UCore, UGnome, UMain;
+uses DateUtils, GTKForms, GTKUtils, GTKView, ULocale, UConfig, UCore, UGnome, UMain, UFileAssoc;
(********************************************************************************************************************************)
function GetErrorString(ErrorNo: integer): string;
@@ -844,12 +845,26 @@ begin
else begin
AboutBox := gnome_about_new('Tux Commander', nil, 'Copyright © 2009 Tomáš Bžatek',
PChar(Format(LANGAboutStringGnome, [ConstAboutVersion, ConstAboutBuildDate])),
- @Authors, nil, Translations, nil);
+ @Authors, nil, Translations, AppIcon128.FPixbuf);
gtk_window_set_transient_for(GTK_WINDOW(AboutBox), GTK_WINDOW(FMain.FWidget));
gtk_dialog_run(GTK_DIALOG(AboutBox));
end;
end;
+procedure SetupAppIcon;
+var List: PGList;
+begin
+ List := nil;
+ List := g_list_append(List, AppIcon16.FPixbuf);
+ List := g_list_append(List, AppIcon24.FPixbuf);
+ List := g_list_append(List, AppIcon32.FPixbuf);
+ 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(List);
+ g_list_free(List);
+end;
+
(********************************************************************************************************************************)
procedure TrimCRLFESC(var s: string);
begin