Permalink
Browse files

Do not use hardcoded path for icon

Use just the symbolic name "hardinfo", allowing for icon packs to
provide alternative icons.

Fixes #227
  • Loading branch information...
lpereira committed Mar 12, 2018
1 parent 217eb89 commit 1906d3027dc3ad8b9b5533712299d48e265c852c
@@ -299,3 +299,7 @@ install(FILES ${HARDINFO_MANPAGES}
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/man/man1
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
)
install(FILES pixmaps/hardinfo.png
DESTINATION share/icons/hicolor/48x48/apps
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
)
@@ -7,7 +7,7 @@ Name[ru]=Информация о системе и тестирование
Comment=Displays system information
Comment[ru]=Показывает информацию о системе
Exec=@CMAKE_INSTALL_FULL_BINDIR@/hardinfo
Icon=@CMAKE_INSTALL_FULL_DATAROOTDIR@/hardinfo/pixmaps/logo.png
Icon=hardinfo
Terminal=false
Type=Application
StartupNotify=true
@@ -108,7 +108,7 @@ static double test_icons(GtkWindow *window)
gc = gdk_gc_new(GDK_DRAWABLE(gdk_window));
timer = g_timer_new();
pixbufs[0] = icon_cache_get_pixbuf("logo.png");
pixbufs[0] = icon_cache_get_pixbuf("hardinfo.png");
pixbufs[1] = icon_cache_get_pixbuf("syncmanager.png");
pixbufs[2] = icon_cache_get_pixbuf("report-large.png");
File renamed without changes.
@@ -199,7 +199,7 @@ void cb_about()
gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(about),
_("System information and benchmark tool"));
gtk_about_dialog_set_logo(GTK_ABOUT_DIALOG(about),
icon_cache_get_pixbuf("logo.png"));
icon_cache_get_pixbuf("hardinfo.png"));
gtk_about_dialog_set_license(GTK_ABOUT_DIALOG(about),
_("HardInfo is free software; you can redistribute it and/or modify "
@@ -416,7 +416,7 @@ static void create_window(void)
shell->window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_set_icon(GTK_WINDOW(shell->window),
icon_cache_get_pixbuf("logo.png"));
icon_cache_get_pixbuf("hardinfo.org"));
shell_set_title(shell, NULL);
gtk_window_set_default_size(GTK_WINDOW(shell->window), 800, 600);
g_signal_connect(G_OBJECT(shell->window), "destroy", destroy_me, NULL);

0 comments on commit 1906d30

Please sign in to comment.