From 412973e13a813c0f20ea573d9d82aa6cb6b09865 Mon Sep 17 00:00:00 2001 From: Ray-V Date: Thu, 24 May 2018 11:15:18 +0100 Subject: [PATCH] Option to set konqueror filemanagement default view mode --- BUILD-TDE.sh | 28 ++++++++++++++++++++++++---- Core/tdebase/README | 28 ++-------------------------- Core/tdebase/tdebase.SlackBuild | 9 +++++++++ 3 files changed, 35 insertions(+), 30 deletions(-) diff --git a/BUILD-TDE.sh b/BUILD-TDE.sh index 50956d3..5e4f1c0 100755 --- a/BUILD-TDE.sh +++ b/BUILD-TDE.sh @@ -400,9 +400,9 @@ Non-TDE apps are in the Misc category and don't need the \Zb\Zr\Z4R\Znequired TD "Apps/koffice" "Office Suite" off "\Zb\Z6 Optional build-time dependencies - GraphicsMagick/libpng14 [for chalk/krita] \Zn" \ "Apps/koffice-i18n" "Internationalization files for koffice" off "\Zb\Z6 Required for koffice when \Zb\Z3Additional language support\Zb\Z6 has been selected \Zn" \ "Apps/krusader" "File manager for TDE" off "\Zb\Z6 \Zn" \ -"Apps/ksensors" "A graphical interface for sensors" off "\Zb\Z6 Runtime requirement ap/lm_sensors \Zn" \ " Misc/graphviz" "Graph Visualization" off "\Zb\Z6 Runtime option for kscope. pdf/html docs not built by default \Zn" \ "Apps/kscope" "A source-editing environment for C and C-style languages." off "\Zb\Z6 Runtime options cscope [d/cscope], ctags [ap/vim], dot [graphviz] \Zn" \ +"Apps/ksensors" "A graphical interface for sensors" off "\Zb\Z6 Runtime requirement ap/lm_sensors \Zn" \ "Apps/kshutdown" "Shutdown utility for TDE" off "\Zb\Z6 \Zn" \ "Apps/ksquirrel" "An image viewer with OpenGL and KIPI support." off "\Zb\Z6 Requires kipi-plugins tdelibkdcraw tdelibkexiv2 tdelibkipi libksquirrel. \Zn" \ "Apps/tdektorrent" "A BitTorrent client for TDE" off "\Zb\Z6 \Zn" \ @@ -453,6 +453,24 @@ $(cat Core/tdebase/README|sed "s|/{TDE_installation_dir}|$(cat $TMPVARS/INSTALL_ " \ 30 75 done + +rm -f $TMPVARS/VIEWMODE +dialog --cr-wrap --nocancel --no-shadow --colors --title " Konqueror file manager " --menu \ +" +Konqueror file manager defaults to 'Icon View'. Setting 'another View' and saving that view profile should, but doesn't, override this. + +Until this is fixed [bug 2881], set the default view mode here. + +" \ +20 75 7 \ +"Icon" "konq_iconview" \ +"Multi Column" "konq_multicolumnview" \ +"Tree" "konq_treeview" \ +"Info List" "konq_infolistview" \ +"Detailed List" "konq_detailedlistview" \ +"Text" "konq_textview" \ +"File Size" "fsview_part" \ +2> $TMPVARS/VIEWMODE } @@ -559,6 +577,7 @@ export EXIT_FAIL=$(cat $TMPVARS/EXIT_FAIL) export KEEP_BUILD=$(cat $TMPVARS/KEEP_BUILD) export PREPEND=$(cat $TMPVARS/PREPEND) export RUNLEVEL=$(cat $TMPVARS/RUNLEVEL) +export VIEWMODE=$(grep "$(cat $TMPVARS/VIEWMODE)" $0 | grep -o [a-z]*_[a-z]*) # these exports are for koffice.SB [[ $(cat $TMPVARS/Krita_OPTS) == *krita* ]] && export REVERT=yes [[ $(cat $TMPVARS/Krita_OPTS) == *libpng14* ]] && export USE_PNG14=yes @@ -593,8 +612,8 @@ export ARM_FABI=$(readelf -Ah $(which bash)|grep -oE "soft|hard") [[ $(cat $TMPVARS/build-new) != no ]] && NEW_BUILD=yes || NEW_BUILD='no - re-use existing' ## Action on failure AOF=$(echo $EXIT_FAIL|cut -d" " -f1) -## if tdebase selected, runlevel selected -[[ $(grep -o tdebase $TMPVARS/TDEbuilds) ]] && [[ $RUNLEVEL ]] && TDMRL=\\Zb\\Z6$RUNLEVEL\\Zn && SHADERL=" " +## if tdebase selected +[[ $(grep -o tdebase $TMPVARS/TDEbuilds) ]] && TDMRL=\\Zb\\Z6$RUNLEVEL\\Zn && V_MODE=\\Zb\\Z6$(cat $TMPVARS/VIEWMODE)\\Zn && SHADERL=" " ## koffice - only if it is being built [[ $(sed 's|koffice-||' $TMPVARS/TDEbuilds | grep -o Apps/koffice) ]] && { [[ $REVERT == yes ]] && RVT=\\Zb\\Z6yes\\Zn || RVT=\\Zb\\Z6no\\Zn @@ -621,7 +640,8 @@ Action on failure \Zb\Z6${AOF:-continue}\Zn Keep the temporary build files \Zb\Z6$KEEP_BUILD\Zn Pre-select required [\Zb\Zr\Z4R\Zn] builds \Zb\Z6$(cat $TMPVARS/SELECT|sed 's|off|no|;s|on|yes|')\Zn Prepend TDE libs paths \Zb\Z6${PREPEND:-no}\Zn${SHADERL:-\Z0\Zb} -Runlevel for TDM ${TDMRL:-n/a}\Zn${SHADEKO:-\Z0\Zb} +Runlevel for TDM ${TDMRL:-n/a} +Konqueror file manager view mode ${V_MODE:-n/a}\Zn${SHADEKO:-\Z0\Zb} koffice: revert chalk to krita ${RVT:-n/a} build with libpng14 ${USE_PNG:-n/a} diff --git a/Core/tdebase/README b/Core/tdebase/README index 0a3022a..4ac00b0 100755 --- a/Core/tdebase/README +++ b/Core/tdebase/README @@ -23,29 +23,5 @@ or [2] copy the contents of rc.4.local to rc.4 above other session manager options (Runlevel) -Set this to 4 and tdm should work out-of-the-box, especially for new installations. - ------------------- - -(Konqueror file manager) as-built defaults to 'Icon View' when starting. -Setting 'another View' and saving that view profile should, but doesn't, override this. - -The problem seems to be that TDE lacks the [MainView Settings] entry in konquerorrc that exists in KDE3. - -Until this is fixed, to set 'Tree View' for example: - -VIEWMODE=konq_treeview -sed -i "s|konq_iconview|$VIEWMODE|" /{TDE_installation_dir}/share/apps/konqueror/profiles/filemanagement -echo "[MainView Settings] -ViewMode=$VIEWMODE" > ~/.trinity/share/config/konquerorrc - -The ViewMode options are: - -konq_iconview -konq_multicolumnview -konq_treeview -konq_infolistview -konq_detailedlistview -konq_textview -fsview_part [File Size] - +Set this to 4 and tdm should work out-of-the-box. + diff --git a/Core/tdebase/tdebase.SlackBuild b/Core/tdebase/tdebase.SlackBuild index 3b0b5c9..2feb3f8 100755 --- a/Core/tdebase/tdebase.SlackBuild +++ b/Core/tdebase/tdebase.SlackBuild @@ -38,6 +38,8 @@ listdocs_fn ## patch for gcc7 twin/client.cpp:2978:38: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] sed -i 's|data != None|data != 0|' twin/client.cpp +## part 1/2 of setting konqueror filemanagement default view mode +sed -i "s|konq_iconview|$VIEWMODE|" konqueror/profile_filemanagement.desktop chown_fn @@ -164,5 +166,12 @@ echo " sed -i 's|id:[1-5]|id:4|' etc/inittab " >> $PKG/install/doinst.sh } +## part 2/2 of setting konqueror filemanagement default view mode +## add [MainView Settings] ViewMode to konquerorrc +echo " +mkdir -p .\$HOME/.trinity/share/config/ +echo '[MainView Settings] +ViewMode=$VIEWMODE' > .\$HOME/.trinity/share/config/konquerorrc +" >> $PKG/install/doinst.sh makepkg_fn