提交 0954828f 编写于 作者: A Arnaud Lacombe

kconfig: replace KERNELVERSION usage by the mainmenu's prompt

Signed-off-by: NArnaud Lacombe <lacombar@gmail.com>
Reviewed-by: NSam Ravnborg <sam@ravnborg.org>
Reviewed-by: NMichal Marek <mmarek@suse.cz>
上级 c55c9d57
...@@ -574,8 +574,6 @@ int conf_write(const char *name) ...@@ -574,8 +574,6 @@ int conf_write(const char *name)
if (!out) if (!out)
return 1; return 1;
sym = sym_lookup("KERNELVERSION", 0);
sym_calc_value(sym);
time(&now); time(&now);
env = getenv("KCONFIG_NOTIMESTAMP"); env = getenv("KCONFIG_NOTIMESTAMP");
if (env && *env) if (env && *env)
...@@ -583,10 +581,10 @@ int conf_write(const char *name) ...@@ -583,10 +581,10 @@ int conf_write(const char *name)
fprintf(out, _("#\n" fprintf(out, _("#\n"
"# Automatically generated make config: don't edit\n" "# Automatically generated make config: don't edit\n"
"# Linux kernel version: %s\n" "# %s\n"
"%s%s" "%s%s"
"#\n"), "#\n"),
sym_get_string_value(sym), rootmenu.prompt->text,
use_timestamp ? "# " : "", use_timestamp ? "# " : "",
use_timestamp ? ctime(&now) : ""); use_timestamp ? ctime(&now) : "");
...@@ -797,25 +795,23 @@ int conf_write_autoconf(void) ...@@ -797,25 +795,23 @@ int conf_write_autoconf(void)
return 1; return 1;
} }
sym = sym_lookup("KERNELVERSION", 0);
sym_calc_value(sym);
time(&now); time(&now);
fprintf(out, "#\n" fprintf(out, "#\n"
"# Automatically generated make config: don't edit\n" "# Automatically generated make config: don't edit\n"
"# Linux kernel version: %s\n" "# %s\n"
"# %s" "# %s"
"#\n", "#\n",
sym_get_string_value(sym), ctime(&now)); rootmenu.prompt->text, ctime(&now));
fprintf(tristate, "#\n" fprintf(tristate, "#\n"
"# Automatically generated - do not edit\n" "# Automatically generated - do not edit\n"
"\n"); "\n");
fprintf(out_h, "/*\n" fprintf(out_h, "/*\n"
" * Automatically generated C config: don't edit\n" " * Automatically generated C config: don't edit\n"
" * Linux kernel version: %s\n" " * %s\n"
" * %s" " * %s"
" */\n" " */\n"
"#define AUTOCONF_INCLUDED\n", "#define AUTOCONF_INCLUDED\n",
sym_get_string_value(sym), ctime(&now)); rootmenu.prompt->text, ctime(&now));
for_all_symbols(i, sym) { for_all_symbols(i, sym) {
sym_calc_value(sym); sym_calc_value(sym);
......
...@@ -133,7 +133,6 @@ void init_main_window(const gchar * glade_file) ...@@ -133,7 +133,6 @@ void init_main_window(const gchar * glade_file)
GladeXML *xml; GladeXML *xml;
GtkWidget *widget; GtkWidget *widget;
GtkTextBuffer *txtbuf; GtkTextBuffer *txtbuf;
char title[256];
GtkStyle *style; GtkStyle *style;
xml = glade_xml_new(glade_file, "window1", NULL); xml = glade_xml_new(glade_file, "window1", NULL);
...@@ -210,9 +209,7 @@ void init_main_window(const gchar * glade_file) ...@@ -210,9 +209,7 @@ void init_main_window(const gchar * glade_file)
/*"style", PANGO_STYLE_OBLIQUE, */ /*"style", PANGO_STYLE_OBLIQUE, */
NULL); NULL);
sprintf(title, _("Linux Kernel v%s Configuration"), gtk_window_set_title(GTK_WINDOW(main_wnd), rootmenu.prompt->text);
getenv("KERNELVERSION"));
gtk_window_set_title(GTK_WINDOW(main_wnd), title);
gtk_widget_show(main_wnd); gtk_widget_show(main_wnd);
} }
......
...@@ -288,13 +288,9 @@ static void set_config_filename(const char *config_filename) ...@@ -288,13 +288,9 @@ static void set_config_filename(const char *config_filename)
{ {
static char menu_backtitle[PATH_MAX+128]; static char menu_backtitle[PATH_MAX+128];
int size; int size;
struct symbol *sym;
sym = sym_lookup("KERNELVERSION", 0);
sym_calc_value(sym);
size = snprintf(menu_backtitle, sizeof(menu_backtitle), size = snprintf(menu_backtitle, sizeof(menu_backtitle),
_("%s - Linux Kernel v%s Configuration"), "%s - %s", config_filename, rootmenu.prompt->text);
config_filename, sym_get_string_value(sym));
if (size >= sizeof(menu_backtitle)) if (size >= sizeof(menu_backtitle))
menu_backtitle[sizeof(menu_backtitle)-1] = '\0'; menu_backtitle[sizeof(menu_backtitle)-1] = '\0';
set_dialog_backtitle(menu_backtitle); set_dialog_backtitle(menu_backtitle);
......
...@@ -633,13 +633,9 @@ static char menu_backtitle[PATH_MAX+128]; ...@@ -633,13 +633,9 @@ static char menu_backtitle[PATH_MAX+128];
static const char *set_config_filename(const char *config_filename) static const char *set_config_filename(const char *config_filename)
{ {
int size; int size;
struct symbol *sym;
sym = sym_lookup("KERNELVERSION", 0);
sym_calc_value(sym);
size = snprintf(menu_backtitle, sizeof(menu_backtitle), size = snprintf(menu_backtitle, sizeof(menu_backtitle),
_("%s - Linux Kernel v%s Configuration"), "%s - %s", config_filename, rootmenu.prompt->text);
config_filename, sym_get_string_value(sym));
if (size >= sizeof(menu_backtitle)) if (size >= sizeof(menu_backtitle))
menu_backtitle[sizeof(menu_backtitle)-1] = '\0'; menu_backtitle[sizeof(menu_backtitle)-1] = '\0';
......
...@@ -1274,8 +1274,8 @@ ConfigMainWindow::ConfigMainWindow(void) ...@@ -1274,8 +1274,8 @@ ConfigMainWindow::ConfigMainWindow(void)
char title[256]; char title[256];
QDesktopWidget *d = configApp->desktop(); QDesktopWidget *d = configApp->desktop();
snprintf(title, sizeof(title), _("Linux Kernel v%s Configuration%s"), snprintf(title, sizeof(title), "%s%s",
getenv("KERNELVERSION"), rootmenu.prompt->text,
#if QT_VERSION < 0x040000 #if QT_VERSION < 0x040000
" (Qt3)" " (Qt3)"
#else #else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册