summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMavridis Philippe <mavridisf@gmail.com>2024-07-31 22:09:23 +0300
committerMavridis Philippe <mavridisf@gmail.com>2024-08-01 14:04:31 +0300
commit5bb53d86755c9b30a7fcd6db6c453e6b3c4b79fa (patch)
treeb91e66102f5021daa378e409fc6cd2ddafa75083
parent0657fdb9fee33399f4d4faec9cb5bbca70dd82d2 (diff)
downloadtdebase-5bb53d86755c9b30a7fcd6db6c453e6b3c4b79fa.tar.gz
tdebase-5bb53d86755c9b30a7fcd6db6c453e6b3c4b79fa.zip
Use server icon for remote folders
This icon is more accurate than the more generic applications-internet. Includes a tdeconf_update script. Signed-off-by: Mavridis Philippe <mavridisf@gmail.com> (cherry picked from commit e84954ddc1a0406ae319dd02a7d946ed62cb6859)
-rw-r--r--knetattach/CMakeLists.txt2
-rw-r--r--knetattach/knetattach.ui.h2
-rw-r--r--knetattach/tdeconf_update/CMakeLists.txt18
-rw-r--r--knetattach/tdeconf_update/remote_folder_icon.upd2
-rwxr-xr-xknetattach/tdeconf_update/remote_folder_icon_upd.sh4
5 files changed, 27 insertions, 1 deletions
diff --git a/knetattach/CMakeLists.txt b/knetattach/CMakeLists.txt
index e5c4d7aa1..adf1ae32e 100644
--- a/knetattach/CMakeLists.txt
+++ b/knetattach/CMakeLists.txt
@@ -9,6 +9,8 @@
#
#################################################
+add_subdirectory( tdeconf_update )
+
include_directories(
${CMAKE_CURRENT_BINARY_DIR}
${TDE_INCLUDE_DIR}
diff --git a/knetattach/knetattach.ui.h b/knetattach/knetattach.ui.h
index 7ac898dec..e064305e9 100644
--- a/knetattach/knetattach.ui.h
+++ b/knetattach/knetattach.ui.h
@@ -183,7 +183,7 @@ void KNetAttach::finished()
path += name + ".desktop";
KSimpleConfig desktopFile(path, false);
desktopFile.setGroup("Desktop Entry");
- desktopFile.writeEntry("Icon", "applications-internet");
+ desktopFile.writeEntry("Icon", "server");
desktopFile.writeEntry("Name", name);
desktopFile.writeEntry("Type", "Link");
desktopFile.writeEntry("URL", url.prettyURL());
diff --git a/knetattach/tdeconf_update/CMakeLists.txt b/knetattach/tdeconf_update/CMakeLists.txt
new file mode 100644
index 000000000..b32f6417c
--- /dev/null
+++ b/knetattach/tdeconf_update/CMakeLists.txt
@@ -0,0 +1,18 @@
+###############################################################################
+# #
+# Copyright © 2024 Mavridis Philippe <mavridisf@gmail.com #
+# #
+# Licensed under the terms of GNU General Public License v2 or later. #
+# Improvements are welcome! #
+# #
+###############################################################################
+
+install(
+ FILES remote_folder_icon.upd
+ DESTINATION ${KCONF_UPDATE_INSTALL_DIR}
+)
+
+install(
+ PROGRAMS remote_folder_icon_upd.sh
+ DESTINATION ${KCONF_UPDATE_INSTALL_DIR}
+) \ No newline at end of file
diff --git a/knetattach/tdeconf_update/remote_folder_icon.upd b/knetattach/tdeconf_update/remote_folder_icon.upd
new file mode 100644
index 000000000..66f75f96d
--- /dev/null
+++ b/knetattach/tdeconf_update/remote_folder_icon.upd
@@ -0,0 +1,2 @@
+Id=remote_folder_icon_update
+Script=remote_folder_icon_upd.sh \ No newline at end of file
diff --git a/knetattach/tdeconf_update/remote_folder_icon_upd.sh b/knetattach/tdeconf_update/remote_folder_icon_upd.sh
new file mode 100755
index 000000000..b859896ff
--- /dev/null
+++ b/knetattach/tdeconf_update/remote_folder_icon_upd.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+find "$HOME/.trinity/share/apps/remoteview" -type f -iname "*.desktop" -print0 2>/dev/null | \
+ xargs -r0 sed -ri "s|Icon=applications-internet|Icon=server|g" \ No newline at end of file