diff --git a/README.md b/README.md index 3e07d59..33abb0a 100644 --- a/README.md +++ b/README.md @@ -72,7 +72,5 @@ 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 Licenses for more details. -This product includes icons from Crystal Project, -copyright 2006-2007 Everaldo Coelho [www.everaldo.com](https://www.everaldo.com). -Crystal Project icons are licensed under [GNU LGPL](https://www.gnu.org/licenses/lgpl-3.0.en.html). - +This product includes icons from Oxygen Icons copyright [KDE](https://kde.org) +and licenced under the [GNU LGPL version 3](https://www.gnu.org/licenses/lgpl-3.0.en.html) or later. diff --git a/data/128/gsmartcontrol.png b/data/128/gsmartcontrol.png index c9bff7a..78d6903 100644 Binary files a/data/128/gsmartcontrol.png and b/data/128/gsmartcontrol.png differ diff --git a/data/16/gsmartcontrol.png b/data/16/gsmartcontrol.png index cac13ee..bae21a8 100644 Binary files a/data/16/gsmartcontrol.png and b/data/16/gsmartcontrol.png differ diff --git a/data/22/gsmartcontrol.png b/data/22/gsmartcontrol.png index c4f505d..09aa1a2 100644 Binary files a/data/22/gsmartcontrol.png and b/data/22/gsmartcontrol.png differ diff --git a/data/24/gsmartcontrol.png b/data/24/gsmartcontrol.png index 8f259a1..09aa1a2 100644 Binary files a/data/24/gsmartcontrol.png and b/data/24/gsmartcontrol.png differ diff --git a/data/256/gsmartcontrol.png b/data/256/gsmartcontrol.png index 0d06b21..52b30ad 100644 Binary files a/data/256/gsmartcontrol.png and b/data/256/gsmartcontrol.png differ diff --git a/data/32/gsmartcontrol.png b/data/32/gsmartcontrol.png index 589f1fd..0ae47f1 100644 Binary files a/data/32/gsmartcontrol.png and b/data/32/gsmartcontrol.png differ diff --git a/data/48/gsmartcontrol.png b/data/48/gsmartcontrol.png index 1ca0a45..429b27a 100644 Binary files a/data/48/gsmartcontrol.png and b/data/48/gsmartcontrol.png differ diff --git a/data/64/gsmartcontrol.png b/data/64/gsmartcontrol.png index 6e24be6..68351d1 100644 Binary files a/data/64/gsmartcontrol.png and b/data/64/gsmartcontrol.png differ diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt index 9cb6469..53a99cf 100644 --- a/data/CMakeLists.txt +++ b/data/CMakeLists.txt @@ -26,12 +26,17 @@ if (WIN32) install(FILES gsmartcontrol.ico DESTINATION .) endif() +set (DATA_ICONS + icons/drive-optical.png + icons/drive-harddisk.png + icons/drive-removable-media-usb.png +) + # Install internal icons if (WIN32) - install(FILES icon_optical.png icon_harddisk.png - DESTINATION .) + install(FILES ${DATA_ICONS} DESTINATION icons) else() - install(FILES icon_optical.png icon_harddisk.png + install(FILES ${DATA_ICONS} DESTINATION "${CMAKE_INSTALL_DATADIR}/gsmartcontrol/icons") endif() diff --git a/data/create_ico.sh b/data/create_ico.sh new file mode 100755 index 0000000..7410537 --- /dev/null +++ b/data/create_ico.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +png_name="gsmartcontrol.png" + +# needs imagemagick +convert 16/$png_name 22/$png_name 24/$png_name 32/$png_name \ +48/$png_name 64/$png_name 128/$png_name 256/$png_name gsmartcontrol.ico diff --git a/data/gsmartcontrol.ico b/data/gsmartcontrol.ico index bba5e80..4088184 100644 Binary files a/data/gsmartcontrol.ico and b/data/gsmartcontrol.ico differ diff --git a/data/icon_optical.png b/data/icon_optical.png deleted file mode 100644 index c11bf8a..0000000 Binary files a/data/icon_optical.png and /dev/null differ diff --git a/data/icon_harddisk.png b/data/icons/drive-harddisk.png similarity index 100% rename from data/icon_harddisk.png rename to data/icons/drive-harddisk.png diff --git a/data/icons/drive-optical.png b/data/icons/drive-optical.png new file mode 100644 index 0000000..82dd0cd Binary files /dev/null and b/data/icons/drive-optical.png differ diff --git a/data/icons/drive-removable-media-usb.png b/data/icons/drive-removable-media-usb.png new file mode 100644 index 0000000..369604f Binary files /dev/null and b/data/icons/drive-removable-media-usb.png differ diff --git a/docs/index.md b/docs/index.md index b5c8ddc..584d1ba 100644 --- a/docs/index.md +++ b/docs/index.md @@ -73,7 +73,5 @@ 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 Licenses for more details. -This product includes icons from Crystal Project, -copyright 2006-2007 Everaldo Coelho [www.everaldo.com](https://www.everaldo.com). -Crystal Project icons are licensed under [GNU LGPL](https://www.gnu.org/licenses/lgpl-3.0.en.html). - +This product includes icons from Oxygen Icons copyright [KDE](https://kde.org) +and licenced under the [GNU LGPL version 3](https://www.gnu.org/licenses/lgpl-3.0.en.html) or later. diff --git a/packaging/obs_debian/debian.copyright b/packaging/obs_debian/debian.copyright index 77391c9..95240d8 100644 --- a/packaging/obs_debian/debian.copyright +++ b/packaging/obs_debian/debian.copyright @@ -17,7 +17,8 @@ This program is free software: you can redistribute it and/or modify it under th 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 Licenses for more details. -This product includes icons from Crystal Project, copyright 2006-2007 Everaldo Coelho (https://www.everaldo.com). Crystal Project icons are licensed under GNU LGPL. +This product includes icons from Oxygen Icons copyright KDE (https://kde.org) +and licenced under the GNU LGPL version 3 or later. You should have received copies of these licenses along with this program. If not, see . diff --git a/src/gui/gsc_init.cpp b/src/gui/gsc_init.cpp index d2af3d6..f0f8339 100644 --- a/src/gui/gsc_init.cpp +++ b/src/gui/gsc_init.cpp @@ -457,19 +457,19 @@ bool app_init_and_loop(int& argc, char**& argv) // Add data file search paths if (is_from_source) { if constexpr(BuildEnv::debug_build()) { - hz::data_file_add_search_directory("icons", hz::fs_path_from_string(BuildEnv::package_top_source_dir()) / "data"); - hz::data_file_add_search_directory("ui", hz::fs_path_from_string(BuildEnv::package_top_source_dir()) / "src/gui/ui"); + hz::data_file_add_search_directory("icons", hz::fs_path_from_string(BuildEnv::package_top_source_dir()) / "data" / "icons"); + hz::data_file_add_search_directory("ui", hz::fs_path_from_string(BuildEnv::package_top_source_dir()) / "src" / "gui" / "ui"); hz::data_file_add_search_directory("doc", hz::fs_path_from_string(BuildEnv::package_top_source_dir()) / "doc"); } else { // Assume the source is the parent directory (standard cmake build with the build directory as a subdirectory of source directory, // and the executables placed directly in the build directory). - hz::data_file_add_search_directory("icons", application_dir.parent_path() / "data"); - hz::data_file_add_search_directory("ui", application_dir.parent_path() / "src/gui/ui"); + hz::data_file_add_search_directory("icons", application_dir.parent_path() / "data" / "icons"); + hz::data_file_add_search_directory("ui", application_dir.parent_path() / "src" / "gui" / "ui"); hz::data_file_add_search_directory("doc", application_dir.parent_path() / "doc"); } } else { if constexpr(BuildEnv::is_kernel_family_windows()) { - hz::data_file_add_search_directory("icons", application_dir); + hz::data_file_add_search_directory("icons", application_dir / "icons"); hz::data_file_add_search_directory("ui", application_dir / "ui"); hz::data_file_add_search_directory("doc", application_dir / "doc"); } else { diff --git a/src/gui/gsc_main_window_iconview.cpp b/src/gui/gsc_main_window_iconview.cpp index 31d6deb..dcb1057 100644 --- a/src/gui/gsc_main_window_iconview.cpp +++ b/src/gui/gsc_main_window_iconview.cpp @@ -505,7 +505,7 @@ void GscMainWindowIconView::load_icon_pixbufs() // nothing } - default_icon_ = load_icon_pixbuf(default_icon_theme, "drive-harddisk", "icon_harddisk.png"); + default_icon_ = load_icon_pixbuf(default_icon_theme, "drive-harddisk", "drive-harddisk.png"); for (auto type : StorageDeviceDetectedTypeExt::get_all_values()) { Glib::RefPtr type_icon; @@ -515,7 +515,7 @@ void GscMainWindowIconView::load_icon_pixbufs() break; case StorageDeviceDetectedType::AtaAny: case StorageDeviceDetectedType::AtaHdd: - type_icon = load_icon_pixbuf(default_icon_theme, "drive-harddisk", "icon_harddisk.png"); + type_icon = load_icon_pixbuf(default_icon_theme, "drive-harddisk", "drive-harddisk.png"); break; case StorageDeviceDetectedType::AtaSsd: case StorageDeviceDetectedType::Nvme: @@ -524,10 +524,10 @@ void GscMainWindowIconView::load_icon_pixbufs() break; case StorageDeviceDetectedType::BasicScsi: // Most likely to be a flash drive - type_icon = load_icon_pixbuf(default_icon_theme, "drive-removable-media", ""); + type_icon = load_icon_pixbuf(default_icon_theme, "drive-removable-media", "drive-removable-media-usb.png"); break; case StorageDeviceDetectedType::CdDvd: - type_icon = load_icon_pixbuf(default_icon_theme, "drive-optical", "icon_optical.png"); + type_icon = load_icon_pixbuf(default_icon_theme, "drive-optical", "drive-optical.png"); break; case StorageDeviceDetectedType::UnsupportedRaid: // Not in XDG, but available in some icon themes diff --git a/src/hz/fs.h b/src/hz/fs.h index 2373370..8a8daed 100644 --- a/src/hz/fs.h +++ b/src/hz/fs.h @@ -455,7 +455,16 @@ inline fs::path fs_get_application_dir() // In Windows the path is in utf-8. wai_getExecutablePath(vpath.data(), int(path_len), &dirname_length); - return {vpath.begin(), vpath.begin() + dirname_length}; + fs::path app_dir = {vpath.begin(), vpath.begin() + dirname_length}; + + // On Windows, the binary may be in the "bin" subdirectory, so remove that. +#ifdef _WIN32 + if (app_dir.filename() == "bin") { + app_dir = app_dir.parent_path(); + } +#endif + + return app_dir; }