diff options
author | Leandro Pereira <leandro@hardinfo.org> | 2018-03-12 09:14:01 -0700 |
---|---|---|
committer | Leandro Pereira <leandro@hardinfo.org> | 2018-03-12 09:15:42 -0700 |
commit | 1906d3027dc3ad8b9b5533712299d48e265c852c (patch) | |
tree | 00b432b3861a0407bc2117b9023084c3e0e49726 | |
parent | 217eb89c8f4de0e00e8b27dc8349d8295d6e68a4 (diff) |
Do not use hardcoded path for icon
Use just the symbolic name "hardinfo", allowing for icon packs to
provide alternative icons.
Fixes #227
-rw-r--r-- | CMakeLists.txt | 4 | ||||
-rw-r--r-- | hardinfo.desktop.cmake | 2 | ||||
-rw-r--r-- | modules/benchmark/guibench.c | 2 | ||||
-rw-r--r-- | pixmaps/hardinfo.png (renamed from pixmaps/logo.png) | bin | 1904 -> 1904 bytes | |||
-rw-r--r-- | shell/callbacks.c | 2 | ||||
-rw-r--r-- | shell/shell.c | 2 |
6 files changed, 8 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index ab62cad6..8038aead 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 +) diff --git a/hardinfo.desktop.cmake b/hardinfo.desktop.cmake index 53dbee55..55ccae26 100644 --- a/hardinfo.desktop.cmake +++ b/hardinfo.desktop.cmake @@ -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 diff --git a/modules/benchmark/guibench.c b/modules/benchmark/guibench.c index b9573278..7d159d7e 100644 --- a/modules/benchmark/guibench.c +++ b/modules/benchmark/guibench.c @@ -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"); diff --git a/pixmaps/logo.png b/pixmaps/hardinfo.png Binary files differindex 9d0484a5..9d0484a5 100644 --- a/pixmaps/logo.png +++ b/pixmaps/hardinfo.png diff --git a/shell/callbacks.c b/shell/callbacks.c index 9bb5c990..e7183185 100644 --- a/shell/callbacks.c +++ b/shell/callbacks.c @@ -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 " diff --git a/shell/shell.c b/shell/shell.c index 8688f9ac..10c74d13 100644 --- a/shell/shell.c +++ b/shell/shell.c @@ -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); |