kconfig: replace KERNELVERSION usage by the mainmenu's prompt
authorArnaud Lacombe <lacombar@gmail.com>
Wed, 18 Aug 2010 05:57:13 +0000 (01:57 -0400)
committerArnaud Lacombe <lacombar@gmail.com>
Mon, 20 Sep 2010 02:53:53 +0000 (22:53 -0400)
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Michal Marek <mmarek@suse.cz>
scripts/kconfig/confdata.c
scripts/kconfig/gconf.c
scripts/kconfig/mconf.c
scripts/kconfig/nconf.c
scripts/kconfig/qconf.cc

index 9f3c8899da5a3dcb4fd8ef10b6898f85194b2d8d..f7d89d7065b7e5db1c844902944357f36fac728f 100644 (file)
@@ -574,8 +574,6 @@ int conf_write(const char *name)
        if (!out)
                return 1;
 
-       sym = sym_lookup("KERNELVERSION", 0);
-       sym_calc_value(sym);
        time(&now);
        env = getenv("KCONFIG_NOTIMESTAMP");
        if (env && *env)
@@ -583,10 +581,10 @@ int conf_write(const char *name)
 
        fprintf(out, _("#\n"
                       "# Automatically generated make config: don't edit\n"
-                      "# Linux kernel version: %s\n"
+                      "# %s\n"
                       "%s%s"
                       "#\n"),
-                    sym_get_string_value(sym),
+                    rootmenu.prompt->text,
                     use_timestamp ? "# " : "",
                     use_timestamp ? ctime(&now) : "");
 
@@ -797,25 +795,23 @@ int conf_write_autoconf(void)
                return 1;
        }
 
-       sym = sym_lookup("KERNELVERSION", 0);
-       sym_calc_value(sym);
        time(&now);
        fprintf(out, "#\n"
                     "# Automatically generated make config: don't edit\n"
-                    "# Linux kernel version: %s\n"
+                    "# %s\n"
                     "# %s"
                     "#\n",
-                    sym_get_string_value(sym), ctime(&now));
+                    rootmenu.prompt->text, ctime(&now));
        fprintf(tristate, "#\n"
                          "# Automatically generated - do not edit\n"
                          "\n");
        fprintf(out_h, "/*\n"
                       " * Automatically generated C config: don't edit\n"
-                      " * Linux kernel version: %s\n"
+                      " * %s\n"
                       " * %s"
                       " */\n"
                       "#define AUTOCONF_INCLUDED\n",
-                      sym_get_string_value(sym), ctime(&now));
+                      rootmenu.prompt->text, ctime(&now));
 
        for_all_symbols(i, sym) {
                sym_calc_value(sym);
index 262fbd19c1eab5ecd20948a54f5bdb1c86e210df..455896164d72ccdbe327b2b5914b9561bece6c17 100644 (file)
@@ -133,7 +133,6 @@ void init_main_window(const gchar * glade_file)
        GladeXML *xml;
        GtkWidget *widget;
        GtkTextBuffer *txtbuf;
-       char title[256];
        GtkStyle *style;
 
        xml = glade_xml_new(glade_file, "window1", NULL);
@@ -210,9 +209,7 @@ void init_main_window(const gchar * glade_file)
                                          /*"style", PANGO_STYLE_OBLIQUE, */
                                          NULL);
 
-       sprintf(title, _("Linux Kernel v%s Configuration"),
-               getenv("KERNELVERSION"));
-       gtk_window_set_title(GTK_WINDOW(main_wnd), title);
+       gtk_window_set_title(GTK_WINDOW(main_wnd), rootmenu.prompt->text);
 
        gtk_widget_show(main_wnd);
 }
index cee4281ad209f8cc97641ee10ae673448a3c8cdc..d433c7a24745ff75278132bb9930e242f0785f86 100644 (file)
@@ -288,13 +288,9 @@ static void set_config_filename(const char *config_filename)
 {
        static char menu_backtitle[PATH_MAX+128];
        int size;
-       struct symbol *sym;
 
-       sym = sym_lookup("KERNELVERSION", 0);
-       sym_calc_value(sym);
        size = snprintf(menu_backtitle, sizeof(menu_backtitle),
-                       _("%s - Linux Kernel v%s Configuration"),
-                       config_filename, sym_get_string_value(sym));
+                       "%s - %s", config_filename, rootmenu.prompt->text);
        if (size >= sizeof(menu_backtitle))
                menu_backtitle[sizeof(menu_backtitle)-1] = '\0';
        set_dialog_backtitle(menu_backtitle);
index 801cc048704a580925bc474f6d6154f55ec6b83c..545e1af7cb6884426212d42627da4847ca1e1877 100644 (file)
@@ -633,13 +633,9 @@ static char menu_backtitle[PATH_MAX+128];
 static const char *set_config_filename(const char *config_filename)
 {
        int size;
-       struct symbol *sym;
 
-       sym = sym_lookup("KERNELVERSION", 0);
-       sym_calc_value(sym);
        size = snprintf(menu_backtitle, sizeof(menu_backtitle),
-                       _("%s - Linux Kernel v%s Configuration"),
-                       config_filename, sym_get_string_value(sym));
+                       "%s - %s", config_filename, rootmenu.prompt->text);
        if (size >= sizeof(menu_backtitle))
                menu_backtitle[sizeof(menu_backtitle)-1] = '\0';
 
index fe18f7efdca12513a0964ffb7b2b1843d2dd481e..06dd2e33581de5de81863bd1b74b2fb7100af5ed 100644 (file)
@@ -1274,8 +1274,8 @@ ConfigMainWindow::ConfigMainWindow(void)
        char title[256];
 
        QDesktopWidget *d = configApp->desktop();
-       snprintf(title, sizeof(title), _("Linux Kernel v%s Configuration%s"),
-               getenv("KERNELVERSION"),
+       snprintf(title, sizeof(title), "%s%s",
+               rootmenu.prompt->text,
 #if QT_VERSION < 0x040000
                " (Qt3)"
 #else