summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorQuentin Glidic <sardemff7+git@sardemff7.net>2017-05-30 19:07:33 +0200
committerQuentin Glidic <sardemff7+git@sardemff7.net>2017-05-30 19:08:33 +0200
commit8a6bdd827de065009fbc14b11dca23be61c77138 (patch)
tree8329e5db8da14618b77307159854dbb2d9047553 /source
parentf3b4af1da0c6cea3dbab3d5eca2ac13b6019e4b2 (diff)
config: Add a setting to disable icons loading
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Diffstat (limited to 'source')
-rw-r--r--source/dialogs/drun.c9
-rw-r--r--source/dialogs/window.c4
-rw-r--r--source/xrmoptions.c3
3 files changed, 13 insertions, 3 deletions
diff --git a/source/dialogs/drun.c b/source/dialogs/drun.c
index 941a0b33..907d5f2e 100644
--- a/source/dialogs/drun.c
+++ b/source/dialogs/drun.c
@@ -284,8 +284,13 @@ static gboolean read_desktop_file ( DRunModePrivateData *pd, const char *root, c
#endif
pd->entry_list[pd->cmd_list_length].exec = g_key_file_get_string ( kf, "Desktop Entry", "Exec", NULL );
- pd->entry_list[pd->cmd_list_length].icon_name = g_key_file_get_locale_string ( kf, "Desktop Entry", "Icon", NULL, NULL );
- pd->entry_list[pd->cmd_list_length].icon = NULL;
+ if ( config.show_icons ) {
+ pd->entry_list[pd->cmd_list_length].icon_name = g_key_file_get_locale_string ( kf, "Desktop Entry", "Icon", NULL, NULL );
+ }
+ else{
+ pd->entry_list[pd->cmd_list_length].icon_name = NULL;
+ }
+ pd->entry_list[pd->cmd_list_length].icon = NULL;
// Keep keyfile around.
pd->entry_list[pd->cmd_list_length].key_file = kf;
diff --git a/source/dialogs/window.c b/source/dialogs/window.c
index 1e3611e6..80cf880c 100644
--- a/source/dialogs/window.c
+++ b/source/dialogs/window.c
@@ -693,7 +693,9 @@ static gboolean helper_eval_cb ( const GMatchInfo *info, GString *str, gpointer
helper_eval_add_str ( str, d->c->wmdesktopstr, l, d->pd->wmdn_len );
}
else if ( match[1] == 'i' ) {
- g_string_append ( str, "<span alpha=\"1\">\uFFFC</span>" );
+ if ( config.show_icons ) {
+ g_string_append ( str, "<span alpha=\"1\">\uFFFC</span>" );
+ }
}
else if ( match[1] == 'c' ) {
helper_eval_add_str ( str, d->c->class, l, d->pd->clf_len );
diff --git a/source/xrmoptions.c b/source/xrmoptions.c
index aeb04921..7fd87e56 100644
--- a/source/xrmoptions.c
+++ b/source/xrmoptions.c
@@ -105,6 +105,9 @@ static XrmOption xrmOptions[] = {
{ xrm_Boolean, "fixed-num-lines", { .num = &config.fixed_num_lines }, NULL,
"Always show number of lines", CONFIG_DEFAULT },
+ { xrm_Boolean, "show-icons", { .snum = &config.show_icons }, NULL,
+ "Whether to load and show icons", CONFIG_DEFAULT },
+
{ xrm_String, "terminal", { .str = &config.terminal_emulator }, NULL,
"Terminal to use", CONFIG_DEFAULT },
{ xrm_String, "ssh-client", { .str = &config.ssh_client }, NULL,