[multimedia/kwave] /: remove custom icons from documentation

Mark Penner null at kde.org
Sun Sep 1 13:53:22 BST 2024


Git commit e5b396c18a1c994f29f860ec6f8c77ec7b1c546a by Mark Penner.
Committed on 01/09/2024 at 05:56.
Pushed by mrp into branch 'master'.

remove custom icons from documentation

also no longer need to be able to convert from svg to png

M  +0    -13   cmake/KwaveHandbook.cmake
M  +0    -82   doc/CMakeLists.txt
M  +0    -24   doc/en/index.docbook

https://invent.kde.org/multimedia/kwave/-/commit/e5b396c18a1c994f29f860ec6f8c77ec7b1c546a

diff --git a/cmake/KwaveHandbook.cmake b/cmake/KwaveHandbook.cmake
index fe6dc16e9..165dc61a2 100644
--- a/cmake/KwaveHandbook.cmake
+++ b/cmake/KwaveHandbook.cmake
@@ -30,19 +30,6 @@ SET(_common_dir ${CMAKE_INSTALL_PREFIX}/share/help/${_lang}/kdoctools5-common)
 SET(_common_en_dir ${CMAKE_INSTALL_PREFIX}/share/help/en/kdoctools5-common)
 SET(_html_dir ${CMAKE_BINARY_DIR}/doc/html/${_lang})
 
-#############################################################################
-### png files with the toolbar icons                                      ###
-
-FILE(GLOB _toolbar_icons "${CMAKE_SOURCE_DIR}/kwave/toolbar/*.svgz")
-FOREACH(_toolbar_icon ${_toolbar_icons})
-    GET_FILENAME_COMPONENT(_svgz_file ${_toolbar_icon} NAME)
-    STRING(REPLACE "sc-actions-" "" _svgz_file_base ${_svgz_file})
-    STRING(REPLACE ".svgz" ".png" _png_file ${_svgz_file_base})
-    SET(_toolbar_png ${CMAKE_CURRENT_BINARY_DIR}/toolbar_${_png_file})
-    SVG2PNG(${_toolbar_icon} ${_toolbar_png} ${_png_file})
-    SET(_toolbar_pngs "${_toolbar_pngs}" "${_toolbar_png}")
-ENDFOREACH(_toolbar_icon ${_toolbar_icons})
-
 #############################################################################
 ### "make html_doc"                                                       ###
 
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index 8dd05b8cd..94f1fe6f3 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -30,88 +30,6 @@ SET(_index_docbook_updated ${CMAKE_CURRENT_BINARY_DIR}/index-updated.docbook)
 
 FIND_REQUIRED_PROGRAM(CP_EXECUTABLE cp)
 
-#############################################################################
-### how to convert from svg to png                                        ###
-
-FIND_PROGRAM(RSVG_EXECUTABLE NAMES rsvg-convert rsvg)
-IF (RSVG_EXECUTABLE)
-    GET_FILENAME_COMPONENT(_basename ${RSVG_EXECUTABLE} NAME_WE)
-    MESSAGE(STATUS "Found ${_basename}: ${RSVG_EXECUTABLE}")
-ENDIF (RSVG_EXECUTABLE)
-
-SET(_test_icon "${CMAKE_SOURCE_DIR}/kwave/toolbar/sc-actions-kwave_player_end.svgz")
-GET_FILENAME_COMPONENT(_svgz_file ${_test_icon} NAME)
-STRING(REPLACE ".svgz" ".png" _png_file ${_svgz_file})
-
-SET(RSVG_AVAILABLE NO)
-IF (RSVG_EXECUTABLE)
-    # try to convert one icon, to see if "rsvg" really works
-    EXECUTE_PROCESS(
-        COMMAND ${RSVG_EXECUTABLE} -w 32 -h 32 -f png ${_test_icon} -o "${_png_file}"
-        WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
-        RESULT_VARIABLE RSVG_CONVERT_RESULT
-        OUTPUT_VARIABLE _stdout
-        ERROR_VARIABLE _stderr
-    )
-    IF (${RSVG_CONVERT_RESULT} EQUAL 0)
-        MESSAGE(STATUS "Converting svg to png with ${RSVG_EXECUTABLE}")
-        MACRO(SVG2PNG _infile _outfile _name)
-            ADD_CUSTOM_COMMAND(OUTPUT ${_outfile}
-                COMMAND ${RSVG_EXECUTABLE} -w 32 -h 32 -f png ${_infile} -o ${_outfile}
-                DEPENDS ${_infile}
-                COMMENT STATUS "Converting ${_name}"
-            )
-        ENDMACRO(SVG2PNG)
-
-        SET(RSVG_AVAILABLE YES)
-    ELSE (${RSVG_CONVERT_RESULT} EQUAL 0)
-        MESSAGE(STATUS "Found rsvg but conversion failed, falling back to convert from ImageMagick")
-    ENDIF (${RSVG_CONVERT_RESULT} EQUAL 0)
-ENDIF (RSVG_EXECUTABLE)
-
-IF (NOT RSVG_AVAILABLE)
-    SET(CONVERT_AVAILABLE NO)
-    FIND_PROGRAM(CONVERT_EXECUTABLE NAMES convert)
-    IF (CONVERT_EXECUTABLE)
-        GET_FILENAME_COMPONENT(_basename ${CONVERT_EXECUTABLE} NAME_WE)
-        MESSAGE(STATUS "Found ${_basename}: ${CONVERT_EXECUTABLE}")
-
-        # try to convert one icon, to see if "convert" has proper svg support
-        EXECUTE_PROCESS(
-            COMMAND ${CONVERT_EXECUTABLE} -resize 32x32 ${_test_icon} "${_png_file}"
-            WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
-            RESULT_VARIABLE SVG_CONVERT_RESULT
-            OUTPUT_VARIABLE _stdout
-            ERROR_VARIABLE _stderr
-        )
-        IF (${SVG_CONVERT_RESULT} EQUAL 0)
-            MESSAGE(STATUS "Converting svg to png with ${CONVERT_EXECUTABLE}")
-            MACRO(SVG2PNG _infile _outfile _name)
-                ADD_CUSTOM_COMMAND(OUTPUT ${_outfile}
-                    COMMAND ${CONVERT_EXECUTABLE} -resize 32x32 ${_infile} ${_outfile}
-                    DEPENDS ${_infile}
-                    COMMENT STATUS "Converting ${_name}"
-                )
-            ENDMACRO(SVG2PNG)
-            SET(CONVERT_AVAILABLE YES)
-        ENDIF (${SVG_CONVERT_RESULT} EQUAL 0)
-    ENDIF (CONVERT_EXECUTABLE)
-
-    IF (NOT CONVERT_AVAILABLE)
-        MESSAGE(FATAL_ERROR "
-        your system lacks support for converting icons in svg format to png.
-
-        You have three options:
-        1) install the tool \"rsvg\"
-        2) install a version of \"convert\" (ImageMagick) that has proper svg support
-        3) omit building the online documentation by using the cmake option \"-DWITH_DOC=OFF\"
-        ")
-    ENDIF (NOT CONVERT_AVAILABLE)
-ENDIF (NOT RSVG_AVAILABLE)
-
-# clean up the temporary png file after conversion test
-FILE(REMOVE "${CMAKE_BINARY_DIR}/${_png_file}")
-
 #############################################################################
 ### "make update-handbook"                                                ###
 
diff --git a/doc/en/index.docbook b/doc/en/index.docbook
index 595299e5f..836f52ecc 100644
--- a/doc/en/index.docbook
+++ b/doc/en/index.docbook
@@ -1658,12 +1658,6 @@
 		<guimenu>View</guimenu><guimenuitem>Previous Page</guimenuitem>
 		</menuchoice>
 	    </para>
-	    <para>
-		toolbar button: <inlinemediaobject><imageobject>
-		<imagedata fileref="toolbar_kwave_player_start.png" format="PNG"/>
-		</imageobject><textobject><phrase><quote>previous page</quote></phrase></textobject>
-		</inlinemediaobject>
-	    </para>
         </listitem>
 	<!-- next page -->
        <listitem><para>
@@ -1677,12 +1671,6 @@
 		<guimenu>View</guimenu><guimenuitem>Next Page</guimenuitem>
 		</menuchoice>
 	    </para>
-	    <para>
-		toolbar button: <inlinemediaobject><imageobject>
-		<imagedata fileref="toolbar_kwave_player_end.png" format="PNG"/>
-		</imageobject><textobject><phrase><quote>next page</quote></phrase></textobject>
-		</inlinemediaobject>
-	    </para>
         </listitem>
 	<!-- scroll right -->
         <listitem><para>
@@ -1696,12 +1684,6 @@
 		<guimenu>View</guimenu><guimenuitem>Scroll right</guimenuitem>
 		</menuchoice>
 	    </para>
-	    <para>
-		toolbar button: <inlinemediaobject><imageobject>
-		<imagedata fileref="toolbar_kwave_player_fwd.png" format="PNG"/>
-		</imageobject><textobject><phrase><quote>scroll right</quote></phrase></textobject>
-		</inlinemediaobject>
-	    </para>
         </listitem>
 	<!-- scroll left -->
         <listitem><para>
@@ -1715,12 +1697,6 @@
 		<guimenu>View</guimenu><guimenuitem>Scroll left</guimenuitem>
 		</menuchoice>
 	    </para>
-	    <para>
-		toolbar button: <inlinemediaobject><imageobject>
-		<imagedata fileref="toolbar_kwave_player_rew.png" format="PNG"/>
-		</imageobject><textobject><phrase><quote>scroll left</quote></phrase></textobject>
-		</inlinemediaobject>
-	    </para>
         </listitem>
 	</itemizedlist>
     </para>



More information about the kde-doc-english mailing list