all repos — tint2 @ 49b41667ad1e879076c58a9128e36ef148754aad

fork of the tint2 desktop panel for my custom setup - only minimized windows across all desktops for the taskbar

tint2conf: Add mime type and full support for editing by path
o9000 mrovi9000@gmail.com
commit

49b41667ad1e879076c58a9128e36ef148754aad

parent

5646dca8b71c1f39500bf8cb745b9ffe763bf693

M src/tint2conf/CMakeLists.txtsrc/tint2conf/CMakeLists.txt

@@ -71,3 +71,4 @@

install( TARGETS tint2conf DESTINATION bin ) install( FILES tint2conf.svg DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/scalable/apps ) install( FILES tint2conf.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/applications ) +install( FILES tint2conf.xml DESTINATION ${CMAKE_INSTALL_DATADIR}/mime/packages )
M src/tint2conf/main.csrc/tint2conf/main.c

@@ -74,7 +74,7 @@

// Returns TRUE if the theme file is in ~/.config. gboolean theme_is_editable(const char *filepath) { - return startswith(filepath, g_get_user_config_dir()); + return access(filepath, W_OK) == 0; } // Returns TRUE if the theme file is ~/.config/tint2/tint2rc.
M src/tint2conf/tint2conf.desktopsrc/tint2conf/tint2conf.desktop

@@ -113,3 +113,4 @@ Exec=tint2conf

Icon=tint2conf Terminal=false Categories=Settings;DesktopSettings; +MimeType=application/x-tint2-theme
A src/tint2conf/tint2conf.xml

@@ -0,0 +1,8 @@

+<?xml version="1.0" encoding="UTF-8"?> +<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info"> + <mime-type type="application/x-tint2-theme"> + <comment xml:lang="en">tint2 theme file</comment> + <sub-class-of type="text/plain"/> + <glob pattern="*tint2rc"/> + </mime-type> +</mime-info>