From 1031cdb68e83817b34cb81934c4775e64582ab07 Mon Sep 17 00:00:00 2001 From: Sanel Zukan Date: Fri, 27 Nov 2009 22:26:25 +0000 Subject: [PATCH] Ignore if TERM == dumb on ede-launch. Check smallest allowed sizes for font and maxwidth in ede-desktop icons. --- ede-desktop/ede-desktop.cpp | 8 ++++++++ ede-launch/ede-launch.cpp | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ede-desktop/ede-desktop.cpp b/ede-desktop/ede-desktop.cpp index fc63317..b25c251 100644 --- a/ede-desktop/ede-desktop.cpp +++ b/ede-desktop/ede-desktop.cpp @@ -323,6 +323,14 @@ void Desktop::read_config(void) { conf.get("Icons", "one_click_exec", gisett->one_click_exec, false); conf.get("Icons", "auto_arrange", gisett->auto_arrange, true); + /* minimal allowed font size */ + if(gisett->label_fontsize < 8) + gisett->label_fontsize = 12; + + /* minimal allowed maxwidth size */ + if(gisett->label_maxwidth < 30) + gisett->label_maxwidth = 75; + /* prevent wild values */ if(wmode != WALLPAPER_CENTER && wmode != WALLPAPER_TILE && wmode != WALLPAPER_STRETCH) wmode = WALLPAPER_CENTER; diff --git a/ede-launch/ede-launch.cpp b/ede-launch/ede-launch.cpp index fb1e9ca..4d39ee4 100644 --- a/ede-launch/ede-launch.cpp +++ b/ede-launch/ede-launch.cpp @@ -274,7 +274,7 @@ static void ok_cb(Fl_Widget*, void* w) { const char* term = getenv("TERM"); /* also check if TERM get inherited from login console */ - if(!term || strcmp(term, "linux") == 0) + if(!term || (strcmp(term, "linux") == 0) || (strcmp(term, "dumb") == 0)) term = "xterm"; snprintf(buf, sizeof(buf), "%s -e %s", term, cmd);