aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorArnaud Lacombe <lacombar@gmail.com>2010-08-18 01:57:13 -0400
committerArnaud Lacombe <lacombar@gmail.com>2010-09-19 22:53:53 -0400
commit0954828fcbf3bd13d593499b16b901a4e801b0b9 (patch)
treec44e00f43b789c3fb5ab69c36d9ec408820dec21 /scripts
parentc55c9d571a3db7a096834b6c8a58d5a32dc807e6 (diff)
kconfig: replace KERNELVERSION usage by the mainmenu's prompt
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/kconfig/confdata.c16
-rw-r--r--scripts/kconfig/gconf.c5
-rw-r--r--scripts/kconfig/mconf.c6
-rw-r--r--scripts/kconfig/nconf.c6
-rw-r--r--scripts/kconfig/qconf.cc4
5 files changed, 11 insertions, 26 deletions
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index 9f3c8899da5a..f7d89d7065b7 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -574,8 +574,6 @@ int conf_write(const char *name)
574 if (!out) 574 if (!out)
575 return 1; 575 return 1;
576 576
577 sym = sym_lookup("KERNELVERSION", 0);
578 sym_calc_value(sym);
579 time(&now); 577 time(&now);
580 env = getenv("KCONFIG_NOTIMESTAMP"); 578 env = getenv("KCONFIG_NOTIMESTAMP");
581 if (env && *env) 579 if (env && *env)
@@ -583,10 +581,10 @@ int conf_write(const char *name)
583 581
584 fprintf(out, _("#\n" 582 fprintf(out, _("#\n"
585 "# Automatically generated make config: don't edit\n" 583 "# Automatically generated make config: don't edit\n"
586 "# Linux kernel version: %s\n" 584 "# %s\n"
587 "%s%s" 585 "%s%s"
588 "#\n"), 586 "#\n"),
589 sym_get_string_value(sym), 587 rootmenu.prompt->text,
590 use_timestamp ? "# " : "", 588 use_timestamp ? "# " : "",
591 use_timestamp ? ctime(&now) : ""); 589 use_timestamp ? ctime(&now) : "");
592 590
@@ -797,25 +795,23 @@ int conf_write_autoconf(void)
797 return 1; 795 return 1;
798 } 796 }
799 797
800 sym = sym_lookup("KERNELVERSION", 0);
801 sym_calc_value(sym);
802 time(&now); 798 time(&now);
803 fprintf(out, "#\n" 799 fprintf(out, "#\n"
804 "# Automatically generated make config: don't edit\n" 800 "# Automatically generated make config: don't edit\n"
805 "# Linux kernel version: %s\n" 801 "# %s\n"
806 "# %s" 802 "# %s"
807 "#\n", 803 "#\n",
808 sym_get_string_value(sym), ctime(&now)); 804 rootmenu.prompt->text, ctime(&now));
809 fprintf(tristate, "#\n" 805 fprintf(tristate, "#\n"
810 "# Automatically generated - do not edit\n" 806 "# Automatically generated - do not edit\n"
811 "\n"); 807 "\n");
812 fprintf(out_h, "/*\n" 808 fprintf(out_h, "/*\n"
813 " * Automatically generated C config: don't edit\n" 809 " * Automatically generated C config: don't edit\n"
814 " * Linux kernel version: %s\n" 810 " * %s\n"
815 " * %s" 811 " * %s"
816 " */\n" 812 " */\n"
817 "#define AUTOCONF_INCLUDED\n", 813 "#define AUTOCONF_INCLUDED\n",
818 sym_get_string_value(sym), ctime(&now)); 814 rootmenu.prompt->text, ctime(&now));
819 815
820 for_all_symbols(i, sym) { 816 for_all_symbols(i, sym) {
821 sym_calc_value(sym); 817 sym_calc_value(sym);
diff --git a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c
index 262fbd19c1ea..455896164d72 100644
--- a/scripts/kconfig/gconf.c
+++ b/scripts/kconfig/gconf.c
@@ -133,7 +133,6 @@ void init_main_window(const gchar * glade_file)
133 GladeXML *xml; 133 GladeXML *xml;
134 GtkWidget *widget; 134 GtkWidget *widget;
135 GtkTextBuffer *txtbuf; 135 GtkTextBuffer *txtbuf;
136 char title[256];
137 GtkStyle *style; 136 GtkStyle *style;
138 137
139 xml = glade_xml_new(glade_file, "window1", NULL); 138 xml = glade_xml_new(glade_file, "window1", NULL);
@@ -210,9 +209,7 @@ void init_main_window(const gchar * glade_file)
210 /*"style", PANGO_STYLE_OBLIQUE, */ 209 /*"style", PANGO_STYLE_OBLIQUE, */
211 NULL); 210 NULL);
212 211
213 sprintf(title, _("Linux Kernel v%s Configuration"), 212 gtk_window_set_title(GTK_WINDOW(main_wnd), rootmenu.prompt->text);
214 getenv("KERNELVERSION"));
215 gtk_window_set_title(GTK_WINDOW(main_wnd), title);
216 213
217 gtk_widget_show(main_wnd); 214 gtk_widget_show(main_wnd);
218} 215}
diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c
index cee4281ad209..d433c7a24745 100644
--- a/scripts/kconfig/mconf.c
+++ b/scripts/kconfig/mconf.c
@@ -288,13 +288,9 @@ static void set_config_filename(const char *config_filename)
288{ 288{
289 static char menu_backtitle[PATH_MAX+128]; 289 static char menu_backtitle[PATH_MAX+128];
290 int size; 290 int size;
291 struct symbol *sym;
292 291
293 sym = sym_lookup("KERNELVERSION", 0);
294 sym_calc_value(sym);
295 size = snprintf(menu_backtitle, sizeof(menu_backtitle), 292 size = snprintf(menu_backtitle, sizeof(menu_backtitle),
296 _("%s - Linux Kernel v%s Configuration"), 293 "%s - %s", config_filename, rootmenu.prompt->text);
297 config_filename, sym_get_string_value(sym));
298 if (size >= sizeof(menu_backtitle)) 294 if (size >= sizeof(menu_backtitle))
299 menu_backtitle[sizeof(menu_backtitle)-1] = '\0'; 295 menu_backtitle[sizeof(menu_backtitle)-1] = '\0';
300 set_dialog_backtitle(menu_backtitle); 296 set_dialog_backtitle(menu_backtitle);
diff --git a/scripts/kconfig/nconf.c b/scripts/kconfig/nconf.c
index 801cc048704a..545e1af7cb68 100644
--- a/scripts/kconfig/nconf.c
+++ b/scripts/kconfig/nconf.c
@@ -633,13 +633,9 @@ static char menu_backtitle[PATH_MAX+128];
633static const char *set_config_filename(const char *config_filename) 633static const char *set_config_filename(const char *config_filename)
634{ 634{
635 int size; 635 int size;
636 struct symbol *sym;
637 636
638 sym = sym_lookup("KERNELVERSION", 0);
639 sym_calc_value(sym);
640 size = snprintf(menu_backtitle, sizeof(menu_backtitle), 637 size = snprintf(menu_backtitle, sizeof(menu_backtitle),
641 _("%s - Linux Kernel v%s Configuration"), 638 "%s - %s", config_filename, rootmenu.prompt->text);
642 config_filename, sym_get_string_value(sym));
643 if (size >= sizeof(menu_backtitle)) 639 if (size >= sizeof(menu_backtitle))
644 menu_backtitle[sizeof(menu_backtitle)-1] = '\0'; 640 menu_backtitle[sizeof(menu_backtitle)-1] = '\0';
645 641
diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index fe18f7efdca1..06dd2e33581d 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -1274,8 +1274,8 @@ ConfigMainWindow::ConfigMainWindow(void)
1274 char title[256]; 1274 char title[256];
1275 1275
1276 QDesktopWidget *d = configApp->desktop(); 1276 QDesktopWidget *d = configApp->desktop();
1277 snprintf(title, sizeof(title), _("Linux Kernel v%s Configuration%s"), 1277 snprintf(title, sizeof(title), "%s%s",
1278 getenv("KERNELVERSION"), 1278 rootmenu.prompt->text,
1279#if QT_VERSION < 0x040000 1279#if QT_VERSION < 0x040000
1280 " (Qt3)" 1280 " (Qt3)"
1281#else 1281#else