Gtk/Qt interface flavours ported to newest toolkit versions
v2 cover Gtk/Qt interface flavours ported to newest toolkit versions
Hi Sam, Yann, all,
I prepared a rebased V2 of the patchset. As far as I get the consensus is to replace the existing Qtk and Qt flavours because there exist a fallback (n/mconf) for users that do not have the never libs available.
I reorganized the commits and used "-D -M" flags this time for a better review. There are some tool generated files like gconfig/gconf.ui and qconfig/mainwindow.ui which surely break the 80-column readability rule but are best viewed in their respective editor (gtk: glade,
qt: designer) anyway.
The Qt flavour is Qt5 compatible but I did not changed the build system to actually use Qt5. I've tested the Qt flavour with Qt 4.8.4, the Gtk flavour with Gtk 3.6.4.
I have another question regarding the patch procedure: I've seen some mails here only requesting for pull requests. Is it common to send pull requests instead of a set of patches?
Regards,
David
David Graeff (4):
KConf: Move flavours into their own subdirectories.
KConf: Update/Port Gtk flavour to use Gtk3
KConf: Qt interface port to Qt4/Qt5, removed Qt3 Support
KConf: images.c for gtk/qt gui flavour reoganized
scripts/kconfig/Makefile | 189 +--
scripts/kconfig/gconf.c | 1542 ------------------
scripts/kconfig/gconfig/Makefile | 69 +
scripts/kconfig/gconfig/gconf.c | 758 +++++++++
scripts/kconfig/{ => gconfig}/gconf.glade | 0
scripts/kconfig/gconfig/gconf.h | 80 +
scripts/kconfig/gconfig/gconf.ui | 536 ++++++
scripts/kconfig/gconfig/gconf_treeview_model.c | 706 ++++++++
scripts/kconfig/gconfig/gconf_treeview_model.h | 43 +
scripts/kconfig/gconfig/util.h | 33 +
scripts/kconfig/images.c | 309 ++--
scripts/kconfig/lxdialog/Makefile | 42 +
scripts/kconfig/{ => lxdialog}/mconf.c | 4 +-
scripts/kconfig/nconfig/Makefile | 26 +
scripts/kconfig/{ => nconfig}/nconf.c | 2 +-
scripts/kconfig/{ => nconfig}/nconf.gui.c | 0
scripts/kconfig/{ => nconfig}/nconf.h | 0
scripts/kconfig/qconf.cc | 1790 ---------------------
scripts/kconfig/qconf.h | 337 ----
scripts/kconfig/qconfig/Makefile | 94 ++
scripts/kconfig/qconfig/infoViewWidget.cc | 225 +++
scripts/kconfig/qconfig/infoViewWidget.h | 42 +
scripts/kconfig/qconfig/mainwindow.cc | 382 +++++
scripts/kconfig/qconfig/mainwindow.h | 73 +
scripts/kconfig/qconfig/mainwindow.ui | 410 +++++
scripts/kconfig/qconfig/qconf.cc | 77 +
scripts/kconfig/qconfig/qconf.h | 23 +
scripts/kconfig/qconfig/searchfiltermodelproxy.cc | 35 +
scripts/kconfig/qconfig/searchfiltermodelproxy.h | 35 +
scripts/kconfig/qconfig/searchmodel.cc | 57 +
scripts/kconfig/qconfig/searchmodel.h | 28 +
31 files changed, 3953 insertions(+), 3994 deletions(-)
delete mode 100644 scripts/kconfig/gconf.c
create mode 100644 scripts/kconfig/gconfig/Makefile
create mode 100644 scripts/kconfig/gconfig/gconf.c
rename scripts/kconfig/{ => gconfig}/gconf.glade (100%)
create mode 100644 scripts/kconfig/gconfig/gconf.h
create mode 100644 scripts/kconfig/gconfig/gconf.ui
create mode 100644 scripts/kconfig/gconfig/gconf_treeview_model.c
create mode 100644 scripts/kconfig/gconfig/gconf_treeview_model.h
create mode 100644 scripts/kconfig/gconfig/util.h
create mode 100644 scripts/kconfig/lxdialog/Makefile
rename scripts/kconfig/{ => lxdialog}/mconf.c (99%)
create mode 100644 scripts/kconfig/nconfig/Makefile
rename scripts/kconfig/{ => nconfig}/nconf.c (99%)
rename scripts/kconfig/{ => nconfig}/nconf.gui.c (100%)
rename scripts/kconfig/{ => nconfig}/nconf.h (100%)
delete mode 100644 scripts/kconfig/qconf.cc
delete mode 100644 scripts/kconfig/qconf.h
create mode 100644 scripts/kconfig/qconfig/Makefile
create mode 100644 scripts/kconfig/qconfig/infoViewWidget.cc
create mode 100644 scripts/kconfig/qconfig/infoViewWidget.h
create mode 100644 scripts/kconfig/qconfig/mainwindow.cc
create mode 100644 scripts/kconfig/qconfig/mainwindow.h
create mode 100644 scripts/kconfig/qconfig/mainwindow.ui
create mode 100644 scripts/kconfig/qconfig/qconf.cc
create mode 100644 scripts/kconfig/qconfig/qconf.h
create mode 100644 scripts/kconfig/qconfig/searchfiltermodelproxy.cc
create mode 100644 scripts/kconfig/qconfig/searchfiltermodelproxy.h
create mode 100644 scripts/kconfig/qconfig/searchmodel.cc
create mode 100644 scripts/kconfig/qconfig/searchmodel.hSignature · 1 line
1.8.1.2
PATCH v2 1/4 KConf: Move flavours into their own subdirectories.
Split out non-generic Makefile targets into new Makefiles. Each flavour has its own specific Makefile now.
create mode 100644 scripts/kconfig/gconfig/Makefile
rename scripts/kconfig/{ => gconfig}/gconf.c (99%)
rename scripts/kconfig/{ => gconfig}/gconf.glade (100%)
create mode 100644 scripts/kconfig/lxdialog/Makefile
rename scripts/kconfig/{ => lxdialog}/mconf.c (99%)
create mode 100644 scripts/kconfig/nconfig/Makefile
rename scripts/kconfig/{ => nconfig}/nconf.c (99%)
rename scripts/kconfig/{ => nconfig}/nconf.gui.c (100%)
rename scripts/kconfig/{ => nconfig}/nconf.h (100%)
create mode 100644 scripts/kconfig/qconfig/Makefile
rename scripts/kconfig/{ => qconfig}/qconf.cc (99%)
rename scripts/kconfig/{ => qconfig}/qconf.h (100%)scripts/kconfig/Makefile +15 -174
@@ -1,8 +1,10 @@ # =========================================================================== # Kernel configuration targets # These targets are used from top-level makefile +# This specific makefile only contains special targets and targets for +# the line-oriented program. Other interface flavours are included at the end. -PHONY += oldconfig xconfig gconfig menuconfig config silentoldconfig update-po-config \ +PHONY += oldconfig config silentoldconfig update-po-config \ localmodconfig localyesconfig ifdef KBUILD_KCONFIG
@@ -14,21 +16,9 @@ endif # We need this, in case the user has it in its environment unexport CONFIG_ -xconfig: $(obj)/qconf - $< $(Kconfig) - -gconfig: $(obj)/gconf - $< $(Kconfig) - -menuconfig: $(obj)/mconf - $< $(Kconfig) - config: $(obj)/conf $< --oldaskconfig $(Kconfig) -nconfig: $(obj)/nconf - $< $(Kconfig) - oldconfig: $(obj)/conf $< --$@ $(Kconfig)
@@ -53,7 +43,7 @@ localyesconfig localmodconfig: $(obj)/streamline_config.pl $(obj)/conf # Create new linux.pot file # Adjust charset to UTF-8 in .po file to accept UTF-8 in Kconfig files -update-po-config: $(obj)/kxgettext $(obj)/gconf.glade.h +update-po-config: $(obj)/kxgettext $(obj)/gkonfig/gconf.glade.h $(Q)echo " GEN config.pot" $(Q)xgettext --default-domain=linux \ --add-comments --keyword=_ --keyword=N_ \
@@ -110,6 +100,7 @@ help: @echo ' nconfig - Update current config utilising a ncurses menu based program' @echo ' menuconfig - Update current config utilising a menu based program' @echo ' xconfig - Update current config utilising a QT based front-end' + @echo ' qconfig - Update current config utilising a QT based front-end' @echo ' gconfig - Update current config utilising a GTK based front-end' @echo ' oldconfig - Update current config utilising a provided .config as base' @echo ' localmodconfig - Update current config disabling modules not loaded'
@@ -125,81 +116,28 @@ help: @echo ' listnewconfig - List new options' @echo ' olddefconfig - Same as silentoldconfig but sets new symbols to their default value' -# lxdialog stuff -check-lxdialog := $(srctree)/$(src)/lxdialog/check-lxdialog.sh - # Use recursively expanded variables so we do not call gcc unless # we really need to do so. (Do not call gcc as part of make mrproper) HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags) \ -DLOCALE # =========================================================================== -# Shared Makefile for the various kconfig executables: +# Shared Makefile for some of the kconfig executables: # conf: Used for defconfig, oldconfig and related targets -# nconf: Used for the nconfig target. -# Utilizes ncurses -# mconf: Used for the menuconfig target -# Utilizes the lxdialog package -# qconf: Used for the xconfig target -# Based on QT which needs to be installed to compile it -# gconf: Used for the gconfig target -# Based on GTK which needs to be installed to compile it # object files used by all kconfig flavours -lxdialog := lxdialog/checklist.o lxdialog/util.o lxdialog/inputbox.o -lxdialog += lxdialog/textbox.o lxdialog/yesno.o lxdialog/menubox.o - conf-objs := conf.o zconf.tab.o -mconf-objs := mconf.o zconf.tab.o $(lxdialog) -nconf-objs := nconf.o zconf.tab.o nconf.gui.o kxgettext-objs := kxgettext.o zconf.tab.o -qconf-cxxobjs := qconf.o -qconf-objs := zconf.tab.o -gconf-objs := gconf.o zconf.tab.o hostprogs-y := conf -ifeq ($(MAKECMDGOALS),nconfig) - hostprogs-y += nconf -endif - -ifeq ($(MAKECMDGOALS),menuconfig) - hostprogs-y += mconf -endif - ifeq ($(MAKECMDGOALS),update-po-config) hostprogs-y += kxgettext endif -ifeq ($(MAKECMDGOALS),xconfig) - qconf-target := 1 -endif -ifeq ($(MAKECMDGOALS),gconfig) - gconf-target := 1 -endif - - -ifeq ($(qconf-target),1) - hostprogs-y += qconf -endif - -ifeq ($(gconf-target),1) - hostprogs-y += gconf -endif - -clean-files := qconf.moc .tmp_qtcheck .tmp_gtkcheck -clean-files += zconf.tab.c zconf.lex.c zconf.hash.c gconf.glade.h -clean-files += mconf qconf gconf nconf +clean-files := zconf.tab.c zconf.lex.c zconf.hash.c clean-files += config.pot linux.pot -# Check that we have the required ncurses stuff installed for lxdialog (menuconfig) -PHONY += $(obj)/dochecklxdialog -$(addprefix $(obj)/,$(lxdialog)): $(obj)/dochecklxdialog -$(obj)/dochecklxdialog: - $(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTLOADLIBES_mconf) - -always := dochecklxdialog - # Add environment specific flags HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(srctree)/$(src)/check.sh $(HOSTCC) $(HOSTCFLAGS))
@@ -210,113 +148,16 @@ HOSTCFLAGS_zconf.tab.o := -I$(src) LEX_PREFIX_zconf := zconf YACC_PREFIX_zconf := zconf -HOSTLOADLIBES_qconf = $(KC_QT_LIBS) -HOSTCXXFLAGS_qconf.o = $(KC_QT_CFLAGS) - -HOSTLOADLIBES_gconf = `pkg-config --libs gtk+-2.0 gmodule-2.0 libglade-2.0` -HOSTCFLAGS_gconf.o = `pkg-config --cflags gtk+-2.0 gmodule-2.0 libglade-2.0` \ - -Wno-missing-prototypes - -HOSTLOADLIBES_mconf = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC)) - -HOSTLOADLIBES_nconf = $(shell \ - pkg-config --libs menu panel ncurses 2>/dev/null \ - || echo "-lmenu -lpanel -lncurses" ) -$(obj)/qconf.o: $(obj)/.tmp_qtcheck - -ifeq ($(qconf-target),1) -$(obj)/.tmp_qtcheck: $(src)/Makefile --include $(obj)/.tmp_qtcheck - -# QT needs some extra effort... -$(obj)/.tmp_qtcheck: - @set -e; echo " CHECK qt"; dir=""; pkg=""; \ - if ! pkg-config --exists QtCore 2> /dev/null; then \ - echo "* Unable to find the QT4 tool qmake. Trying to use QT3"; \ - pkg-config --exists qt 2> /dev/null && pkg=qt; \ - pkg-config --exists qt-mt 2> /dev/null && pkg=qt-mt; \ - if [ -n "$$pkg" ]; then \ - cflags="\$$(shell pkg-config $$pkg --cflags)"; \ - libs="\$$(shell pkg-config $$pkg --libs)"; \ - moc="\$$(shell pkg-config $$pkg --variable=prefix)/bin/moc"; \ - dir="$$(pkg-config $$pkg --variable=prefix)"; \ - else \ - for d in $$QTDIR /usr/share/qt* /usr/lib/qt*; do \ - if [ -f $$d/include/qconfig.h ]; then dir=$$d; break; fi; \ - done; \ - if [ -z "$$dir" ]; then \ - echo >&2 "*"; \ - echo >&2 "* Unable to find any QT installation. Please make sure that"; \ - echo >&2 "* the QT4 or QT3 development package is correctly installed and"; \ - echo >&2 "* either qmake can be found or install pkg-config or set"; \ - echo >&2 "* the QTDIR environment variable to the correct location."; \ - echo >&2 "*"; \ - false; \ - fi; \ - libpath=$$dir/lib; lib=qt; osdir=""; \ - $(HOSTCXX) -print-multi-os-directory > /dev/null 2>&1 && \ - osdir=x$$($(HOSTCXX) -print-multi-os-directory); \ - test -d $$libpath/$$osdir && libpath=$$libpath/$$osdir; \ - test -f $$libpath/libqt-mt.so && lib=qt-mt; \ - cflags="-I$$dir/include"; \ - libs="-L$$libpath -Wl,-rpath,$$libpath -l$$lib"; \ - moc="$$dir/bin/moc"; \ - fi; \ - if [ ! -x $$dir/bin/moc -a -x /usr/bin/moc ]; then \ - echo "*"; \ - echo "* Unable to find $$dir/bin/moc, using /usr/bin/moc instead."; \ - echo "*"; \ - moc="/usr/bin/moc"; \ - fi; \ - else \ - cflags="\$$(shell pkg-config QtCore QtGui Qt3Support --cflags)"; \ - libs="\$$(shell pkg-config QtCore QtGui Qt3Support --libs)"; \ - moc="\$$(shell pkg-config QtCore --variable=moc_location)"; \ - [ -n "$$moc" ] || moc="\$$(shell pkg-config QtCore --variable=prefix)/bin/moc"; \ - fi; \ - echo "KC_QT_CFLAGS=$$cflags" > $@; \ - echo "KC_QT_LIBS=$$libs" >> $@; \ - echo "KC_QT_MOC=$$moc" >> $@ -endif - -$(obj)/gconf.o: $(obj)/.tmp_gtkcheck - -ifeq ($(gconf-target),1) --include $(obj)/.tmp_gtkcheck - -# GTK needs some extra effort, too... -$(obj)/.tmp_gtkcheck: - @if `pkg-config --exists gtk+-2.0 gmodule-2.0 libglade-2.0`; then \ - if `pkg-config --atleast-version=2.0.0 gtk+-2.0`; then \ - touch $@; \ - else \ - echo >&2 "*"; \ - echo >&2 "* GTK+ is present but version >= 2.0.0 is required."; \ - echo >&2 "*"; \ - false; \ - fi \ - else \ - 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 "* You need gtk+-2.0, glib-2.0 and libglade-2.0."; \ - echo >&2 "*"; \ - false; \ - fi -endif - $(obj)/zconf.tab.o: $(obj)/zconf.lex.c $(obj)/zconf.hash.c -$(obj)/qconf.o: $(obj)/qconf.moc - -quiet_cmd_moc = MOC $@ - cmd_moc = $(KC_QT_MOC) -i $< -o $@ +# NCurses/Dialog Interface +include $(obj)/lxdialog/Makefile -$(obj)/%.moc: $(src)/%.h $(obj)/.tmp_qtcheck - $(call cmd,moc) +# Qt Interface +include $(obj)/qconfig/Makefile -# Extract gconf menu items for I18N support -$(obj)/gconf.glade.h: $(obj)/gconf.glade - $(Q)intltool-extract --type=gettext/glade --srcdir=$(srctree) \ - $(obj)/gconf.glade +# NCurses Interface +include $(obj)/nconfig/Makefile +# Gtk Interface +include $(obj)/gconfig/Makefile
scripts/kconfig/gconfig/Makefile new file +63 -0
63 lines not on this page · raw message
scripts/kconfig/gconfig/gconf.c renamed from scripts/kconfig/gconf.c +3 -3
@@ -11,8 +11,8 @@#endif #include <stdlib.h> -#include "lkc.h" -#include "images.c" +#include "../lkc.h" +#include "../images.c" #include <glade/glade.h> #include <gtk/gtk.h>
@@ -1486,7 +1486,7 @@ int main(int ac, char *av[])/* Determine GUI path */ env =getenv (SRCTREE );if (env) - glade_file =g_strconcat (env,"/scripts/kconfig/gconf.glade" ,NULL ); + glade_file =g_strconcat (env,"/scripts/kconfig/gconfig/gconf.glade" ,NULL );else if (av[0 ][0 ] =='/' ) glade_file =g_strconcat (av[0 ],".glade" ,NULL );else
scripts/kconfig/gconfig/gconf.glade renamed from scripts/kconfig/gconf.glade +0 -0
scripts/kconfig/lxdialog/Makefile new file +42 -0
42 lines not on this page · raw message
scripts/kconfig/lxdialog/mconf.c renamed from scripts/kconfig/mconf.c +2 -2
@@ -19,8 +19,8 @@#include <unistd.h> #include <locale.h> -#include "lkc.h" -#include "lxdialog/dialog.h" +#include "../lkc.h" +#include "dialog.h" static const char mconf_readme[] =N_ ( "Overview\n"
scripts/kconfig/nconfig/Makefile new file +26 -0
@@ -0,0 +1,26 @@ +# =========================================================================== +# Kernel configuration targets +# These targets are used from top-level makefile + +PHONY += nconfig + +nconfig: $(obj)/nconf + $< $(Kconfig) + +# =========================================================================== +# nconf: Used for the nconfig target. +# Utilizes ncurses +# object files used by all kconfig flavours listed above + +nconf-objs := nconfig/nconf.o zconf.tab.o nconfig/nconf.gui.o + +ifeq ($(MAKECMDGOALS),nconfig) + hostprogs-y += nconf +endif + +clean-files += nconf + +HOSTLOADLIBES_nconf = $(shell \ + pkg-config --libs menu panel ncurses 2>/dev/null \ + || echo "-lmenu -lpanel -lncurses" ) +
scripts/kconfig/nconfig/nconf.c renamed from scripts/kconfig/nconf.c +1 -1
@@ -9,7 +9,7 @@#include <string.h> #include <stdlib.h> -#include "lkc.h" +#include "../lkc.h" #include "nconf.h" #include <ctype.h>
scripts/kconfig/nconfig/nconf.gui.c renamed from scripts/kconfig/nconf.gui.c +0 -0
scripts/kconfig/nconfig/nconf.h renamed from scripts/kconfig/nconf.h +0 -0
scripts/kconfig/qconfig/Makefile new file +107 -0
107 lines not on this page · raw message
scripts/kconfig/qconfig/qconf.cc renamed from scripts/kconfig/qconf.cc +2 -2
@@ -43,11 +43,11 @@ #include <stdlib.h> -#include "lkc.h" +#include "../lkc.h" #include "qconf.h" #include "qconf.moc" -#include "images.c" +#include "../images.c" #ifdef _ # undef _
scripts/kconfig/qconfig/qconf.h renamed from scripts/kconfig/qconf.h +0 -0
Signature · 1 line
1.8.1.2
Re: [PATCH v2 1/4] KConf: Move flavours into their own subdirectories.
Quoted 5 lines · David Graeff
Split out non-generic
Makefiletargets into new Makefiles. Each flavour has its own specificMakefilenow.Signed-off-by David Graeff <[email protected]>
Quoted 12 lines
create mode 100644 scripts/kconfig/gconfig/Makefile
rename scripts/kconfig/{ => gconfig}/gconf.c (99%)
rename scripts/kconfig/{ => gconfig}/gconf.glade (100%)
create mode 100644 scripts/kconfig/lxdialog/Makefile
rename scripts/kconfig/{ => lxdialog}/mconf.c (99%)
create mode 100644 scripts/kconfig/nconfig/Makefile
rename scripts/kconfig/{ => nconfig}/nconf.c (99%)
rename scripts/kconfig/{ => nconfig}/nconf.gui.c (100%)
rename scripts/kconfig/{ => nconfig}/nconf.h (100%)
create mode 100644 scripts/kconfig/qconfig/Makefile
rename scripts/kconfig/{ => qconfig}/qconf.cc (99%)
rename scripts/kconfig/{ => qconfig}/qconf.h (100%)Please provide the full diffstat for the patch. git format-patch -n will do this for you.
Each directory should be named after the frontend IMO. So lxdialog dir should be renamed to menuconfig.
scripts/kconfig/Makefile help: · line 106
Quoted 13 lines
scripts/kconfig/Makefile +1
-0@@ -110,6 +100,7 @@ help: @echo ' nconfig - Update current config utilising a ncurses menu based program' @echo ' menuconfig - Update current config utilising a menu based program' @echo ' xconfig - Update current config utilising a QT based front-end' + @echo ' qconfig - Update current config utilising a QT based front-end' @echo ' gconfig - Update current config utilising a GTK based front-end' @echo ' oldconfig - Update current config utilising a provided .config as base' @echo ' localmodconfig - Update current config disabling modules not loaded'
So you sneaked in a new "qconfig" target.
This belongs in a separate patch - and we already have xconfig so I suggest to drop it.
scripts/kconfig/Makefile help: · line 139
Quoted 5 lines
scripts/kconfig/Makefile +1
-3-clean-files := qconf.moc .tmp_qtcheck .tmp_gtkcheck -clean-files += zconf.tab.c zconf.lex.c zconf.hash.c gconf.glade.h -clean-files += mconf qconf gconf nconf +clean-files := zconf.tab.c zconf.lex.c zconf.hash.c clean-files += config.pot linux.pot
OK
Quoted 22 lines
scripts/kconfig/gconfig/Makefile new file +16
-0@@ -0,0 +1,63 @@ +# =========================================================================== +# Kernel configuration targets +# These targets are used from top-level makefile + +PHONY += gconfig + +gconfig: $(obj)/gconf + $< $(Kconfig) + +# =========================================================================== +# Shared Makefile for some of the kconfig executables: +# gconf: Used for the gconfig target +# Based on GTK which needs to be installed to compile it +# object files used by all kconfig flavours listed above + +gconf-objs := gconfig/gconf.o zconf.tab.o
scripts/kconfig/gconfig/Makefile line 26
Quoted 10 lines
scripts/kconfig/gconfig/Makefile new file +10
-0+ +ifeq ($(MAKECMDGOALS),gconfig) + gconf-target := 1 +endif + +ifeq ($(gconf-target),1) + hostprogs-y += gconf +endif + +clean-files += zconf.tab.c gconfig/gconf.glade.h gconf
zconf.tab.c should be dropped here.
Other than these small nits it looks good.
Sam
Re: [PATCH v2 1/4] KConf: Move flavours into their own subdirectories.
In reply to David Graeffscripts/kconfig/gconfig/Makefile line 32
Quoted 11 lines · David Graeff
scripts/kconfig/gconfig/Makefile new file +5
-0+ +HOSTLOADLIBES_gconf = `pkg-config --libs gtk+-2.0 gmodule-2.0 libglade-2.0` +HOSTCFLAGS_gconf.o = `pkg-config --cflags gtk+-2.0 gmodule-2.0 libglade-2.0` \ + -Wno-missing-prototypes +
This blank line contains unwanted space characters (and they were not in scripts/kconfig/Makefile).
Michal
PATCH v2 4/4 KConf: images.c for gtk/qt gui flavour reoganized
In reply to David GraeffChange order of xpm image constants to build up groups. Make those groups optional via ifdefs.
Remove not used constants.
scripts/kconfig/images.c +161 -148
@@ -3,6 +3,166 @@* Released under the terms of the GNU GPL v2.0. */ +#ifdef IMAGES_TOOLBAR +static const char *xpm_tree_view[] = { +"22 22 2 1" , +". c None" , +"# c #000000" , +"......................" , +"......................" , +"......#..............." , +"......#..............." , +"......#..............." , +"......#..............." , +"......#..............." , +"......########........" , +"......#..............." , +"......#..............." , +"......#..............." , +"......#..............." , +"......#..............." , +"......########........" , +"......#..............." , +"......#..............." , +"......#..............." , +"......#..............." , +"......#..............." , +"......########........" , +"......................" , +"......................" }; + +static const char *xpm_single_view[] = { +"22 22 2 1" , +". c None" , +"# c #000000" , +"......................" , +"......................" , +"..........#..........." , +"..........#..........." , +"..........#..........." , +"..........#..........." , +"..........#..........." , +"..........#..........." , +"..........#..........." , +"..........#..........." , +"..........#..........." , +"..........#..........." , +"..........#..........." , +"..........#..........." , +"..........#..........." , +"..........#..........." , +"..........#..........." , +"..........#..........." , +"..........#..........." , +"..........#..........." , +"......................" , +"......................" }; + +static const char *xpm_split_view[] = { +"22 22 2 1" , +". c None" , +"# c #000000" , +"......................" , +"......................" , +"......#......#........" , +"......#......#........" , +"......#......#........" , +"......#......#........" , +"......#......#........" , +"......#......#........" , +"......#......#........" , +"......#......#........" , +"......#......#........" , +"......#......#........" , +"......#......#........" , +"......#......#........" , +"......#......#........" , +"......#......#........" , +"......#......#........" , +"......#......#........" , +"......#......#........" , +"......#......#........" , +"......................" , +"......................" }; +#endif + +#ifdef IMAGES_TREEVIEW +static const char *xpm_void[] = { +"12 12 2 1" , +" c white" , +". c black" , +" " , +" " , +" " , +" " , +" " , +" " , +" " , +" " , +" " , +" " , +" " , +" " }; + +static const char *xpm_menu[] = { +"12 12 2 1" , +" c white" , +". c black" , +" " , +" .......... " , +" . . " , +" . .. . " , +" . .... . " , +" . ...... . " , +" . ...... . " , +" . .... . " , +" . .. . " , +" . . " , +" .......... " , +" " }; +#endif + +/* Most images are taken from the system icon theme +in modern gui toolkits nowadays. +Because we compile with -Wunused-variable, we hide +the following xmp image constants. +*/ +#ifdef IMAGES_EXTENDED + +static const char *xpm_menu_inv[] = { +"12 12 2 1" , +" c white" , +". c black" , +" " , +" .......... " , +" .......... " , +" .. ...... " , +" .. .... " , +" .. .. " , +" .. .. " , +" .. .... " , +" .. ...... " , +" .......... " , +" .......... " , +" " }; + +static const char *xpm_menuback[] = { +"12 12 2 1" , +" c white" , +". c black" , +" " , +" .......... " , +" . . " , +" . .. . " , +" . .... . " , +" . ...... . " , +" . ...... . " , +" . .... . " , +" . .. . " , +" . . " , +" .......... " , +" " }; +static const char *xpm_load[] = {"22 22 5 1" , ". c None",
@@ -91,86 +251,6 @@ static const char *xpm_back[] = {"......................" , "......................"}; -static const char *xpm_tree_view[] = { -"22 22 2 1" , -". c None" , -"# c #000000" , -"......................" , -"......................" , -"......#..............." , -"......#..............." , -"......#..............." , -"......#..............." , -"......#..............." , -"......########........" , -"......#..............." , -"......#..............." , -"......#..............." , -"......#..............." , -"......#..............." , -"......########........" , -"......#..............." , -"......#..............." , -"......#..............." , -"......#..............." , -"......#..............." , -"......########........" , -"......................" , -"......................" }; - -static const char *xpm_single_view[] = { -"22 22 2 1" , -". c None" , -"# c #000000" , -"......................" , -"......................" , -"..........#..........." , -"..........#..........." , -"..........#..........." , -"..........#..........." , -"..........#..........." , -"..........#..........." , -"..........#..........." , -"..........#..........." , -"..........#..........." , -"..........#..........." , -"..........#..........." , -"..........#..........." , -"..........#..........." , -"..........#..........." , -"..........#..........." , -"..........#..........." , -"..........#..........." , -"..........#..........." , -"......................" , -"......................" }; - -static const char *xpm_split_view[] = { -"22 22 2 1" , -". c None" , -"# c #000000" , -"......................" , -"......................" , -"......#......#........" , -"......#......#........" , -"......#......#........" , -"......#......#........" , -"......#......#........" , -"......#......#........" , -"......#......#........" , -"......#......#........" , -"......#......#........" , -"......#......#........" , -"......#......#........" , -"......#......#........" , -"......#......#........" , -"......#......#........" , -"......#......#........" , -"......#......#........" , -"......#......#........" , -"......#......#........" , -"......................" , -"......................" };static const char *xpm_symbol_no[] = { "12 12 2 1",
@@ -256,71 +336,4 @@ static const char *xpm_choice_yes[] = {" .. .. " ," .... " , " "}; - -static const char *xpm_menu[] = { -"12 12 2 1" , -" c white" , -". c black" , -" " , -" .......... " , -" . . " , -" . .. . " , -" . .... . " , -" . ...... . " , -" . ...... . " , -" . .... . " , -" . .. . " , -" . . " , -" .......... " , -" " }; - -static const char *xpm_menu_inv[] = { -"12 12 2 1" , -" c white" , -". c black" , -" " , -" .......... " , -" .......... " , -" .. ...... " , -" .. .... " , -" .. .. " , -" .. .. " , -" .. .... " , -" .. ...... " , -" .......... " , -" .......... " , -" " }; - -static const char *xpm_menuback[] = { -"12 12 2 1" , -" c white" , -". c black" , -" " , -" .......... " , -" . . " , -" . .. . " , -" . .... . " , -" . ...... . " , -" . ...... . " , -" . .... . " , -" . .. . " , -" . . " , -" .......... " , -" " }; - -static const char *xpm_void[] = { -"12 12 2 1" , -" c white" , -". c black" , -" " , -" " , -" " , -" " , -" " , -" " , -" " , -" " , -" " , -" " , -" " , -" " }; +#endif
Signature · 1 line
1.8.1.2
Re: [PATCH v2 4/4] KConf: images.c for gtk/qt gui flavour reoganized
Quoted 11 lines · David Graeff
Change order of xpm image constants to build up groups. Make those groups optional via ifdefs.
Remove not used constants.Signed-off-by David Graeff <[email protected]>scripts/kconfig/images.c +0
-0
scripts/kconfig/images.c line 11
Quoted 9 lines
scripts/kconfig/images.c +6
-0@@ -3,6 +3,166 @@* Released under the terms of the GNU GPL v2.0. */ +/* Most images are taken from the system icon theme +in modern gui toolkits nowadays. +Because we compile with -Wunused-variable, we hide +the following xmp image constants. +*/ +#ifdef IMAGES_EXTENDED
I see no users of this. So why not delete these?
Sam
David, All,
On 2013-08-04 12:38 +0200, David Graeff spake thusly:
Quoted 4 lines
Hi Sam, Yann, all,
I prepared a rebased V2 of the patchset. As far as I get the consensus is to replace the existing Qtk and Qt flavours because there exist a
^^^
Qtk, a new toolkit as a merge of Gtk and Qt? ;-)
Quoted 1 line
fallback (n/mconf) for users that do not have the never libs available.
Yes, that was my understanding as well.
Quoted 9 lines
I reorganized the commits and used "-D -M" flags this time for a better review. There are some tool generated files like gconfig/gconf.ui and qconfig/mainwindow.ui which surely break the 80-column readability rule but are best viewed in their respective editor (gtk: glade, qt: designer) anyway.
The Qt flavour is Qt5 compatible but I did not changed the build system to actually use Qt5. I've tested the Qt flavour with Qt 4.8.4, the Gtk flavour with Gtk 3.6.4.
As I previously said, I don't have much insight in Qt or Gtk, so I'm not in a position to properly review those patches. I'll give them a spin at testing, but not much more. Let's see what happens until the next merge window. ;-)
Anyway, I like how you cleaned up scripts/kconfig by moving frontends to their own sub-dir.
/me wonders how much kconfig-frontends [0] will be impacted by this reordering...
Quoted 3 lines
I have another question regarding the patch procedure: I've seen some mails here only requesting for pull requests. Is it common to send pull requests instead of a set of patches?
You want to send patches to the list for people to review them and comment. You don't use pull-requests for this, since the pull-request only contains a single mail [1] with the URL to pull from.
Once everything is OK, either the maintainer will apply those patches, or a sub-maintainer will do it and send a pull-request for 'big' series.
So, you did well to send patches.
[0] http://ymorin.is-a-geek.org/projects/kconfig-frontends
[1] I have a script that sends a pull-request, and send individual patches as a reply to this mail, but standard git-request-pull does not.
Regards,
Yann E. MORIN.
Quoted 74 lines
Regards,
DavidDavid Graeff (4):
KConf: Move flavours into their own subdirectories.
KConf: Update/Port Gtk flavour to use Gtk3
KConf: Qt interface port to Qt4/Qt5, removed Qt3 Support
KConf:images.cfor gtk/qt gui flavour reoganizedscripts/kconfig/Makefile | 189 +-- scripts/kconfig/gconf.c | 1542 ------------------ scripts/kconfig/gconfig/Makefile | 69 + scripts/kconfig/gconfig/gconf.c | 758 +++++++++ scripts/kconfig/{ => gconfig}/gconf.glade | 0 scripts/kconfig/gconfig/gconf.h | 80 + scripts/kconfig/gconfig/gconf.ui | 536 ++++++ scripts/kconfig/gconfig/gconf_treeview_model.c | 706 ++++++++ scripts/kconfig/gconfig/gconf_treeview_model.h | 43 + scripts/kconfig/gconfig/util.h | 33 + scripts/kconfig/images.c | 309 ++-- scripts/kconfig/lxdialog/Makefile | 42 + scripts/kconfig/{ => lxdialog}/mconf.c | 4 +- scripts/kconfig/nconfig/Makefile | 26 + scripts/kconfig/{ => nconfig}/nconf.c | 2 +- scripts/kconfig/{ => nconfig}/nconf.gui.c | 0 scripts/kconfig/{ => nconfig}/nconf.h | 0 scripts/kconfig/qconf.cc | 1790 --------------------- scripts/kconfig/qconf.h | 337 ---- scripts/kconfig/qconfig/Makefile | 94 ++ scripts/kconfig/qconfig/infoViewWidget.cc | 225 +++ scripts/kconfig/qconfig/infoViewWidget.h | 42 + scripts/kconfig/qconfig/mainwindow.cc | 382 +++++ scripts/kconfig/qconfig/mainwindow.h | 73 + scripts/kconfig/qconfig/mainwindow.ui | 410 +++++ scripts/kconfig/qconfig/qconf.cc | 77 + scripts/kconfig/qconfig/qconf.h | 23 + scripts/kconfig/qconfig/searchfiltermodelproxy.cc | 35 + scripts/kconfig/qconfig/searchfiltermodelproxy.h | 35 + scripts/kconfig/qconfig/searchmodel.cc | 57 + scripts/kconfig/qconfig/searchmodel.h | 28 + 31 files changed, 3953 insertions(+), 3994 deletions(-) delete mode 100644 scripts/kconfig/gconf.c create mode 100644 scripts/kconfig/gconfig/Makefile create mode 100644 scripts/kconfig/gconfig/gconf.c rename scripts/kconfig/{ => gconfig}/gconf.glade (100%) create mode 100644 scripts/kconfig/gconfig/gconf.h create mode 100644 scripts/kconfig/gconfig/gconf.ui create mode 100644 scripts/kconfig/gconfig/gconf_treeview_model.c create mode 100644 scripts/kconfig/gconfig/gconf_treeview_model.h create mode 100644 scripts/kconfig/gconfig/util.h create mode 100644 scripts/kconfig/lxdialog/Makefile rename scripts/kconfig/{ => lxdialog}/mconf.c (99%) create mode 100644 scripts/kconfig/nconfig/Makefile rename scripts/kconfig/{ => nconfig}/nconf.c (99%) rename scripts/kconfig/{ => nconfig}/nconf.gui.c (100%) rename scripts/kconfig/{ => nconfig}/nconf.h (100%) delete mode 100644 scripts/kconfig/qconf.cc delete mode 100644 scripts/kconfig/qconf.h create mode 100644 scripts/kconfig/qconfig/Makefile create mode 100644 scripts/kconfig/qconfig/infoViewWidget.cc create mode 100644 scripts/kconfig/qconfig/infoViewWidget.h create mode 100644 scripts/kconfig/qconfig/mainwindow.cc create mode 100644 scripts/kconfig/qconfig/mainwindow.h create mode 100644 scripts/kconfig/qconfig/mainwindow.ui create mode 100644 scripts/kconfig/qconfig/qconf.cc create mode 100644 scripts/kconfig/qconfig/qconf.h create mode 100644 scripts/kconfig/qconfig/searchfiltermodelproxy.cc create mode 100644 scripts/kconfig/qconfig/searchfiltermodelproxy.h create mode 100644 scripts/kconfig/qconfig/searchmodel.cc create mode 100644 scripts/kconfig/qconfig/searchmodel.hSignature · 1 line
1.8.1.2
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
Yann, All,
I've checked your kconfig-frontends project [0] and very much liked your restructuring of the kconfig dir. What's the reason not to "upstream" this structure?
Actually the root Makefile of the kconfig dir still offer the same targets, so no "legacy" or out of tree applications should be affected negativly. Am I missing something?
[0]http://ymorin.is-a-geek.org/projects/kconfig-frontends
Am 04.08.2013 13:02, schrieb Yann E. MORIN:
Quoted 4 lines
Quoted 2 lines
I prepared a rebased V2 of the patchset. As far as I get the consensus is to replace the existing Qtk and Qt flavours because there exist a
^^^Qtk, a new toolkit as a merge of Gtk and Qt? ;-)
Wouldn't that be awesome :D
Quoted 5 lines
Anyway, I like how you cleaned up
scripts/kconfigby moving frontends to their own sub-dir./me wonders how much kconfig-frontends [0] will be impacted by this reordering...
I've tested all available frontends after my move-into-subdir changes (n-/menu-/g-/xconfig). I had to fix some include paths in the first commit, but big changes regarding to your project
only affect the gconf/qconf dirs.
Different from the kernel kconf, you have used special autotool rules like AM_V_MOC etc for Qt, I didn't know those exist.
Quoted 8 lines
You want to send patches to the list for people to review them and comment. You don't use pull-requests for this, since the pull-request only contains a single mail [1] with the URL to pull from.
Once everything is OK, either the maintainer will apply those patches, or a sub-maintainer will do it and send a pull-request for 'big' series.
So, you did well to send patches.
Ok, understood :)
Regards,
David
Quoted 16 lines · David Graeff
Hi Sam, Yann, all,
I prepared a rebased V2 of the patchset. As far as I get the consensus is to replace the existing Qtk and Qt flavours because there exist a fallback (n/mconf) for users that do not have the never libs available.
I reorganized the commits and used "-D -M" flags this time for a better review. There are some tool generated files like gconfig/gconf.ui and qconfig/mainwindow.ui which surely break the 80-column readability rule but are best viewed in their respective editor (gtk: glade,
qt: designer) anyway.The Qt flavour is Qt5 compatible but I did not changed the build system to actually use Qt5. I've tested the Qt flavour with Qt 4.8.4, the Gtk flavour with Gtk 3.6.4.
I have another question regarding the patch procedure: I've seen some mails here only requesting for pull requests. Is it common to send pull requests instead of a set of patches?
Quoted 8 lines
Regards,
DavidDavid Graeff (4):
KConf: Move flavours into their own subdirectories.
KConf: Update/Port Gtk flavour to use Gtk3
KConf: Qt interface port to Qt4/Qt5, removed Qt3 Support
KConf:images.cfor gtk/qt gui flavour reoganized
General comment.
The prefix should be "kconfig: bla bla"
Sam
Quoted 16 lines · David Graeff
Hi Sam, Yann, all,
I prepared a rebased V2 of the patchset. As far as I get the consensus is to replace the existing Qtk and Qt flavours because there exist a fallback (n/mconf) for users that do not have the never libs available.
I reorganized the commits and used "-D -M" flags this time for a better review. There are some tool generated files like gconfig/gconf.ui and qconfig/mainwindow.ui which surely break the 80-column readability rule but are best viewed in their respective editor (gtk: glade,
qt: designer) anyway.The Qt flavour is Qt5 compatible but I did not changed the build system to actually use Qt5. I've tested the Qt flavour with Qt 4.8.4, the Gtk flavour with Gtk 3.6.4.
I have another question regarding the patch procedure: I've seen some mails here only requesting for pull requests. Is it common to send pull requests instead of a set of patches?
Quoted 8 lines
Regards,
DavidDavid Graeff (4):
KConf: Move flavours into their own subdirectories.
KConf: Update/Port Gtk flavour to use Gtk3
KConf: Qt interface port to Qt4/Qt5, removed Qt3 Support
KConf:images.cfor gtk/qt gui flavour reoganized
I only received 1/4 and 4/4 through the mailing list. Perhaps vger rejected the other two patches for size reasons? I know that Yann told to to send full copies of patches instead of pull request, but could you please create a repository on some git hosting site and publish the patches there _in addition to_ sending them by mail?
Thanks,
Michal
Michal, David, All,
Quoted 26 lines · On Friday 16 August 2013 15:28:16 Michal Marek wrote:
Quoted 16 lines · David Graeff
Hi Sam, Yann, all,
I prepared a rebased V2 of the patchset. As far as I get the consensus is to replace the existing Qtk and Qt flavours because there exist a fallback (n/mconf) for users that do not have the never libs available.
I reorganized the commits and used "-D -M" flags this time for a better review. There are some tool generated files like gconfig/gconf.ui and qconfig/mainwindow.ui which surely break the 80-column readability rule but are best viewed in their respective editor (gtk: glade,
qt: designer) anyway.The Qt flavour is Qt5 compatible but I did not changed the build system to actually use Qt5. I've tested the Qt flavour with Qt 4.8.4, the Gtk flavour with Gtk 3.6.4.
I have another question regarding the patch procedure: I've seen some mails here only requesting for pull requests. Is it common to send pull requests instead of a set of patches?
Quoted 8 lines
Regards,
DavidDavid Graeff (4):
KConf: Move flavours into their own subdirectories.
KConf: Update/Port Gtk flavour to use Gtk3
KConf: Qt interface port to Qt4/Qt5, removed Qt3 Support
KConf:images.cfor gtk/qt gui flavour reoganized
Quoted 5 lines
I only received 1/4 and 4/4 through the mailing list. Perhaps vger rejected the other two patches for size reasons? I know that Yann told to to send full copies of patches instead of pull request, but could you please create a repository on some git hosting site and publish the patches there
_inadditionto_sending them by mail?
Indeed, they are big patches.
I postponed getting them in my branch in waiting to get more reviews on these, since I'm not really comfortable with Qt/GTK.
I'll eventually get them, and if there are enough good reviews coming in before 3.12, I'll queue them for 3.12; otherwise, I was aiming for 3.13.
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +0/33 662376056 | Software Designer | \ / CAMPAIGN | ^ | | --==< O_o >==-- '------------.-------: X AGAINST | /e\ There is no | | http://ymorin.is-a-geek.org/ | (*_*) | / \ HTML MAIL | """ conspiracy. | '------------------------------'-------'------------------'--------------------'
Quoted 15 lines · Yann E. MORIN
Michal, David, All,
Quoted 11 lines · On Friday 16 August 2013 15:28:16 Michal Marek wrote:
Quoted 4 lines · David Graeff
KConf: Move flavours into their own subdirectories.
KConf: Update/Port Gtk flavour to use Gtk3
KConf: Qt interface port to Qt4/Qt5, removed Qt3 Support
KConf:images.cfor gtk/qt gui flavour reoganizedI only received 1/4 and 4/4 through the mailing list. Perhaps vger rejected the other two patches for size reasons? I know that Yann told to to send full copies of patches instead of pull request, but could you please create a repository on some git hosting site and publish the patches there
_inadditionto_sending them by mail?
Quoted 7 lines
Indeed, they are big patches.
I postponed getting them in my branch in waiting to get more reviews on these, since I'm not really comfortable with Qt/GTK.
I'll eventually get them, and if there are enough good reviews coming in before 3.12, I'll queue them for 3.12; otherwise, I was aiming for 3.13.
I think the first patch can be applied easily, provided David sends a new version that addresses Sam's review. Regarding the actual port to newer Gtk / Qt, I'd like to see the patches, too :).
Michal