From e3f87013da2050403989d1933cb7af610a98a47e Mon Sep 17 00:00:00 2001 From: Michael Jennings Date: Sat, 14 Jul 2001 00:08:32 +0000 Subject: [PATCH] Fri Jul 13 17:07:45 2001 Michael Jennings (mej) This is mostly cosmetic, but fairly important nonetheless. Saved config files should not contain the "main" context. SVN revision: 4947 --- ChangeLog | 5 +++++ doc/Eterm.ti | 1 + src/options.c | 43 +++++++++++++++++++--------------------- themes/Eterm/menus.cfg | 2 +- themes/auto/menus.cfg | 2 +- themes/cEterm/menus.cfg | 2 +- themes/chooser/menus.cfg | 2 +- themes/emacs/menus.cfg | 2 +- themes/irc/menus.cfg | 2 +- themes/mutt/menus.cfg | 2 +- themes/trans/menus.cfg | 2 +- 11 files changed, 34 insertions(+), 31 deletions(-) diff --git a/ChangeLog b/ChangeLog index 818a3c6..9e9a5bc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4288,3 +4288,8 @@ for 0.9.1. Now we just need some testing to make sure there's nothing horridly wrong.... So you all can test while we finish up the web site and the backgrounds. :-) ---------------------------------------------------------------------- +Fri Jul 13 17:07:45 2001 Michael Jennings (mej) + +This is mostly cosmetic, but fairly important nonetheless. Saved +config files should not contain the "main" context. +---------------------------------------------------------------------- diff --git a/doc/Eterm.ti b/doc/Eterm.ti index 46b19fc..5e17684 100644 --- a/doc/Eterm.ti +++ b/doc/Eterm.ti @@ -44,6 +44,7 @@ Eterm|Eterm-color|Eterm with xterm-style color support (X Window System), # Alternate character set (line drawing), enable/enter/exit ACS acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, +# The line below is used by some vtXXX emulators, but I don't think it's right for us. # acsc=+\020\,\021-\030.^Y0\333`\004a\261f\370g\361h\260i\316j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v\301w\302x\263y\363z\362{\343|\330}\234~\376, enacs=\e)0, smacs=^N, rmacs=^O, diff --git a/src/options.c b/src/options.c index 2cd6330..5f94227 100644 --- a/src/options.c +++ b/src/options.c @@ -3336,9 +3336,7 @@ save_config(char *path, unsigned char save_theme) fprintf(fp, "# Eterm Configuration File\n"); fprintf(fp, "# Automatically generated by " APL_NAME "-" VERSION " on %s\n", dt_stamp); - fprintf(fp, "begin main\n\n"); - - fprintf(fp, " begin color\n"); + fprintf(fp, "begin color\n"); fprintf(fp, " foreground %s\n", rs_color[fgColor]); fprintf(fp, " background %s\n", rs_color[bgColor]); fprintf(fp, " cursor %s\n", rs_color[cursorColor]); @@ -3356,9 +3354,9 @@ save_config(char *path, unsigned char save_theme) fprintf(fp, " color ul %s\n", rs_color[colorUL]); } #endif - fprintf(fp, " end color\n\n"); + fprintf(fp, "end color\n\n"); - fprintf(fp, " begin attributes\n"); + fprintf(fp, "begin attributes\n"); if (save_theme) { if (rs_geometry) { fprintf(fp, " geometry %s\n", rs_geometry); @@ -3386,10 +3384,10 @@ save_config(char *path, unsigned char save_theme) fprintf(fp, " font bold %s\n", rs_boldFont); } #endif - fprintf(fp, " end attributes\n\n"); + fprintf(fp, "end attributes\n\n"); if (save_theme) { - fprintf(fp, " begin imageclasses\n"); + fprintf(fp, "begin imageclasses\n"); fprintf(fp, " path \"%s\"\n", rs_path); #ifdef PIXMAP_SUPPORT if (rs_icon != NULL) { @@ -3663,13 +3661,13 @@ save_config(char *path, unsigned char save_theme) } fprintf(fp, " end image\n"); } - fprintf(fp, " end imageclasses\n\n"); + fprintf(fp, "end imageclasses\n\n"); for (i = 0; i < menu_list->nummenus; i++) { menu_t *menu = menu_list->menus[i]; unsigned short j; - fprintf(fp, " begin menu\n"); + fprintf(fp, "begin menu\n"); fprintf(fp, " title \"%s\"\n", menu->title); if (menu->font) { unsigned long tmp; @@ -3702,12 +3700,12 @@ save_config(char *path, unsigned char save_theme) fprintf(fp, " end\n"); } } - fprintf(fp, " end menu\n"); + fprintf(fp, "end menu\n"); } fprintf(fp, "\n"); } - fprintf(fp, " begin actions\n"); + fprintf(fp, "begin actions\n"); for (action = action_list; action; action = action->next) { fprintf(fp, " bind "); if (action->mod != MOD_NONE) { @@ -3761,10 +3759,10 @@ save_config(char *path, unsigned char save_theme) fprintf(fp, "script \"%s\"\n", action->param.script); } } - fprintf(fp, " end actions\n\n"); + fprintf(fp, "end actions\n\n"); #ifdef MULTI_CHARSET - fprintf(fp, " begin multichar\n"); + fprintf(fp, "begin multichar\n"); if (rs_multichar_encoding) { fprintf(fp, " encoding %s\n", rs_multichar_encoding); } @@ -3773,21 +3771,21 @@ save_config(char *path, unsigned char save_theme) fprintf(fp, " font %d %s\n", i, etmfonts[i]); } } - fprintf(fp, " end multichar\n\n"); + fprintf(fp, "end multichar\n\n"); #endif #ifdef USE_XIM - fprintf(fp, " begin xim\n"); + fprintf(fp, "begin xim\n"); if (rs_input_method) { fprintf(fp, " input_method %s\n", rs_input_method); } if (rs_preedit_type) { fprintf(fp, " preedit_type %s\n", rs_preedit_type); } - fprintf(fp, " end xim\n\n"); + fprintf(fp, "end xim\n\n"); #endif - fprintf(fp, " begin toggles\n"); + fprintf(fp, "begin toggles\n"); fprintf(fp, " map_alert %d\n", (Options & Opt_map_alert ? 1 : 0)); fprintf(fp, " visual_bell %d\n", (Options & Opt_visual_bell ? 1 : 0)); fprintf(fp, " login_shell %d\n", (Options & Opt_login_shell ? 1 : 0)); @@ -3812,9 +3810,9 @@ save_config(char *path, unsigned char save_theme) fprintf(fp, " itrans %d\n", (image_toggles & IMOPT_ITRANS ? 1 : 0)); fprintf(fp, " buttonbar %d\n", ((buttonbar && bbar_is_visible(buttonbar)) ? 1 : 0)); fprintf(fp, " resize_gravity %d\n", (Options & Opt_resize_gravity ? 1 : 0)); - fprintf(fp, " end toggles\n\n"); + fprintf(fp, "end toggles\n\n"); - fprintf(fp, " begin keyboard\n"); + fprintf(fp, "begin keyboard\n"); tmp_str = XKeysymToString(ks_smallfont); if (tmp_str) { fprintf(fp, " smallfont_key %s\n", tmp_str); @@ -3844,9 +3842,9 @@ save_config(char *path, unsigned char save_theme) #endif fprintf(fp, " app_keypad %d\n", (PrivateModes & PrivMode_aplKP ? 1 : 0)); fprintf(fp, " app_cursor %d\n", (PrivateModes & PrivMode_aplCUR ? 1 : 0)); - fprintf(fp, " end keyboard\n\n"); + fprintf(fp, "end keyboard\n\n"); - fprintf(fp, " begin misc\n"); + fprintf(fp, "begin misc\n"); #ifdef PRINTPIPE if (rs_print_pipe) { fprintf(fp, " print_pipe \"%s\"\n", rs_print_pipe); @@ -3869,8 +3867,7 @@ save_config(char *path, unsigned char save_theme) fprintf(fp, " cut_chars \"%s\"\n", rs_cutchars); } #endif - fprintf(fp, " end misc\n\n"); - fprintf(fp, "end main\n"); + fprintf(fp, "end misc\n\n"); fclose(fp); return 0; diff --git a/themes/Eterm/menus.cfg b/themes/Eterm/menus.cfg index b81766a..6ef8d1c 100644 --- a/themes/Eterm/menus.cfg +++ b/themes/Eterm/menus.cfg @@ -1,4 +1,4 @@ - + begin menu title Font font -*-times-bold-r-normal--14-*-*-*-*-*-iso8859-1 diff --git a/themes/auto/menus.cfg b/themes/auto/menus.cfg index b81766a..6ef8d1c 100644 --- a/themes/auto/menus.cfg +++ b/themes/auto/menus.cfg @@ -1,4 +1,4 @@ - + begin menu title Font font -*-times-bold-r-normal--14-*-*-*-*-*-iso8859-1 diff --git a/themes/cEterm/menus.cfg b/themes/cEterm/menus.cfg index b81766a..6ef8d1c 100644 --- a/themes/cEterm/menus.cfg +++ b/themes/cEterm/menus.cfg @@ -1,4 +1,4 @@ - + begin menu title Font font -*-times-bold-r-normal--14-*-*-*-*-*-iso8859-1 diff --git a/themes/chooser/menus.cfg b/themes/chooser/menus.cfg index bb38c7d..6a11a89 100644 --- a/themes/chooser/menus.cfg +++ b/themes/chooser/menus.cfg @@ -1,4 +1,4 @@ - + %preproc m4 define(STRING_ITEM, `begin menuitem text "$1" diff --git a/themes/emacs/menus.cfg b/themes/emacs/menus.cfg index 3d07d37..6ff1fbf 100644 --- a/themes/emacs/menus.cfg +++ b/themes/emacs/menus.cfg @@ -1,4 +1,4 @@ - + begin menu title Font font -*-times-bold-r-normal--14-*-*-*-*-*-iso8859-1 diff --git a/themes/irc/menus.cfg b/themes/irc/menus.cfg index b81766a..6ef8d1c 100644 --- a/themes/irc/menus.cfg +++ b/themes/irc/menus.cfg @@ -1,4 +1,4 @@ - + begin menu title Font font -*-times-bold-r-normal--14-*-*-*-*-*-iso8859-1 diff --git a/themes/mutt/menus.cfg b/themes/mutt/menus.cfg index 780a5f1..a301bbc 100644 --- a/themes/mutt/menus.cfg +++ b/themes/mutt/menus.cfg @@ -1,4 +1,4 @@ - + begin menu title Font font -*-times-bold-r-normal--14-*-*-*-*-*-iso8859-1 diff --git a/themes/trans/menus.cfg b/themes/trans/menus.cfg index b81766a..6ef8d1c 100644 --- a/themes/trans/menus.cfg +++ b/themes/trans/menus.cfg @@ -1,4 +1,4 @@ - + begin menu title Font font -*-times-bold-r-normal--14-*-*-*-*-*-iso8859-1