tint2conf: Sort applications correctly when additional desktop files from non-standard locations are found in the config

This commit is contained in:
o9000
2016-02-28 13:41:19 +01:00
parent e8eae27029
commit edbf9f4437
3 changed files with 71 additions and 28 deletions

View File

@@ -112,7 +112,7 @@ void tint_exec(const char *command)
}
}
char *expand_tilde(char *s)
char *expand_tilde(const char *s)
{
const gchar *home = g_get_home_dir();
if (home && (strcmp(s, "~") == 0 || strstr(s, "~/") == s)) {
@@ -125,7 +125,7 @@ char *expand_tilde(char *s)
}
}
char *contract_tilde(char *s)
char *contract_tilde(const char *s)
{
const gchar *home = g_get_home_dir();
if (!home)

View File

@@ -53,11 +53,11 @@ void tint_exec(const char *command);
// Returns a copy of s in which "~" is expanded to the path to the user's home directory.
// The caller takes ownership of the string.
char *expand_tilde(char *s);
char *expand_tilde(const char *s);
// The opposite of expand_tilde: replaces the path to the user's home directory with "~".
// The caller takes ownership of the string.
char *contract_tilde(char *s);
char *contract_tilde(const char *s);
// Color
int hex_char_to_int(char c);