Merge tag 'kbuild-v6.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
Pull Kbuild updates from Masahiro Yamada:
"This is the last pull request from me.
I'm grateful to have been able to continue as a maintainer for eight
years. From the next cycle, Nathan and Nicolas will maintain Kbuild.
- Fix a shortcut key issue in menuconfig
- Fix missing rebuild of kheaders
- Sort the symbol dump generated by gendwarfsyms
- Support zboot extraction in scripts/extract-vmlinux
- Migrate gconfig to GTK 3
- Add TAR variable to allow overriding the default tar command
- Hand over Kbuild maintainership"
* tag 'kbuild-v6.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (92 commits)
MAINTAINERS: hand over Kbuild maintenance
kheaders: make it possible to override TAR
kbuild: userprogs: use correct linker when mixing clang and GNU ld
kconfig: lxdialog: replace strcpy() with strncpy() in inputbox.c
kconfig: lxdialog: replace strcpy with snprintf in print_autowrap
kconfig: gconf: refactor text_insert_help()
kconfig: gconf: remove unneeded variable in text_insert_msg
kconfig: gconf: use hyphens in signals
kconfig: gconf: replace GtkImageMenuItem with GtkMenuItem
kconfig: gconf: Fix Back button behavior
kconfig: gconf: fix single view to display dependent symbols correctly
scripts: add zboot support to extract-vmlinux
gendwarfksyms: order -T symtypes output by name
gendwarfksyms: use preferred form of sizeof for allocation
kconfig: qconf: confine {begin,end}Group to constructor and destructor
kconfig: qconf: fix ConfigList::updateListAllforAll()
kconfig: add a function to dump all menu entries in a tree-like format
kconfig: gconf: show GTK version in About dialog
kconfig: gconf: replace GtkHPaned and GtkVPaned with GtkPaned
kconfig: gconf: replace GdkColor with GdkRGBA
...
This commit is contained in:
@@ -12,13 +12,12 @@
|
||||
|
||||
check_vmlinux()
|
||||
{
|
||||
# Use readelf to check if it's a valid ELF
|
||||
# TODO: find a better to way to check that it's really vmlinux
|
||||
# and not just an elf
|
||||
readelf -h $1 > /dev/null 2>&1 || return 1
|
||||
|
||||
cat $1
|
||||
exit 0
|
||||
if file "$1" | grep -q 'Linux kernel.*boot executable' ||
|
||||
readelf -h "$1" > /dev/null 2>&1
|
||||
then
|
||||
cat "$1"
|
||||
exit 0
|
||||
fi
|
||||
}
|
||||
|
||||
try_decompress()
|
||||
|
||||
@@ -15,7 +15,7 @@ void cache_set(struct cache *cache, unsigned long key, int value)
|
||||
{
|
||||
struct cache_item *ci;
|
||||
|
||||
ci = xmalloc(sizeof(struct cache_item));
|
||||
ci = xmalloc(sizeof(*ci));
|
||||
ci->key = key;
|
||||
ci->value = value;
|
||||
hash_add(cache->cache, &ci->hash, hash_32(key));
|
||||
|
||||
@@ -33,7 +33,7 @@ static struct die *create_die(Dwarf_Die *die, enum die_state state)
|
||||
{
|
||||
struct die *cd;
|
||||
|
||||
cd = xmalloc(sizeof(struct die));
|
||||
cd = xmalloc(sizeof(*cd));
|
||||
init_die(cd);
|
||||
cd->addr = (uintptr_t)die->addr;
|
||||
|
||||
@@ -123,7 +123,7 @@ static struct die_fragment *append_item(struct die *cd)
|
||||
{
|
||||
struct die_fragment *df;
|
||||
|
||||
df = xmalloc(sizeof(struct die_fragment));
|
||||
df = xmalloc(sizeof(*df));
|
||||
df->type = FRAGMENT_EMPTY;
|
||||
list_add_tail(&df->list, &cd->fragments);
|
||||
return df;
|
||||
|
||||
@@ -634,7 +634,7 @@ static int get_union_kabi_status(Dwarf_Die *die, Dwarf_Die *placeholder,
|
||||
* Note that the user of this feature is responsible for ensuring
|
||||
* that the structure actually remains ABI compatible.
|
||||
*/
|
||||
memset(&state.kabi, 0, sizeof(struct kabi_state));
|
||||
memset(&state.kabi, 0, sizeof(state.kabi));
|
||||
|
||||
res = checkp(process_die_container(&state, NULL, die,
|
||||
check_union_member_kabi_status,
|
||||
|
||||
@@ -228,7 +228,7 @@ void kabi_read_rules(int fd)
|
||||
if (type == KABI_RULE_TYPE_UNKNOWN)
|
||||
error("unsupported kABI rule type: '%s'", field);
|
||||
|
||||
rule = xmalloc(sizeof(struct rule));
|
||||
rule = xmalloc(sizeof(*rule));
|
||||
|
||||
rule->type = type;
|
||||
rule->target = xstrdup(get_rule_field(&rule_str, &left));
|
||||
|
||||
@@ -146,7 +146,7 @@ void symbol_read_exports(FILE *file)
|
||||
continue;
|
||||
}
|
||||
|
||||
sym = xcalloc(1, sizeof(struct symbol));
|
||||
sym = xcalloc(1, sizeof(*sym));
|
||||
sym->name = name;
|
||||
sym->addr.section = SHN_UNDEF;
|
||||
sym->state = SYMBOL_UNPROCESSED;
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
#define _GNU_SOURCE
|
||||
#include <inttypes.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <zlib.h>
|
||||
|
||||
#include "gendwarfksyms.h"
|
||||
@@ -43,7 +45,7 @@ static int type_list_append(struct list_head *list, const char *s, void *owned)
|
||||
if (!s)
|
||||
return 0;
|
||||
|
||||
entry = xmalloc(sizeof(struct type_list_entry));
|
||||
entry = xmalloc(sizeof(*entry));
|
||||
entry->str = s;
|
||||
entry->owned = owned;
|
||||
list_add_tail(&entry->list, list);
|
||||
@@ -120,7 +122,7 @@ static struct type_expansion *type_map_add(const char *name,
|
||||
struct type_expansion *e;
|
||||
|
||||
if (__type_map_get(name, &e)) {
|
||||
e = xmalloc(sizeof(struct type_expansion));
|
||||
e = xmalloc(sizeof(*e));
|
||||
type_expansion_init(e);
|
||||
e->name = xstrdup(name);
|
||||
|
||||
@@ -179,20 +181,41 @@ static int type_map_get(const char *name, struct type_expansion **res)
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int cmp_expansion_name(const void *p1, const void *p2)
|
||||
{
|
||||
struct type_expansion *const *e1 = p1;
|
||||
struct type_expansion *const *e2 = p2;
|
||||
|
||||
return strcmp((*e1)->name, (*e2)->name);
|
||||
}
|
||||
|
||||
static void type_map_write(FILE *file)
|
||||
{
|
||||
struct type_expansion *e;
|
||||
struct hlist_node *tmp;
|
||||
struct type_expansion **es;
|
||||
size_t count = 0;
|
||||
size_t i = 0;
|
||||
|
||||
if (!file)
|
||||
return;
|
||||
|
||||
hash_for_each_safe(type_map, e, tmp, hash) {
|
||||
checkp(fputs(e->name, file));
|
||||
hash_for_each_safe(type_map, e, tmp, hash)
|
||||
++count;
|
||||
es = xmalloc(count * sizeof(*es));
|
||||
hash_for_each_safe(type_map, e, tmp, hash)
|
||||
es[i++] = e;
|
||||
|
||||
qsort(es, count, sizeof(*es), cmp_expansion_name);
|
||||
|
||||
for (i = 0; i < count; ++i) {
|
||||
checkp(fputs(es[i]->name, file));
|
||||
checkp(fputs(" ", file));
|
||||
type_list_write(&e->expanded, file);
|
||||
type_list_write(&es[i]->expanded, file);
|
||||
checkp(fputs("\n", file));
|
||||
}
|
||||
|
||||
free(es);
|
||||
}
|
||||
|
||||
static void type_map_free(void)
|
||||
|
||||
@@ -594,7 +594,7 @@ static void check_conf(struct menu *menu)
|
||||
default:
|
||||
if (!conf_cnt++)
|
||||
printf("*\n* Restart config...\n*\n");
|
||||
rootEntry = menu_get_parent_menu(menu);
|
||||
rootEntry = menu_get_menu_or_parent_menu(menu);
|
||||
conf(rootEntry);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ static bool is_same(const char *file1, const char *file2)
|
||||
if (map2 == MAP_FAILED)
|
||||
goto close2;
|
||||
|
||||
if (bcmp(map1, map2, st1.st_size))
|
||||
if (memcmp(map1, map2, st1.st_size))
|
||||
goto close2;
|
||||
|
||||
ret = true;
|
||||
|
||||
@@ -6,7 +6,7 @@ set -eu
|
||||
cflags=$1
|
||||
libs=$2
|
||||
|
||||
PKG="gtk+-2.0 gmodule-2.0 libglade-2.0"
|
||||
PKG=gtk+-3.0
|
||||
|
||||
if [ -z "$(command -v ${HOSTPKG_CONFIG})" ]; then
|
||||
echo >&2 "*"
|
||||
@@ -18,18 +18,11 @@ fi
|
||||
if ! ${HOSTPKG_CONFIG} --exists $PKG; then
|
||||
echo >&2 "*"
|
||||
echo >&2 "* Unable to find the GTK+ installation. Please make sure that"
|
||||
echo >&2 "* the GTK+ 2.0 development package is correctly installed."
|
||||
echo >&2 "* the GTK 3 development package is correctly installed."
|
||||
echo >&2 "* You need $PKG"
|
||||
echo >&2 "*"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! ${HOSTPKG_CONFIG} --atleast-version=2.0.0 gtk+-2.0; then
|
||||
echo >&2 "*"
|
||||
echo >&2 "* GTK+ is present but version >= 2.0.0 is required."
|
||||
echo >&2 "*"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
${HOSTPKG_CONFIG} --cflags ${PKG} > ${cflags}
|
||||
${HOSTPKG_CONFIG} --libs ${PKG} > ${libs}
|
||||
|
||||
+834
-949
File diff suppressed because it is too large
Load Diff
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
|
||||
|
||||
<glade-interface>
|
||||
<interface>
|
||||
|
||||
<widget class="GtkWindow" id="window1">
|
||||
<object class="GtkWindow" id="window1">
|
||||
<property name="visible">True</property>
|
||||
<property name="title" translatable="yes">Gtk Kernel Configurator</property>
|
||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||
@@ -17,295 +17,196 @@
|
||||
<property name="skip_pager_hint">False</property>
|
||||
<property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
|
||||
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
|
||||
<signal name="destroy" handler="on_window1_destroy" object="window1"/>
|
||||
<signal name="size_request" handler="on_window1_size_request" object="vpaned1" last_modification_time="Fri, 11 Jan 2002 16:17:11 GMT"/>
|
||||
<signal name="delete_event" handler="on_window1_delete_event" object="window1" last_modification_time="Sun, 09 Mar 2003 19:42:46 GMT"/>
|
||||
|
||||
<child>
|
||||
<widget class="GtkVBox" id="vbox1">
|
||||
<object class="GtkBox" id="vbox1">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">0</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkMenuBar" id="menubar1">
|
||||
<object class="GtkMenuBar" id="menubar1">
|
||||
<property name="visible">True</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkMenuItem" id="file1">
|
||||
<object class="GtkMenuItem" id="file1">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">_File</property>
|
||||
<property name="use_underline">True</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkMenu" id="file1_menu">
|
||||
<child type="submenu">
|
||||
<object class="GtkMenu" id="file1_menu">
|
||||
|
||||
<child>
|
||||
<widget class="GtkImageMenuItem" id="load1">
|
||||
<object class="GtkMenuItem" id="load1">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip" translatable="yes">Load a config file</property>
|
||||
<property name="tooltip-text" translatable="yes">Load a config file</property>
|
||||
<property name="label" translatable="yes">_Load</property>
|
||||
<property name="use_underline">True</property>
|
||||
<signal name="activate" handler="on_load1_activate"/>
|
||||
<accelerator key="L" modifiers="GDK_CONTROL_MASK" signal="activate"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image39">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-open</property>
|
||||
<property name="icon_size">1</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkImageMenuItem" id="save1">
|
||||
<object class="GtkMenuItem" id="save1">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip" translatable="yes">Save the config in .config</property>
|
||||
<property name="tooltip-text" translatable="yes">Save the config in .config</property>
|
||||
<property name="label" translatable="yes">_Save</property>
|
||||
<property name="use_underline">True</property>
|
||||
<signal name="activate" handler="on_save_activate"/>
|
||||
<accelerator key="S" modifiers="GDK_CONTROL_MASK" signal="activate"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image40">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-save</property>
|
||||
<property name="icon_size">1</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkImageMenuItem" id="save_as1">
|
||||
<object class="GtkMenuItem" id="save_as1">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip" translatable="yes">Save the config in a file</property>
|
||||
<property name="tooltip-text" translatable="yes">Save the config in a file</property>
|
||||
<property name="label" translatable="yes">Save _as</property>
|
||||
<property name="use_underline">True</property>
|
||||
<signal name="activate" handler="on_save_as1_activate"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image41">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-save-as</property>
|
||||
<property name="icon_size">1</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkSeparatorMenuItem" id="separator1">
|
||||
<object class="GtkSeparatorMenuItem" id="separator1">
|
||||
<property name="visible">True</property>
|
||||
</widget>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkImageMenuItem" id="quit1">
|
||||
<object class="GtkMenuItem" id="quit1">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">_Quit</property>
|
||||
<property name="use_underline">True</property>
|
||||
<signal name="activate" handler="on_quit1_activate"/>
|
||||
<accelerator key="Q" modifiers="GDK_CONTROL_MASK" signal="activate"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image42">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-quit</property>
|
||||
<property name="icon_size">1</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</object>
|
||||
</child>
|
||||
</widget>
|
||||
</object>
|
||||
</child>
|
||||
</widget>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkMenuItem" id="options1">
|
||||
<object class="GtkMenuItem" id="options1">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">_Options</property>
|
||||
<property name="use_underline">True</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkMenu" id="options1_menu">
|
||||
<child type="submenu">
|
||||
<object class="GtkMenu" id="options1_menu">
|
||||
|
||||
<child>
|
||||
<widget class="GtkCheckMenuItem" id="show_name1">
|
||||
<object class="GtkCheckMenuItem" id="show_name1">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip" translatable="yes">Show name</property>
|
||||
<property name="tooltip-text" translatable="yes">Show name</property>
|
||||
<property name="label" translatable="yes">Show _name</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="active">False</property>
|
||||
<signal name="activate" handler="on_show_name1_activate"/>
|
||||
</widget>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkCheckMenuItem" id="show_range1">
|
||||
<object class="GtkCheckMenuItem" id="show_range1">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip" translatable="yes">Show range (Y/M/N)</property>
|
||||
<property name="tooltip-text" translatable="yes">Show range (Y/M/N)</property>
|
||||
<property name="label" translatable="yes">Show _range</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="active">False</property>
|
||||
<signal name="activate" handler="on_show_range1_activate"/>
|
||||
</widget>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkCheckMenuItem" id="show_data1">
|
||||
<object class="GtkCheckMenuItem" id="show_data1">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip" translatable="yes">Show value of the option</property>
|
||||
<property name="tooltip-text" translatable="yes">Show value of the option</property>
|
||||
<property name="label" translatable="yes">Show _data</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="active">False</property>
|
||||
<signal name="activate" handler="on_show_data1_activate"/>
|
||||
</widget>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkSeparatorMenuItem" id="separator2">
|
||||
<object class="GtkSeparatorMenuItem" id="separator2">
|
||||
<property name="visible">True</property>
|
||||
</widget>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkRadioMenuItem" id="set_option_mode1">
|
||||
<object class="GtkRadioMenuItem" id="set_option_mode1">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip" translatable="yes">Show normal options</property>
|
||||
<property name="tooltip-text" translatable="yes">Show normal options</property>
|
||||
<property name="label" translatable="yes">Show normal options</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="active">True</property>
|
||||
<signal name="activate" handler="on_set_option_mode1_activate"/>
|
||||
</widget>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkRadioMenuItem" id="set_option_mode2">
|
||||
<object class="GtkRadioMenuItem" id="set_option_mode2">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip" translatable="yes">Show all options</property>
|
||||
<property name="tooltip-text" translatable="yes">Show all options</property>
|
||||
<property name="label" translatable="yes">Show all _options</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="active">False</property>
|
||||
<property name="group">set_option_mode1</property>
|
||||
<signal name="activate" handler="on_set_option_mode2_activate"/>
|
||||
</widget>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkRadioMenuItem" id="set_option_mode3">
|
||||
<object class="GtkRadioMenuItem" id="set_option_mode3">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip" translatable="yes">Show all options with prompts</property>
|
||||
<property name="tooltip-text" translatable="yes">Show all options with prompts</property>
|
||||
<property name="label" translatable="yes">Show all prompt options</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="active">False</property>
|
||||
<property name="group">set_option_mode1</property>
|
||||
<signal name="activate" handler="on_set_option_mode3_activate"/>
|
||||
</widget>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
</widget>
|
||||
</object>
|
||||
</child>
|
||||
</widget>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkMenuItem" id="help1">
|
||||
<object class="GtkMenuItem" id="help1">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">_Help</property>
|
||||
<property name="use_underline">True</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkMenu" id="help1_menu">
|
||||
<child type="submenu">
|
||||
<object class="GtkMenu" id="help1_menu">
|
||||
|
||||
<child>
|
||||
<widget class="GtkImageMenuItem" id="introduction1">
|
||||
<object class="GtkMenuItem" id="introduction1">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">_Introduction</property>
|
||||
<property name="use_underline">True</property>
|
||||
<signal name="activate" handler="on_introduction1_activate" last_modification_time="Fri, 15 Nov 2002 20:26:30 GMT"/>
|
||||
<accelerator key="I" modifiers="GDK_CONTROL_MASK" signal="activate"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image43">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-dialog-question</property>
|
||||
<property name="icon_size">1</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkImageMenuItem" id="about1">
|
||||
<object class="GtkMenuItem" id="about1">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">_About</property>
|
||||
<property name="use_underline">True</property>
|
||||
<signal name="activate" handler="on_about1_activate" last_modification_time="Fri, 15 Nov 2002 20:26:30 GMT"/>
|
||||
<accelerator key="A" modifiers="GDK_CONTROL_MASK" signal="activate"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image44">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-properties</property>
|
||||
<property name="icon_size">1</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkImageMenuItem" id="license1">
|
||||
<object class="GtkMenuItem" id="license1">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">_License</property>
|
||||
<property name="use_underline">True</property>
|
||||
<signal name="activate" handler="on_license1_activate" last_modification_time="Fri, 15 Nov 2002 20:26:30 GMT"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image45">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-justify-fill</property>
|
||||
<property name="icon_size">1</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</object>
|
||||
</child>
|
||||
</widget>
|
||||
</object>
|
||||
</child>
|
||||
</widget>
|
||||
</object>
|
||||
</child>
|
||||
</widget>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
@@ -314,32 +215,23 @@
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkHandleBox" id="handlebox1">
|
||||
<property name="visible">True</property>
|
||||
<property name="shadow_type">GTK_SHADOW_OUT</property>
|
||||
<property name="handle_position">GTK_POS_LEFT</property>
|
||||
<property name="snap_edge">GTK_POS_TOP</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkToolbar" id="toolbar1">
|
||||
<object class="GtkToolbar" id="toolbar1">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">GTK_ORIENTATION_HORIZONTAL</property>
|
||||
<property name="toolbar_style">GTK_TOOLBAR_BOTH</property>
|
||||
<property name="tooltips">True</property>
|
||||
<property name="show_arrow">True</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkToolButton" id="button1">
|
||||
<object class="GtkToolButton" id="button1">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip" translatable="yes">Goes up of one level (single view)</property>
|
||||
<property name="tooltip-text" translatable="yes">Goes up one level (single view)</property>
|
||||
<property name="label" translatable="yes">Back</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="stock_id">gtk-undo</property>
|
||||
<property name="visible_horizontal">True</property>
|
||||
<property name="visible_vertical">True</property>
|
||||
<property name="is_important">False</property>
|
||||
<signal name="clicked" handler="on_back_clicked"/>
|
||||
</widget>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
@@ -347,18 +239,18 @@
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkToolItem" id="toolitem1">
|
||||
<object class="GtkToolItem" id="toolitem1">
|
||||
<property name="visible">True</property>
|
||||
<property name="visible_horizontal">True</property>
|
||||
<property name="visible_vertical">True</property>
|
||||
<property name="is_important">False</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkVSeparator" id="vseparator1">
|
||||
<object class="GtkVSeparator" id="vseparator1">
|
||||
<property name="visible">True</property>
|
||||
</widget>
|
||||
</object>
|
||||
</child>
|
||||
</widget>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">False</property>
|
||||
@@ -366,17 +258,16 @@
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkToolButton" id="button2">
|
||||
<object class="GtkToolButton" id="button2">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip" translatable="yes">Load a config file</property>
|
||||
<property name="tooltip-text" translatable="yes">Load a config file</property>
|
||||
<property name="label" translatable="yes">Load</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="stock_id">gtk-open</property>
|
||||
<property name="visible_horizontal">True</property>
|
||||
<property name="visible_vertical">True</property>
|
||||
<property name="is_important">False</property>
|
||||
<signal name="clicked" handler="on_load_clicked"/>
|
||||
</widget>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
@@ -384,17 +275,16 @@
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkToolButton" id="button3">
|
||||
<object class="GtkToolButton" id="button3">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip" translatable="yes">Save a config file</property>
|
||||
<property name="tooltip-text" translatable="yes">Save a config file</property>
|
||||
<property name="label" translatable="yes">Save</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="stock_id">gtk-save</property>
|
||||
<property name="visible_horizontal">True</property>
|
||||
<property name="visible_vertical">True</property>
|
||||
<property name="is_important">False</property>
|
||||
<signal name="clicked" handler="on_save_activate"/>
|
||||
</widget>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
@@ -402,18 +292,18 @@
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkToolItem" id="toolitem2">
|
||||
<object class="GtkToolItem" id="toolitem2">
|
||||
<property name="visible">True</property>
|
||||
<property name="visible_horizontal">True</property>
|
||||
<property name="visible_vertical">True</property>
|
||||
<property name="is_important">False</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkVSeparator" id="vseparator2">
|
||||
<object class="GtkVSeparator" id="vseparator2">
|
||||
<property name="visible">True</property>
|
||||
</widget>
|
||||
</object>
|
||||
</child>
|
||||
</widget>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">False</property>
|
||||
@@ -421,17 +311,16 @@
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkToolButton" id="button4">
|
||||
<object class="GtkToolButton" id="button4">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip" translatable="yes">Single view</property>
|
||||
<property name="tooltip-text" translatable="yes">Single view</property>
|
||||
<property name="label" translatable="yes">Single</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="stock_id">gtk-missing-image</property>
|
||||
<property name="visible_horizontal">True</property>
|
||||
<property name="visible_vertical">True</property>
|
||||
<property name="is_important">False</property>
|
||||
<signal name="clicked" handler="on_single_clicked" last_modification_time="Sun, 12 Jan 2003 14:28:39 GMT"/>
|
||||
</widget>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
@@ -439,17 +328,16 @@
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkToolButton" id="button5">
|
||||
<object class="GtkToolButton" id="button5">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip" translatable="yes">Split view</property>
|
||||
<property name="tooltip-text" translatable="yes">Split view</property>
|
||||
<property name="label" translatable="yes">Split</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="stock_id">gtk-missing-image</property>
|
||||
<property name="visible_horizontal">True</property>
|
||||
<property name="visible_vertical">True</property>
|
||||
<property name="is_important">False</property>
|
||||
<signal name="clicked" handler="on_split_clicked" last_modification_time="Sun, 12 Jan 2003 14:28:45 GMT"/>
|
||||
</widget>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
@@ -457,17 +345,16 @@
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkToolButton" id="button6">
|
||||
<object class="GtkToolButton" id="button6">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip" translatable="yes">Full view</property>
|
||||
<property name="tooltip-text" translatable="yes">Full view</property>
|
||||
<property name="label" translatable="yes">Full</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="stock_id">gtk-missing-image</property>
|
||||
<property name="visible_horizontal">True</property>
|
||||
<property name="visible_vertical">True</property>
|
||||
<property name="is_important">False</property>
|
||||
<signal name="clicked" handler="on_full_clicked" last_modification_time="Sun, 12 Jan 2003 14:28:50 GMT"/>
|
||||
</widget>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
@@ -475,18 +362,18 @@
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkToolItem" id="toolitem3">
|
||||
<object class="GtkToolItem" id="toolitem3">
|
||||
<property name="visible">True</property>
|
||||
<property name="visible_horizontal">True</property>
|
||||
<property name="visible_vertical">True</property>
|
||||
<property name="is_important">False</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkVSeparator" id="vseparator3">
|
||||
<object class="GtkVSeparator" id="vseparator3">
|
||||
<property name="visible">True</property>
|
||||
</widget>
|
||||
</object>
|
||||
</child>
|
||||
</widget>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">False</property>
|
||||
@@ -494,17 +381,16 @@
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkToolButton" id="button7">
|
||||
<object class="GtkToolButton" id="button7">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip" translatable="yes">Collapse the whole tree in the right frame</property>
|
||||
<property name="tooltip-text" translatable="yes">Collapse the whole tree in the right frame</property>
|
||||
<property name="label" translatable="yes">Collapse</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="stock_id">gtk-remove</property>
|
||||
<property name="visible_horizontal">True</property>
|
||||
<property name="visible_vertical">True</property>
|
||||
<property name="is_important">False</property>
|
||||
<signal name="clicked" handler="on_collapse_clicked"/>
|
||||
</widget>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
@@ -512,25 +398,22 @@
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkToolButton" id="button8">
|
||||
<object class="GtkToolButton" id="button8">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip" translatable="yes">Expand the whole tree in the right frame</property>
|
||||
<property name="tooltip-text" translatable="yes">Expand the whole tree in the right frame</property>
|
||||
<property name="label" translatable="yes">Expand</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="stock_id">gtk-add</property>
|
||||
<property name="visible_horizontal">True</property>
|
||||
<property name="visible_vertical">True</property>
|
||||
<property name="is_important">False</property>
|
||||
<signal name="clicked" handler="on_expand_clicked"/>
|
||||
</widget>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
@@ -539,14 +422,13 @@
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkHPaned" id="hpaned1">
|
||||
<object class="GtkPaned" id="hpaned1">
|
||||
<property name="width_request">1</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="position">0</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkScrolledWindow" id="scrolledwindow1">
|
||||
<object class="GtkScrolledWindow" id="scrolledwindow1">
|
||||
<property name="visible">True</property>
|
||||
<property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
|
||||
<property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
|
||||
@@ -554,19 +436,16 @@
|
||||
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkTreeView" id="treeview1">
|
||||
<object class="GtkTreeView" id="treeview1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="headers_visible">True</property>
|
||||
<property name="rules_hint">False</property>
|
||||
<property name="reorderable">False</property>
|
||||
<property name="enable_search">False</property>
|
||||
<signal name="cursor_changed" handler="on_treeview2_cursor_changed" last_modification_time="Sun, 12 Jan 2003 15:58:22 GMT"/>
|
||||
<signal name="button_press_event" handler="on_treeview1_button_press_event" last_modification_time="Sun, 12 Jan 2003 16:03:52 GMT"/>
|
||||
<signal name="key_press_event" handler="on_treeview2_key_press_event" last_modification_time="Sun, 12 Jan 2003 16:11:44 GMT"/>
|
||||
</widget>
|
||||
</object>
|
||||
</child>
|
||||
</widget>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="shrink">True</property>
|
||||
<property name="resize">False</property>
|
||||
@@ -574,13 +453,13 @@
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkVPaned" id="vpaned1">
|
||||
<object class="GtkPaned" id="vpaned1">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="position">0</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkScrolledWindow" id="scrolledwindow2">
|
||||
<object class="GtkScrolledWindow" id="scrolledwindow2">
|
||||
<property name="visible">True</property>
|
||||
<property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
|
||||
<property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
|
||||
@@ -588,7 +467,7 @@
|
||||
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkTreeView" id="treeview2">
|
||||
<object class="GtkTreeView" id="treeview2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="has_focus">True</property>
|
||||
@@ -596,12 +475,9 @@
|
||||
<property name="rules_hint">False</property>
|
||||
<property name="reorderable">False</property>
|
||||
<property name="enable_search">False</property>
|
||||
<signal name="cursor_changed" handler="on_treeview2_cursor_changed" last_modification_time="Sun, 12 Jan 2003 15:57:55 GMT"/>
|
||||
<signal name="button_press_event" handler="on_treeview2_button_press_event" last_modification_time="Sun, 12 Jan 2003 15:57:58 GMT"/>
|
||||
<signal name="key_press_event" handler="on_treeview2_key_press_event" last_modification_time="Sun, 12 Jan 2003 15:58:01 GMT"/>
|
||||
</widget>
|
||||
</object>
|
||||
</child>
|
||||
</widget>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="shrink">True</property>
|
||||
<property name="resize">False</property>
|
||||
@@ -609,7 +485,7 @@
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkScrolledWindow" id="scrolledwindow3">
|
||||
<object class="GtkScrolledWindow" id="scrolledwindow3">
|
||||
<property name="visible">True</property>
|
||||
<property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
|
||||
<property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
|
||||
@@ -617,7 +493,7 @@
|
||||
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkTextView" id="textview3">
|
||||
<object class="GtkTextView" id="textview3">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="editable">False</property>
|
||||
@@ -632,30 +508,29 @@
|
||||
<property name="left_margin">0</property>
|
||||
<property name="right_margin">0</property>
|
||||
<property name="indent">0</property>
|
||||
<property name="text" translatable="yes">Sorry, no help available for this option yet.</property>
|
||||
</widget>
|
||||
</object>
|
||||
</child>
|
||||
</widget>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="shrink">True</property>
|
||||
<property name="resize">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="shrink">True</property>
|
||||
<property name="resize">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</object>
|
||||
</child>
|
||||
</widget>
|
||||
</object>
|
||||
|
||||
</glade-interface>
|
||||
</interface>
|
||||
@@ -98,9 +98,11 @@ bool menu_is_visible(struct menu *menu);
|
||||
bool menu_has_prompt(const struct menu *menu);
|
||||
const char *menu_get_prompt(const struct menu *menu);
|
||||
struct menu *menu_get_parent_menu(struct menu *menu);
|
||||
struct menu *menu_get_menu_or_parent_menu(struct menu *menu);
|
||||
int get_jump_key_char(void);
|
||||
struct gstr get_relations_str(struct symbol **sym_arr, struct list_head *head);
|
||||
void menu_get_ext_help(struct menu *menu, struct gstr *help);
|
||||
void menu_dump(void);
|
||||
|
||||
/* symbol.c */
|
||||
void sym_clear_all_valid(void);
|
||||
|
||||
@@ -39,8 +39,10 @@ int dialog_inputbox(const char *title, const char *prompt, int height, int width
|
||||
|
||||
if (!init)
|
||||
instr[0] = '\0';
|
||||
else
|
||||
strcpy(instr, init);
|
||||
else {
|
||||
strncpy(instr, init, sizeof(dialog_input_result) - 1);
|
||||
instr[sizeof(dialog_input_result) - 1] = '\0';
|
||||
}
|
||||
|
||||
do_resize:
|
||||
if (getmaxy(stdscr) <= (height - INPUTBOX_HEIGHT_MIN))
|
||||
|
||||
@@ -264,7 +264,7 @@ do_resize:
|
||||
if (key < 256 && isalpha(key))
|
||||
key = tolower(key);
|
||||
|
||||
if (strchr("ynmh", key))
|
||||
if (strchr("ynmh ", key))
|
||||
i = max_choice;
|
||||
else {
|
||||
for (i = choice + 1; i < max_choice; i++) {
|
||||
|
||||
@@ -345,8 +345,7 @@ void print_autowrap(WINDOW * win, const char *prompt, int width, int y, int x)
|
||||
int prompt_len, room, wlen;
|
||||
char tempstr[MAX_LEN + 1], *word, *sp, *sp2, *newline_separator = 0;
|
||||
|
||||
strcpy(tempstr, prompt);
|
||||
|
||||
snprintf(tempstr, sizeof(tempstr), "%s", prompt);
|
||||
prompt_len = strlen(tempstr);
|
||||
|
||||
if (prompt_len <= width - x * 2) { /* If prompt is short */
|
||||
|
||||
@@ -575,7 +575,27 @@ const char *menu_get_prompt(const struct menu *menu)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* menu_get_parent_menu - return the parent menu or NULL
|
||||
* @menu: pointer to the menu
|
||||
* return: the parent menu, or NULL if there is no parent.
|
||||
*/
|
||||
struct menu *menu_get_parent_menu(struct menu *menu)
|
||||
{
|
||||
for (menu = menu->parent; menu; menu = menu->parent)
|
||||
if (menu->type == M_MENU)
|
||||
return menu;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* menu_get_menu_or_parent_menu - return the parent menu or the menu itself
|
||||
* @menu: pointer to the menu
|
||||
* return: the parent menu. If the given argument is already a menu, return
|
||||
* itself.
|
||||
*/
|
||||
struct menu *menu_get_menu_or_parent_menu(struct menu *menu)
|
||||
{
|
||||
enum prop_type type;
|
||||
|
||||
@@ -768,3 +788,77 @@ void menu_get_ext_help(struct menu *menu, struct gstr *help)
|
||||
if (sym)
|
||||
get_symbol_str(help, sym, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* menu_dump - dump all menu entries in a tree-like format
|
||||
*/
|
||||
void menu_dump(void)
|
||||
{
|
||||
struct menu *menu = &rootmenu;
|
||||
unsigned long long bits = 0;
|
||||
int indent = 0;
|
||||
|
||||
while (menu) {
|
||||
|
||||
for (int i = indent - 1; i >= 0; i--) {
|
||||
if (bits & (1ULL << i)) {
|
||||
if (i > 0)
|
||||
printf("| ");
|
||||
else
|
||||
printf("|-- ");
|
||||
} else {
|
||||
if (i > 0)
|
||||
printf(" ");
|
||||
else
|
||||
printf("`-- ");
|
||||
}
|
||||
}
|
||||
|
||||
switch (menu->type) {
|
||||
case M_CHOICE:
|
||||
printf("choice \"%s\"\n", menu->prompt->text);
|
||||
break;
|
||||
case M_COMMENT:
|
||||
printf("comment \"%s\"\n", menu->prompt->text);
|
||||
break;
|
||||
case M_IF:
|
||||
printf("if\n");
|
||||
break;
|
||||
case M_MENU:
|
||||
printf("menu \"%s\"", menu->prompt->text);
|
||||
if (!menu->sym) {
|
||||
printf("\n");
|
||||
break;
|
||||
}
|
||||
printf(" + ");
|
||||
/* fallthrough */
|
||||
case M_NORMAL:
|
||||
printf("symbol %s\n", menu->sym->name);
|
||||
break;
|
||||
}
|
||||
if (menu->list) {
|
||||
bits <<= 1;
|
||||
menu = menu->list;
|
||||
if (menu->next)
|
||||
bits |= 1;
|
||||
else
|
||||
bits &= ~1;
|
||||
indent++;
|
||||
continue;
|
||||
}
|
||||
|
||||
while (menu && !menu->next) {
|
||||
menu = menu->parent;
|
||||
bits >>= 1;
|
||||
indent--;
|
||||
}
|
||||
|
||||
if (menu) {
|
||||
menu = menu->next;
|
||||
if (menu->next)
|
||||
bits |= 1;
|
||||
else
|
||||
bits &= ~1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -593,6 +593,8 @@ static void item_add_str(const char *fmt, ...)
|
||||
tmp_str,
|
||||
sizeof(k_menu_items[index].str));
|
||||
|
||||
k_menu_items[index].str[sizeof(k_menu_items[index].str) - 1] = '\0';
|
||||
|
||||
free_item(curses_menu_items[index]);
|
||||
curses_menu_items[index] = new_item(
|
||||
k_menu_items[index].str,
|
||||
|
||||
@@ -359,6 +359,7 @@ int dialog_inputbox(WINDOW *main_window,
|
||||
x = (columns-win_cols)/2;
|
||||
|
||||
strncpy(result, init, *result_len);
|
||||
result[*result_len - 1] = '\0';
|
||||
|
||||
/* create the windows */
|
||||
win = newwin(win_lines, win_cols, y, x);
|
||||
|
||||
+24
-12
@@ -37,6 +37,12 @@ QAction *ConfigMainWindow::saveAction;
|
||||
ConfigSettings::ConfigSettings()
|
||||
: QSettings("kernel.org", "qconf")
|
||||
{
|
||||
beginGroup("/kconfig/qconf");
|
||||
}
|
||||
|
||||
ConfigSettings::~ConfigSettings()
|
||||
{
|
||||
endGroup();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -92,7 +98,6 @@ void ConfigItem::updateMenu(void)
|
||||
{
|
||||
ConfigList* list;
|
||||
struct symbol* sym;
|
||||
struct property *prop;
|
||||
QString prompt;
|
||||
int type;
|
||||
tristate expr;
|
||||
@@ -105,11 +110,10 @@ void ConfigItem::updateMenu(void)
|
||||
}
|
||||
|
||||
sym = menu->sym;
|
||||
prop = menu->prompt;
|
||||
prompt = menu_get_prompt(menu);
|
||||
|
||||
if (prop) switch (prop->type) {
|
||||
case P_MENU:
|
||||
switch (menu->type) {
|
||||
case M_MENU:
|
||||
if (list->mode == singleMode) {
|
||||
/* a menuconfig entry is displayed differently
|
||||
* depending whether it's at the view root or a child.
|
||||
@@ -123,10 +127,16 @@ void ConfigItem::updateMenu(void)
|
||||
setIcon(promptColIdx, QIcon());
|
||||
}
|
||||
goto set_prompt;
|
||||
case P_COMMENT:
|
||||
case M_COMMENT:
|
||||
setIcon(promptColIdx, QIcon());
|
||||
prompt = "*** " + prompt + " ***";
|
||||
goto set_prompt;
|
||||
case M_CHOICE:
|
||||
setIcon(promptColIdx, QIcon());
|
||||
sym = sym_calc_choice(menu);
|
||||
if (sym)
|
||||
setText(dataColIdx, sym->name);
|
||||
goto set_prompt;
|
||||
default:
|
||||
;
|
||||
}
|
||||
@@ -188,7 +198,11 @@ void ConfigItem::testUpdateMenu(void)
|
||||
if (!menu)
|
||||
return;
|
||||
|
||||
sym_calc_value(menu->sym);
|
||||
if (menu->type == M_CHOICE)
|
||||
sym_calc_choice(menu);
|
||||
else
|
||||
sym_calc_value(menu->sym);
|
||||
|
||||
if (menu->flags & MENU_CHANGED) {
|
||||
/* the menu entry changed, so update all list items */
|
||||
menu->flags &= ~MENU_CHANGED;
|
||||
@@ -478,7 +492,7 @@ void ConfigList::updateListAllForAll()
|
||||
while (it.hasNext()) {
|
||||
ConfigList *list = it.next();
|
||||
|
||||
list->updateList();
|
||||
list->updateListAll();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -569,7 +583,7 @@ void ConfigList::setParentMenu(void)
|
||||
oldroot = rootEntry;
|
||||
if (rootEntry == &rootmenu)
|
||||
return;
|
||||
setRootMenu(menu_get_parent_menu(rootEntry->parent));
|
||||
setRootMenu(menu_get_menu_or_parent_menu(rootEntry->parent));
|
||||
|
||||
QTreeWidgetItemIterator it(this);
|
||||
while (*it) {
|
||||
@@ -1532,7 +1546,7 @@ void ConfigMainWindow::setMenuLink(struct menu *menu)
|
||||
switch (configList->mode) {
|
||||
case singleMode:
|
||||
list = configList;
|
||||
parent = menu_get_parent_menu(menu);
|
||||
parent = menu_get_menu_or_parent_menu(menu);
|
||||
if (!parent)
|
||||
return;
|
||||
list->setRootMenu(parent);
|
||||
@@ -1543,7 +1557,7 @@ void ConfigMainWindow::setMenuLink(struct menu *menu)
|
||||
configList->clearSelection();
|
||||
list = configList;
|
||||
} else {
|
||||
parent = menu_get_parent_menu(menu->parent);
|
||||
parent = menu_get_menu_or_parent_menu(menu->parent);
|
||||
if (!parent)
|
||||
return;
|
||||
|
||||
@@ -1821,7 +1835,6 @@ int main(int ac, char** av)
|
||||
configApp = new QApplication(ac, av);
|
||||
|
||||
configSettings = new ConfigSettings();
|
||||
configSettings->beginGroup("/kconfig/qconf");
|
||||
v = new ConfigMainWindow();
|
||||
|
||||
//zconfdump(stdout);
|
||||
@@ -1829,7 +1842,6 @@ int main(int ac, char** av)
|
||||
v->show();
|
||||
configApp->exec();
|
||||
|
||||
configSettings->endGroup();
|
||||
delete configSettings;
|
||||
delete v;
|
||||
delete configApp;
|
||||
|
||||
@@ -24,6 +24,7 @@ class ConfigMainWindow;
|
||||
class ConfigSettings : public QSettings {
|
||||
public:
|
||||
ConfigSettings();
|
||||
~ConfigSettings(void);
|
||||
QList<int> readSizes(const QString& key, bool *ok);
|
||||
bool writeSizes(const QString& key, const QList<int>& value);
|
||||
};
|
||||
|
||||
@@ -195,6 +195,10 @@ static void sym_set_changed(struct symbol *sym)
|
||||
|
||||
list_for_each_entry(menu, &sym->menus, link)
|
||||
menu->flags |= MENU_CHANGED;
|
||||
|
||||
menu = sym_get_choice_menu(sym);
|
||||
if (menu)
|
||||
menu->flags |= MENU_CHANGED;
|
||||
}
|
||||
|
||||
static void sym_set_all_changed(void)
|
||||
|
||||
Reference in New Issue
Block a user