mirror of
https://github.com/torvalds/linux.git
synced 2025-08-15 14:11:42 +02:00
Kbuild updates for v6.17
- 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 -----BEGIN PGP SIGNATURE----- iQJJBAABCgAzFiEEbmPs18K1szRHjPqEPYsBB53g2wYFAmiSr38VHG1hc2FoaXJv eUBrZXJuZWwub3JnAAoJED2LAQed4NsGcTIP/RCVr/OEJgVXg8dOBNhNuhGoidnM 2uqRcaza68tOSegpFGcfd9bhO1TCR/O5SL117TS8UEx4f9ge7gk/+XVZC8i1268m 9+V6eJd8QI34nB/EezMnrhvFmn2kC0UMuSldZYQJ2cReLjtapBP2xBtWnxi+Zyyw +FjdHwQln7E8UaB/gMqh9KVVOytX4NIUUZEA/78nd4eJaJbLxJ/5ztAxGLB//bXI Rr6bjAeOmIfRWS9QWnGzNzHmzp4SSmU+/gdLXyaWlmoVjeut8O+BJXvQRNfswk8K JXmk6uZUx6CNheCca2RaM0i6XAArkpOQc/7v7Ul/rSriTxdxAVUghjk0fNrXJGvQ kBjewOTUXg8f4xhuPAL3nkWmCh0s0tV3Q0EneAaJuUck5yRkW0bxxKa74h6ji2q8 8RsNS5Mq0yYiR1gmCqhEmTN6/wDamSpGkHT0k6ukipixjCr5DP2QFP/xT3d7qSwc W6msliXgBmY/ZrGoJXy4zjmu5vxKfAes+7JLBDxUKjdItC818qwSPf+nbvVIdJqb K4/hcNDuYPKd/8N8YapPjbGfTBk9Xqp74ez4xg5XNIBPS+cE5k/mePletbCzkzC5 vzjoNgVUmpPGPdDaBk+S4jSEzWUi575aQx590OfdoXsBt4CQVHHk4PEM1Qh5cWnZ m6tx1oqfruovU6Gx =MtyJ -----END PGP SIGNATURE----- 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:
commit
a530a36bb5
33 changed files with 1223 additions and 1339 deletions
6
CREDITS
6
CREDITS
|
@ -4378,6 +4378,12 @@ S: 542 West 112th Street, 5N
|
|||
S: New York, New York 10025
|
||||
S: USA
|
||||
|
||||
N: Masahiro Yamada
|
||||
E: masahiroy@kernel.org
|
||||
D: Kbuild Maintainer 2017-2025
|
||||
D: Kconfig Maintainer 2018-2025
|
||||
S: Japan
|
||||
|
||||
N: Li Yang
|
||||
E: leoli@freescale.com
|
||||
D: Freescale Highspeed USB device driver
|
||||
|
|
|
@ -67,12 +67,12 @@ Environment variables for ``*config``:
|
|||
with its value when saving the configuration, instead of using the
|
||||
default, ``CONFIG_``.
|
||||
|
||||
Environment variables for ``{allyes/allmod/allno/rand}config``:
|
||||
Environment variables for ``{allyes/allmod/allno/alldef/rand}config``:
|
||||
|
||||
``KCONFIG_ALLCONFIG``
|
||||
The allyesconfig/allmodconfig/allnoconfig/randconfig variants can also
|
||||
use the environment variable KCONFIG_ALLCONFIG as a flag or a filename
|
||||
that contains config symbols that the user requires to be set to a
|
||||
The allyesconfig/allmodconfig/alldefconfig/allnoconfig/randconfig variants
|
||||
can also use the environment variable KCONFIG_ALLCONFIG as a flag or a
|
||||
filename that contains config symbols that the user requires to be set to a
|
||||
specific value. If KCONFIG_ALLCONFIG is used without a filename where
|
||||
KCONFIG_ALLCONFIG == "" or KCONFIG_ALLCONFIG == "1", ``make *config``
|
||||
checks for a file named "all{yes/mod/no/def/random}.config"
|
||||
|
|
13
MAINTAINERS
13
MAINTAINERS
|
@ -13174,11 +13174,9 @@ F: mm/kasan/
|
|||
F: scripts/Makefile.kasan
|
||||
|
||||
KCONFIG
|
||||
M: Masahiro Yamada <masahiroy@kernel.org>
|
||||
L: linux-kbuild@vger.kernel.org
|
||||
S: Maintained
|
||||
S: Orphan
|
||||
Q: https://patchwork.kernel.org/project/linux-kbuild/list/
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git kbuild
|
||||
F: Documentation/kbuild/kconfig*
|
||||
F: scripts/Kconfig.include
|
||||
F: scripts/kconfig/
|
||||
|
@ -13243,13 +13241,12 @@ S: Maintained
|
|||
F: fs/autofs/
|
||||
|
||||
KERNEL BUILD + files below scripts/ (unless maintained elsewhere)
|
||||
M: Masahiro Yamada <masahiroy@kernel.org>
|
||||
R: Nathan Chancellor <nathan@kernel.org>
|
||||
R: Nicolas Schier <nicolas@fjasle.eu>
|
||||
M: Nathan Chancellor <nathan@kernel.org>
|
||||
M: Nicolas Schier <nicolas@fjasle.eu>
|
||||
L: linux-kbuild@vger.kernel.org
|
||||
S: Maintained
|
||||
S: Odd Fixes
|
||||
Q: https://patchwork.kernel.org/project/linux-kbuild/list/
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/kbuild/linux.git
|
||||
F: Documentation/kbuild/
|
||||
F: Makefile
|
||||
F: scripts/*vmlinux*
|
||||
|
|
5
Makefile
5
Makefile
|
@ -549,6 +549,7 @@ LZMA = lzma
|
|||
LZ4 = lz4
|
||||
XZ = xz
|
||||
ZSTD = zstd
|
||||
TAR = tar
|
||||
|
||||
CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \
|
||||
-Wbitwise -Wno-return-void -Wno-unknown-attribute $(CF)
|
||||
|
@ -628,7 +629,7 @@ export RUSTC RUSTDOC RUSTFMT RUSTC_OR_CLIPPY_QUIET RUSTC_OR_CLIPPY BINDGEN
|
|||
export HOSTRUSTC KBUILD_HOSTRUSTFLAGS
|
||||
export CPP AR NM STRIP OBJCOPY OBJDUMP READELF PAHOLE RESOLVE_BTFIDS LEX YACC AWK INSTALLKERNEL
|
||||
export PERL PYTHON3 CHECK CHECKFLAGS MAKE UTS_MACHINE HOSTCXX
|
||||
export KGZIP KBZIP2 KLZOP LZMA LZ4 XZ ZSTD
|
||||
export KGZIP KBZIP2 KLZOP LZMA LZ4 XZ ZSTD TAR
|
||||
export KBUILD_HOSTCXXFLAGS KBUILD_HOSTLDFLAGS KBUILD_HOSTLDLIBS KBUILD_PROCMACROLDFLAGS LDFLAGS_MODULE
|
||||
export KBUILD_USERCFLAGS KBUILD_USERLDFLAGS
|
||||
|
||||
|
@ -1141,7 +1142,7 @@ KBUILD_USERCFLAGS += $(filter -m32 -m64 --target=%, $(KBUILD_CPPFLAGS) $(KBUILD
|
|||
KBUILD_USERLDFLAGS += $(filter -m32 -m64 --target=%, $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS))
|
||||
|
||||
# userspace programs are linked via the compiler, use the correct linker
|
||||
ifeq ($(CONFIG_CC_IS_CLANG)$(CONFIG_LD_IS_LLD),yy)
|
||||
ifdef CONFIG_CC_IS_CLANG
|
||||
KBUILD_USERLDFLAGS += --ld-path=$(LD)
|
||||
endif
|
||||
|
||||
|
|
|
@ -43,8 +43,8 @@
|
|||
* alias.
|
||||
*/
|
||||
#define MODULE_ALIAS_CRYPTO(name) \
|
||||
__MODULE_INFO(alias, alias_userspace, name); \
|
||||
__MODULE_INFO(alias, alias_crypto, "crypto-" name)
|
||||
MODULE_INFO(alias, name); \
|
||||
MODULE_INFO(alias, "crypto-" name)
|
||||
|
||||
struct crypto_aead;
|
||||
struct crypto_instance;
|
||||
|
|
|
@ -165,9 +165,6 @@ extern void cleanup_module(void);
|
|||
|
||||
struct module_kobject *lookup_or_create_module_kobject(const char *name);
|
||||
|
||||
/* Generic info of form tag = "info" */
|
||||
#define MODULE_INFO(tag, info) __MODULE_INFO(tag, tag, info)
|
||||
|
||||
/* For userspace: you can also call me... */
|
||||
#define MODULE_ALIAS(_alias) MODULE_INFO(alias, _alias)
|
||||
|
||||
|
|
|
@ -24,18 +24,19 @@
|
|||
#define __MODULE_INFO_PREFIX KBUILD_MODNAME "."
|
||||
#endif
|
||||
|
||||
#define __MODULE_INFO(tag, name, info) \
|
||||
static const char __UNIQUE_ID(name)[] \
|
||||
/* Generic info of form tag = "info" */
|
||||
#define MODULE_INFO(tag, info) \
|
||||
static const char __UNIQUE_ID(modinfo)[] \
|
||||
__used __section(".modinfo") __aligned(1) \
|
||||
= __MODULE_INFO_PREFIX __stringify(tag) "=" info
|
||||
|
||||
#define __MODULE_PARM_TYPE(name, _type) \
|
||||
__MODULE_INFO(parmtype, name##type, #name ":" _type)
|
||||
MODULE_INFO(parmtype, #name ":" _type)
|
||||
|
||||
/* One for each parameter, describing how to use it. Some files do
|
||||
multiple of these per line, so can't just use MODULE_INFO. */
|
||||
#define MODULE_PARM_DESC(_parm, desc) \
|
||||
__MODULE_INFO(parm, _parm, #_parm ":" desc)
|
||||
MODULE_INFO(parm, #_parm ":" desc)
|
||||
|
||||
struct kernel_param;
|
||||
|
||||
|
|
|
@ -2655,8 +2655,8 @@ void tcp_update_ulp(struct sock *sk, struct proto *p,
|
|||
void (*write_space)(struct sock *sk));
|
||||
|
||||
#define MODULE_ALIAS_TCP_ULP(name) \
|
||||
__MODULE_INFO(alias, alias_userspace, name); \
|
||||
__MODULE_INFO(alias, alias_tcp_ulp, "tcp-ulp-" name)
|
||||
MODULE_INFO(alias, name); \
|
||||
MODULE_INFO(alias, "tcp-ulp-" name)
|
||||
|
||||
#ifdef CONFIG_NET_SOCK_MSG
|
||||
struct sk_msg;
|
||||
|
|
2
kernel/.gitignore
vendored
2
kernel/.gitignore
vendored
|
@ -1,3 +1,5 @@
|
|||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
/config_data
|
||||
/kheaders.md5
|
||||
/kheaders-objlist
|
||||
/kheaders-srclist
|
||||
|
|
|
@ -159,11 +159,48 @@ filechk_cat = cat $<
|
|||
$(obj)/config_data: $(KCONFIG_CONFIG) FORCE
|
||||
$(call filechk,cat)
|
||||
|
||||
# kheaders_data.tar.xz
|
||||
$(obj)/kheaders.o: $(obj)/kheaders_data.tar.xz
|
||||
|
||||
quiet_cmd_genikh = CHK $(obj)/kheaders_data.tar.xz
|
||||
cmd_genikh = $(CONFIG_SHELL) $(srctree)/kernel/gen_kheaders.sh $@
|
||||
$(obj)/kheaders_data.tar.xz: FORCE
|
||||
$(call cmd,genikh)
|
||||
quiet_cmd_kheaders_data = GEN $@
|
||||
cmd_kheaders_data = "$<" "$@" "$(obj)/kheaders-srclist" "$(obj)/kheaders-objlist" "$(KBUILD_BUILD_TIMESTAMP)"
|
||||
cmd_kheaders_data_dep = cat $(depfile) >> $(dot-target).cmd; rm -f $(depfile)
|
||||
|
||||
clean-files := kheaders_data.tar.xz kheaders.md5
|
||||
define rule_kheaders_data
|
||||
$(call cmd_and_savecmd,kheaders_data)
|
||||
$(call cmd,kheaders_data_dep)
|
||||
endef
|
||||
|
||||
targets += kheaders_data.tar.xz
|
||||
$(obj)/kheaders_data.tar.xz: $(src)/gen_kheaders.sh $(obj)/kheaders-srclist $(obj)/kheaders-objlist $(obj)/kheaders.md5 FORCE
|
||||
$(call if_changed_rule,kheaders_data)
|
||||
|
||||
# generated headers in objtree
|
||||
#
|
||||
# include/generated/utsversion.h is ignored because it is generated
|
||||
# after gen_kheaders.sh is executed. (utsversion.h is unneeded for kheaders)
|
||||
filechk_kheaders_objlist = \
|
||||
for d in include "arch/$(SRCARCH)/include"; do \
|
||||
find "$${d}/generated" ! -path "include/generated/utsversion.h" -a -name "*.h" -print; \
|
||||
done
|
||||
|
||||
$(obj)/kheaders-objlist: FORCE
|
||||
$(call filechk,kheaders_objlist)
|
||||
|
||||
# non-generated headers in srctree
|
||||
filechk_kheaders_srclist = \
|
||||
for d in include "arch/$(SRCARCH)/include"; do \
|
||||
find "$(srctree)/$${d}" -path "$(srctree)/$${d}/generated" -prune -o -name "*.h" -print; \
|
||||
done
|
||||
|
||||
$(obj)/kheaders-srclist: FORCE
|
||||
$(call filechk,kheaders_srclist)
|
||||
|
||||
# Some files are symlinks. If symlinks are changed, kheaders_data.tar.xz should
|
||||
# be rebuilt.
|
||||
filechk_kheaders_md5sum = xargs -r -a $< stat -c %N | md5sum
|
||||
|
||||
$(obj)/kheaders.md5: $(obj)/kheaders-srclist FORCE
|
||||
$(call filechk,kheaders_md5sum)
|
||||
|
||||
clean-files := kheaders.md5 kheaders-srclist kheaders-objlist
|
||||
|
|
|
@ -4,79 +4,34 @@
|
|||
# This script generates an archive consisting of kernel headers
|
||||
# for CONFIG_IKHEADERS.
|
||||
set -e
|
||||
sfile="$(readlink -f "$0")"
|
||||
outdir="$(pwd)"
|
||||
tarfile=$1
|
||||
tmpdir=$outdir/${tarfile%/*}/.tmp_dir
|
||||
srclist=$2
|
||||
objlist=$3
|
||||
timestamp=$4
|
||||
|
||||
dir_list="
|
||||
include/
|
||||
arch/$SRCARCH/include/
|
||||
"
|
||||
dir=$(dirname "${tarfile}")
|
||||
tmpdir=${dir}/.tmp_dir
|
||||
depfile=${dir}/.$(basename "${tarfile}").d
|
||||
|
||||
# Support incremental builds by skipping archive generation
|
||||
# if timestamps of files being archived are not changed.
|
||||
# generate dependency list.
|
||||
{
|
||||
echo
|
||||
echo "deps_${tarfile} := \\"
|
||||
sed 's:\(.*\): \1 \\:' "${srclist}"
|
||||
sed -n '/^include\/generated\/autoconf\.h$/!s:\(.*\): \1 \\:p' "${objlist}"
|
||||
echo
|
||||
echo "${tarfile}: \$(deps_${tarfile})"
|
||||
echo
|
||||
echo "\$(deps_${tarfile}):"
|
||||
|
||||
# This block is useful for debugging the incremental builds.
|
||||
# Uncomment it for debugging.
|
||||
# if [ ! -f /tmp/iter ]; then iter=1; echo 1 > /tmp/iter;
|
||||
# else iter=$(($(cat /tmp/iter) + 1)); echo $iter > /tmp/iter; fi
|
||||
# find $all_dirs -name "*.h" | xargs ls -l > /tmp/ls-$iter
|
||||
|
||||
all_dirs=
|
||||
if [ "$building_out_of_srctree" ]; then
|
||||
for d in $dir_list; do
|
||||
all_dirs="$all_dirs $srctree/$d"
|
||||
done
|
||||
fi
|
||||
all_dirs="$all_dirs $dir_list"
|
||||
|
||||
# include/generated/utsversion.h is ignored because it is generated after this
|
||||
# script is executed. (utsversion.h is unneeded for kheaders)
|
||||
#
|
||||
# When Kconfig regenerates include/generated/autoconf.h, its timestamp is
|
||||
# updated, but the contents might be still the same. When any CONFIG option is
|
||||
# changed, Kconfig touches the corresponding timestamp file include/config/*.
|
||||
# Hence, the md5sum detects the configuration change anyway. We do not need to
|
||||
# check include/generated/autoconf.h explicitly.
|
||||
#
|
||||
# Ignore them for md5 calculation to avoid pointless regeneration.
|
||||
headers_md5="$(find $all_dirs -name "*.h" -a \
|
||||
! -path include/generated/utsversion.h -a \
|
||||
! -path include/generated/autoconf.h |
|
||||
xargs ls -l | md5sum | cut -d ' ' -f1)"
|
||||
|
||||
# Any changes to this script will also cause a rebuild of the archive.
|
||||
this_file_md5="$(ls -l $sfile | md5sum | cut -d ' ' -f1)"
|
||||
if [ -f $tarfile ]; then tarfile_md5="$(md5sum $tarfile | cut -d ' ' -f1)"; fi
|
||||
if [ -f kernel/kheaders.md5 ] &&
|
||||
[ "$(head -n 1 kernel/kheaders.md5)" = "$headers_md5" ] &&
|
||||
[ "$(head -n 2 kernel/kheaders.md5 | tail -n 1)" = "$this_file_md5" ] &&
|
||||
[ "$(tail -n 1 kernel/kheaders.md5)" = "$tarfile_md5" ]; then
|
||||
exit
|
||||
fi
|
||||
|
||||
echo " GEN $tarfile"
|
||||
} > "${depfile}"
|
||||
|
||||
rm -rf "${tmpdir}"
|
||||
mkdir "${tmpdir}"
|
||||
|
||||
if [ "$building_out_of_srctree" ]; then
|
||||
(
|
||||
cd $srctree
|
||||
for f in $dir_list
|
||||
do find "$f" -name "*.h";
|
||||
done | tar -c -f - -T - | tar -xf - -C "${tmpdir}"
|
||||
)
|
||||
fi
|
||||
|
||||
for f in $dir_list;
|
||||
do find "$f" -name "*.h";
|
||||
done | tar -c -f - -T - | tar -xf - -C "${tmpdir}"
|
||||
|
||||
# Always exclude include/generated/utsversion.h
|
||||
# Otherwise, the contents of the tarball may vary depending on the build steps.
|
||||
rm -f "${tmpdir}/include/generated/utsversion.h"
|
||||
# shellcheck disable=SC2154 # srctree is passed as an env variable
|
||||
sed "s:^${srctree}/::" "${srclist}" | ${TAR} -c -f - -C "${srctree}" -T - | ${TAR} -xf - -C "${tmpdir}"
|
||||
${TAR} -c -f - -T "${objlist}" | ${TAR} -xf - -C "${tmpdir}"
|
||||
|
||||
# Remove comments except SDPX lines
|
||||
# Use a temporary file to store directory contents to prevent find/xargs from
|
||||
|
@ -88,12 +43,8 @@ xargs -0 -P8 -n1 \
|
|||
rm -f "${tmpdir}.contents.txt"
|
||||
|
||||
# Create archive and try to normalize metadata for reproducibility.
|
||||
tar "${KBUILD_BUILD_TIMESTAMP:+--mtime=$KBUILD_BUILD_TIMESTAMP}" \
|
||||
${TAR} "${timestamp:+--mtime=$timestamp}" \
|
||||
--owner=0 --group=0 --sort=name --numeric-owner --mode=u=rw,go=r,a+X \
|
||||
-I $XZ -cf $tarfile -C "${tmpdir}/" . > /dev/null
|
||||
|
||||
echo $headers_md5 > kernel/kheaders.md5
|
||||
echo "$this_file_md5" >> kernel/kheaders.md5
|
||||
echo "$(md5sum $tarfile | cut -d ' ' -f1)" >> kernel/kheaders.md5
|
||||
-I "${XZ}" -cf "${tarfile}" -C "${tmpdir}/" . > /dev/null
|
||||
|
||||
rm -rf "${tmpdir}"
|
||||
|
|
|
@ -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}
|
||||
|
|
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);
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue