Replace bundled icons with the ones from Oxygen project; bundle removable drive icon; update copyrights accordingly.
@@ -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.
|
||||
|
||||
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 7.5 KiB |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 632 B |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 3.2 KiB |
@@ -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()
|
||||
|
||||
|
||||
@@ -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
|
||||
|
Before Width: | Height: | Size: 95 KiB After Width: | Height: | Size: 130 KiB |
|
Before Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
@@ -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.
|
||||
|
||||
@@ -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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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<Gdk::Pixbuf> 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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||