aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-10-18 23:00:43 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-10-18 23:29:01 +0100
commitac86126021eb6d07bdabfcac086d62f6f4da3c23 (patch)
treea7fa6609b17b49746b8e668225aefa6996570522
parent9e50013b9b8fac27a1cc4bbef78077d111164a59 (diff)
downloadpaludis-ac86126021eb6d07bdabfcac086d62f6f4da3c23.tar.gz
paludis-ac86126021eb6d07bdabfcac086d62f6f4da3c23.tar.xz
Kill contrarius, gtkpaludis, AdaptedEnvironment
-rw-r--r--Makefile.am2
-rw-r--r--bash-completion/Makefile.am2
-rw-r--r--bash-completion/contrarius61
-rw-r--r--configure.ac43
-rw-r--r--doc/api/cplusplus/doxygen.conf.in2
-rw-r--r--doc/api/python/Makefile.am1
-rw-r--r--doc/clients/Makefile.am10
-rw-r--r--doc/clients/index.html.part1
-rw-r--r--doc/clients/toplinks.html.part.in6
-rw-r--r--doc/index.html.part.in1
-rw-r--r--paludis/environments/adapted/Makefile.am67
-rw-r--r--paludis/environments/adapted/adapted_environment.cc303
-rw-r--r--paludis/environments/adapted/adapted_environment.hh154
-rw-r--r--paludis/environments/adapted/adapted_environment_TEST.cc40
-rw-r--r--paludis/environments/adapted/registration.cc29
-rw-r--r--paludis/files.m41
-rw-r--r--paludis/host_tuple_name.cc233
-rw-r--r--paludis/host_tuple_name.hh235
-rw-r--r--paludis/host_tuple_name.sr28
-rw-r--r--paludis/host_tuple_name_TEST.cc242
-rwxr-xr-xpaludis/repositories/e/ebuild/ebuild.bash1
-rw-r--r--python/Makefile.am2
-rw-r--r--python/environment.cc22
-rwxr-xr-xpython/environment_TEST.py37
-rw-r--r--ruby/Makefile.am2
-rw-r--r--ruby/environment.cc104
-rw-r--r--ruby/environment_TEST.rb68
-rw-r--r--src/clients/contrarius/Makefile.am104
-rw-r--r--src/clients/contrarius/command_line.cc97
-rw-r--r--src/clients/contrarius/command_line.hh118
-rw-r--r--src/clients/contrarius/contrarius.cc195
-rw-r--r--src/clients/contrarius/contrarius_stage_options.sr27
-rw-r--r--src/clients/contrarius/default_config.txt12
-rw-r--r--src/clients/contrarius/install.cc165
-rw-r--r--src/clients/contrarius/install.hh34
-rw-r--r--src/clients/contrarius/man_contrarius.cc80
-rw-r--r--src/clients/contrarius/stage.cc233
-rw-r--r--src/clients/contrarius/stage.hh219
-rw-r--r--src/clients/contrarius/stage_builder.cc93
-rw-r--r--src/clients/contrarius/stage_builder.hh51
-rw-r--r--src/clients/contrarius/target_config.cc146
-rw-r--r--src/clients/contrarius/target_config.hh108
-rw-r--r--src/clients/gtkpaludis/Makefile.am34
-rw-r--r--src/clients/gtkpaludis/gtkpaludis.cc26
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/Makefile.am65
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/categories_list.cc61
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/categories_list.hh29
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/categories_list_model.cc111
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/categories_list_model.hh44
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/gui_sync_task.cc109
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/gui_sync_task.hh43
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/gui_task.cc10
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/gui_task.hh18
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/main_notebook.cc111
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/main_notebook.hh33
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/main_notebook_page.cc25
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/main_notebook_page.hh22
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/main_window.cc82
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/main_window.hh39
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/markup.cc49
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/markup.hh17
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/markup_formatter.cc252
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/markup_formatter.hh92
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/messages_page.cc93
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/messages_page.hh33
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/package_buttons.cc91
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/package_buttons.hh35
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/packages_filter.cc67
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/packages_filter.hh26
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/packages_list.cc97
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/packages_list.hh33
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/packages_list_filtered_model.cc91
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/packages_list_filtered_model.hh40
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/packages_list_model.cc353
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/packages_list_model.hh58
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/packages_package_filter.cc59
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/packages_package_filter.hh29
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/packages_package_filter_model.cc76
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/packages_package_filter_model.hh39
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/packages_package_filter_option.hh17
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/packages_page.cc191
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/packages_page.hh53
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/packages_repository_filter.cc61
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/packages_repository_filter.hh29
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/packages_repository_filter_model.cc118
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/packages_repository_filter_model.hh46
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/packages_text_filter.cc60
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/packages_text_filter.hh29
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/packages_text_filter_source.cc59
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/packages_text_filter_source.hh29
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/packages_text_filter_source_model.cc68
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/packages_text_filter_source_model.hh39
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/packages_text_filter_source_option.hh15
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/query_notebook.cc56
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/query_notebook.hh28
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/query_notebook_page.cc26
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/query_notebook_page.hh23
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/query_window.cc122
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/query_window.hh41
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/repositories_list.cc57
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/repositories_list.hh29
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/repositories_list_model.cc86
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/repositories_list_model.hh43
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/repositories_page.cc70
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/repositories_page.hh30
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/repository_buttons.cc92
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/repository_buttons.hh34
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/repository_info.cc45
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/repository_info.hh26
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/repository_info_model.cc99
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/repository_info_model.hh51
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/sets_list.cc60
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/sets_list.hh30
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/sets_list_model.cc120
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/sets_list_model.hh45
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/task_sequence_list.cc50
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/task_sequence_list.hh27
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/task_sequence_list_model.cc63
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/task_sequence_list_model.hh41
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/task_window.cc173
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/task_window.hh41
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/threaded_window.cc208
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/threaded_window.hh49
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/version_info.cc68
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/version_info.hh30
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/version_info_model.cc335
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/version_info_model.hh52
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/versions_list.cc99
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/versions_list.hh31
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/versions_list_model.cc155
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/versions_list_model.hh52
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/versions_page.cc72
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/versions_page.hh32
-rw-r--r--src/clients/gtkpaludis/vtemm/Makefile.am78
-rw-r--r--src/clients/gtkpaludis/vtemm/converts/Makefile.am15
-rw-r--r--src/clients/gtkpaludis/vtemm/converts/convert.m430
-rw-r--r--src/clients/gtkpaludis/vtemm/converts/convert_base.m469
-rw-r--r--src/clients/gtkpaludis/vtemm/defs/Makefile.am57
-rw-r--r--src/clients/gtkpaludis/vtemm/defs/enum.pl230
-rw-r--r--src/clients/gtkpaludis/vtemm/defs/generate_defs_vte.cc35
-rw-r--r--src/clients/gtkpaludis/vtemm/reaper.ccg65
-rw-r--r--src/clients/gtkpaludis/vtemm/reaper.hg50
-rw-r--r--src/clients/gtkpaludis/vtemm/terminal_widget.ccg159
-rw-r--r--src/clients/gtkpaludis/vtemm/terminal_widget.hg181
-rw-r--r--src/output/colour.hh8
145 files changed, 13 insertions, 10440 deletions
diff --git a/Makefile.am b/Makefile.am
index 5874171..2a2f3f6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -11,7 +11,7 @@ DISTCHECK_CONFIGURE_FLAGS = --enable-qa --enable-ruby --enable-ruby-doc --enable
--with-ruby-install-dir='$${DESTDIR}$${prefix}/ruby_dir' \
--with-repositories=default \
--with-environments=default,portage \
- --with-clients=default,accerso,contrarius,importare,inquisitio,instruo \
+ --with-clients=default,accerso,importare,inquisitio,instruo \
--with-default-distribution=giant-space-monkey \
--enable-htmltidy
diff --git a/bash-completion/Makefile.am b/bash-completion/Makefile.am
index be1e736..2e74f10 100644
--- a/bash-completion/Makefile.am
+++ b/bash-completion/Makefile.am
@@ -1,6 +1,6 @@
MAINTAINERCLEANFILES = Makefile.in
noinst_DATA = paludis adjutrix qualudis \
- contrarius inquisitio \
+ inquisitio \
accerso instruo reconcilio \
importare
EXTRA_DIST = $(noinst_DATA)
diff --git a/bash-completion/contrarius b/bash-completion/contrarius
deleted file mode 100644
index 97233e7..0000000
--- a/bash-completion/contrarius
+++ /dev/null
@@ -1,61 +0,0 @@
-# Bash completion function for contrarius
-# Written by Mike Kelly
-# vim: set et sw=4 sts=4 ts=4 ft=sh :
-
-# NOTE: This is still a work in progress, don't expect it to work well or
-# properly right now.
-
-_contrarius() {
- local cur prev opts
- COMPREPLY=()
- cur=${COMP_WORDS[COMP_CWORD]}
- prev=${COMP_WORDS[COMP_CWORD-1]}
-
- opts="--version -V \
- --help -h \
- --fetch -f \
- --pretend -p \
- --environment -E \
- --show-reasons \
- --stage -s \
- --target -t \
- --headers -H \
- --always-rebuild -r \
- --debug-build \
- --verbose -v \
- --log-level -L \
- --no-colour -C \
- --no-color \
- --resume-command-template"
-
- case "${cur}" in
- -*)
- COMPREPLY=($(compgen -W "${opts}" -- "${cur}"))
- return 0
- ;;
- *)
- case "${prev}" in
- ## Enum operators
- --log-level|-L)
- COMPREPLY=($(compgen -W "debug qa warning silent" -- "${cur}"))
- return 0
- ;;
-
- --show-reasons)
- COMPREPLY=($(compgen -W "none summary full" -- "${cur}"))
- return 0
- ;;
- --stage|-s)
- COMPREPLY=($(compgen -W "binutils minimal headers libc full" -- "${cur}"))
- return 0
- ;;
- --debug-build)
- COMPREPLY=($(compgen -W "none split internal" -- "${cur}"))
- return 0
- ;;
-
- esac
- ;;
- esac
-}
-complete -F _contrarius contrarius
diff --git a/configure.ac b/configure.ac
index 39bc3a9..9c9caa8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -414,7 +414,6 @@ need_xml_check=
need_pcrepp_check=
need_syck_check=
need_gem_check=
-need_gtkmm_check=
dnl {{{ we can use abi::__cxa_demangle
AC_MSG_CHECKING([for abi::__cxa_demangle])
@@ -1230,16 +1229,15 @@ fi
dnl }}}
dnl {{{ environments
-ALL_ENVIRONMENTS="adapted no_config paludis portage test"
-DEFAULT_ENVIRONMENTS="adapted no_config paludis test"
+ALL_ENVIRONMENTS="no_config paludis portage test"
+DEFAULT_ENVIRONMENTS="no_config paludis test"
AC_MSG_CHECKING([which environments to build...])
AC_ARG_WITH([environments],
[ --with-environments=foo,bar,...
Build the specified environments:
all All available environments
- default Equivalent to adapted,no_config,paludis,test
+ default Equivalent to no_config,paludis,test
- adapted An environment adapter, for contrarius etc
no_config Configurationless environment, for adjutrix etc
paludis Standard Paludis environments
portage Portage configuration (dodgy)
@@ -1268,14 +1266,10 @@ AC_DEFINE_UNQUOTED([DEFAULT_DISTRIBUTION], "$DEFAULT_DISTRIBUTION", [Default dis
dnl }}}
dnl {{{ clients
-ALL_CLIENTS="accerso adjutrix contrarius gtkpaludis importare inquisitio instruo paludis qualudis reconcilio"
+ALL_CLIENTS="accerso adjutrix importare inquisitio instruo paludis qualudis reconcilio"
ALL_CLIENTS_HTML=""
for a in $ALL_CLIENTS ; do
- if test x"$a" = "xgtkpaludis" ; then
- ALL_CLIENTS_HTML="$ALL_CLIENTS_HTML"
- else
- ALL_CLIENTS_HTML="$ALL_CLIENTS_HTML $a.html"
- fi
+ ALL_CLIENTS_HTML="$ALL_CLIENTS_HTML $a.html"
done
DEFAULT_CLIENTS="adjutrix importare paludis reconcilio"
if test x"$ENABLE_QA" = "xyes" ; then
@@ -1291,8 +1285,6 @@ AC_ARG_WITH([clients],
accerso A fetch / mirror client
adjutrix A tool for tree querying
- contrarius The cross toolchain creator
- gtkpaludis GUI client (unusable)
importare On-the-fly unpackaged installer
inquisitio A search client
instruo A metadata generation client
@@ -1314,9 +1306,6 @@ AC_SUBST([BUILD_CLIENTS])
if echo $clients | tr ' ' '\n' | grep '^inquisitio$' >/dev/null ; then
need_pcrepp_check=yes
fi
-if echo $clients | tr ' ' '\n' | grep '^gtkpaludis$' >/dev/null ; then
- need_gtkmm_check=yes
-fi
dnl }}}
dnl {{{ libxml2 check
@@ -1367,21 +1356,6 @@ if test "x$need_gem_check" = "xyes" ; then
fi
dnl }}}
-dnl {{{ gtkmm check
-if test "x$need_gtkmm_check" = "xyes" ; then
- PKG_CHECK_MODULES([gtkmm], [gtkmm-2.4 >= 2.8.0])
- PKG_CHECK_MODULES([gthread], [gthread-2.0 >= 2.12.0])
- PKG_CHECK_MODULES([vte], [vte >= 0.12.1])
- PKG_CHECK_MODULES([pygtk], [pygtk-2.0 >= 2.6.0])
- AC_CHECK_FUNCS([posix_openpt], [], [AC_MSG_ERROR([I need posix_openpt])])
- GLIBMM_LIBDIR=`pkg-config --variable=libdir glibmm-2.4`
- GMMPROC_DIR=$GLIBMM_LIBDIR/glibmm-2.4/proc
- AC_SUBST(GMMPROC_DIR)
- GMMPROC=$GMMPROC_DIR/gmmproc
- AC_SUBST(GMMPROC)
-fi
-dnl }}}
-
dnl {{{ check for eselect
AC_MSG_CHECKING([for eselect])
if eselect version >/dev/null 2>/dev/null ; then
@@ -1447,7 +1421,6 @@ AC_OUTPUT(
paludis/distributions/exherbo/Makefile
paludis/distributions/gentoo/Makefile
paludis/environments/Makefile
- paludis/environments/adapted/Makefile
paludis/environments/no_config/Makefile
paludis/environments/paludis/Makefile
paludis/environments/portage/Makefile
@@ -1488,12 +1461,6 @@ AC_OUTPUT(
src/clients/Makefile
src/clients/accerso/Makefile
src/clients/adjutrix/Makefile
- src/clients/contrarius/Makefile
- src/clients/gtkpaludis/Makefile
- src/clients/gtkpaludis/libgtkpaludis/Makefile
- src/clients/gtkpaludis/vtemm/Makefile
- src/clients/gtkpaludis/vtemm/converts/Makefile
- src/clients/gtkpaludis/vtemm/defs/Makefile
src/clients/importare/Makefile
src/clients/inquisitio/Makefile
src/clients/instruo/Makefile
diff --git a/doc/api/cplusplus/doxygen.conf.in b/doc/api/cplusplus/doxygen.conf.in
index e2c2794..ea0227a 100644
--- a/doc/api/cplusplus/doxygen.conf.in
+++ b/doc/api/cplusplus/doxygen.conf.in
@@ -477,7 +477,7 @@ WARN_LOGFILE =
# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.
-INPUT = ../../../paludis ../../../paludis/args ../../../paludis/environments ../../../paludis/environments/no_config ../../../paludis/environments/adapted ../../../paludis/environments/test ../../../paludis/fetchers ../../../paludis/repositories/fake ../../../paludis/selinux ../../../paludis/syncers ../../../paludis/util ./ ./examples/
+INPUT = ../../../paludis ../../../paludis/args ../../../paludis/environments ../../../paludis/environments/no_config ../../../paludis/environments/test ../../../paludis/fetchers ../../../paludis/repositories/fake ../../../paludis/selinux ../../../paludis/syncers ../../../paludis/util ./ ./examples/
# This tag can be used to specify the character encoding of the source files that
# doxygen parses. Internally doxygen uses the UTF-8 encoding, which is also the default
diff --git a/doc/api/python/Makefile.am b/doc/api/python/Makefile.am
index 74ad925..c0f919b 100644
--- a/doc/api/python/Makefile.am
+++ b/doc/api/python/Makefile.am
@@ -28,7 +28,6 @@ python : $(top_builddir)/python/paludis.so epydoc.css python_syntax.css create_p
\`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/util/.libs\`: \
\`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/.libs\`: \
\`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/no_config/.libs\`: \
- \`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/adapted/.libs\`: \
\`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/repositories/e/.libs\`: \
\`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/repositories/fake/.libs\`: \
\`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/python/.libs\`" \
diff --git a/doc/clients/Makefile.am b/doc/clients/Makefile.am
index 0c585c0..f08720b 100644
--- a/doc/clients/Makefile.am
+++ b/doc/clients/Makefile.am
@@ -62,16 +62,6 @@ adjutrix.html : header.html.part footer.html.part
fi ; } && \
cat footer.html.part ; } > $@
-contrarius.html : header.html.part footer.html.part
- { cat header.html.part && { \
- if test -x $(top_builddir)/src/clients/contrarius/man-contrarius ; then \
- $(top_builddir)/src/clients/contrarius/man-contrarius --html ; \
- else \
- echo "<h1>contrarius</h1>"; \
- echo "<p>Sorry, documentation was generated without support for the contrarius client.</p>" ; \
- fi ; } && \
- cat footer.html.part ; } > $@
-
inquisitio.html : header.html.part footer.html.part
{ cat header.html.part && { \
if test -x $(top_builddir)/src/clients/inquisitio/man-inquisitio ; then \
diff --git a/doc/clients/index.html.part b/doc/clients/index.html.part
index 12b42ce..f40c4f1 100644
--- a/doc/clients/index.html.part
+++ b/doc/clients/index.html.part
@@ -6,7 +6,6 @@
<ul>
<li><a href="paludis.html">paludis</a>, the console package management client.</li>
- <li><a href="contrarius.html">contrarius</a>, a tool for creating cross-toolchains.</li>
<li><a href="importare.html">importare</a>, the unpackaged package installer.</li>
<li><a href="inquisitio.html">inquisitio</a>, the search client.</li>
<li><a href="reconcilio.html">reconcilio</a>, a tool for rebuilding packages with broken linkage.</li>
diff --git a/doc/clients/toplinks.html.part.in b/doc/clients/toplinks.html.part.in
index cf27103..bf89ffb 100644
--- a/doc/clients/toplinks.html.part.in
+++ b/doc/clients/toplinks.html.part.in
@@ -28,11 +28,11 @@
</td>
<td class="currentpage">
- <a href="###TOPURI###clients/contrarius.html">contrarius</a>
+ <a href="###TOPURI###clients/inquisitio.html">inquisitio</a>
</td>
<td class="currentpage">
- <a href="###TOPURI###clients/qualudis.html">qualudis</a>
+ &nbsp;
</td>
</tr>
@@ -56,7 +56,7 @@
</td>
<td class="currentpage">
- <a href="###TOPURI###clients/inquisitio.html">inquisitio</a>
+ <a href="###TOPURI###clients/qualudis.html">qualudis</a>
</td>
<td class="currentpage">
diff --git a/doc/index.html.part.in b/doc/index.html.part.in
index dd4b2c8..cb66f16 100644
--- a/doc/index.html.part.in
+++ b/doc/index.html.part.in
@@ -79,7 +79,6 @@ the exheres repository format.</p>
<ul>
<li><a href="clients/paludis.html">paludis</a>, the console package management client.</li>
- <li><a href="clients/contrarius.html">contrarius</a>, a tool for creating cross-toolchains.</li>
<li><a href="clients/importare.html">importare</a>, the unpackaged package installer.</li>
<li><a href="clients/inquisitio.html">inquisitio</a>, the search client.</li>
<li><a href="clients/reconcilio.html">reconcilio</a>, a tool for rebuilding packages with broken linkage.</li>
diff --git a/paludis/environments/adapted/Makefile.am b/paludis/environments/adapted/Makefile.am
deleted file mode 100644
index 266bdb4..0000000
--- a/paludis/environments/adapted/Makefile.am
+++ /dev/null
@@ -1,67 +0,0 @@
-CLEANFILES = *~ gmon.out *.gcov *.gcno *.gcda *.loT ihateautomake.cc ihateautomake.o *.epicfail
-DISTCLEANFILES =
-MAINTAINERCLEANFILES = Makefile.in
-AM_CXXFLAGS = -I$(top_srcdir) @PALUDIS_CXXFLAGS@ @PALUDIS_CXXFLAGS_VISIBILITY@
-DEFS= \
- -DSYSCONFDIR=\"$(sysconfdir)\" \
- -DLIBEXECDIR=\"$(libexecdir)\" \
- -DDATADIR=\"$(datadir)\" \
- -DLIBDIR=\"$(libdir)\"
-
-libpaludisadaptedenvironment_@PALUDIS_PC_SLOT@_la_SOURCES = \
- adapted_environment.cc adapted_environment.hh \
- registration.cc
-
-libpaludisadaptedenvironment_@PALUDIS_PC_SLOT@_la_LDFLAGS = -version-info @VERSION_LIB_CURRENT@:@VERSION_LIB_REVISION@:0
-
-libpaludisadaptedenvironment_@PALUDIS_PC_SLOT@_la_LIBADD = \
- $(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la
-
-lib_LTLIBRARIES = libpaludisadaptedenvironment_@PALUDIS_PC_SLOT@.la
-
-paludis_environment_adapted_includedir = $(includedir)/paludis-$(PALUDIS_PC_SLOT)/paludis/environments/adapted
-paludis_environment_adapted_include_HEADERS = \
- adapted_environment.hh
-
-EXTRA_DIST = \
- adapted_environment_TEST.cc
-
-TESTS = adapted_environment_TEST
-
-TESTS_ENVIRONMENT = env \
- PALUDIS_EBUILD_DIR="$(top_srcdir)/ebuild/" \
- PALUDIS_SKIP_CONFIG="yes" \
- PALUDIS_REPOSITORY_SO_DIR="$(top_builddir)/paludis/repositories" \
- PALUDIS_DISTRIBUTION="gentoo" \
- PALUDIS_OPTIONS="" \
- TEST_SCRIPT_DIR="$(srcdir)/" \
- bash $(top_srcdir)/test/run_test.sh
-
-check_PROGRAMS = $(TESTS)
-check_SCRIPTS =
-
-adapted_environment_TEST_SOURCES = adapted_environment_TEST.cc
-
-adapted_environment_TEST_LDADD = \
- libpaludisadaptedenvironment_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/util/test_extras.o \
- $(top_builddir)/test/libtest.a \
- $(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
- $(DYNAMIC_LD_LIBS)
-
-BUILT_SOURCES =
-
-built-sources : $(BUILT_SOURCES)
- for s in $(SUBDIRS) ; do $(MAKE) -C $$s built-sources || exit 1 ; done
-
-distcheck-deps-local : $(DISTCHECK_DEPS)
-
-distcheck-deps : distcheck-deps-subdirs
-
-distcheck-deps-subdirs :
- for s in $(SUBDIRS) . ; do if test x$$s = x. ; then $(MAKE) distcheck-deps-local || exit 1 ; \
- else $(MAKE) -C $$s distcheck-deps || exit 1 ; fi ; done
-
diff --git a/paludis/environments/adapted/adapted_environment.cc b/paludis/environments/adapted/adapted_environment.cc
deleted file mode 100644
index 39af01e..0000000
--- a/paludis/environments/adapted/adapted_environment.cc
+++ /dev/null
@@ -1,303 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-/*
- * Copyright (c) 2007, 2008 Ciaran McCreesh
- *
- * This file is part of the Paludis package manager. Paludis is free software;
- * you can redistribute it and/or modify it under the terms of the GNU General
- * Public License version 2, as published by the Free Software Foundation.
- *
- * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#include "adapted_environment.hh"
-#include <paludis/dep_spec.hh>
-#include <paludis/hook.hh>
-#include <paludis/util/stringify.hh>
-#include <paludis/util/fs_entry.hh>
-#include <paludis/util/private_implementation_pattern-impl.hh>
-#include <paludis/util/hashes.hh>
-#include <paludis/util/wrapped_forward_iterator.hh>
-#include <paludis/match_package.hh>
-#include <tr1/unordered_map>
-
-using namespace paludis;
-
-typedef std::tr1::unordered_multimap<UseFlagName, std::pair<std::tr1::shared_ptr<const PackageDepSpec>, UseFlagState>, Hash<UseFlagName> > Use;
-
-namespace paludis
-{
- template<>
- struct Implementation<AdaptedEnvironment>
- {
- std::tr1::shared_ptr<Environment> env;
- Use use;
- bool has_metadata_keys;
-
- Implementation(std::tr1::shared_ptr<Environment> e) :
- env(e),
- has_metadata_keys(false)
- {
- }
- };
-}
-
-AdaptedEnvironment::AdaptedEnvironment(const std::tr1::shared_ptr<Environment> & e) :
- PrivateImplementationPattern<AdaptedEnvironment>(new Implementation<AdaptedEnvironment>(e)),
- _imp(PrivateImplementationPattern<AdaptedEnvironment>::_imp)
-{
-}
-
-AdaptedEnvironment::~AdaptedEnvironment()
-{
-}
-
-void
-AdaptedEnvironment::adapt_use(const std::tr1::shared_ptr<const PackageDepSpec> & p,
- const UseFlagName & u, const UseFlagState s)
-{
- _imp->use.insert(std::make_pair(u, std::make_pair(p, s)));
-}
-
-void
-AdaptedEnvironment::clear_adaptions()
-{
- _imp.reset(new Implementation<AdaptedEnvironment>(_imp->env));
-}
-
-std::tr1::shared_ptr<PackageDatabase>
-AdaptedEnvironment::package_database()
-{
- return _imp->env->package_database();
-}
-
-std::tr1::shared_ptr<const PackageDatabase>
-AdaptedEnvironment::package_database() const
-{
- return _imp->env->package_database();
-}
-
-bool
-AdaptedEnvironment::query_use(const UseFlagName & u, const PackageID & e) const
-{
- UseFlagState result(use_unspecified);
- for (std::pair<Use::const_iterator, Use::const_iterator> p(_imp->use.equal_range(u)) ;
- p.first != p.second ; ++p.first)
- if (match_package(*this, *p.first->second.first, e))
- result = p.first->second.second;
-
- switch (result)
- {
- case use_enabled:
- return true;
-
- case use_disabled:
- return false;
-
- case use_unspecified:
- return _imp->env->query_use(u, e);
-
- case last_use:
- ;
- }
-
- throw InternalError(PALUDIS_HERE, "Bad state");
-}
-
-std::tr1::shared_ptr<const UseFlagNameSet>
-AdaptedEnvironment::known_use_expand_names(const UseFlagName & u, const PackageID & e) const
-{
- return _imp->env->known_use_expand_names(u, e);
-}
-
-bool
-AdaptedEnvironment::accept_license(const std::string & l, const PackageID & e) const
-{
- return _imp->env->accept_license(l, e);
-}
-
-bool
-AdaptedEnvironment::accept_keywords(const std::tr1::shared_ptr<const KeywordNameSet> & k, const PackageID & e) const
-{
- return _imp->env->accept_keywords(k, e);
-}
-
-std::tr1::shared_ptr<const FSEntrySequence>
-AdaptedEnvironment::bashrc_files() const
-{
- return _imp->env->bashrc_files();
-}
-
-std::tr1::shared_ptr<const FSEntrySequence>
-AdaptedEnvironment::syncers_dirs() const
-{
- return _imp->env->syncers_dirs();
-}
-
-std::tr1::shared_ptr<const FSEntrySequence>
-AdaptedEnvironment::fetchers_dirs() const
-{
- return _imp->env->fetchers_dirs();
-}
-
-std::tr1::shared_ptr<const FSEntrySequence>
-AdaptedEnvironment::hook_dirs() const
-{
- return _imp->env->hook_dirs();
-}
-
-std::string
-AdaptedEnvironment::paludis_command() const
-{
- return _imp->env->paludis_command();
-}
-
-void
-AdaptedEnvironment::set_paludis_command(const std::string & s)
-{
- _imp->env->set_paludis_command(s);
-}
-
-const FSEntry
-AdaptedEnvironment::root() const
-{
- return _imp->env->root();
-}
-
-uid_t
-AdaptedEnvironment::reduced_uid() const
-{
- return _imp->env->reduced_uid();
-}
-
-gid_t
-AdaptedEnvironment::reduced_gid() const
-{
- return _imp->env->reduced_gid();
-}
-
-std::tr1::shared_ptr<const MirrorsSequence>
-AdaptedEnvironment::mirrors(const std::string & m) const
-{
- return _imp->env->mirrors(m);
-}
-
-std::tr1::shared_ptr<const SetNameSet>
-AdaptedEnvironment::set_names() const
-{
- return _imp->env->set_names();
-}
-
-std::tr1::shared_ptr<SetSpecTree::ConstItem>
-AdaptedEnvironment::set(const SetName & s) const
-{
- return _imp->env->set(s);
-}
-
-std::tr1::shared_ptr<const DestinationsSet>
-AdaptedEnvironment::default_destinations() const
-{
- return _imp->env->default_destinations();
-}
-
-HookResult
-AdaptedEnvironment::perform_hook(const Hook & h) const
-{
- return _imp->env->perform_hook(h);
-}
-
-std::string
-AdaptedEnvironment::distribution() const
-{
- return _imp->env->distribution();
-}
-
-const std::tr1::shared_ptr<const Mask>
-AdaptedEnvironment::mask_for_breakage(const PackageID & id) const
-{
- return _imp->env->mask_for_breakage(id);
-}
-
-const std::tr1::shared_ptr<const Mask>
-AdaptedEnvironment::mask_for_user(const PackageID & id) const
-{
- return _imp->env->mask_for_user(id);
-}
-
-bool
-AdaptedEnvironment::unmasked_by_user(const PackageID & id) const
-{
- return _imp->env->unmasked_by_user(id);
-}
-
-bool
-AdaptedEnvironment::is_paludis_package(const QualifiedPackageName & q) const
-{
- return _imp->env->is_paludis_package(q);
-}
-
-void
-AdaptedEnvironment::add_to_world(const QualifiedPackageName & q) const
-{
- _imp->env->add_to_world(q);
-}
-
-void
-AdaptedEnvironment::add_to_world(const SetName & s) const
-{
- _imp->env->add_to_world(s);
-}
-
-void
-AdaptedEnvironment::remove_from_world(const QualifiedPackageName & q) const
-{
- _imp->env->remove_from_world(q);
-}
-
-void
-AdaptedEnvironment::remove_from_world(const SetName & s) const
-{
- _imp->env->remove_from_world(s);
-}
-
-std::tr1::shared_ptr<PackageIDSequence>
-AdaptedEnvironment::operator[] (const Selection & s) const
-{
- return _imp->env->operator[] (s);
-}
-
-void
-AdaptedEnvironment::need_keys_added() const
-{
- if (! _imp->has_metadata_keys)
- for (Environment::MetadataConstIterator i(_imp->env->begin_metadata()), i_end(_imp->env->end_metadata()) ;
- i != i_end ; ++i)
- add_metadata_key(*i);
-}
-
-void
-AdaptedEnvironment::clear_metadata_keys() const
-{
- Environment::clear_metadata_keys();
- _imp->has_metadata_keys = false;
-}
-
-const std::tr1::shared_ptr<const MetadataValueKey<std::string> >
-AdaptedEnvironment::format_key() const
-{
- return _imp->env->format_key();
-}
-
-const std::tr1::shared_ptr<const MetadataValueKey<FSEntry> >
-AdaptedEnvironment::config_location_key() const
-{
- return _imp->env->config_location_key();
-}
-
diff --git a/paludis/environments/adapted/adapted_environment.hh b/paludis/environments/adapted/adapted_environment.hh
deleted file mode 100644
index 163576d..0000000
--- a/paludis/environments/adapted/adapted_environment.hh
+++ /dev/null
@@ -1,154 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-/*
- * Copyright (c) 2007, 2008 Ciaran McCreesh
- *
- * This file is part of the Paludis package manager. Paludis is free software;
- * you can redistribute it and/or modify it under the terms of the GNU General
- * Public License version 2, as published by the Free Software Foundation.
- *
- * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#ifndef PALUDIS_GUARD_PALUDIS_ENVIRONMENTS_ADAPTED_ADAPTED_ENVIRONMENT_HH
-#define PALUDIS_GUARD_PALUDIS_ENVIRONMENTS_ADAPTED_ADAPTED_ENVIRONMENT_HH 1
-
-#include <paludis/environment.hh>
-#include <paludis/util/private_implementation_pattern.hh>
-
-namespace paludis
-{
- class PackageDepSpec;
-
- /**
- * An Environment that allows you to change aspects of an
- * existing Environment, e.g.\ the state of a USE flag for a
- * package.
- *
- * \ingroup grpadaptedenvironment
- * \nosubgrouping
- */
- class PALUDIS_VISIBLE AdaptedEnvironment :
- public Environment,
- private PrivateImplementationPattern<AdaptedEnvironment>
- {
- private:
- PrivateImplementationPattern<AdaptedEnvironment>::ImpPtr & _imp;
-
- protected:
- virtual void clear_metadata_keys() const;
- virtual void need_keys_added() const;
-
- public:
- AdaptedEnvironment(const std::tr1::shared_ptr<Environment> &);
- ~AdaptedEnvironment();
-
- ///\name Adapting methods
- ///\{
-
- /**
- * Set the state of a USE flag for the given PackageDepSpec.
- */
- void adapt_use(const std::tr1::shared_ptr<const PackageDepSpec> &, const UseFlagName &, const UseFlagState);
-
- /**
- * Clear all adaptions from this Environemnt.
- */
- void clear_adaptions();
-
- ///\}
-
- virtual std::tr1::shared_ptr<PackageIDSequence> operator[] (const Selection &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual bool query_use(const UseFlagName &, const PackageID &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual std::tr1::shared_ptr<const UseFlagNameSet> known_use_expand_names(
- const UseFlagName &, const PackageID &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual bool accept_license(const std::string &, const PackageID &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual bool accept_keywords(const std::tr1::shared_ptr<const KeywordNameSet> &, const PackageID &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual std::tr1::shared_ptr<PackageDatabase> package_database()
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual std::tr1::shared_ptr<const PackageDatabase> package_database() const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual std::tr1::shared_ptr<const FSEntrySequence> bashrc_files() const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual std::tr1::shared_ptr<const FSEntrySequence> syncers_dirs() const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual std::tr1::shared_ptr<const FSEntrySequence> fetchers_dirs() const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual std::tr1::shared_ptr<const FSEntrySequence> hook_dirs() const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual std::string paludis_command() const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual void set_paludis_command(const std::string &);
-
- virtual const FSEntry root() const;
-
- virtual uid_t reduced_uid() const;
-
- virtual gid_t reduced_gid() const;
-
- virtual std::tr1::shared_ptr<const MirrorsSequence> mirrors(const std::string &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual std::tr1::shared_ptr<const SetNameSet> set_names() const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual std::tr1::shared_ptr<SetSpecTree::ConstItem> set(const SetName & id) const;
-
- virtual std::tr1::shared_ptr<const DestinationsSet> default_destinations() const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual HookResult perform_hook(const Hook &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual std::string distribution() const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual const std::tr1::shared_ptr<const Mask> mask_for_breakage(const PackageID &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual const std::tr1::shared_ptr<const Mask> mask_for_user(const PackageID &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual bool unmasked_by_user(const PackageID &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual bool is_paludis_package(const QualifiedPackageName &) const PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual void add_to_world(const QualifiedPackageName &) const;
-
- virtual void add_to_world(const SetName &) const;
-
- virtual void remove_from_world(const QualifiedPackageName &) const;
-
- virtual void remove_from_world(const SetName &) const;
-
- virtual const std::tr1::shared_ptr<const MetadataValueKey<std::string> > format_key() const;
- virtual const std::tr1::shared_ptr<const MetadataValueKey<FSEntry> > config_location_key() const;
- };
-}
-
-#endif
diff --git a/paludis/environments/adapted/adapted_environment_TEST.cc b/paludis/environments/adapted/adapted_environment_TEST.cc
deleted file mode 100644
index 9446003..0000000
--- a/paludis/environments/adapted/adapted_environment_TEST.cc
+++ /dev/null
@@ -1,40 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-/*
- * Copyright (c) 2007, 2008 Ciaran McCreesh
- *
- * This file is part of the Paludis package manager. Paludis is free software;
- * you can redistribute it and/or modify it under the terms of the GNU General
- * Public License version 2, as published by the Free Software Foundation.
- *
- * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#include "adapted_environment.hh"
-#include <paludis/environments/test/test_environment.hh>
-#include <test/test_framework.hh>
-#include <test/test_runner.hh>
-
-using namespace paludis;
-using namespace test;
-
-namespace test_cases
-{
- struct AdaptedEnvironmentTest : TestCase
- {
- AdaptedEnvironmentTest() : TestCase("adapted environment") { }
-
- void run()
- {
- AdaptedEnvironment e(std::tr1::shared_ptr<TestEnvironment>(new TestEnvironment));
- }
- } test_adapted_environment;
-}
-
diff --git a/paludis/environments/adapted/registration.cc b/paludis/environments/adapted/registration.cc
deleted file mode 100644
index de91c5e..0000000
--- a/paludis/environments/adapted/registration.cc
+++ /dev/null
@@ -1,29 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-/*
- * Copyright (c) 2007, 2008 Ciaran McCreesh
- *
- * This file is part of the Paludis package manager. Paludis is free software;
- * you can redistribute it and/or modify it under the terms of the GNU General
- * Public License version 2, as published by the Free Software Foundation.
- *
- * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#include <paludis/environment_factory.hh>
-
-using namespace paludis;
-
-extern "C" void paludis_initialise_environment_so(EnvironmentFactory * const) PALUDIS_VISIBLE;
-
-void paludis_initialise_environment_so(EnvironmentFactory * const)
-{
-}
-
diff --git a/paludis/files.m4 b/paludis/files.m4
index 67f8888..dbde27f 100644
--- a/paludis/files.m4
+++ b/paludis/files.m4
@@ -41,7 +41,6 @@ add(`generator_handler', `hh', `cc', `fwd')
add(`handled_information', `hh', `fwd', `cc')
add(`hook', `hh', `cc', `fwd',`se', `sr')
add(`hooker', `hh', `cc', `test', `testscript')
-add(`host_tuple_name', `hh', `cc', `sr', `test')
add(`install_task', `hh', `cc', `se')
add(`literal_metadata_key', `hh', `cc')
add(`mask', `hh', `cc', `fwd')
diff --git a/paludis/host_tuple_name.cc b/paludis/host_tuple_name.cc
deleted file mode 100644
index 2248208..0000000
--- a/paludis/host_tuple_name.cc
+++ /dev/null
@@ -1,233 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-/*
- * Copyright (c) 2006 Danny van Dyk
- *
- * This file is part of the Paludis package manager. Paludis is free software;
- * you can redistribute it and/or modify it under the terms of the GNU General
- * Public License version 2, as published by the Free Software Foundation.
- *
- * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#include <paludis/host_tuple_name.hh>
-#include <paludis/util/stringify.hh>
-#include <paludis/util/operators.hh>
-#include <paludis/util/tokeniser.hh>
-#include <paludis/util/stringify.hh>
-#include <utility>
-#include <vector>
-#include <ostream>
-
-using namespace paludis;
-
-#include <paludis/host_tuple_name-sr.cc>
-
-HostTupleNameError::HostTupleNameError(const std::string & name) throw () :
- NameError(name, "host tuple name")
-{
-}
-
-HostTupleNameError::HostTupleNameError(const std::string & name,
- const std::string & type) throw () :
- NameError(name, type)
-{
-}
-
-HostTupleName::HostTupleName(const std::string & s) :
- architecture("architecture"),
- manufacturer("manufacturer"),
- kernel("kernel"),
- userland("userland")
-{
- Context c("When creating a HostTupleName from '" + s + "':");
-
- std::vector<std::string> tokens;
- tokenise<delim_kind::AnyOfTag, delim_mode::DelimiterTag>(s, "-", "", std::back_inserter(tokens));
-
- switch (tokens.size())
- {
- case 2: // Type 'arch'-'userland', i.e. 'spu-elf'.
- architecture = ArchitectureNamePart(tokens[0]);
- manufacturer = ManufacturerNamePart("");
- kernel = KernelNamePart("");
- userland = UserlandNamePart(tokens[1]);
-
- break;
-
- case 3: /*
- * Type 'arch'-'manufacturer'-'os', i.e. 'i386-unknown-freebsd6.0'.
- * Let's duplicate the 'os' field into kernel and userland.
- */
- architecture = ArchitectureNamePart(tokens[0]);
- manufacturer = ManufacturerNamePart(tokens[1]);
- kernel = KernelNamePart(tokens[2]);
- userland = UserlandNamePart(tokens[2]);
-
- break;
-
- case 4: // Type full
- architecture = ArchitectureNamePart(tokens[0]);
- manufacturer = ManufacturerNamePart(tokens[1]);
- kernel = KernelNamePart(tokens[2]);
- userland = UserlandNamePart(tokens[3]);
-
- break;
-
- default:
- throw HostTupleNameError(s);
- }
-}
-
-std::ostream &
-paludis::operator<< (std::ostream & s, const HostTupleName & c)
-{
- s << c.architecture;
- if (! c.manufacturer.data().empty())
- s << "-" << c.manufacturer;
- if ((! c.kernel.data().empty()) && (c.kernel.data() != c.userland.data()))
- s << "-" << c.kernel;
- s << "-" << c.userland;
- return s;
-}
-
-void
-ArchitectureNamePartValidator::validate(const std::string & s)
-{
- static const std::string allowed_chars(
- "abcdefghijklmnopqrstuvwxyz"
- "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
- "0123456789_.");
- // '.' is included, as 'HPPA1.x' is a valid ArchitectureNamePart.
-
- do
- {
- if (s.empty())
- break;
-
- if ('-' == s.at(0))
- break;
-
- if (std::string::npos != s.find_first_not_of(allowed_chars))
- break;
-
- return;
-
- } while (false);
-
- Context c("When validating architecture name '" + s + "':");
-
- throw ArchitectureNamePartError(s);
-}
-
-ArchitectureNamePartError::ArchitectureNamePartError(const std::string & name) throw () :
- HostTupleNameError(name, "architecture name part")
-{
-}
-
-void
-ManufacturerNamePartValidator::validate(const std::string & s)
-{
- static const std::string allowed_chars(
- "abcdefghijklmnopqrstuvwxyz"
- "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
- "0123456789_");
-
- do
- {
- if (s.empty())
- return;
-
- if ('-' == s.at(0))
- break;
-
- if (std::string::npos != s.find_first_not_of(allowed_chars))
- break;
-
- return;
-
- } while (false);
-
- Context c("When validating manufacturer name '" + s + "':");
-
- throw ManufacturerNamePartError(s);
-}
-
-ManufacturerNamePartError::ManufacturerNamePartError(const std::string & name) throw () :
- HostTupleNameError(name, "manufacturer name part")
-{
-}
-
-void
-KernelNamePartValidator::validate(const std::string & s)
-{
- static const std::string allowed_chars(
- "abcdefghijklmnopqrstuvwxyz"
- "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
- "0123456789_.");
-
- do
- {
- if (s.empty())
- return;
-
- if ('-' == s.at(0))
- break;
-
- if (std::string::npos != s.find_first_not_of(allowed_chars))
- break;
-
- return;
-
- } while (false);
-
- Context c("When validating kernel name '" + s + "':");
-
- throw KernelNamePartError(s);
-}
-
-KernelNamePartError::KernelNamePartError(const std::string & name) throw () :
- HostTupleNameError(name, "kernel name part")
-{
-}
-
-void
-UserlandNamePartValidator::validate(const std::string & s)
-{
- static const std::string allowed_chars(
- "abcdefghijklmnopqrstuvwxyz"
- "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
- "0123456789_.");
-
- do
- {
- if (s.empty())
- break;
-
- if ('-' == s.at(0))
- break;
-
- if (std::string::npos != s.find_first_not_of(allowed_chars))
- break;
-
- return;
-
- } while (false);
-
- Context c("When validating manufacturer name '" + s + "':");
-
- throw UserlandNamePartError(s);
-}
-
-UserlandNamePartError::UserlandNamePartError(const std::string & name) throw () :
- HostTupleNameError(name, "userland name part")
-{
-}
-
diff --git a/paludis/host_tuple_name.hh b/paludis/host_tuple_name.hh
deleted file mode 100644
index 6b6a149..0000000
--- a/paludis/host_tuple_name.hh
+++ /dev/null
@@ -1,235 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-/*
- * Copyright (c) 2006 Danny van Dyk
- *
- * This file is part of the Paludis package manager. Paludis is free software;
- * you can redistribute it and/or modify it under the terms of the GNU General
- * Public License version 2, as published by the Free Software Foundation.
- *
- * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#ifndef PALUDIS_GUARD_PALUDIS_HOST_TUPLE_NAME_HH
-#define PALUDIS_GUARD_PALUDIS_HOST_TUPLE_NAME_HH 1
-
-#include <paludis/util/exception.hh>
-#include <paludis/util/instantiation_policy.hh>
-#include <paludis/util/sr.hh>
-#include <paludis/util/validated.hh>
-
-#include <string>
-#include <iosfwd>
-
-/** \file
- * Declarations for various additional cross-compiling related Name classes.
- *
- * \ingroup g_names
- *
- * \section Examples
- *
- * - \ref example_name.cc "example_name.cc"
- */
-
-namespace paludis
-{
- /**
- * A HostTupleNameError is thrown if an invalid value is assigned to
- * an HostTupleName.
- *
- * \ingroup g_names
- * \ingroup g_exceptions
- */
- class PALUDIS_VISIBLE HostTupleNameError : public NameError
- {
- public:
- ///\name Basic operations
- ///\{
-
- HostTupleNameError(const std::string & name) throw ();
-
- HostTupleNameError(const std::string & name,
- const std::string & type) throw ();
-
- ///\}
- };
-
- /**
- * An ArchitectureNamePartError is thrown if an invalid value is assigned to
- * an ArchitectureNamePart.
- *
- * \ingroup g_names
- * \ingroup g_exceptions
- */
- class PALUDIS_VISIBLE ArchitectureNamePartError : public HostTupleNameError
- {
- public:
- /**
- * Constructor.
- */
- ArchitectureNamePartError(const std::string & name) throw ();
- };
-
- /**
- * An ArchitectureNamePartValidator handles validation rules for the value
- * of an ArchitectureNamePart.
- *
- * \ingroup g_names
- */
- struct PALUDIS_VISIBLE ArchitectureNamePartValidator :
- private InstantiationPolicy<ArchitectureNamePartValidator, instantiation_method::NonInstantiableTag>
- {
- /**
- * If the parameter is not a valid value for an ArchitectureNamePart,
- * throw an ArchitectureNamePartError.
- */
- static void validate(const std::string &);
- };
-
- /**
- * An ArchitectureNamePart holds a std::string that is a valid name for the
- * architecture part of a HostTupleName.
- *
- * \ingroup g_names
- */
- typedef Validated<std::string, ArchitectureNamePartValidator> ArchitectureNamePart;
-
- /**
- * An ManufacturerNamePartError is thrown if an invalid value is assigned to
- * an ManufacturerNamePart.
- *
- * \ingroup g_names
- * \ingroup g_exceptions
- */
- class PALUDIS_VISIBLE ManufacturerNamePartError : public HostTupleNameError
- {
- public:
- /**
- * Constructor.
- */
- ManufacturerNamePartError(const std::string & name) throw ();
- };
-
- /**
- * An ManufacturerNamePartValidator handles validation rules for the value
- * of an ManufacturerNamePart.
- *
- * \ingroup g_names
- */
- struct PALUDIS_VISIBLE ManufacturerNamePartValidator :
- private InstantiationPolicy<ManufacturerNamePartValidator, instantiation_method::NonInstantiableTag>
- {
- /**
- * If the parameter is not a valid value for an ManufacturerNamePart,
- * throw an ManufacturerNamePartError.
- */
- static void validate(const std::string &);
- };
-
- /**
- * An ManufacturerNamePart holds a std::string that is a valid name for the
- * architecture part of a HostTupleName.
- *
- * \ingroup g_names
- */
- typedef Validated<std::string, ManufacturerNamePartValidator> ManufacturerNamePart;
-
- /**
- * An KernelNamePartError is thrown if an invalid value is assigned to
- * an KernelNamePart.
- *
- * \ingroup g_names
- * \ingroup g_exceptions
- */
- class PALUDIS_VISIBLE KernelNamePartError : public HostTupleNameError
- {
- public:
- /**
- * Constructor.
- */
- KernelNamePartError(const std::string & name) throw ();
- };
-
- /**
- * An KernelNamePartValidator handles validation rules for the value
- * of an KernelNamePart.
- *
- * \ingroup g_names
- */
- struct PALUDIS_VISIBLE KernelNamePartValidator :
- private InstantiationPolicy<KernelNamePartValidator, instantiation_method::NonInstantiableTag>
- {
- /**
- * If the parameter is not a valid value for an KernelNamePart,
- * throw an KernelNamePartError.
- */
- static void validate(const std::string &);
- };
-
- /**
- * An KernelNamePart holds a std::string that is a valid name for the
- * architecture part of a HostTupleName.
- *
- * \ingroup g_names
- */
- typedef Validated<std::string, KernelNamePartValidator> KernelNamePart;
-
- /**
- * An UserlandNamePartError is thrown if an invalid value is assigned to
- * an UserlandNamePart.
- *
- * \ingroup g_names
- * \ingroup g_exceptions
- */
- class PALUDIS_VISIBLE UserlandNamePartError : public HostTupleNameError
- {
- public:
- /**
- * Constructor.
- */
- UserlandNamePartError(const std::string & name) throw ();
- };
-
- /**
- * An UserlandNamePartValidator handles validation rules for the value
- * of an UserlandNamePart.
- *
- * \ingroup g_names
- */
- struct PALUDIS_VISIBLE UserlandNamePartValidator :
- private InstantiationPolicy<UserlandNamePartValidator, instantiation_method::NonInstantiableTag>
- {
- /**
- * If the parameter is not a valid value for an UserlandNamePart,
- * throw an UserlandNamePartError.
- */
- static void validate(const std::string &);
- };
-
- /**
- * An UserlandNamePart holds a std::string that is a valid name for the
- * architecture part of a HostTupleName.
- *
- * \ingroup g_names
- */
- typedef Validated<std::string, UserlandNamePartValidator> UserlandNamePart;
-
-#include <paludis/host_tuple_name-sr.hh>
-
-
- /**
- * Output a QualifiedPackageName to a stream.
- *
- * \ingroup g_names
- */
- std::ostream & operator<< (std::ostream &, const HostTupleName &) PALUDIS_VISIBLE;
-}
-
-#endif
diff --git a/paludis/host_tuple_name.sr b/paludis/host_tuple_name.sr
deleted file mode 100644
index 1458ae7..0000000
--- a/paludis/host_tuple_name.sr
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/env bash
-# vim: set sw=4 sts=4 et :
-
-make_class_HostTupleName()
-{
- visible
-
- key architecture ArchitectureNamePart
- key manufacturer ManufacturerNamePart
- key kernel KernelNamePart
- key userland UserlandNamePart
-
- comparison_operators all all
-
- extra_constructors <<END
- HostTupleName(const std::string &);
-END
-
- doxygen_comment << "END"
- /**
- * Represents a host tuple name as expected by autotools.
- *
- * \ingroup g_names
- * \nosubgrouping
- */
-END
-}
-
diff --git a/paludis/host_tuple_name_TEST.cc b/paludis/host_tuple_name_TEST.cc
deleted file mode 100644
index 766f3cf..0000000
--- a/paludis/host_tuple_name_TEST.cc
+++ /dev/null
@@ -1,242 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-/*
- * Copyright (c) 2006 Danny van Dyk
- *
- * This file is part of the Paludis package manager. Paludis is free software;
- * you can redistribute it and/or modify it under the terms of the GNU General
- * Public License version 2, as published by the Free Software Foundation.
- *
- * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#include <paludis/host_tuple_name.hh>
-#include <paludis/util/exception.hh>
-#include <test/test_framework.hh>
-#include <test/test_runner.hh>
-#include <iostream>
-using namespace test;
-using namespace paludis;
-
-/** \file
- * Test cases for HostTupleName.
- *
- */
-
-namespace test_cases
-{
- /**
- * \test Basic HostTupleName tests.
- *
- */
- struct HostTupleNameTest : TestCase
- {
- HostTupleNameTest() : TestCase("basic") { }
-
- void run()
- {
- HostTupleName a("i686-unknown-linux-gnu");
- TEST_CHECK(true);
- }
- } test_host_tuple_name;
-
- /**
- * \test Validate HostTupleName tests.
- *
- */
- struct HostTupleNameValidateTest : TestCase
- {
- HostTupleNameValidateTest() : TestCase("validate") { }
-
- void run()
- {
- HostTupleName a("i686-unknown-linux-gnu");
- TEST_CHECK_THROWS(a = HostTupleName("moo!"), HostTupleNameError);
- TEST_CHECK_THROWS(a = HostTupleName("foo-bar!"), HostTupleNameError);
- TEST_CHECK_THROWS(a = HostTupleName("foo-bar-baz-too-many"), HostTupleNameError);
- }
- } test_host_tuple_name_validate;
-
- /**
- * \test Compare HostTupleName tests.
- *
- */
- struct HostTupleNameCompareTest : TestCase
- {
- HostTupleNameCompareTest() : TestCase("compare") { }
-
- void run()
- {
- HostTupleName foo1("i386-pc-linux-gnu");
- HostTupleName foo2("i686-unknown-freebsd6.0");
- HostTupleName foo3("spu-elf");
- HostTupleName foo4("i386-pc-linux-gnu");
-
- TEST_CHECK( (foo1 < foo2));
- TEST_CHECK( (foo2 < foo3));
- TEST_CHECK( (foo1 < foo3));
-
- TEST_CHECK( (foo1 == foo4));
- }
- } test_host_tuple_name_compare;
-
- /**
- * \test HostTupleName stringification tests.
- *
- */
- struct HostTupleNameStringificationTest : TestCase
- {
- HostTupleNameStringificationTest() : TestCase("stringification") { }
-
- void run()
- {
- HostTupleName htn("i686-gentoo-freebsd6.2");
-
- std::cout << "FOO: " << stringify(htn) << std::endl;
- TEST_CHECK( ("i686-gentoo-freebsd6.2" == stringify(htn)) );
- }
- } test_host_tuple_name_stringification;
-
- /**
- * \test Test ArchitectureNamePart creation.
- *
- */
- struct ArchitectureNamePartCreationTest : public TestCase
- {
- ArchitectureNamePartCreationTest() : TestCase("architecture creation") { }
-
- void run()
- {
- ArchitectureNamePart a("hppa1.1");
- TEST_CHECK(true);
- }
- } architecture_name_part_creation;
-
- /**
- * \test Test ArchitectureNamePart validation
- *
- */
- struct ArchitectureNamePartValidationTest : public TestCase
- {
- ArchitectureNamePartValidationTest() : TestCase("architecture validation") {}
-
- void run()
- {
- ArchitectureNamePart a = ArchitectureNamePart("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_.");
-
- TEST_CHECK_THROWS(a = ArchitectureNamePart(""), ArchitectureNamePartError);
- TEST_CHECK_THROWS(a = ArchitectureNamePart("*"), ArchitectureNamePartError);
- TEST_CHECK_THROWS(a = ArchitectureNamePart("foo bar"), ArchitectureNamePartError);
- }
- } architecture_name_part_validation;
-
- /**
- * \test Test ManufacturerNamePart creation.
- *
- */
- struct ManufacturerNamePartCreationTest : public TestCase
- {
- ManufacturerNamePartCreationTest() : TestCase("manufacturer creation") { }
-
- void run()
- {
- ManufacturerNamePart m1("unknown");
- ManufacturerNamePart m2("");
- TEST_CHECK(true);
- }
- } manufacturer_name_part_creation;
-
- /**
- * \test Test ManufacturerNamePart validation
- *
- */
- struct ManufacturerNamePartValidationTest : public TestCase
- {
- ManufacturerNamePartValidationTest() : TestCase("manufacturer validation") {}
-
- void run()
- {
- ManufacturerNamePart m = ManufacturerNamePart("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_");
-
- TEST_CHECK_THROWS(m = ManufacturerNamePart("."), ManufacturerNamePartError);
- TEST_CHECK_THROWS(m = ManufacturerNamePart("*"), ManufacturerNamePartError);
- TEST_CHECK_THROWS(m = ManufacturerNamePart("foo bar"), ManufacturerNamePartError);
- }
- } manufacturer_name_part_validation;
-
- /**
- * \test Test KernelNamePart creation.
- *
- */
- struct KernelNamePartCreationTest : public TestCase
- {
- KernelNamePartCreationTest() : TestCase("kernel creation") { }
-
- void run()
- {
- KernelNamePart k1("freebsd6.0");
- KernelNamePart k2("");
- TEST_CHECK(true);
- }
- } kernel_name_part_creation;
-
- /**
- * \test Test KernelNamePart validation
- *
- */
- struct KernelNamePartValidationTest : public TestCase
- {
- KernelNamePartValidationTest() : TestCase("kernel validation") {}
-
- void run()
- {
- KernelNamePart k = KernelNamePart("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_.");
-
- TEST_CHECK_THROWS(k = KernelNamePart("aixsucks!"), KernelNamePartError);
- TEST_CHECK_THROWS(k = KernelNamePart("*"), KernelNamePartError);
- TEST_CHECK_THROWS(k = KernelNamePart("foo bar"), KernelNamePartError);
- }
- } kernel_name_part_validation;
-
- /**
- * \test Test UserlandNamePart creation.
- *
- */
- struct UserlandNamePartCreationTest : public TestCase
- {
- UserlandNamePartCreationTest() : TestCase("userland creation") { }
-
- void run()
- {
- UserlandNamePart u("freebsd6.0");
- TEST_CHECK(true);
- }
- } userland_name_part_creation;
-
- /**
- * \test Test UserlandNamePart validation
- *
- */
- struct UserlandNamePartValidationTest : public TestCase
- {
- UserlandNamePartValidationTest() : TestCase("userland validation") {}
-
- void run()
- {
- UserlandNamePart u = UserlandNamePart("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_.");
-
- TEST_CHECK_THROWS(u = UserlandNamePart(""), UserlandNamePartError);
- TEST_CHECK_THROWS(u = UserlandNamePart("*"), UserlandNamePartError);
- TEST_CHECK_THROWS(u = UserlandNamePart("foo bar"), UserlandNamePartError);
- }
- } userland_name_part_validation;
-
-}
-
diff --git a/paludis/repositories/e/ebuild/ebuild.bash b/paludis/repositories/e/ebuild/ebuild.bash
index 54446da..1a1d6a6 100755
--- a/paludis/repositories/e/ebuild/ebuild.bash
+++ b/paludis/repositories/e/ebuild/ebuild.bash
@@ -268,7 +268,6 @@ ebuild_scrub_environment()
unset -v ROOTPATH T TEMP HOME TMPDIR PORTDIR FILESDIR ECLASSDIR DISTDIR
unset -v SKIP_FUNCTIONS FETCHEDDIR REPODIR EAPI FILES PKGMANAGER
- unset -v ${!CONTRARIUS_CMDLINE_*} CONTRARIUS_OPTIONS
unset -v ${!GTKPALUDIS_CMDLINE_*} GTKPALUDIS_OPTIONS
unset -v ${!ADJUTRIX_CMDLINE_*} ADJUTRIX_OPTIONS
unset -v ${!QUALUDIS_CMDLINE_*} QUALUDIS_OPTIONS
diff --git a/python/Makefile.am b/python/Makefile.am
index 259de77..c99f6eb 100644
--- a/python/Makefile.am
+++ b/python/Makefile.am
@@ -131,7 +131,6 @@ TESTS_ENVIRONMENT = env \
\`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/util/.libs\`: \
\`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/.libs\`: \
\`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/no_config/.libs\`: \
- \`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/adapted/.libs\`: \
\`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/repositories/e/.libs\`: \
\`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/repositories/fake/.libs\`: \
\`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/python/.libs\`" \
@@ -183,7 +182,6 @@ libpaludispython_@PALUDIS_PC_SLOT@_la_LIBADD = \
$(top_builddir)/paludis/repositories/fake/libpaludisfakerepository_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/environments/paludis/libpaludispaludisenvironment_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/environments/no_config/libpaludisnoconfigenvironment_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/adapted/libpaludisadaptedenvironment_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la
libadditionaltests_@PALUDIS_PC_SLOT@_la_SOURCES = additional_tests.hh additional_tests.cc
diff --git a/python/environment.cc b/python/environment.cc
index 2ceefe4..ea1d40f 100644
--- a/python/environment.cc
+++ b/python/environment.cc
@@ -23,7 +23,6 @@
#include <paludis/environment.hh>
#include <paludis/environment_factory.hh>
-#include <paludis/environments/adapted/adapted_environment.hh>
#include <paludis/environments/paludis/paludis_environment.hh>
#include <paludis/environments/paludis/paludis_config.hh>
#include <paludis/environments/no_config/no_config_environment.hh>
@@ -684,27 +683,6 @@ void expose_environment()
;
/**
- * AdaptedEnvironment
- */
- bp::class_<AdaptedEnvironment, bp::bases<Environment>, boost::noncopyable>
- (
- "AdaptedEnvironment",
- "An Environment that allows you to change aspects of an existing Environment,"
- " e.g. the state of a USE flag for a package.",
- bp::init<std::tr1::shared_ptr<Environment> >("__init__(Environment)")
- )
- .def("adapt_use", &AdaptedEnvironment::adapt_use,
- "adapt_use(PackageDepSpeec, UseFlagName, UseFlagState)\n"
- "Set the state of a USE flag for the given PackageDepSpec."
- )
-
- .def("clear_adaptions", &AdaptedEnvironment::clear_adaptions,
- "clear_adaptions()\n"
- "Clear all adaptions from this Environemnt."
- )
- ;
-
- /**
* PaludisEnvironment
*/
bp::class_<PaludisEnvironment, bp::bases<Environment>, boost::noncopyable>
diff --git a/python/environment_TEST.py b/python/environment_TEST.py
index d2e1339..398d361 100755
--- a/python/environment_TEST.py
+++ b/python/environment_TEST.py
@@ -95,43 +95,6 @@ class TestCase_01_Environments(unittest.TestCase):
def test_12_config_dir(self):
self.assert_(isinstance(self.e.config_dir, str))
-class TestCase_02_AdaptedEnvironment(unittest.TestCase):
- def test_01_create(self):
- env = AdaptedEnvironment(EnvironmentFactory.instance.create(""))
-
- def test_02_adapt_use(self):
- env = AdaptedEnvironment(EnvironmentFactory.instance.create(""))
- pid = iter(env[Selection.RequireExactlyOne(Generator.Matches(
- parse_user_package_dep_spec("=foo/bar-1.0", env, UserPackageDepSpecOptions())))]).next()
- pds = parse_user_package_dep_spec("foo/bar", env, [])
-
- self.assert_(env.query_use("enabled", pid))
- self.assert_(not env.query_use("not_enabled", pid))
- self.assert_(env.query_use("sometimes_enabled", pid))
-
- env.adapt_use(pds, "enabled", UseFlagState.DISABLED)
- self.assert_(not env.query_use("enabled", pid))
-
- env.adapt_use(pds, "not_enabled", UseFlagState.ENABLED)
- self.assert_(env.query_use("not_enabled", pid))
-
- env.adapt_use(pds, "sometimes_enabled", UseFlagState.ENABLED)
- self.assert_(env.query_use("sometimes_enabled", pid))
-
- def test_03_clear_adaptions(self):
- env = AdaptedEnvironment(EnvironmentFactory.instance.create(""))
- pid = iter(env[Selection.RequireExactlyOne(Generator.Matches(
- parse_user_package_dep_spec("=foo/bar-1.0", env, [])))]).next()
- pds = parse_user_package_dep_spec("foo/bar", env, [])
-
- self.assert_(env.query_use("enabled", pid))
-
- env.adapt_use(pds, "enabled", UseFlagState.DISABLED)
- self.assert_(not env.query_use("enabled", pid))
-
- env.clear_adaptions()
- self.assert_(env.query_use("enabled", pid))
-
class TestCase_03_TestEnvironment(unittest.TestCase):
def test_01_create(self):
env = TestEnvironment()
diff --git a/ruby/Makefile.am b/ruby/Makefile.am
index 9dbd9ae..2ec336f 100644
--- a/ruby/Makefile.am
+++ b/ruby/Makefile.am
@@ -114,7 +114,6 @@ TESTS_ENVIRONMENT = env \
\`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/util/.libs\`: \
\`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/paludis/.libs\`: \
\`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/no_config/.libs\`: \
- \`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments/adapted/.libs\`: \
\`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/repositories/e/.libs\`: \
\`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/qa/.libs\`: \
\`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/ruby/.libs\`:$$LD_LIBRARY_PATH" \
@@ -150,7 +149,6 @@ libpaludisruby_@PALUDIS_PC_SLOT@_la_LIBADD = \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/environments/paludis/libpaludispaludisenvironment_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/environments/no_config/libpaludisnoconfigenvironment_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/adapted/libpaludisadaptedenvironment_@PALUDIS_PC_SLOT@.la \
$(PTHREAD_LIBS)
check_DATA = .libs/Paludis.so
diff --git a/ruby/environment.cc b/ruby/environment.cc
index f3ac2aa..8a06170 100644
--- a/ruby/environment.cc
+++ b/ruby/environment.cc
@@ -21,7 +21,6 @@
#include <paludis_ruby.hh>
#include <paludis/environments/paludis/paludis_environment.hh>
#include <paludis/environments/no_config/no_config_environment.hh>
-#include <paludis/environments/adapted/adapted_environment.hh>
#include <paludis/environment_factory.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/set.hh>
@@ -38,24 +37,8 @@ namespace
static VALUE c_environment;
static VALUE c_paludis_environment;
static VALUE c_no_config_environment;
- static VALUE c_adapted_environment;
static VALUE c_environment_factory;
- std::tr1::shared_ptr<AdaptedEnvironment>
- value_to_adapted_environment(VALUE v)
- {
- if (rb_obj_is_kind_of(v, c_adapted_environment))
- {
- std::tr1::shared_ptr<Environment> * v_ptr;
- Data_Get_Struct(v, std::tr1::shared_ptr<Environment>, v_ptr);
- return std::tr1::static_pointer_cast<AdaptedEnvironment>(*v_ptr);
- }
- else
- {
- rb_raise(rb_eTypeError, "Can't convert %s into AdaptedEnvironment", rb_obj_classname(v));
- }
- }
-
/*
* call-seq:
* query_use(use_flag, package_id) -> true or false
@@ -463,80 +446,6 @@ namespace
return Qnil;
}
- VALUE
- adapted_environment_init(int, VALUE *, VALUE self)
- {
- return self;
- }
-
- /*
- * call-seq:
- * AdaptedEnvironment.new(environment) -> AdaptedEnvironment
- *
- * Return a new AdaptedEnvironment based on the given Environment.
- */
- VALUE
- adapted_environment_new(int argc, VALUE * argv, VALUE self)
- {
- if (1 != argc)
- rb_raise(rb_eArgError, "AdaptedEnvironment.new expects one argument, but got %d", argc);
- try
- {
- std::tr1::shared_ptr<Environment> * e = new std::tr1::shared_ptr<Environment>(new AdaptedEnvironment(value_to_environment(argv[0])));
- VALUE tdata(Data_Wrap_Struct(self, 0, &Common<std::tr1::shared_ptr<Environment> >::free, e));
- rb_obj_call_init(tdata, argc, argv);
- return tdata;
- }
- catch (const std::exception & e)
- {
- exception_to_ruby_exception(e);
- }
- }
-
- /*
- * call-seq:
- * adapt_use(package_dep_spec, use_flag_name, use_flag_state) -> Nil
- *
- * Set the state of a USE flag for the given PackageDepSpec, enable == true, disabled == false.
- */
- VALUE
- adapted_environment_adapt_use(VALUE self, VALUE package_dep_spec, VALUE use_flag_name, VALUE use_flag_state)
- {
- try
- {
- UseFlagState ufs;
- if (use_flag_state == Qtrue)
- ufs = use_enabled;
- else if (use_flag_state == Qfalse)
- ufs = use_disabled;
- else
- rb_raise(rb_eTypeError, "Can't convert %s into UseFlagState", rb_obj_classname(use_flag_state));
-
- value_to_adapted_environment(self)->adapt_use(value_to_package_dep_spec(package_dep_spec),
- UseFlagName(StringValuePtr(use_flag_name)),
- ufs);
- return Qnil;
- }
- catch (const std::exception & e)
- {
- exception_to_ruby_exception(e);
- }
- }
-
- /*
- * call-seq:
- * clear_adaptions -> Nil
- *
- * Clear all adaptions from this Environment.
- */
- VALUE
- adapted_environment_clear_adaptions(VALUE self)
- {
- value_to_adapted_environment(self)->clear_adaptions();
- return Qnil;
- }
-
-
/*
* call-seq:
* create(spec) -> Environment
@@ -613,19 +522,6 @@ namespace
rb_define_method(c_no_config_environment, "accept_unstable=", RUBY_FUNC_CAST(&no_config_environment_set_accept_unstable), 1);
/*
- * Document-class: Paludis::AdaptedEnvironment
- *
- * An Environment that allows you to change aspects of an
- * existing Environment, e.g. the state of a USE flag for a
- * package.
- */
- c_adapted_environment = rb_define_class_under(paludis_module(), "AdaptedEnvironment", c_environment);
- rb_define_singleton_method(c_adapted_environment, "new", RUBY_FUNC_CAST(&adapted_environment_new), -1);
- rb_define_method(c_adapted_environment, "initialize", RUBY_FUNC_CAST(&adapted_environment_init), -1);
- rb_define_method(c_adapted_environment, "adapt_use", RUBY_FUNC_CAST(&adapted_environment_adapt_use), 3);
- rb_define_method(c_adapted_environment, "clear_adaptions", RUBY_FUNC_CAST(&adapted_environment_clear_adaptions), 0);
-
- /*
* Document-class: Paludis::EnvironmentFactory
*
* A class that holds methods to create environments.
diff --git a/ruby/environment_TEST.rb b/ruby/environment_TEST.rb
index becac4f..ba85eb6 100644
--- a/ruby/environment_TEST.rb
+++ b/ruby/environment_TEST.rb
@@ -174,74 +174,6 @@ module Paludis
end
end
- class TestCase_AdaptedEnvironment < Test::Unit::TestCase
- def env
- @env or @env = AdaptedEnvironment.new(EnvironmentFactory.instance.create(""))
- end
-
- def test_create
- assert_nothing_raised do
- env
- end
- end
-
- def test_create_bad
- assert_raise ArgumentError do
- AdaptedEnvironment.new
- end
- end
- end
-
- class TestCase_AdaptedEnvironmentAdaptUse < Test::Unit::TestCase
- def env
- @env or @env = AdaptedEnvironment.new(EnvironmentFactory.instance.create(""))
- end
-
- def test_adapt_use
- pid = env[Selection::RequireExactlyOne.new(
- Generator::Matches.new(Paludis::parse_user_package_dep_spec('=foo/bar-1.0::testrepo', env, [])))].first
-
- assert env.query_use("enabled", pid)
- assert ! env.query_use("not_enabled", pid)
- assert env.query_use("sometimes_enabled", pid)
-
- env.adapt_use(Paludis::parse_user_package_dep_spec('foo/bar', env, []), 'enabled', false);
- assert ! env.query_use('enabled', pid);
- env.adapt_use(Paludis::parse_user_package_dep_spec('foo/bar', env, []), 'not_enabled', true);
- assert env.query_use("not_enabled", pid)
- env.adapt_use(Paludis::parse_user_package_dep_spec('foo/bar', env, []), 'sometimes_enabled', false);
- assert ! env.query_use("sometimes_enabled", pid)
- end
-
- def test_adapt_use_bad
- assert_raise TypeError do
- env.adapt_use(Paludis::parse_user_package_dep_spec('foo/bar', env, []), 'not_enabled', 'lemon');
- end
- assert_raise TypeError do
- env.adapt_use(Paludis::parse_user_package_dep_spec('foo/bar', env, []), 7, false);
- end
- end
- end
-
- class TestCase_AdaptedEnvironmentClearAdaptions < Test::Unit::TestCase
- def env
- @env or @env = AdaptedEnvironment.new(EnvironmentFactory.instance.create(""))
- end
-
- def test_clear_adaptions
- pid = env[Selection::RequireExactlyOne.new(Generator::Matches.new(
- Paludis::parse_user_package_dep_spec('=foo/bar-1.0::testrepo', env, [])))].first
-
- assert env.query_use("enabled", pid)
-
- env.adapt_use(Paludis::parse_user_package_dep_spec('foo/bar', env, []), 'enabled', false);
- assert ! env.query_use('enabled', pid);
-
- env.clear_adaptions;
- assert env.query_use("enabled", pid)
- end
- end
-
class TestCase_EnvironmentPackageDatabase < Test::Unit::TestCase
def env
@env or @env = EnvironmentFactory.instance.create("")
diff --git a/src/clients/contrarius/Makefile.am b/src/clients/contrarius/Makefile.am
deleted file mode 100644
index 634d1ec..0000000
--- a/src/clients/contrarius/Makefile.am
+++ /dev/null
@@ -1,104 +0,0 @@
-AM_CXXFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src \
- @PALUDIS_CXXFLAGS@ @PALUDIS_CXXFLAGS_NO_WOLD_STYLE_CAST@ @PALUDIS_CXXFLAGS_VISIBILITY@
-DEFS= \
- -DDATADIR=\"$(datadir)\" \
- -DSYSCONFDIR=\"$(sysconfdir)\" \
- -DLIBEXECDIR=\"$(libexecdir)\" \
- -DBIGTEMPDIR=\"/var/tmp\" \
- -DLIBDIR=\"$(libdir)\"
-SUBDIRS = .
-
-man_pages = contrarius.1
-
-bin_PROGRAMS = contrarius
-noinst_PROGRAMS = man-contrarius
-man_MANS = $(man_pages)
-
-contrarius_SOURCES = \
- command_line.hh \
- command_line.cc \
- contrarius.cc \
- install.hh \
- install.cc \
- stage.hh \
- stage.cc \
- stage_builder.hh \
- stage_builder.cc \
- target_config.hh \
- target_config.cc
-
-contrarius_LDADD = \
- $(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/adapted/libpaludisadaptedenvironment_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/args/libpaludisargs_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/src/output/liboutput.a \
- $(DYNAMIC_LD_LIBS)
-
-contrarius_stage_options-sr.hh : contrarius_stage_options.sr $(top_srcdir)/misc/make_sr.bash
- $(top_srcdir)/misc/make_sr.bash --header $(srcdir)/contrarius_stage_options.sr > $@
-
-contrarius_stage_options-sr.cc : contrarius_stage_options.sr $(top_srcdir)/misc/make_sr.bash
- $(top_srcdir)/misc/make_sr.bash --source $(srcdir)/contrarius_stage_options.sr > $@
-
-BUILT_SOURCES = \
- contrarius_stage_options-sr.hh \
- contrarius_stage_options-sr.cc
-
-TESTS_ENVIRONMENT = env \
- TEST_SCRIPT_DIR="$(srcdir)/" \
- PALUDIS_REPOSITORY_SO_DIR="$(top_builddir)/paludis/repositories" \
- PALUDIS_EAPIS_DIR="$(top_srcdir)/paludis/eapis/" \
- PALUDIS_DISTRIBUTIONS_DIR="$(top_srcdir)/paludis/distributions/" \
- PALUDIS_DISTRIBUTION="gentoo" \
- PALUDIS_OPTIONS="" \
- CONTRARIUS_OPTIONS="" \
- bash $(top_srcdir)/test/run_test.sh bash
-
-TESTS = version_TEST
-
-version_TEST :
- echo -e "#!/bin/sh\n./contrarius --version" > $@
-
-contrarius.1 : man-contrarius
- ./man-contrarius > $@
-
-man_contrarius_SOURCES = \
- man_contrarius.cc \
- command_line.hh \
- command_line.cc
-
-man_contrarius_LDADD = \
- $(top_builddir)/paludis/args/libpaludisargs_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/args/libpaludisman_@PALUDIS_PC_SLOT@.a \
- $(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/src/output/liboutput.a \
- $(DYNAMIC_LD_LIBS)
-
-CLEANFILES = *~ version_TEST gmon.out *.gcov *.gcno *.gcda *.loT *.epicfail
-DISTCLEANFILES = $(man_pages) $(noinst_DATA) \
- contrarius_stage_options-sr.hh contrarius_stage_options-sr.cc
-MAINTAINERCLEANFILES = Makefile.in
-EXTRA_DIST = \
- $(man_pages) \
- contrarius_stage_options.sr \
- contrarius_stage_options-sr.hh \
- contrarius_stage_options-sr.cc \
- default_config.txt
-
-contrarius_datadir = $(datadir)/paludis/contrarius/
-contrarius_data_DATA = default_config.txt
-
-built-sources : $(BUILT_SOURCES)
- for s in `echo $(SUBDIRS) | tr -d .` ; do $(MAKE) -C $$s built-sources || exit 1 ; done
-
-DISTCHECK_DEPS = contrarius.1
-
-distcheck-deps-local : $(DISTCHECK_DEPS)
-
-distcheck-deps : distcheck-deps-subdirs
-
-distcheck-deps-subdirs :
- for s in $(SUBDIRS) . ; do if test x$$s = x. ; then $(MAKE) distcheck-deps-local || exit 1 ; \
- else $(MAKE) -C $$s distcheck-deps || exit 1 ; fi ; done
-
diff --git a/src/clients/contrarius/command_line.cc b/src/clients/contrarius/command_line.cc
deleted file mode 100644
index 5032252..0000000
--- a/src/clients/contrarius/command_line.cc
+++ /dev/null
@@ -1,97 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-/*
- * Copyright (c) 2006 Danny van Dyk
- *
- * This file is part of the Paludis package manager. Paludis is free software;
- * you can redistribute it and/or modify it under the terms of the GNU General
- * Public License version 2, as published by the Free Software Foundation.
- *
- * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#include "command_line.hh"
-#include <paludis/util/instantiation_policy-impl.hh>
-
-template class paludis::InstantiationPolicy<CommandLine, paludis::instantiation_method::SingletonTag>;
-
-CommandLine::CommandLine() :
- ArgsHandler(),
-
- action_args(this, "Actions",
- "Selects which basic action to perform. Up to one action should "
- "be specified. If no action is specified, contrarius tries to create"
- "a cross toolchain."),
- a_version(&action_args, "version", 'V', "Display program version", false),
- a_help(&action_args, "help", 'h', "Display program help", false),
-
- build_args(this, "Building",
- "Tweak toolchain creation."),
- a_fetch(&build_args, "fetch", 'f', "Only fetch sources; don't install anything", false),
- a_pretend(&build_args, "pretend", 'p', "Pretend only", true),
- a_environment(&build_args, "environment", 'E', "Environment specification (class:suffix, both parts optional)"),
- a_show_reasons(&build_args, "show-reasons", '\0', "Show why packages are being installed",
- paludis::args::EnumArg::EnumArgOptions
- ("none", "Don't show any information")
- ("summary", "Show a summary")
- ("full", "Show full output (can be very verbose)"),
- "none"),
- a_stage(&build_args, "stage", 's', "Build specified toolchain stage.",
- paludis::args::EnumArg::EnumArgOptions("binutils","Build binutils only")
- ("minimal", "Build a minimal gcc additionaly")
- ("headers", "Build kernel headers additionaly")
- ("libc", "Build the C Standard Library additionally")
- ("full", "Build a full cross toolchain."),
- "binutils"),
- a_target(&build_args, "target", 't', "Build for specified CTARGET."),
- a_headers(&build_args, "headers", 'H',
- "Add additional stage to install kernel- and libc-headers before gcc.", true),
- a_always_rebuild(&build_args, "always-rebuild", 'r', "Always rebuild already built stages.", true),
-
- a_debug_build(&build_args, "debug-build", '\0', "What to do with debug information",
- paludis::args::EnumArg::EnumArgOptions
- ("none", "Discard debug information")
- ("split", "Split debug information")
- ("internal", "Keep debug information with binaries"),
- "none"),
-
- output_options(this, "Options for output verbosity",
- "Control how verbose contrarius is."),
- a_verbose(&output_options, "verbose", 'v', "Be verbose", true),
- a_log_level(&output_options, "log-level", 'L'),
- a_no_colour(&output_options, "no-colour", 'C', "Do not use colour", false),
- a_no_color(&a_no_colour, "no-color"),
- a_resume_command_template(&output_options, "resume-command-template", '\0', "Save the resume command to a file made using mkstemp(3)")
-{
- add_environment_variable("CONTRARIUS_OPTIONS", "Default command-line options.");
-}
-
-CommandLine::~CommandLine()
-{
-}
-
-std::string
-CommandLine::app_name() const
-{
- return "contrarius";
-}
-
-std::string
-CommandLine::app_synopsis() const
-{
- return "A tool to create cross-toolchains";
-}
-
-std::string
-CommandLine::app_description() const
-{
- return
- "contrarius.";
-}
diff --git a/src/clients/contrarius/command_line.hh b/src/clients/contrarius/command_line.hh
deleted file mode 100644
index 25b8d1a..0000000
--- a/src/clients/contrarius/command_line.hh
+++ /dev/null
@@ -1,118 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#ifndef PALUDIS_GUARD_SRC_CONTRARIUS_COMMAND_LINE_HH
-#define PALUDIS_GUARD_SRC_CONTRARIUS_COMMAND_LINE_HH 1
-
-#include <paludis/args/args.hh>
-#include <paludis/util/instantiation_policy.hh>
-#include <paludis/args/log_level_arg.hh>
-
-class CommandLine :
- public paludis::args::ArgsHandler,
- public paludis::InstantiationPolicy<CommandLine, paludis::instantiation_method::SingletonTag>
-{
- friend class paludis::InstantiationPolicy<CommandLine, paludis::instantiation_method::SingletonTag>;
-
- private:
- /// Constructor.
- CommandLine();
-
- /// Destructor.
- ~CommandLine();
-
- public:
- ///\name Program information
- ///\{
-
- virtual std::string app_name() const;
- virtual std::string app_synopsis() const;
- virtual std::string app_description() const;
-
- ///\}
-
- ///\name Action arguments
- ///\{
-
- /// Action arguments.
- paludis::args::ArgsGroup action_args;
-
- /// --version
- paludis::args::SwitchArg a_version;
-
- /// --help
- paludis::args::SwitchArg a_help;
-
- ///\}
-
- ///\name Build arguments
- ///\{
-
- /// Build arguments.
- paludis::args::ArgsGroup build_args;
-
- /// --fetch
- paludis::args::SwitchArg a_fetch;
-
- /// --pretend
- paludis::args::SwitchArg a_pretend;
-
- /// --environment
- paludis::args::StringArg a_environment;
-
- /// --show-reasons
- paludis::args::EnumArg a_show_reasons;
-
- /// --stage
- paludis::args::EnumArg a_stage;
-
- /// --target
- paludis::args::StringArg a_target;
-
- /// --headers \todo Find a better name!
- paludis::args::SwitchArg a_headers;
-
- /// --always-rebuild
- paludis::args::SwitchArg a_always_rebuild;
-
- /// --debug-build
- paludis::args::EnumArg a_debug_build;
-
- ///\}
-
- ///\name Output options
- ///\{
-
- /// Output options.
- paludis::args::ArgsGroup output_options;
-
- /// --verbose
- paludis::args::SwitchArg a_verbose;
-
- /// --log-level
- paludis::args::LogLevelArg a_log_level;
-
- /// --no-colour
- paludis::args::SwitchArg a_no_colour;
-
- /// --no-color
- paludis::args::AliasArg a_no_color;
-
- /// --resume-command-template
- paludis::args::StringArg a_resume_command_template;
- ///\}
-};
-
-/**
- * Show the help message.
- */
-struct DoHelp
-{
- const std::string message;
-
- DoHelp(const std::string & m = "") :
- message(m)
- {
- }
-};
-
-#endif
diff --git a/src/clients/contrarius/contrarius.cc b/src/clients/contrarius/contrarius.cc
deleted file mode 100644
index c3553c0..0000000
--- a/src/clients/contrarius/contrarius.cc
+++ /dev/null
@@ -1,195 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-/*
- * Copyright (c) 2006 Danny van Dyk
- *
- * This file is part of the Paludis package manager. Paludis is free software;
- * you can redistribute it and/or modify it under the terms of the GNU General
- * Public License version 2, as published by the Free Software Foundation.
- *
- * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#include <paludis/args/args.hh>
-#include <paludis/paludis.hh>
-#include <paludis/environments/adapted/adapted_environment.hh>
-#include <paludis/environment_factory.hh>
-#include <paludis/util/util.hh>
-#include <paludis/util/system.hh>
-
-#include <cstdlib>
-#include <iostream>
-#include <algorithm>
-
-#include "target_config.hh"
-#include "command_line.hh"
-#include "stage.hh"
-#include "config.h"
-#include "stage_builder.hh"
-
-using namespace paludis;
-using std::cout;
-using std::cerr;
-using std::endl;
-
-struct DoVersion
-{
-};
-
-int main(int argc, char *argv[])
-{
- std::string options(paludis::getenv_with_default("CONTRARIUS_OPTIONS", ""));
- if (! options.empty())
- options = "(" + options + ") ";
- options += join(argv + 1, argv + argc, " ");
-
- Context context(std::string("In program ") + argv[0] + " " + options + ":");
-
- try
- {
- CommandLine::get_instance()->run(argc, argv, "contrarius", "CONTRARIUS_OPTIONS", "CONTRARIUS_CMDLINE");
-
- if (CommandLine::get_instance()->a_help.specified())
- throw DoHelp();
-
- if (CommandLine::get_instance()->a_log_level.specified())
- Log::get_instance()->set_log_level(CommandLine::get_instance()->a_log_level.option());
- else
- Log::get_instance()->set_log_level(ll_qa);
-
- if (CommandLine::get_instance()->a_version.specified())
- throw DoVersion();
-
- Log::get_instance()->message("contrarius.sucks", ll_warning, lc_no_context) <<
- "Contrarius is mostly undocumented, unreliable and unsupported. If you're lucky, it might work "
- "exactly as expected. But it probably won't, and when it breaks, we can't really help you. You "
- "are welcome to send patches.";
-
- if (! CommandLine::get_instance()->a_target.specified())
- throw DoHelp("you need to specify a --target");
-
- std::string stage;
- if (CommandLine::get_instance()->a_stage.specified())
- stage = CommandLine::get_instance()->a_stage.argument();
- else
- stage = "cxx";
-
- std::tr1::shared_ptr<AdaptedEnvironment> env(
- new AdaptedEnvironment(EnvironmentFactory::get_instance()->create(
- CommandLine::get_instance()->a_environment.argument())));
-
- StageOptions stage_opts(CommandLine::get_instance()->a_pretend.specified(),
- CommandLine::get_instance()->a_fetch.specified(),
- CommandLine::get_instance()->a_always_rebuild.specified());
-
- OurStageBuilderTask builder(stage_opts);
-
- do
- {
- if (! TargetConfig::get_instance()->aux().empty())
- builder.queue_stage(std::tr1::shared_ptr<const StageBase>(new AuxiliaryStage(env)));
-
- builder.queue_stage(std::tr1::shared_ptr<const StageBase>(new BinutilsStage(env)));
-
- if (stage == "binutils")
- break;
-
- if (CommandLine::get_instance()->a_headers.specified())
- {
- if (TargetConfig::get_instance()->headers().empty())
- throw DoHelp("--headers specified though CTARGET does not need any headers");
- builder.queue_stage(std::tr1::shared_ptr<const StageBase>(new KernelHeadersStage(env)));
- builder.queue_stage(std::tr1::shared_ptr<const StageBase>(new LibCHeadersStage(env)));
- }
-
- builder.queue_stage(std::tr1::shared_ptr<const StageBase>(new MinimalStage(env)));
-
- if (stage == "minimal")
- break;
-
- if ((! CommandLine::get_instance()->a_headers.specified()) &&
- (! TargetConfig::get_instance()->headers().empty()))
- builder.queue_stage(std::tr1::shared_ptr<const StageBase>(new KernelHeadersStage(env)));
-
- if (stage == "headers")
- break;
-
- builder.queue_stage(std::tr1::shared_ptr<const StageBase>(new LibCStage(env)));
-
- if (stage == "libc")
- break;
-
- builder.queue_stage(std::tr1::shared_ptr<const StageBase>(new FullStage(env)));
-
- } while (false);
-
- builder.execute();
-
- return EXIT_SUCCESS;
- }
- catch (const DoVersion &)
- {
- cout << "contrarius, part of " << PALUDIS_PACKAGE << " " << PALUDIS_VERSION_MAJOR << "."
- << PALUDIS_VERSION_MINOR << "." << PALUDIS_VERSION_MICRO;
- if (! std::string(PALUDIS_GIT_HEAD).empty())
- cout << " git " << PALUDIS_GIT_HEAD;
- cout << endl << endl;
- cout << "Paludis comes with ABSOLUTELY NO WARRANTY. Paludis is free software, and you" << endl;
- cout << "are welcome to redistribute it under the terms of the GNU General Public" << endl;
- cout << "License, version 2." << endl;
-
- return EXIT_SUCCESS;
- }
- catch (const paludis::args::ArgsError & e)
- {
- cerr << "Usage error: " << e.message() << endl;
- cerr << "Try " << argv[0] << " --help" << endl;
- return EXIT_FAILURE;
- }
- catch (const DoHelp & h)
- {
- if (h.message.empty())
- {
- cout << "Usage: " << argv[0] << " --target CTARGET [options]" << endl;
- cout << endl;
- cout << *CommandLine::get_instance();
- return EXIT_SUCCESS;
- }
- else
- {
- cerr << "Usage error: " << h.message << endl;
- cerr << "Try " << argv[0] << " --help" << endl;
- return EXIT_FAILURE;
- }
- }
- catch (const Exception & e)
- {
- cout << endl;
- cerr << "Unhandled exception:" << endl
- << " * " << e.backtrace("\n * ")
- << e.message() << " (" << e.what() << ")" << endl;
- return EXIT_FAILURE;
- }
- catch (const std::exception & e)
- {
- cout << endl;
- cerr << "Unhandled exception:" << endl
- << " * " << e.what() << endl;
- return EXIT_FAILURE;
- }
- catch (...)
- {
- cout << endl;
- cerr << "Unhandled exception:" << endl
- << " * Unknown exception type. Ouch..." << endl;
- return EXIT_FAILURE;
- }
-}
-
diff --git a/src/clients/contrarius/contrarius_stage_options.sr b/src/clients/contrarius/contrarius_stage_options.sr
deleted file mode 100644
index c998afd..0000000
--- a/src/clients/contrarius/contrarius_stage_options.sr
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/usr/bin/env bash
-# vim: set sw=4 sts=4 et :
-
-make_class_ContrariusStageOptions()
-{
- key environment "std::tr1::shared_ptr<Environment>"
- key target HostTupleName
-
- key binutils "std::tr1::shared_ptr<const PackageDepSpec>"
- key gcc "std::tr1::shared_ptr<const PackageDepSpec>"
- key headers "std::tr1::shared_ptr<const PackageDepSpec>"
- key libc "std::tr1::shared_ptr<const PackageDepSpec>"
-
- extra_constructors <<END
- ContrariusStageOptions(
- std::tr1::shared_ptr<Environment>,
- const HostTupleName & target,
- const std::string & binutils_name,
- const std::string & binutils_version,
- const std::string & gcc_name,
- const std::string & gcc_version,
- const std::string & headers_name,
- const std::string & headers_version,
- const std::string & libc_name,
- const std::string & libc_version);
-END
-}
diff --git a/src/clients/contrarius/default_config.txt b/src/clients/contrarius/default_config.txt
deleted file mode 100644
index 5b395ca..0000000
--- a/src/clients/contrarius/default_config.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-*-*-linux-* headers linux-headers
-*-*-freebsd*-* headers freebsd-lib
-*-*-mingw*-* headers w32api
-*-*-*-elf headers
-*-*-*-elf libc newlib
-*-*-*-gnu libc glibc
-*-*-*-freebsd*-* libc freebsd-lib
-*-*-*-mingw* libc mingw-runtime
-*-*-*-uclibc libc uclibc
-*-*-*-* binutils binutils
-*-*-*-* gcc gcc
-*-*-*-* aux
diff --git a/src/clients/contrarius/install.cc b/src/clients/contrarius/install.cc
deleted file mode 100644
index f2d6daf..0000000
--- a/src/clients/contrarius/install.cc
+++ /dev/null
@@ -1,165 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-/*
- * Copyright (c) 2006 Danny van Dyk
- * Copyright (c) 2007, 2008 Ciaran McCreesh
- *
- * This file is part of the Paludis package manager. Paludis is free software;
- * you can redistribute it and/or modify it under the terms of the GNU General
- * Public License version 2, as published by the Free Software Foundation.
- *
- * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#include "install.hh"
-#include <src/output/console_install_task.hh>
-
-#include <iostream>
-
-#include <paludis/install_task.hh>
-#include <paludis/util/log.hh>
-#include <paludis/util/sequence.hh>
-#include <paludis/environment.hh>
-#include <paludis/package_id.hh>
-
-/** \file
- * Handle the --install action for the contrarius program.
- */
-
-using namespace paludis;
-
-using std::cerr;
-using std::cout;
-using std::endl;
-
-namespace
-{
- class OurInstallTask :
- public ConsoleInstallTask
- {
- public:
- OurInstallTask(std::tr1::shared_ptr<Environment> env, const DepListOptions & options) :
- ConsoleInstallTask(env.get(), options, env->default_destinations())
- {
- }
-
- virtual bool want_full_install_reasons() const
- {
- return "full" == CommandLine::get_instance()->a_show_reasons.argument();
- }
-
- virtual bool want_tags_summary() const
- {
- return CommandLine::get_instance()->a_pretend.specified();
- }
-
- virtual bool want_install_reasons() const
- {
- return "full" == CommandLine::get_instance()->a_show_reasons.argument() ||
- "summary" == CommandLine::get_instance()->a_show_reasons.argument();
- }
-
- virtual bool want_unchanged_use_flags() const
- {
- return false;
- }
-
- virtual bool want_changed_use_flags() const
- {
- return false;
- }
-
- virtual bool want_new_use_flags() const
- {
- return false;
- }
-
- virtual bool want_use_summary() const
- {
- return false;
- }
-
- virtual bool want_new_descriptions() const
- {
- return false;
- }
-
- virtual bool want_existing_descriptions() const
- {
- return false;
- }
-
- virtual bool want_compact() const
- {
- return false;
- }
-
- virtual bool want_suggestions() const
- {
- return false;
- }
-
- virtual std::string make_resume_command(const bool) const
- {
- return "";
- }
-
- virtual void show_resume_command() const
- {
- }
- };
-}
-
-int
-do_install(const std::tr1::shared_ptr<Environment> & env, std::string spec_str)
-{
- Context context("When performing install action from command line:");
-
- DepListOptions options;
-
- options.circular = dl_circular_discard;
- options.circular = dl_circular_error;
- options.installed_deps_pre = dl_deps_discard;
- options.installed_deps_runtime = dl_deps_discard;
- options.installed_deps_post = dl_deps_discard;
- options.uninstalled_deps_pre = dl_deps_discard;
- options.uninstalled_deps_runtime = dl_deps_discard;
- options.uninstalled_deps_post = dl_deps_discard;
- options.reinstall = dl_reinstall_never;
- options.target_type = dl_target_set;
-
- OurInstallTask task(env, options);
- task.set_fetch_only(CommandLine::get_instance()->a_fetch.specified());
- task.set_pretend(CommandLine::get_instance()->a_pretend.specified());
-
- if (CommandLine::get_instance()->a_debug_build.specified())
- {
- if (CommandLine::get_instance()->a_debug_build.argument() == "none")
- task.set_debug_mode(iado_none);
- else if (CommandLine::get_instance()->a_debug_build.argument() == "split")
- task.set_debug_mode(iado_split);
- else if (CommandLine::get_instance()->a_debug_build.argument() == "internal")
- task.set_debug_mode(iado_internal);
- else
- throw DoHelp("bad value for --debug-build");
- }
-
- std::tr1::shared_ptr<Sequence<std::string> > specs(new Sequence<std::string>);
- specs->push_back(spec_str);
- if (! task.try_to_set_targets_from_user_specs(specs))
- return task.exit_status();
-
- task.execute();
-
- cout << endl;
-
- return task.exit_status();
-}
-
diff --git a/src/clients/contrarius/install.hh b/src/clients/contrarius/install.hh
deleted file mode 100644
index 42c0f99..0000000
--- a/src/clients/contrarius/install.hh
+++ /dev/null
@@ -1,34 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-/*
- * Copyright (c) 2006 Danny van Dyk
- *
- * This file is part of the Paludis package manager. Paludis is free software;
- * you can redistribute it and/or modify it under the terms of the GNU General
- * Public License version 2, as published by the Free Software Foundation.
- *
- * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#ifndef PALUDIS_GUARD_SRC_DEPGRAPH_HH
-#define PALUDIS_GUARD_SRC_DEPGRAPH_HH 1
-
-#include <paludis/dep_spec.hh>
-#include <paludis/environment.hh>
-#include "command_line.hh"
-
-/** \file
- * Declaration for the do_install function.
- */
-
-/// Handle --install.
-int do_install(const std::tr1::shared_ptr<paludis::Environment> &, std::string spec_str);
-
-#endif
diff --git a/src/clients/contrarius/man_contrarius.cc b/src/clients/contrarius/man_contrarius.cc
deleted file mode 100644
index f5210a3..0000000
--- a/src/clients/contrarius/man_contrarius.cc
+++ /dev/null
@@ -1,80 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-/*
- * Copyright (c) 2006 Danny van Dyk
- * Copyright (c) 2007 Ciaran McCreesh
- *
- * This file is part of the Paludis package manager. Paludis is free software;
- * you can redistribute it and/or modify it under the terms of the GNU General
- * Public License version 2, as published by the Free Software Foundation.
- *
- * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#include "command_line.hh"
-#include <paludis/args/man.hh>
-
-#include <iostream>
-#include <cstdlib>
-
-using std::cout;
-using std::endl;
-
-namespace
-{
- struct ManCommandLine :
- paludis::args::ArgsHandler
- {
- paludis::args::ArgsGroup group;
- paludis::args::SwitchArg a_html;
-
- ManCommandLine() :
- group(this, "", ""),
- a_html(&group, "html", '\0', "", false)
- {
- }
-
- virtual std::string app_name() const
- {
- return "";
- }
-
- virtual std::string app_description() const
- {
- return "";
- }
-
- virtual std::string app_synopsis() const
- {
- return "";
- }
- };
-}
-
-int
-main(int argc, char * argv[])
-{
- ManCommandLine cmdline;
- cmdline.run(argc, argv, "", "", "");
-
- if (cmdline.a_html.specified())
- {
- paludis::args::HtmlWriter hw(cout);
- paludis::args::generate_doc(hw, CommandLine::get_instance());
- }
- else
- {
- paludis::args::ManWriter mw(cout);
- paludis::args::generate_doc(mw, CommandLine::get_instance());
- }
-
- return EXIT_SUCCESS;
-}
-
diff --git a/src/clients/contrarius/stage.cc b/src/clients/contrarius/stage.cc
deleted file mode 100644
index 6cc01b4..0000000
--- a/src/clients/contrarius/stage.cc
+++ /dev/null
@@ -1,233 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-/*
- * Copyright (c) 2006 Danny van Dyk
- *
- * This file is part of the Paludis package manager. Paludis is free software;
- * you can redistribute it and/or modify it under the terms of the GNU General
- * Public License version 2, as published by the Free Software Foundation.
- *
- * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#include <paludis/util/log.hh>
-#include <paludis/util/tokeniser.hh>
-#include <paludis/util/sequence.hh>
-#include <paludis/util/config_file.hh>
-#include <paludis/util/options.hh>
-#include <paludis/generator.hh>
-#include <paludis/filter.hh>
-#include <paludis/filtered_generator.hh>
-#include <paludis/selection.hh>
-#include <paludis/package_database.hh>
-#include <paludis/environments/adapted/adapted_environment.hh>
-#include <paludis/user_dep_spec.hh>
-#include <string>
-#include <tr1/memory>
-
-#include "stage.hh"
-#include "target_config.hh"
-#include "install.hh"
-
-using namespace paludis;
-
-int
-AuxiliaryStage::build(const StageOptions &) const
-{
- Context context("When building AuxiliaryStage:");
-
- return 0 == do_install(_env, TargetConfig::get_instance()->aux());
-}
-
-bool
-AuxiliaryStage::is_rebuild() const
-{
- std::list<std::string> packages;
- tokenise_whitespace(TargetConfig::get_instance()->aux(), std::back_inserter(packages));
-
- for (std::list<std::string>::const_iterator p(packages.begin()), p_end(packages.end()) ;
- p != p_end ; ++p)
- if ((*_env)[selection::SomeArbitraryVersion(
- generator::Matches(parse_user_package_dep_spec(*p, _env.get(), UserPackageDepSpecOptions())) |
- filter::InstalledAtRoot(_env->root()))]->empty())
- return false;
-
- return true;
-}
-
-int
-BinutilsStage::build(const StageOptions &) const
-{
- Context context("When building BinutilsStage:");
-
- std::tr1::shared_ptr<PackageDepSpec> binutils(new PackageDepSpec(
- parse_user_package_dep_spec(TargetConfig::get_instance()->binutils(), _env.get(),
- UserPackageDepSpecOptions())));
-
- _env->clear_adaptions();
-
- return 0 == do_install(_env, stringify(*binutils));
-}
-
-bool
-BinutilsStage::is_rebuild() const
-{
- return (! (*_env)[selection::SomeArbitraryVersion(
- generator::Matches(parse_user_package_dep_spec(
- TargetConfig::get_instance()->binutils(), _env.get(), UserPackageDepSpecOptions())) |
- filter::InstalledAtRoot(_env->root()))]->empty());
-}
-
-int
-KernelHeadersStage::build(const StageOptions &) const
-{
- Context context("When building KernelHeadersStage:");
-
- std::tr1::shared_ptr<PackageDepSpec> headers(new PackageDepSpec(
- parse_user_package_dep_spec(TargetConfig::get_instance()->headers(),
- _env.get(), UserPackageDepSpecOptions())));
-
- _env->clear_adaptions();
-
- _env->adapt_use(headers, UseFlagName("crosscompile_opts_headers-only"), use_enabled);
-
- return 0 == do_install(_env, stringify(*headers));
-}
-
-bool
-KernelHeadersStage::is_rebuild() const
-{
- return (! (*_env)[selection::SomeArbitraryVersion(
- generator::Matches(parse_user_package_dep_spec(TargetConfig::get_instance()->headers(),
- _env.get(), UserPackageDepSpecOptions())) |
- filter::InstalledAtRoot(_env->root()))]->empty());
-}
-
-int
-MinimalStage::build(const StageOptions &) const
-{
- Context context("When executing MinimalStage:");
-
- std::tr1::shared_ptr<PackageDepSpec> gcc(new PackageDepSpec(parse_user_package_dep_spec(
- TargetConfig::get_instance()->gcc(),
- _env.get(), UserPackageDepSpecOptions())));
-
- _env->clear_adaptions();
-
- _env->adapt_use(gcc, UseFlagName("boundschecking"), use_disabled);
- _env->adapt_use(gcc, UseFlagName("fortran"), use_disabled);
- _env->adapt_use(gcc, UseFlagName("gtk"), use_disabled);
- _env->adapt_use(gcc, UseFlagName("gcj"), use_disabled);
- _env->adapt_use(gcc, UseFlagName("mudflap"), use_disabled);
- _env->adapt_use(gcc, UseFlagName("objc"), use_disabled);
- _env->adapt_use(gcc, UseFlagName("objc-gc"), use_disabled);
- _env->adapt_use(gcc, UseFlagName("nocxx"), use_enabled);
- _env->adapt_use(gcc, UseFlagName("crosscompile_opts_bootstrap"), use_enabled);
-
- return 0 == do_install(_env, stringify(*gcc));
-}
-
-bool
-MinimalStage::is_rebuild() const
-{
- return (! (*_env)[selection::SomeArbitraryVersion(
- generator::Matches(parse_user_package_dep_spec(
- TargetConfig::get_instance()->gcc(), _env.get(), UserPackageDepSpecOptions())) |
- filter::InstalledAtRoot(_env->root()))]->empty());
-}
-
-int
-LibCHeadersStage::build(const StageOptions &) const
-{
- Context context("When building LIbCHeaderStage:");
-
- std::tr1::shared_ptr<PackageDepSpec> libc(new PackageDepSpec(
- parse_user_package_dep_spec(TargetConfig::get_instance()->libc(), _env.get(),
- UserPackageDepSpecOptions())));
-
- _env->clear_adaptions();
-
- _env->adapt_use(libc, UseFlagName("crosscompile_opts_headers-only"), use_enabled);
-
- return 0 == do_install(_env, stringify(*libc));
-}
-
-bool
-LibCHeadersStage::is_rebuild() const
-{
- return (! (*_env)[selection::SomeArbitraryVersion(
- generator::Matches(parse_user_package_dep_spec(
- TargetConfig::get_instance()->libc(), _env.get(), UserPackageDepSpecOptions())) |
- filter::InstalledAtRoot(_env->root()))]->empty());
-}
-
-int
-LibCStage::build(const StageOptions &) const
-{
- Context context("When building LibCStage:");
-
- std::tr1::shared_ptr<PackageDepSpec> libc(new PackageDepSpec(
- parse_user_package_dep_spec(TargetConfig::get_instance()->libc(), _env.get(),
- UserPackageDepSpecOptions())));
-
- _env->clear_adaptions();
-
- return 0 == do_install(_env, stringify(*libc));
-}
-
-bool
-LibCStage::is_rebuild() const
-{
- std::tr1::shared_ptr<const PackageIDSequence> c((*_env)[selection::BestVersionOnly(
- generator::Matches(parse_user_package_dep_spec(TargetConfig::get_instance()->libc(),
- _env.get(), UserPackageDepSpecOptions())) |
- filter::InstalledAtRoot(_env->root()))]);
-
- if (c->empty())
- return false;
-
- return (! _env->query_use(UseFlagName("crosscompile_opts_headers-only"), **c->last()));
-}
-
-int
-FullStage::build(const StageOptions &) const
-{
- Context context("When building FullStage:");
-
- std::tr1::shared_ptr<PackageDepSpec> gcc(new PackageDepSpec(parse_user_package_dep_spec(
- TargetConfig::get_instance()->gcc(), _env.get(),
- UserPackageDepSpecOptions())));
-
- _env->clear_adaptions();
-
- _env->adapt_use(gcc, UseFlagName("boundschecking"), use_disabled);
- _env->adapt_use(gcc, UseFlagName("gtk"), use_disabled);
- _env->adapt_use(gcc, UseFlagName("gcj"), use_disabled);
- _env->adapt_use(gcc, UseFlagName("mudflap"), use_disabled);
- _env->adapt_use(gcc, UseFlagName("objc"), use_disabled);
- _env->adapt_use(gcc, UseFlagName("objc-gc"), use_disabled);
-
- return 0 == do_install(_env, stringify(*gcc));
-}
-
-bool
-FullStage::is_rebuild() const
-{
- std::tr1::shared_ptr<const PackageIDSequence> c((*_env)[selection::BestVersionOnly(
- generator::Matches(parse_user_package_dep_spec(TargetConfig::get_instance()->gcc(),
- _env.get(), UserPackageDepSpecOptions())) |
- filter::InstalledAtRoot(_env->root()))]);
-
- if (c->empty())
- return false;
-
- return (! _env->query_use(UseFlagName("nocxx"), **c->last()));
-}
-
diff --git a/src/clients/contrarius/stage.hh b/src/clients/contrarius/stage.hh
deleted file mode 100644
index 5f47211..0000000
--- a/src/clients/contrarius/stage.hh
+++ /dev/null
@@ -1,219 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-/*
- * Copyright (c) 2006 Danny van Dyk
- *
- * This file is part of the Paludis package manager. Paludis is free software;
- * you can redistribute it and/or modify it under the terms of the GNU General
- * Public License version 2, as published by the Free Software Foundation.
- *
- * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#ifndef PALUDIS_GUARD_SRC_CONTRARIUS_STAGE_HH
-#define PALUDIS_GUARD_SRC_CONTRARIUS_STAGE_HH 1
-
-#include <paludis/name.hh>
-#include <paludis/host_tuple_name.hh>
-#include <paludis/dep_spec.hh>
-#include <paludis/stage_builder_task.hh>
-
-#include <string>
-
-namespace paludis
-{
- class AdaptedEnvironment;
-
-#include <src/clients/contrarius/contrarius_stage_options-sr.hh>
-
- class ContrariusStage :
- public StageBase
- {
- protected:
- std::tr1::shared_ptr<AdaptedEnvironment> _env;
-
- public:
- ContrariusStage(const std::tr1::shared_ptr<AdaptedEnvironment> & e) :
- _env(e)
- {
- }
- };
-
- class AuxiliaryStage :
- public ContrariusStage
- {
- public:
- AuxiliaryStage(const std::tr1::shared_ptr<AdaptedEnvironment> & e) :
- ContrariusStage(e)
- {
- }
-
- virtual int build(const StageOptions &) const;
-
- virtual std::string description() const
- {
- return "Building auxiliary dependencies of the cross toolchain";
- }
-
- virtual bool is_rebuild() const;
-
- virtual std::string short_name() const
- {
- return "cross-auxiliary stage";
- }
- };
-
- class BinutilsStage :
- public ContrariusStage
- {
- public:
- BinutilsStage(const std::tr1::shared_ptr<AdaptedEnvironment> & e) :
- ContrariusStage(e)
- {
- }
-
- virtual int build(const StageOptions &) const;
-
- virtual std::string description() const
- {
- return "Building the GNU binutils as part of the cross toolchain";
- }
-
- virtual bool is_rebuild() const;
-
- virtual std::string short_name() const
- {
- return "cross-binutils stage";
- }
- };
-
- class KernelHeadersStage :
- public ContrariusStage
- {
- public:
- KernelHeadersStage(const std::tr1::shared_ptr<AdaptedEnvironment> & e) :
- ContrariusStage(e)
- {
- }
-
- virtual int build(const StageOptions &) const;
-
- virtual std::string description() const
- {
- return "Building the kernel headers as part of the cross toolchain";
- }
-
- virtual bool is_rebuild() const;
-
- virtual std::string short_name() const
- {
- return "cross-kernel-headers stage";
- }
- };
-
- class MinimalStage :
- public ContrariusStage
- {
- public:
- MinimalStage(const std::tr1::shared_ptr<AdaptedEnvironment> & e) :
- ContrariusStage(e)
- {
- }
-
- virtual int build(const StageOptions &) const;
-
- virtual std::string description() const
- {
- return "Building a minimal GNU C compiler as part of the cross toolchain";
- }
-
- virtual bool is_rebuild() const;
-
- virtual std::string short_name() const
- {
- return "cross-minimal-gcc stage";
- }
- };
-
- class LibCHeadersStage :
- public ContrariusStage
- {
- public:
- LibCHeadersStage(const std::tr1::shared_ptr<AdaptedEnvironment> & e) :
- ContrariusStage(e)
- {
- }
-
- virtual int build(const StageOptions &) const;
-
- virtual std::string description() const
- {
- return "Building the C standard library headers as part of the cross toolchain";
- }
-
- virtual bool is_rebuild() const;
-
- virtual std::string short_name() const
- {
- return "cross-libc-headers stage";
- }
- };
-
- class LibCStage :
- public ContrariusStage
- {
- public:
- LibCStage(const std::tr1::shared_ptr<AdaptedEnvironment> & e) :
- ContrariusStage(e)
- {
- }
-
- virtual int build(const StageOptions &) const;
-
- virtual std::string description() const
- {
- return "Building the C standard library as part of the cross toolchain";
- }
-
- virtual bool is_rebuild() const;
-
- virtual std::string short_name() const
- {
- return "cross-libc stage";
- }
- };
-
-
- class FullStage :
- public ContrariusStage
- {
- public:
- FullStage(const std::tr1::shared_ptr<AdaptedEnvironment> & e) :
- ContrariusStage(e)
- {
- }
-
- virtual int build(const StageOptions &) const;
-
- virtual std::string description() const
- {
- return "Building the full GNU compiler collection as part of the cross toolchain";
- }
-
- virtual bool is_rebuild() const;
-
- virtual std::string short_name() const
- {
- return "cross-gcc stage";
- }
- };
-}
-
-#endif
diff --git a/src/clients/contrarius/stage_builder.cc b/src/clients/contrarius/stage_builder.cc
deleted file mode 100644
index db6dc60..0000000
--- a/src/clients/contrarius/stage_builder.cc
+++ /dev/null
@@ -1,93 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-/*
- * Copyright (c) 2006 Danny van Dyk
- *
- * This file is part of the Paludis package manager. Paludis is free software;
- * you can redistribute it and/or modify it under the terms of the GNU General
- * Public License version 2, as published by the Free Software Foundation.
- *
- * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#include <paludis/stage_builder_task.hh>
-#include <paludis/environment.hh>
-#include <src/clients/contrarius/stage.hh>
-#include <src/clients/contrarius/stage_builder.hh>
-#include <src/output/colour.hh>
-#include <paludis/util/wrapped_forward_iterator.hh>
-
-#include <iostream>
-#include <list>
-#include <string>
-
-using namespace paludis;
-using std::cout;
-using std::endl;
-
-void
-OurStageBuilderTask::on_build_all_pre()
-{
- cout << endl << colour(cl_heading, "These stages will be built:")
- << endl << endl;
-
- int num_stages(0), num_rebuilds(0);
- for (StageConstIterator s(begin_stages()), s_end(end_stages()) ; s != s_end ; s++)
- {
- cout << "o " << colour(cl_key_name, (*s)->short_name()) << endl
- << " " << colour(cl_tag, (*s)->description()) << endl;
- ++num_stages;
- if ((*s)->is_rebuild())
- ++num_rebuilds;
- }
-
- cout << endl << "Total: " << num_stages << " Stage" << (num_stages > 1 ? "s" : "")
- << " (" << num_rebuilds << " rebuild)" << endl;
-
- cout << endl;
-}
-
-void
-OurStageBuilderTask::on_build_pre(const std::tr1::shared_ptr<const StageBase> & s)
-{
- cout << colour(cl_heading, "Contents of stage ")
- << colour(cl_stage_short_name, s->short_name()) << endl;
-}
-
-void
-OurStageBuilderTask::on_build_post(const std::tr1::shared_ptr<const StageBase> &)
-{
-}
-
-void
-OurStageBuilderTask::on_build_fail(const std::tr1::shared_ptr<const StageBase> & s, const StageBuildError & e)
-{
- cout << "Build of stage '" << s->short_name() << "' failed:" << endl;
- cout << "Error: " << e.message() << endl << endl;
- throw;
-}
-
-void
-OurStageBuilderTask::on_build_succeed(const std::tr1::shared_ptr<const StageBase> & s)
-{
- cout << "Build of stage '" << s->short_name() << "' succeeded." << endl << endl;
-}
-
-void
-OurStageBuilderTask::on_build_skipped(const std::tr1::shared_ptr<const StageBase> & s)
-{
- cout << "Skipped rebuild of stage '" << s->short_name() << "'" << endl << endl;
-}
-
-void
-OurStageBuilderTask::on_build_all_post()
-{
- cout << endl;
-}
diff --git a/src/clients/contrarius/stage_builder.hh b/src/clients/contrarius/stage_builder.hh
deleted file mode 100644
index 80349c3..0000000
--- a/src/clients/contrarius/stage_builder.hh
+++ /dev/null
@@ -1,51 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-/*
- * Copyright (c) 2006 Danny van Dyk
- *
- * This file is part of the Paludis package manager. Paludis is free software;
- * you can redistribute it and/or modify it under the terms of the GNU General
- * Public License version 2, as published by the Free Software Foundation.
- *
- * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#ifndef PALUDIS_GUARD_SRC_CONTRARIUS_STAGE_BUILDER_HH
-#define PALUDIS_GUARD_SRC_CONTRARIUS_STAGE_BUILDER_HH 1
-
-#include <paludis/stage_builder_task.hh>
-#include <src/clients/contrarius/stage.hh>
-#include <string>
-
-namespace paludis
-{
- class Environment;
-
- class OurStageBuilderTask :
- public StageBuilderTask
- {
- public:
- OurStageBuilderTask(const StageOptions & o) :
- StageBuilderTask(o)
- {
- }
-
- virtual void on_build_all_pre();
- virtual void on_build_pre(const std::tr1::shared_ptr<const StageBase> &);
- virtual void on_build_post(const std::tr1::shared_ptr<const StageBase> &);
- virtual void on_build_fail(const std::tr1::shared_ptr<const StageBase> &, const StageBuildError &)
- PALUDIS_ATTRIBUTE((noreturn));
- virtual void on_build_succeed(const std::tr1::shared_ptr<const StageBase> &);
- virtual void on_build_skipped(const std::tr1::shared_ptr<const StageBase> &);
- virtual void on_build_all_post();
- };
-}
-
-#endif
diff --git a/src/clients/contrarius/target_config.cc b/src/clients/contrarius/target_config.cc
deleted file mode 100644
index 9b923e5..0000000
--- a/src/clients/contrarius/target_config.cc
+++ /dev/null
@@ -1,146 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-/*
- * Copyright (c) 2007 Danny van Dyk
- *
- * This file is part of the Paludis package manager. Paludis is free software;
- * you can redistribute it and/or modify it under the terms of the GNU General
- * Public License version 2, as published by the Free Software Foundation.
- *
- * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#include <paludis/util/fs_entry.hh>
-#include <paludis/util/tokeniser.hh>
-#include <paludis/util/stringify.hh>
-#include <paludis/util/instantiation_policy-impl.hh>
-#include <paludis/util/options.hh>
-#include <paludis/util/config_file.hh>
-#include <paludis/util/wrapped_forward_iterator-impl.hh>
-#include <list>
-#include <string>
-#include <vector>
-
-#include "command_line.hh"
-#include "target_config.hh"
-
-using namespace paludis;
-
-template class InstantiationPolicy<TargetConfig, instantiation_method::SingletonTag>;
-template class WrappedForwardIterator<TargetConfig::ConstIteratorTag, const std::string>;
-
-void
-TargetConfig::_parse_defaults()
-{
- Context c("While parsing default configuration:");
-
- LineConfigFile defaults(FSEntry(DATADIR "/paludis/contrarius/default_config.txt"), LineConfigFileOptions());
- for (LineConfigFile::ConstIterator l(defaults.begin()), l_end(defaults.end()) ;
- l != l_end ; ++l)
- {
- Context c2("While parsing line '" + *l + "'");
- std::vector<std::string> tokens;
- tokenise_whitespace(*l, std::back_inserter(tokens));
- SpecEntryList * list(&_binutils_list);
-
- if ((("aux" == tokens[1]) || "headers" == tokens[1]) && (2 == std::distance(tokens.begin(), tokens.end())))
- tokens.push_back("");
- else if (3 > std::distance(tokens.begin(), tokens.end()))
- throw TargetConfigError("Illegal number of tokens encountered");
-
- if ("binutils" == tokens[1])
- list = &_binutils_list;
- else if ("gcc" == tokens[1])
- list = &_gcc_list;
- else if ("headers" == tokens[1])
- list = &_headers_list;
- else if ("libc" == tokens[1])
- list = &_libc_list;
- else if ("aux" == tokens[1])
- list = &_aux_list;
- else
- throw TargetConfigError("Invalid key '" + tokens[1] + "' encountered");
-
- std::string entry(tokens[2]);
- for (std::vector<std::string>::const_iterator t(tokens.begin() + 3), t_end(tokens.end()) ;
- t != t_end ; ++t)
- entry += " " + *t;
-
- list->push_back(std::make_pair(tokens[0], entry));
- }
-}
-
-std::string
-TargetConfig::_find_match(SpecEntryList & list)
-{
- std::vector<std::string> tokens;
-
- for (SpecEntryList::const_iterator i(list.begin()), i_end(list.end()) ;
- i != i_end ; ++i)
- {
- tokens.clear();
- tokenise<delim_kind::AnyOfTag, delim_mode::DelimiterTag>(i->first, "-", "", std::back_inserter(tokens));
-
- for (unsigned index(0) ; index < 4 ; ++index)
- {
- std::string & token(tokens[index]);
-
- std::string t;
- if (0 == index)
- t = stringify(_target.architecture);
- else if (1 == index)
- t = stringify(_target.manufacturer);
- else if (2 == index)
- t = stringify(_target.kernel);
- else if (3 == index)
- t = stringify(_target.userland);
-
- if ((t.empty()) && ("*" == token))
- continue;
-
- if (t.length() < token.length())
- break;
-
- if (0 != token.compare(0, token.length() - 1, t, 0, token.length() - 1))
- break;
-
- if (('*' == token[token.length() - 1]) || (t[token.length() - 1] == token[token.length() - 1]))
- {
- if (3 == index)
- return i->second;
- else
- continue;
- }
- else
- break;
- }
- }
-
- throw TargetConfigError("Unknown CTARGET '" + stringify(_target) + "'");
-}
-
-TargetConfig::TargetConfig() :
- _target(CommandLine::get_instance()->a_target.argument())
-{
- _parse_defaults();
-
- _binutils = "cross-" + stringify(_target) + "/" + _find_match(_binutils_list);
-
- _gcc = "cross-" + stringify(_target) + "/" + _find_match(_gcc_list);
-
- _headers = _find_match(_headers_list);
- if (! _headers.empty())
- _headers = "cross-" + stringify(_target) + "/" + _find_match(_headers_list);
-
- _libc = "cross-" + stringify(_target) + "/" + _find_match(_libc_list);
-
- _aux = _find_match(_aux_list);
-}
-
diff --git a/src/clients/contrarius/target_config.hh b/src/clients/contrarius/target_config.hh
deleted file mode 100644
index 835a966..0000000
--- a/src/clients/contrarius/target_config.hh
+++ /dev/null
@@ -1,108 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-/*
- * Copyright (c) 2007 Danny van Dyk
- *
- * This file is part of the Paludis package manager. Paludis is free software;
- * you can redistribute it and/or modify it under the terms of the GNU General
- * Public License version 2, as published by the Free Software Foundation.
- *
- * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#ifndef PALUDIS_GUARD_SRC_CLIENTS_CONTRARIUS_TARGET_CONFIG_HH
-#define PALUDIS_GUARD_SRC_CLIENTS_CONTRARIUS_TARGET_CONFIG_HH 1
-
-#include <paludis/util/exception.hh>
-#include <paludis/util/instantiation_policy.hh>
-#include <paludis/util/wrapped_forward_iterator-fwd.hh>
-#include <paludis/host_tuple_name.hh>
-#include <list>
-#include <utility>
-
-using namespace paludis;
-
-class TargetConfigError :
- public Exception
-{
- public:
- TargetConfigError(const std::string & m) throw () :
- Exception("Error in contrarius configuration: " + m)
- {
- }
-};
-
-class TargetConfig :
- public InstantiationPolicy<TargetConfig, instantiation_method::SingletonTag>
-{
- friend class InstantiationPolicy<TargetConfig, instantiation_method::SingletonTag>;
-
- private:
- typedef std::list<std::pair<std::string, std::string> > SpecEntryList;
-
- struct ConstIteratorTag;
- typedef WrappedForwardIterator<ConstIteratorTag, const std::string> ConstIterator;
-
- SpecEntryList _binutils_list;
-
- SpecEntryList _gcc_list;
-
- SpecEntryList _headers_list;
-
- SpecEntryList _libc_list;
-
- SpecEntryList _aux_list;
-
- HostTupleName _target;
-
- std::string _binutils;
-
- std::string _gcc;
-
- std::string _headers;
-
- std::string _libc;
-
- std::string _aux;
-
- TargetConfig();
-
- void _parse_defaults();
-
- std::string _find_match(SpecEntryList & list);
-
- public:
- std::string binutils() const
- {
- return _binutils;
- }
-
- std::string gcc() const
- {
- return _gcc;
- }
-
- std::string headers() const
- {
- return _headers;
- }
-
- std::string libc() const
- {
- return _libc;
- }
-
- std::string aux() const
- {
- return _aux;
- }
-};
-
-#endif
diff --git a/src/clients/gtkpaludis/Makefile.am b/src/clients/gtkpaludis/Makefile.am
deleted file mode 100644
index 1f146ae..0000000
--- a/src/clients/gtkpaludis/Makefile.am
+++ /dev/null
@@ -1,34 +0,0 @@
-CLEANFILES = *~ *.epicfail
-MAINTAINERCLEANFILES = Makefile.in
-SUBDIRS = vtemm libgtkpaludis .
-
-AM_CXXFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/clients/gtkpaludis \
- @PALUDIS_CXXFLAGS@ @PALUDIS_CXXFLAGS_VISIBILITY@ \
- $(gtkmm_CFLAGS) $(gthread_CFLAGS) \
- @PALUDIS_CXXFLAGS_NO_WOLD_STYLE_CAST@ @PALUDIS_CXXFLAGS_NO_WREDUNDANT_DECLS@ @PALUDIS_CXXFLAGS_NO_WSHADOW@
-
-bin_PROGRAMS = gtkpaludis
-
-TESTS =
-
-gtkpaludis_SOURCES = \
- gtkpaludis.cc
-
-gtkpaludis_LDADD = \
- libgtkpaludis/libgtkpaludis.a \
- vtemm/libvtemm.a \
- $(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
- $(gtkmm_LIBS) $(gthread_LIBS) $(vte_LIBS)
-
-built-sources : $(BUILT_SOURCES)
- for s in `echo $(SUBDIRS) | tr -d .` ; do $(MAKE) -C $$s built-sources || exit 1 ; done
-
-distcheck-deps-local : $(DISTCHECK_DEPS)
-
-distcheck-deps : distcheck-deps-subdirs
-
-distcheck-deps-subdirs :
- for s in $(SUBDIRS) . ; do if test x$$s = x. ; then $(MAKE) distcheck-deps-local || exit 1 ; \
- else $(MAKE) -C $$s distcheck-deps || exit 1 ; fi ; done
-
diff --git a/src/clients/gtkpaludis/gtkpaludis.cc b/src/clients/gtkpaludis/gtkpaludis.cc
deleted file mode 100644
index 3c3f704..0000000
--- a/src/clients/gtkpaludis/gtkpaludis.cc
+++ /dev/null
@@ -1,26 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#include <paludis/environment_factory.hh>
-#include <paludis/util/log.hh>
-#include <libgtkpaludis/main_window.hh>
-#include <gtkmm.h>
-#include <cstdlib>
-
-using namespace gtkpaludis;
-
-int main(int argc, char *argv[])
-{
- Glib::thread_init();
- Gtk::Main kit(argc, argv);
-
- paludis::Log::get_instance()->set_log_level(paludis::ll_qa);
- paludis::Log::get_instance()->set_program_name(argv[0]);
- std::tr1::shared_ptr<paludis::Environment> env(
- paludis::EnvironmentFactory::get_instance()->create(""));
-
- MainWindow main_window(env.get());
- Gtk::Main::run(main_window);
-
- return EXIT_SUCCESS;
-}
-
diff --git a/src/clients/gtkpaludis/libgtkpaludis/Makefile.am b/src/clients/gtkpaludis/libgtkpaludis/Makefile.am
deleted file mode 100644
index caeb0b0..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/Makefile.am
+++ /dev/null
@@ -1,65 +0,0 @@
-CLEANFILES = *~ *.epicfail
-MAINTAINERCLEANFILES = Makefile.in
-
-noinst_LIBRARIES = libgtkpaludis.a
-libgtkpaludis_a_SOURCES = \
- categories_list.cc categories_list.hh \
- categories_list_model.cc categories_list_model.hh \
- gui_task.cc gui_task.hh \
- gui_sync_task.cc gui_sync_task.hh \
- main_notebook.cc main_notebook.hh \
- main_notebook_page.cc main_notebook_page.hh \
- main_window.cc main_window.hh \
- markup.cc markup.hh \
- markup_formatter.cc markup_formatter.hh \
- messages_page.cc messages_page.hh \
- package_buttons.cc package_buttons.hh \
- packages_filter.cc packages_filter.hh \
- packages_list.cc packages_list.hh \
- packages_list_filtered_model.cc packages_list_filtered_model.hh \
- packages_list_model.cc packages_list_model.hh \
- packages_page.cc packages_page.hh \
- packages_package_filter.cc packages_package_filter.hh \
- packages_package_filter_model.cc packages_package_filter_model.hh \
- packages_repository_filter.cc packages_repository_filter.hh \
- packages_repository_filter_model.cc packages_repository_filter_model.hh \
- packages_text_filter.cc packages_text_filter.hh \
- packages_text_filter_source.cc packages_text_filter_source.hh \
- packages_text_filter_source_model.cc packages_text_filter_source_model.hh \
- query_notebook.cc query_notebook.hh \
- query_notebook_page.cc query_notebook_page.hh \
- query_window.cc query_window.hh \
- repositories_list.cc repositories_list.hh \
- repositories_list_model.cc repositories_list_model.hh \
- repositories_page.cc repositories_page.hh \
- repository_buttons.cc repository_buttons.hh \
- repository_info.cc repository_info.hh \
- repository_info_model.cc repository_info_model.hh \
- sets_list.cc sets_list.hh \
- sets_list_model.cc sets_list_model.hh \
- task_sequence_list.cc task_sequence_list.hh \
- task_sequence_list_model.cc task_sequence_list_model.hh \
- task_window.cc task_window.hh \
- threaded_window.cc threaded_window.hh \
- version_info.cc version_info.hh \
- version_info_model.cc version_info_model.hh \
- versions_list.cc versions_list.hh \
- versions_list_model.cc versions_list_model.hh \
- versions_page.cc versions_page.hh \
- packages_package_filter_option.hh \
- packages_text_filter_source_option.hh
-
-AM_CXXFLAGS = @PALUDIS_CXXFLAGS@ @PALUDIS_CXXFLAGS_VISIBILITY@ -I$(top_srcdir)/src/clients/gtkpaludis \
- $(gtkmm_CFLAGS) $(gthread_CFLAGS) -I$(top_srcdir) \
- @PALUDIS_CXXFLAGS_NO_WOLD_STYLE_CAST@ @PALUDIS_CXXFLAGS_NO_WREDUNDANT_DECLS@ @PALUDIS_CXXFLAGS_NO_WSHADOW@
-
-built-sources : $(BUILT_SOURCES)
- for s in `echo $(SUBDIRS) | tr -d .` ; do $(MAKE) -C $$s built-sources || exit 1 ; done
-
-distcheck-deps-local : $(DISTCHECK_DEPS)
-
-distcheck-deps : distcheck-deps-subdirs
-
-distcheck-deps-subdirs :
- for s in $(SUBDIRS) . ; do if test x$$s = x. ; then $(MAKE) distcheck-deps-local || exit 1 ; \
- else $(MAKE) -C $$s distcheck-deps || exit 1 ; fi ; done
diff --git a/src/clients/gtkpaludis/libgtkpaludis/categories_list.cc b/src/clients/gtkpaludis/libgtkpaludis/categories_list.cc
deleted file mode 100644
index 48d1bd0..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/categories_list.cc
+++ /dev/null
@@ -1,61 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#include "categories_list.hh"
-#include "categories_list_model.hh"
-#include "packages_page.hh"
-#include <paludis/util/private_implementation_pattern-impl.hh>
-
-using namespace gtkpaludis;
-using namespace paludis;
-
-namespace paludis
-{
- template<>
- struct Implementation<CategoriesList>
- {
- Glib::RefPtr<CategoriesListModel> model;
- MainWindow * const main_window;
- PackagesPage * const packages_page;
-
- Implementation(MainWindow * const m, PackagesPage * const p) :
- model(new CategoriesListModel(m, p)),
- main_window(m),
- packages_page(p)
- {
- }
- };
-}
-
-CategoriesList::CategoriesList(MainWindow * const m, PackagesPage * const p) :
- Gtk::TreeView(),
- PrivateImplementationPattern<CategoriesList>(new Implementation<CategoriesList>(m, p))
-{
- set_model(_imp->model);
-
- append_column("Category", _imp->model->columns().col_cat_name);
-
- signal_cursor_changed().connect(sigc::mem_fun(this, &CategoriesList::handle_signal_cursor_changed));
-}
-
-CategoriesList::~CategoriesList()
-{
-}
-
-void
-CategoriesList::populate()
-{
- _imp->model->populate();
-}
-
-void
-CategoriesList::handle_signal_cursor_changed()
-{
- if (get_selection()->get_selected())
- _imp->packages_page->set_category(std::tr1::shared_ptr<CategoryNamePart>(new CategoryNamePart(
- static_cast<Glib::ustring>((*get_selection()->get_selected())[_imp->model->columns().col_cat_name]).raw())));
- else
- _imp->packages_page->set_category(
- std::tr1::shared_ptr<CategoryNamePart>());
-}
-
-
diff --git a/src/clients/gtkpaludis/libgtkpaludis/categories_list.hh b/src/clients/gtkpaludis/libgtkpaludis/categories_list.hh
deleted file mode 100644
index 98f62d9..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/categories_list.hh
+++ /dev/null
@@ -1,29 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#ifndef GTKPALUDIS_GUARD_LIBGTKPALUDIS_CATEGORIES_LIST_HH
-#define GTKPALUDIS_GUARD_LIBGTKPALUDIS_CATEGORIES_LIST_HH 1
-
-#include <paludis/util/private_implementation_pattern.hh>
-#include <gtkmm/treeview.h>
-
-namespace gtkpaludis
-{
- class MainWindow;
- class PackagesPage;
-
- class CategoriesList :
- public Gtk::TreeView,
- private paludis::PrivateImplementationPattern<CategoriesList>
- {
- protected:
- void handle_signal_cursor_changed();
-
- public:
- CategoriesList(MainWindow * const m, PackagesPage * const p);
- ~CategoriesList();
-
- void populate();
- };
-}
-
-#endif
diff --git a/src/clients/gtkpaludis/libgtkpaludis/categories_list_model.cc b/src/clients/gtkpaludis/libgtkpaludis/categories_list_model.cc
deleted file mode 100644
index a652440..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/categories_list_model.cc
+++ /dev/null
@@ -1,111 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#include "categories_list_model.hh"
-#include "main_window.hh"
-#include "packages_page.hh"
-#include <paludis/util/private_implementation_pattern-impl.hh>
-#include <paludis/util/set.hh>
-#include <paludis/util/sequence.hh>
-#include <paludis/util/wrapped_forward_iterator.hh>
-#include <paludis/util/wrapped_output_iterator.hh>
-#include <paludis/util/indirect_iterator-impl.hh>
-#include <paludis/environment.hh>
-#include <paludis/package_database.hh>
-
-using namespace paludis;
-using namespace gtkpaludis;
-
-namespace paludis
-{
- template<>
- struct Implementation<CategoriesListModel>
- {
- MainWindow * const main_window;
- PackagesPage * const packages_page;
- CategoriesListModel::Columns columns;
-
- Implementation(MainWindow * const m, PackagesPage * const p) :
- main_window(m),
- packages_page(p)
- {
- }
- };
-}
-
-CategoriesListModel::CategoriesListModel(MainWindow * const m, PackagesPage * const p) :
- PrivateImplementationPattern<CategoriesListModel>(new Implementation<CategoriesListModel>(m, p)),
- Gtk::ListStore(_imp->columns)
-{
-}
-
-CategoriesListModel::~CategoriesListModel()
-{
-}
-
-void
-CategoriesListModel::populate()
-{
- _imp->main_window->paludis_thread_action(
- sigc::mem_fun(this, &CategoriesListModel::populate_in_paludis_thread), "Populating categories list model");
-}
-
-void
-CategoriesListModel::populate_in_paludis_thread()
-{
- std::tr1::shared_ptr<CategoryNamePartSet> columns(new CategoryNamePartSet);
-
- std::tr1::shared_ptr<const RepositoryNameSet> repos(
- _imp->packages_page->get_repository_filter()->repositories(_imp->main_window->environment()));
-
- if (repos)
- {
- for (RepositoryNameSet::ConstIterator r(repos->begin()), r_end(repos->end()) ;
- r != r_end ; ++r)
- {
- std::tr1::shared_ptr<const CategoryNamePartSet> cats(
- _imp->main_window->environment()->package_database()->fetch_repository(*r)->category_names());
- std::copy(cats->begin(), cats->end(), columns->inserter());
- }
- }
- else
- {
- for (IndirectIterator<PackageDatabase::RepositoryConstIterator>
- r(indirect_iterator(_imp->main_window->environment()->package_database()->begin_repositories())),
- r_end(indirect_iterator(_imp->main_window->environment()->package_database()->end_repositories())) ;
- r != r_end ; ++r)
- {
- std::tr1::shared_ptr<const CategoryNamePartSet> cats(r->category_names());
- std::copy(cats->begin(), cats->end(), columns->inserter());
- }
- }
-
- _imp->main_window->gui_thread_action(
- sigc::bind(sigc::mem_fun(this, &CategoriesListModel::populate_in_gui_thread), columns));
-}
-
-void
-CategoriesListModel::populate_in_gui_thread(const std::tr1::shared_ptr<const CategoryNamePartSet> & names)
-{
- clear();
- for (CategoryNamePartSet::ConstIterator n(names->begin()), n_end(names->end()) ;
- n != n_end ; ++n)
- (*append())[_imp->columns.col_cat_name] = stringify(*n);
-}
-
-
-CategoriesListModel::Columns::Columns()
-{
- add(col_cat_name);
-}
-
-CategoriesListModel::Columns::~Columns()
-{
-}
-
-CategoriesListModel::Columns &
-CategoriesListModel::columns()
-{
- return _imp->columns;
-}
-
-
diff --git a/src/clients/gtkpaludis/libgtkpaludis/categories_list_model.hh b/src/clients/gtkpaludis/libgtkpaludis/categories_list_model.hh
deleted file mode 100644
index d89f055..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/categories_list_model.hh
+++ /dev/null
@@ -1,44 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#ifndef GTKPALUDIS_GUARD_LIBGTKPALUDIS_CATEGORIES_LIST_MODEL_HH
-#define GTKPALUDIS_GUARD_LIBGTKPALUDIS_CATEGORIES_LIST_MODEL_HH 1
-
-#include <gtkmm/liststore.h>
-#include <paludis/util/private_implementation_pattern.hh>
-#include <paludis/name.hh>
-#include <tr1/memory>
-
-namespace gtkpaludis
-{
- class MainWindow;
- class PackagesPage;
-
- class CategoriesListModel :
- private paludis::PrivateImplementationPattern<CategoriesListModel>,
- public Gtk::ListStore
- {
- protected:
- void populate_in_paludis_thread();
- void populate_in_gui_thread(const std::tr1::shared_ptr<const paludis::CategoryNamePartSet> & names);
-
- public:
- CategoriesListModel(MainWindow * const m, PackagesPage * const p);
- ~CategoriesListModel();
-
- void populate();
-
- class Columns :
- public Gtk::TreeModelColumnRecord
- {
- public:
- Columns();
- ~Columns();
-
- Gtk::TreeModelColumn<Glib::ustring> col_cat_name;
- };
-
- Columns & columns();
- };
-}
-
-#endif
diff --git a/src/clients/gtkpaludis/libgtkpaludis/gui_sync_task.cc b/src/clients/gtkpaludis/libgtkpaludis/gui_sync_task.cc
deleted file mode 100644
index 334c25f..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/gui_sync_task.cc
+++ /dev/null
@@ -1,109 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#include "gui_sync_task.hh"
-#include "main_window.hh"
-#include "main_notebook.hh"
-#include "task_window.hh"
-#include <paludis/util/private_implementation_pattern-impl.hh>
-#include <paludis/util/stringify.hh>
-#include <paludis/util/wrapped_forward_iterator.hh>
-
-using namespace gtkpaludis;
-using namespace paludis;
-
-namespace paludis
-{
- template <>
- struct Implementation<GuiSyncTask>
- {
- MainWindow * const main_window;
- TaskWindow * task_window;
-
- Implementation(MainWindow * const m, GuiSyncTask * const g) :
- main_window(m),
- task_window(new TaskWindow(m, g))
- {
- }
- };
-}
-
-GuiSyncTask::GuiSyncTask(MainWindow * const m) :
- SyncTask(m->environment(), false),
- PrivateImplementationPattern<GuiSyncTask>(new Implementation<GuiSyncTask>(m, this)),
- _imp(PrivateImplementationPattern<GuiSyncTask>::_imp)
-{
-}
-
-GuiSyncTask::~GuiSyncTask()
-{
-}
-
-void
-GuiSyncTask::on_sync_all_pre()
-{
- for (TargetsConstIterator t(begin_targets()), t_end(end_targets()) ;
- t != t_end ; ++t)
- _imp->task_window->gui_thread_action(
- sigc::bind(sigc::mem_fun(_imp->task_window, &TaskWindow::append_sequence_item),
- stringify(*t), stringify(*t), "Pending..."));
-}
-
-void
-GuiSyncTask::on_sync_pre(const RepositoryName & r)
-{
- _imp->task_window->gui_thread_action(
- sigc::bind(sigc::mem_fun(_imp->task_window, &TaskWindow::set_sequence_item_status),
- stringify(r), "Syncing..."));
-}
-
-void
-GuiSyncTask::on_sync_post(const RepositoryName &)
-{
-}
-
-void
-GuiSyncTask::on_sync_skip(const RepositoryName & r)
-{
- _imp->task_window->gui_thread_action(
- sigc::bind(sigc::mem_fun(_imp->task_window, &TaskWindow::set_sequence_item_status),
- stringify(r), "Skipped"));
-}
-
-void
-GuiSyncTask::on_sync_fail(const RepositoryName & r, const SyncFailedError &)
-{
- _imp->task_window->gui_thread_action(
- sigc::bind(sigc::mem_fun(_imp->task_window, &TaskWindow::set_sequence_item_status),
- stringify(r), "Failed"));
-}
-
-void
-GuiSyncTask::on_sync_succeed(const RepositoryName & r)
-{
- _imp->task_window->gui_thread_action(
- sigc::bind(sigc::mem_fun(_imp->task_window, &TaskWindow::set_sequence_item_status),
- stringify(r), "Success"));
-}
-
-void
-GuiSyncTask::on_sync_all_post()
-{
-}
-
-void
-GuiSyncTask::run()
-{
- _imp->task_window->run();
-}
-
-void
-GuiSyncTask::paludis_thread_execute()
-{
- execute();
-}
-
-void
-GuiSyncTask::on_sync_status(const int, const int, const int)
-{
-}
-
diff --git a/src/clients/gtkpaludis/libgtkpaludis/gui_sync_task.hh b/src/clients/gtkpaludis/libgtkpaludis/gui_sync_task.hh
deleted file mode 100644
index c37bc01..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/gui_sync_task.hh
+++ /dev/null
@@ -1,43 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#ifndef GTKPALUDIS_GUARD_LIBGTKPALUDIS_GUI_SYNC_TASK_HH
-#define GTKPALUDIS_GUARD_LIBGTKPALUDIS_GUI_SYNC_TASK_HH 1
-
-#include <paludis/sync_task.hh>
-#include <paludis/util/private_implementation_pattern.hh>
-#include <libgtkpaludis/gui_task.hh>
-
-namespace gtkpaludis
-{
- class MainWindow;
-
- class GuiSyncTask :
- public GuiTask,
- protected paludis::SyncTask,
- private paludis::PrivateImplementationPattern<GuiSyncTask>
- {
- private:
- paludis::PrivateImplementationPattern<GuiSyncTask>::ImpPtr & _imp;
-
- protected:
- virtual void on_sync_all_pre();
- virtual void on_sync_pre(const paludis::RepositoryName &);
- virtual void on_sync_post(const paludis::RepositoryName &);
- virtual void on_sync_skip(const paludis::RepositoryName &);
- virtual void on_sync_fail(const paludis::RepositoryName &, const paludis::SyncFailedError &);
- virtual void on_sync_succeed(const paludis::RepositoryName &);
- virtual void on_sync_all_post();
- virtual void on_sync_status(const int x, const int y, const int a);
-
- public:
- GuiSyncTask(MainWindow * const);
- ~GuiSyncTask();
-
- using paludis::SyncTask::add_target;
-
- virtual void run();
- virtual void paludis_thread_execute();
- };
-}
-
-#endif
diff --git a/src/clients/gtkpaludis/libgtkpaludis/gui_task.cc b/src/clients/gtkpaludis/libgtkpaludis/gui_task.cc
deleted file mode 100644
index b3ce961..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/gui_task.cc
+++ /dev/null
@@ -1,10 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#include "gui_task.hh"
-
-using namespace gtkpaludis;
-
-GuiTask::~GuiTask()
-{
-}
-
diff --git a/src/clients/gtkpaludis/libgtkpaludis/gui_task.hh b/src/clients/gtkpaludis/libgtkpaludis/gui_task.hh
deleted file mode 100644
index 08acd68..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/gui_task.hh
+++ /dev/null
@@ -1,18 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#ifndef GTKPALUDIS_GUARD_LIBGTKPALUDIS_GUI_TASK_HH
-#define GTKPALUDIS_GUARD_LIBGTKPALUDIS_GUI_TASK_HH 1
-
-namespace gtkpaludis
-{
- class TaskWindow;
-
- class GuiTask
- {
- public:
- virtual ~GuiTask() = 0;
- virtual void paludis_thread_execute() = 0;
- };
-}
-
-#endif
diff --git a/src/clients/gtkpaludis/libgtkpaludis/main_notebook.cc b/src/clients/gtkpaludis/libgtkpaludis/main_notebook.cc
deleted file mode 100644
index 86f5b49..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/main_notebook.cc
+++ /dev/null
@@ -1,111 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#include "main_notebook.hh"
-#include "main_notebook_page.hh"
-#include "repositories_page.hh"
-#include "packages_page.hh"
-#include "messages_page.hh"
-#include <paludis/util/private_implementation_pattern-impl.hh>
-#include <map>
-
-using namespace gtkpaludis;
-using namespace paludis;
-
-namespace paludis
-{
- template<>
- struct Implementation<MainNotebook>
- {
- MainWindow * const main_window;
-
- PackagesPage packages_page;
- RepositoriesPage repositories_page;
-
- MessagesPage messages_page;
- int messages_page_index;
- bool messages_starred;
-
- std::map<int, MainNotebookPage *> pages_by_index;
-
- sigc::connection signal_switch_page_connection;
-
- Implementation(MainWindow * const m, MainNotebook * const n) :
- main_window(m),
- packages_page(m),
- repositories_page(m),
- messages_page(m, n),
- messages_starred(false)
- {
- }
- };
-}
-
-MainNotebook::MainNotebook(MainWindow * const m) :
- Gtk::Notebook(),
- PrivateImplementationPattern<MainNotebook>(new Implementation<MainNotebook>(m, this))
-{
- _imp->pages_by_index.insert(std::make_pair(
- append_page(_imp->packages_page, "Packages"),
- &_imp->packages_page));
-
- _imp->pages_by_index.insert(std::make_pair(
- append_page(_imp->repositories_page, "Repositories"),
- &_imp->repositories_page));
-
- _imp->pages_by_index.insert(std::make_pair(
- _imp->messages_page_index = append_page(_imp->messages_page, "Messages"),
- &_imp->messages_page));
-
- _imp->signal_switch_page_connection = signal_switch_page().connect(
- sigc::mem_fun(*this, &MainNotebook::handle_switch_page));
-}
-
-MainNotebook::~MainNotebook()
-{
- _imp->signal_switch_page_connection.disconnect();
-}
-
-void
-MainNotebook::handle_switch_page(GtkNotebookPage *, guint page)
-{
- std::map<int, MainNotebookPage *>::const_iterator f(_imp->pages_by_index.find(page));
- if (_imp->pages_by_index.end() != f)
- {
- f->second->populate_once();
- if (f->second == &_imp->messages_page)
- unmark_messages_page();
- }
-}
-
-void
-MainNotebook::mark_messages_page()
-{
- if ((! _imp->messages_starred) && (get_current_page() != _imp->messages_page_index))
- {
- _imp->messages_starred = true;
- set_tab_label_text(_imp->messages_page, "Messages *");
- }
-}
-
-void
-MainNotebook::unmark_messages_page()
-{
- if (_imp->messages_starred)
- {
- _imp->messages_starred = false;
- set_tab_label_text(_imp->messages_page, "Messages");
- }
-}
-
-void
-MainNotebook::show_messages_page()
-{
- set_current_page(_imp->messages_page_index);
-}
-
-void
-MainNotebook::set_capture_output_options()
-{
- _imp->messages_page.set_capture_output_options();
-}
-
diff --git a/src/clients/gtkpaludis/libgtkpaludis/main_notebook.hh b/src/clients/gtkpaludis/libgtkpaludis/main_notebook.hh
deleted file mode 100644
index 8b98723..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/main_notebook.hh
+++ /dev/null
@@ -1,33 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#ifndef GTKPALUDIS_GUARD_GTKPALUDIS_LIBGTKPALUDIS_MAIN_NOTEBOOK_HH
-#define GTKPALUDIS_GUARD_GTKPALUDIS_LIBGTKPALUDIS_MAIN_NOTEBOOK_HH 1
-
-#include <gtkmm/notebook.h>
-#include <paludis/util/private_implementation_pattern.hh>
-
-namespace gtkpaludis
-{
- class MainWindow;
-
- class MainNotebook :
- public Gtk::Notebook,
- private paludis::PrivateImplementationPattern<MainNotebook>
- {
- protected:
- void handle_switch_page(GtkNotebookPage *, guint);
-
- public:
- MainNotebook(MainWindow * const);
- ~MainNotebook();
-
- void populate();
-
- void mark_messages_page();
- void unmark_messages_page();
- void show_messages_page();
- void set_capture_output_options();
- };
-}
-
-#endif
diff --git a/src/clients/gtkpaludis/libgtkpaludis/main_notebook_page.cc b/src/clients/gtkpaludis/libgtkpaludis/main_notebook_page.cc
deleted file mode 100644
index 32adfea..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/main_notebook_page.cc
+++ /dev/null
@@ -1,25 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#include "main_notebook_page.hh"
-
-using namespace gtkpaludis;
-
-MainNotebookPage::MainNotebookPage() :
- _populated(false)
-{
-}
-
-MainNotebookPage::~MainNotebookPage()
-{
-}
-
-void
-MainNotebookPage::populate_once()
-{
- if (_populated)
- return;
-
- populate();
- _populated = true;
-}
-
diff --git a/src/clients/gtkpaludis/libgtkpaludis/main_notebook_page.hh b/src/clients/gtkpaludis/libgtkpaludis/main_notebook_page.hh
deleted file mode 100644
index 8c66476..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/main_notebook_page.hh
+++ /dev/null
@@ -1,22 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#ifndef GTKPALUDIS_GUARD_LIBGTKPALUDIS_MAIN_NOTEBOOK_PAGE_HH
-#define GTKPALUDIS_GUARD_LIBGTKPALUDIS_MAIN_NOTEBOOK_PAGE_HH 1
-
-namespace gtkpaludis
-{
- class MainNotebookPage
- {
- private:
- bool _populated;
-
- public:
- MainNotebookPage();
- virtual ~MainNotebookPage() = 0;
-
- void populate_once();
- virtual void populate() = 0;
- };
-}
-
-#endif
diff --git a/src/clients/gtkpaludis/libgtkpaludis/main_window.cc b/src/clients/gtkpaludis/libgtkpaludis/main_window.cc
deleted file mode 100644
index 9f01709..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/main_window.cc
+++ /dev/null
@@ -1,82 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#include "main_window.hh"
-#include "main_notebook.hh"
-#include <gtkmm/statusbar.h>
-#include <gtkmm/table.h>
-#include <paludis/util/private_implementation_pattern-impl.hh>
-
-using namespace gtkpaludis;
-using namespace paludis;
-
-namespace paludis
-{
- template<>
- struct Implementation<MainWindow>
- {
- Gtk::Table main_table;
- MainNotebook main_notebook;
- Gtk::Statusbar status_bar;
-
- Implementation(MainWindow * const m) :
- main_table(2, 1),
- main_notebook(m)
- {
- }
- };
-}
-
-MainWindow::MainWindow(Environment * const e) :
- ThreadedWindow(Gtk::WINDOW_TOPLEVEL, e),
- PrivateImplementationPattern<MainWindow>(new Implementation<MainWindow>(this)),
- _imp(PrivateImplementationPattern<MainWindow>::_imp)
-{
- set_title("gtkPaludis");
- set_default_size(800, 600);
- set_border_width(4);
-
- _imp->main_table.attach(_imp->main_notebook, 0, 1, 0, 1, Gtk::EXPAND | Gtk::FILL,
- Gtk::EXPAND | Gtk::FILL, 4, 4);
- _imp->main_table.attach(_imp->status_bar, 0, 1, 1, 2, Gtk::EXPAND | Gtk::FILL,
- Gtk::FILL, 4, 4);
-
- add(_imp->main_table);
- show_all();
-
- _imp->status_bar.set_has_resize_grip(true);
-}
-
-MainWindow::~MainWindow()
-{
-}
-
-void
-MainWindow::push_status_message(const std::string & s)
-{
- _imp->status_bar.push(s);
-}
-
-void
-MainWindow::pop_status_message()
-{
- _imp->status_bar.pop();
-}
-
-void
-MainWindow::do_set_sensitive(const bool v)
-{
- _imp->main_notebook.set_sensitive(v);
-}
-
-MainNotebook *
-MainWindow::main_notebook()
-{
- return &_imp->main_notebook;
-}
-
-void
-MainWindow::set_capture_output_options()
-{
- _imp->main_notebook.set_capture_output_options();
-}
-
diff --git a/src/clients/gtkpaludis/libgtkpaludis/main_window.hh b/src/clients/gtkpaludis/libgtkpaludis/main_window.hh
deleted file mode 100644
index b3e74fd..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/main_window.hh
+++ /dev/null
@@ -1,39 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#ifndef GTKPALUDIS_GUARD_GTKPALUDIS_MAIN_WINDOW_HH
-#define GTKPALUDIS_GUARD_GTKPALUDIS_MAIN_WINDOW_HH 1
-
-#include <libgtkpaludis/threaded_window.hh>
-#include <paludis/util/private_implementation_pattern.hh>
-
-namespace gtkpaludis
-{
- class MainNotebook;
-
- class MainWindow :
- public ThreadedWindow,
- private paludis::PrivateImplementationPattern<MainWindow>
- {
- private:
- paludis::PrivateImplementationPattern<MainWindow>::ImpPtr & _imp;
-
- protected:
- virtual void push_status_message(const std::string &);
- virtual void pop_status_message();
-
- virtual void do_set_sensitive(const bool);
-
- public:
- MainWindow(paludis::Environment * const);
- ~MainWindow();
-
- MainNotebook * main_notebook();
-
- using ThreadedWindow::sensitise;
- using ThreadedWindow::desensitise;
-
- void set_capture_output_options();
- };
-}
-
-#endif
diff --git a/src/clients/gtkpaludis/libgtkpaludis/markup.cc b/src/clients/gtkpaludis/libgtkpaludis/markup.cc
deleted file mode 100644
index 4231591..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/markup.cc
+++ /dev/null
@@ -1,49 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#include "markup.hh"
-
-using namespace gtkpaludis;
-
-std::string
-gtkpaludis::markup_escape(const std::string & s)
-{
- std::string result;
- for (std::string::size_type p(0) ; p < s.length() ; ++p)
- {
- switch (s[p])
- {
- case '<':
- result.append("&lt;");
- break;
- case '>':
- result.append("&gt;");
- break;
- case '&':
- result.append("&amp;");
- break;
- default:
- result.append(1, s[p]);
- break;
- }
- }
- return result;
-}
-
-std::string
-gtkpaludis::markup_bold(const std::string & s)
-{
- return "<span weight=\"bold\">" + s + "</span>";
-}
-
-std::string
-gtkpaludis::markup_italic(const std::string & s)
-{
- return "<span style=\"italic\">" + s + "</span>";
-}
-
-std::string
-gtkpaludis::markup_foreground(const std::string & c, const std::string & s)
-{
- return "<span foreground=\"" + c + "\">" + s + "</span>";
-}
-
diff --git a/src/clients/gtkpaludis/libgtkpaludis/markup.hh b/src/clients/gtkpaludis/libgtkpaludis/markup.hh
deleted file mode 100644
index 9b0bc41..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/markup.hh
+++ /dev/null
@@ -1,17 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#ifndef GTKPALUDIS_GUARD_LIBGTKPALUDIS_MARKUP_HH
-#define GTKPALUDIS_GUARD_LIBGTKPALUDIS_MARKUP_HH 1
-
-#include <string>
-
-namespace gtkpaludis
-{
- std::string markup_escape(const std::string & s);
- std::string markup_foreground(const std::string & c, const std::string & s);
- std::string markup_bold(const std::string & s);
- std::string markup_italic(const std::string & s);
-}
-
-
-#endif
diff --git a/src/clients/gtkpaludis/libgtkpaludis/markup_formatter.cc b/src/clients/gtkpaludis/libgtkpaludis/markup_formatter.cc
deleted file mode 100644
index 2689bea..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/markup_formatter.cc
+++ /dev/null
@@ -1,252 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#include "markup_formatter.hh"
-#include "markup.hh"
-#include <paludis/util/private_implementation_pattern-impl.hh>
-#include <paludis/util/stringify.hh>
-#include <paludis/util/set.hh>
-#include <paludis/name.hh>
-
-using namespace gtkpaludis;
-using namespace paludis;
-
-std::string
-MarkupFormatter::format(const IUseFlag & f, const format::Plain &) const
-{
- return markup_escape(stringify(f));
-}
-
-std::string
-MarkupFormatter::format(const IUseFlag & f, const format::Enabled &) const
-{
- return markup_foreground("green", markup_escape(stringify(f.flag)));
-}
-
-std::string
-MarkupFormatter::format(const IUseFlag & f, const format::Disabled &) const
-{
- return markup_foreground("red", markup_escape("-" + stringify(f.flag)));
-}
-
-std::string
-MarkupFormatter::format(const IUseFlag & f, const format::Forced &) const
-{
- return markup_foreground("green", markup_escape("(" + stringify(f.flag) + ")"));
-}
-
-std::string
-MarkupFormatter::format(const IUseFlag & f, const format::Masked &) const
-{
- return markup_foreground("red", markup_escape("(-" + stringify(f.flag) + ")"));
-}
-
-std::string
-MarkupFormatter::decorate(const IUseFlag &, const std::string & f, const format::Added &) const
-{
- return f + "+";
-}
-
-std::string
-MarkupFormatter::decorate(const IUseFlag &, const std::string & f, const format::Changed &) const
-{
- return f + "*";
-}
-
-std::string
-MarkupFormatter::format(const UseFlagName & f, const format::Plain &) const
-{
- return markup_escape(stringify(f));
-}
-
-std::string
-MarkupFormatter::format(const UseFlagName & f, const format::Enabled &) const
-{
- return markup_foreground("green", markup_escape(stringify(f)));
-}
-
-std::string
-MarkupFormatter::format(const UseFlagName & f, const format::Disabled &) const
-{
- return markup_foreground("red", markup_escape(stringify(f)));
-}
-
-std::string
-MarkupFormatter::format(const UseFlagName & f, const format::Forced &) const
-{
- return markup_foreground("green", markup_escape("(" + stringify(f) + ")"));
-}
-
-std::string
-MarkupFormatter::format(const UseFlagName & f, const format::Masked &) const
-{
- return markup_foreground("red", markup_escape("(" + stringify(f) + ")"));
-}
-
-std::string
-MarkupFormatter::format(const ConditionalDepSpec & f, const format::Plain &) const
-{
- return markup_escape(stringify(f));
-}
-
-std::string
-MarkupFormatter::format(const ConditionalDepSpec & f, const format::Enabled &) const
-{
- return markup_foreground("green", markup_escape(stringify(f)));
-}
-
-std::string
-MarkupFormatter::format(const ConditionalDepSpec & f, const format::Disabled &) const
-{
- return markup_foreground("red", markup_escape(stringify(f)));
-}
-
-std::string
-MarkupFormatter::format(const ConditionalDepSpec & f, const format::Forced &) const
-{
- return markup_foreground("green", markup_escape("(" + stringify(f) + ")"));
-}
-
-std::string
-MarkupFormatter::format(const ConditionalDepSpec & f, const format::Masked &) const
-{
- return markup_foreground("red", markup_escape("(" + stringify(f) + ")"));
-}
-
-std::string
-MarkupFormatter::format(const PackageDepSpec & f, const format::Plain &) const
-{
- return markup_escape(stringify(f));
-}
-
-std::string
-MarkupFormatter::format(const PackageDepSpec & f, const format::Installed &) const
-{
- return markup_foreground("blue", markup_escape(stringify(f)));
-}
-
-std::string
-MarkupFormatter::format(const PackageDepSpec & f, const format::Installable &) const
-{
- return markup_foreground("darkblue", markup_escape(stringify(f)));
-}
-
-std::string
-MarkupFormatter::format(const PlainTextDepSpec & f, const format::Plain &) const
-{
- return markup_escape(stringify(f));
-}
-
-std::string
-MarkupFormatter::format(const LicenseDepSpec & f, const format::Plain &) const
-{
- return markup_escape(stringify(f));
-}
-
-std::string
-MarkupFormatter::format(const LicenseDepSpec & f, const format::Accepted &) const
-{
- return markup_foreground("green", markup_escape(stringify(f)));
-}
-
-std::string
-MarkupFormatter::format(const LicenseDepSpec & f, const format::Unaccepted &) const
-{
- return markup_foreground("red", markup_escape(stringify(f)));
-}
-
-std::string
-MarkupFormatter::format(const KeywordName & f, const format::Plain &) const
-{
- return markup_escape(stringify(f));
-}
-
-std::string
-MarkupFormatter::format(const KeywordName & f, const format::Accepted &) const
-{
- return markup_foreground("green", markup_escape(stringify(f)));
-}
-
-std::string
-MarkupFormatter::format(const KeywordName & f, const format::Unaccepted &) const
-{
- return markup_foreground("red", markup_escape(stringify(f)));
-}
-
-std::string
-MarkupFormatter::format(const std::string & f, const format::Plain &) const
-{
- return markup_escape(stringify(f));
-}
-
-std::string
-MarkupFormatter::format(const URILabelsDepSpec & f, const format::Plain &) const
-{
- return markup_escape(stringify(f));
-}
-
-std::string
-MarkupFormatter::format(const DependencyLabelsDepSpec & f, const format::Plain &) const
-{
- return markup_escape(stringify(f));
-}
-
-std::string
-MarkupFormatter::format(const NamedSetDepSpec & f, const format::Plain &) const
-{
- return markup_escape(stringify(f));
-}
-
-std::string
-MarkupFormatter::format(const FetchableURIDepSpec & f, const format::Plain &) const
-{
- return markup_escape(stringify(f));
-}
-
-std::string
-MarkupFormatter::format(const SimpleURIDepSpec & f, const format::Plain &) const
-{
- return markup_escape(stringify(f));
-}
-
-std::string
-MarkupFormatter::format(const BlockDepSpec & f, const format::Plain &) const
-{
- return markup_escape(stringify(f));
-}
-
-std::string
-MarkupFormatter::format(const FSEntry & f, const format::Plain &) const
-{
- return markup_escape(stringify(f));
-}
-
-std::string
-MarkupFormatter::format(const PackageID & f, const format::Plain &) const
-{
- return markup_escape(stringify(f));
-}
-
-std::string
-MarkupFormatter::format(const PackageID & f, const format::Installed &) const
-{
- return markup_foreground("blue", markup_escape(stringify(f)));
-}
-
-std::string
-MarkupFormatter::format(const PackageID & f, const format::Installable &) const
-{
- return markup_foreground("darkblue", markup_escape(stringify(f)));
-}
-
-std::string
-MarkupFormatter::newline() const
-{
- return "\n";
-}
-
-std::string
-MarkupFormatter::indent(const int i) const
-{
- return std::string(4 * i, ' ');
-}
-
diff --git a/src/clients/gtkpaludis/libgtkpaludis/markup_formatter.hh b/src/clients/gtkpaludis/libgtkpaludis/markup_formatter.hh
deleted file mode 100644
index 60ce649..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/markup_formatter.hh
+++ /dev/null
@@ -1,92 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#ifndef GTKPALUDIS_GUARD_LIBGTKPALUDIS_MARKUP_FORMATTER_HH
-#define GTKPALUDIS_GUARD_LIBGTKPALUDIS_MARKUP_FORMATTER_HH 1
-
-#include <paludis/formatter.hh>
-#include <paludis/name-fwd.hh>
-#include <paludis/dep_spec-fwd.hh>
-#include <paludis/util/fs_entry-fwd.hh>
-
-namespace gtkpaludis
-{
- class MarkupFormatter :
- public paludis::CanFormat<paludis::UseFlagName>,
- public paludis::CanFormat<paludis::IUseFlag>,
- public paludis::CanFormat<paludis::KeywordName>,
- public paludis::CanFormat<paludis::ConditionalDepSpec>,
- public paludis::CanFormat<paludis::PackageDepSpec>,
- public paludis::CanFormat<paludis::BlockDepSpec>,
- public paludis::CanFormat<paludis::DependencyLabelsDepSpec>,
- public paludis::CanFormat<paludis::URILabelsDepSpec>,
- public paludis::CanFormat<paludis::PlainTextDepSpec>,
- public paludis::CanFormat<paludis::SimpleURIDepSpec>,
- public paludis::CanFormat<paludis::FetchableURIDepSpec>,
- public paludis::CanFormat<paludis::LicenseDepSpec>,
- public paludis::CanFormat<paludis::NamedSetDepSpec>,
- public paludis::CanFormat<paludis::PackageID>,
- public paludis::CanFormat<paludis::FSEntry>,
- public paludis::CanFormat<std::string>,
- public paludis::CanSpace
- {
- public:
- std::string format(const paludis::IUseFlag &, const paludis::format::Plain &) const;
- std::string format(const paludis::IUseFlag &, const paludis::format::Enabled &) const;
- std::string format(const paludis::IUseFlag &, const paludis::format::Disabled &) const;
- std::string format(const paludis::IUseFlag &, const paludis::format::Forced &) const;
- std::string format(const paludis::IUseFlag &, const paludis::format::Masked &) const;
- std::string decorate(const paludis::IUseFlag &, const std::string &, const paludis::format::Added &) const;
- std::string decorate(const paludis::IUseFlag &, const std::string &, const paludis::format::Changed &) const;
-
- std::string format(const paludis::UseFlagName &, const paludis::format::Plain &) const;
- std::string format(const paludis::UseFlagName &, const paludis::format::Enabled &) const;
- std::string format(const paludis::UseFlagName &, const paludis::format::Disabled &) const;
- std::string format(const paludis::UseFlagName &, const paludis::format::Forced &) const;
- std::string format(const paludis::UseFlagName &, const paludis::format::Masked &) const;
-
- std::string format(const paludis::ConditionalDepSpec &, const paludis::format::Plain &) const;
- std::string format(const paludis::ConditionalDepSpec &, const paludis::format::Enabled &) const;
- std::string format(const paludis::ConditionalDepSpec &, const paludis::format::Disabled &) const;
- std::string format(const paludis::ConditionalDepSpec &, const paludis::format::Forced &) const;
- std::string format(const paludis::ConditionalDepSpec &, const paludis::format::Masked &) const;
-
- std::string format(const paludis::PackageDepSpec &, const paludis::format::Plain &) const;
- std::string format(const paludis::PackageDepSpec &, const paludis::format::Installed &) const;
- std::string format(const paludis::PackageDepSpec &, const paludis::format::Installable &) const;
-
- std::string format(const paludis::PlainTextDepSpec &, const paludis::format::Plain &) const;
-
- std::string format(const paludis::LicenseDepSpec &, const paludis::format::Plain &) const;
- std::string format(const paludis::LicenseDepSpec &, const paludis::format::Accepted &) const;
- std::string format(const paludis::LicenseDepSpec &, const paludis::format::Unaccepted &) const;
-
- std::string format(const paludis::KeywordName &, const paludis::format::Plain &) const;
- std::string format(const paludis::KeywordName &, const paludis::format::Accepted &) const;
- std::string format(const paludis::KeywordName &, const paludis::format::Unaccepted &) const;
-
- std::string format(const std::string &, const paludis::format::Plain &) const;
-
- std::string format(const paludis::URILabelsDepSpec &, const paludis::format::Plain &) const;
-
- std::string format(const paludis::DependencyLabelsDepSpec &, const paludis::format::Plain &) const;
-
- std::string format(const paludis::NamedSetDepSpec &, const paludis::format::Plain &) const;
-
- std::string format(const paludis::SimpleURIDepSpec &, const paludis::format::Plain &) const;
-
- std::string format(const paludis::FetchableURIDepSpec &, const paludis::format::Plain &) const;
-
- std::string format(const paludis::BlockDepSpec &, const paludis::format::Plain &) const;
-
- std::string format(const paludis::PackageID &, const paludis::format::Plain &) const;
- std::string format(const paludis::PackageID &, const paludis::format::Installed &) const;
- std::string format(const paludis::PackageID &, const paludis::format::Installable &) const;
-
- std::string format(const paludis::FSEntry &, const paludis::format::Plain &) const;
-
- std::string newline() const;
- std::string indent(const int) const;
- };
-}
-
-#endif
diff --git a/src/clients/gtkpaludis/libgtkpaludis/messages_page.cc b/src/clients/gtkpaludis/libgtkpaludis/messages_page.cc
deleted file mode 100644
index f5cd5a5..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/messages_page.cc
+++ /dev/null
@@ -1,93 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#include "messages_page.hh"
-#include "main_notebook.hh"
-
-#include <paludis/util/fd_output_stream.hh>
-#include <paludis/util/system.hh>
-#include <paludis/util/private_implementation_pattern-impl.hh>
-#include <paludis/util/log.hh>
-#include <vtemm/terminal_widget.hh>
-#include <iostream>
-#include <cstdlib>
-#include <fcntl.h>
-
-using namespace gtkpaludis;
-using namespace paludis;
-
-namespace paludis
-{
- template<>
- struct Implementation<MessagesPage>
- {
- MainWindow * const main_window;
- MainNotebook * const main_notebook;
- Vte::Terminal terminal;
-
- int master_fd, slave_fd;
-
- std::tr1::shared_ptr<FDOutputStream> messages_stream;
-
- sigc::connection terminal_cursor_moved_connection;
-
- Implementation(MainWindow * const m, MessagesPage * const, MainNotebook * const n) :
- main_window(m),
- main_notebook(n),
- master_fd(posix_openpt(O_RDWR | O_NOCTTY))
- {
- grantpt(master_fd);
- unlockpt(master_fd);
- slave_fd = open(ptsname(master_fd), O_RDWR);
-
- messages_stream.reset(new FDOutputStream(slave_fd));
- }
-
- ~Implementation()
- {
- close(master_fd);
- close(slave_fd);
- }
- };
-}
-
-MessagesPage::MessagesPage(MainWindow * const m, MainNotebook * const n) :
- Gtk::Table(1, 1),
- MainNotebookPage(),
- PrivateImplementationPattern<MessagesPage>(new Implementation<MessagesPage>(m, this, n))
-{
- _imp->terminal.set_pty(dup(_imp->master_fd));
- set_capture_output_options();
-
- _imp->terminal.set_scroll_on_output(true);
-
- attach(_imp->terminal, 0, 1, 0, 1, Gtk::EXPAND | Gtk::FILL, Gtk::EXPAND | Gtk::FILL, 4, 4);
-
- _imp->terminal_cursor_moved_connection = _imp->terminal.signal_cursor_moved().connect(
- sigc::mem_fun(this, &MessagesPage::handle_terminal_cursor_moved));
-}
-
-MessagesPage::~MessagesPage()
-{
- _imp->terminal_cursor_moved_connection.disconnect();
- Log::get_instance()->set_log_stream(&std::cerr);
-}
-
-void
-MessagesPage::populate()
-{
-}
-
-void
-MessagesPage::handle_terminal_cursor_moved()
-{
- _imp->main_notebook->mark_messages_page();
-}
-
-void
-MessagesPage::set_capture_output_options()
-{
- set_run_command_stdout_fds(_imp->slave_fd, _imp->master_fd);
- set_run_command_stderr_fds(_imp->slave_fd, _imp->master_fd);
- Log::get_instance()->set_log_stream(_imp->messages_stream.get());
-}
-
diff --git a/src/clients/gtkpaludis/libgtkpaludis/messages_page.hh b/src/clients/gtkpaludis/libgtkpaludis/messages_page.hh
deleted file mode 100644
index 81a2116..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/messages_page.hh
+++ /dev/null
@@ -1,33 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#ifndef GTKPALUDIS_GUARD_LIBGTKPALUDIS_MESSAGES_PAGE_HH
-#define GTKPALUDIS_GUARD_LIBGTKPALUDIS_MESSAGES_PAGE_HH 1
-
-#include <paludis/util/private_implementation_pattern.hh>
-#include <libgtkpaludis/main_notebook_page.hh>
-#include <gtkmm/table.h>
-
-namespace gtkpaludis
-{
- class MainWindow;
- class MainNotebook;
-
- class MessagesPage :
- public Gtk::Table,
- public MainNotebookPage,
- private paludis::PrivateImplementationPattern<MessagesPage>
- {
- protected:
- void handle_terminal_cursor_moved();
-
- public:
- MessagesPage(MainWindow * const m, MainNotebook * const n);
- ~MessagesPage();
-
- void populate();
- void set_capture_output_options();
- };
-}
-
-
-#endif
diff --git a/src/clients/gtkpaludis/libgtkpaludis/package_buttons.cc b/src/clients/gtkpaludis/libgtkpaludis/package_buttons.cc
deleted file mode 100644
index c9c11f9..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/package_buttons.cc
+++ /dev/null
@@ -1,91 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#include "package_buttons.hh"
-#include "main_window.hh"
-#include "query_window.hh"
-#include "packages_page.hh"
-#include <gtkmm/button.h>
-#include <paludis/environment.hh>
-#include <paludis/package_database.hh>
-#include <paludis/repository.hh>
-#include <paludis/util/private_implementation_pattern-impl.hh>
-
-using namespace gtkpaludis;
-using namespace paludis;
-
-namespace paludis
-{
- template<>
- struct Implementation<PackageButtons>
- {
- MainWindow * const main_window;
- PackagesPage * const packages_page;
-
- Gtk::Button install_button;
- Gtk::Button uninstall_button;
- Gtk::Button query_button;
-
- Implementation(MainWindow * const m, PackagesPage * const p) :
- main_window(m),
- packages_page(p),
- install_button("Install..."),
- uninstall_button("Uninstall..."),
- query_button("Query...")
- {
- }
- };
-}
-
-PackageButtons::PackageButtons(MainWindow * const m, PackagesPage * const p) :
- Gtk::HButtonBox(),
- PrivateImplementationPattern<PackageButtons>(new Implementation<PackageButtons>(m, p))
-{
- set_layout(Gtk::BUTTONBOX_END);
- set_spacing(10);
-
- _imp->install_button.set_sensitive(false);
- add(_imp->install_button);
-
- _imp->uninstall_button.set_sensitive(false);
- add(_imp->uninstall_button);
-
- _imp->query_button.set_sensitive(false);
- _imp->query_button.signal_clicked().connect(sigc::mem_fun(this, &PackageButtons::handle_query_button_clicked));
- add(_imp->query_button);
-}
-
-PackageButtons::~PackageButtons()
-{
-}
-
-void
-PackageButtons::populate()
-{
- _imp->main_window->paludis_thread_action(
- sigc::bind(sigc::mem_fun(this, &PackageButtons::populate_in_paludis_thread),
- _imp->packages_page->get_qpn()), "Updating package buttons");
-}
-
-void
-PackageButtons::populate_in_paludis_thread(const std::tr1::shared_ptr<const QualifiedPackageName> & q)
-{
- _imp->main_window->gui_thread_action(
- sigc::bind(sigc::mem_fun(this, &PackageButtons::populate_in_gui_thread),
- q, false, false));
-}
-
-void
-PackageButtons::populate_in_gui_thread(const bool u, const bool v, const bool w)
-{
- _imp->query_button.set_sensitive(u);
- _imp->install_button.set_sensitive(v);
- _imp->uninstall_button.set_sensitive(w);
-}
-
-void
-PackageButtons::handle_query_button_clicked()
-{
- QueryWindow * q(new QueryWindow(_imp->main_window, *_imp->packages_page->get_qpn()));
- q->show_all();
-}
-
diff --git a/src/clients/gtkpaludis/libgtkpaludis/package_buttons.hh b/src/clients/gtkpaludis/libgtkpaludis/package_buttons.hh
deleted file mode 100644
index 9e142e3..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/package_buttons.hh
+++ /dev/null
@@ -1,35 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#ifndef GTKPALUDIS_GUARD_LIBGTKPALUDIS_PACKAGE_BUTTONS_HH
-#define GTKPALUDIS_GUARD_LIBGTKPALUDIS_PACKAGE_BUTTONS_HH 1
-
-#include <gtkmm/buttonbox.h>
-#include <paludis/util/private_implementation_pattern.hh>
-#include <paludis/name.hh>
-#include <tr1/memory>
-
-namespace gtkpaludis
-{
- class MainWindow;
- class PackagesPage;
-
- class PackageButtons :
- public Gtk::HButtonBox,
- private paludis::PrivateImplementationPattern<PackageButtons>
- {
- private:
- void populate_in_paludis_thread(const std::tr1::shared_ptr<const paludis::QualifiedPackageName> &);
- void populate_in_gui_thread(const bool, const bool, const bool);
-
- protected:
- void handle_query_button_clicked();
-
- public:
- PackageButtons(MainWindow * const m, PackagesPage * const p);
- ~PackageButtons();
-
- void populate();
- };
-}
-
-#endif
diff --git a/src/clients/gtkpaludis/libgtkpaludis/packages_filter.cc b/src/clients/gtkpaludis/libgtkpaludis/packages_filter.cc
deleted file mode 100644
index 6b1062d..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/packages_filter.cc
+++ /dev/null
@@ -1,67 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#include "packages_filter.hh"
-#include "packages_repository_filter.hh"
-#include "packages_package_filter.hh"
-#include "packages_text_filter.hh"
-#include <paludis/util/private_implementation_pattern-impl.hh>
-#include <gtkmm/label.h>
-#include <gtkmm/table.h>
-#include <gtkmm/expander.h>
-#include <gtkmm/box.h>
-#include <gtkmm/checkbutton.h>
-
-using namespace gtkpaludis;
-using namespace paludis;
-
-namespace paludis
-{
- template<>
- struct Implementation<PackagesFilter>
- {
- MainWindow * const main_window;
- PackagesPage * const packages_page;
- PackagesRepositoryFilter packages_repository_filter;
- PackagesPackageFilter packages_package_filter;
- PackagesTextFilter packages_text_filter;
-
- Gtk::Expander standard_expander;
- Gtk::Table standard_table;
-
- Implementation(MainWindow * const m, PackagesPage * const p) :
- main_window(m),
- packages_page(p),
- packages_repository_filter(m, p),
- packages_package_filter(m, p),
- packages_text_filter(m, p),
- standard_expander("Filters:"),
- standard_table(3, 1)
- {
- }
- };
-}
-
-PackagesFilter::PackagesFilter(MainWindow * const m, PackagesPage * const p) :
- Gtk::VBox(),
- PrivateImplementationPattern<PackagesFilter>(new Implementation<PackagesFilter>(m, p))
-{
- add(_imp->standard_expander);
- _imp->standard_expander.add(_imp->standard_table);
- _imp->standard_expander.set_expanded(true);
- _imp->standard_table.attach(_imp->packages_repository_filter, 0, 1, 0, 1, Gtk::FILL, Gtk::FILL, 4, 4);
- _imp->standard_table.attach(_imp->packages_package_filter, 1, 2, 0, 1, Gtk::FILL, Gtk::FILL, 4, 4);
- _imp->standard_table.attach(_imp->packages_text_filter, 2, 3, 0, 1, Gtk::EXPAND | Gtk::FILL, Gtk::FILL, 0, 0);
-}
-
-PackagesFilter::~PackagesFilter()
-{
-}
-
-void
-PackagesFilter::populate()
-{
- _imp->packages_repository_filter.populate();
- _imp->packages_package_filter.populate();
- _imp->packages_text_filter.populate();
-}
-
diff --git a/src/clients/gtkpaludis/libgtkpaludis/packages_filter.hh b/src/clients/gtkpaludis/libgtkpaludis/packages_filter.hh
deleted file mode 100644
index 9fb6d0f..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/packages_filter.hh
+++ /dev/null
@@ -1,26 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#ifndef GTKPALUDIS_GUARD_LIBGTKPALUDIS_PACKAGES_FILTER_HH
-#define GTKPALUDIS_GUARD_LIBGTKPALUDIS_PACKAGES_FILTER_HH 1
-
-#include <gtkmm/box.h>
-#include <paludis/util/private_implementation_pattern.hh>
-
-namespace gtkpaludis
-{
- class MainWindow;
- class PackagesPage;
-
- class PackagesFilter :
- public Gtk::VBox,
- private paludis::PrivateImplementationPattern<PackagesFilter>
- {
- public:
- PackagesFilter(MainWindow * const, PackagesPage * const);
- ~PackagesFilter();
-
- void populate();
- };
-}
-
-#endif
diff --git a/src/clients/gtkpaludis/libgtkpaludis/packages_list.cc b/src/clients/gtkpaludis/libgtkpaludis/packages_list.cc
deleted file mode 100644
index 61fc95c..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/packages_list.cc
+++ /dev/null
@@ -1,97 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#include "packages_list.hh"
-#include "packages_list_model.hh"
-#include "packages_list_filtered_model.hh"
-#include "packages_page.hh"
-#include "main_window.hh"
-#include <paludis/util/private_implementation_pattern-impl.hh>
-
-using namespace gtkpaludis;
-using namespace paludis;
-
-namespace paludis
-{
- template<>
- struct Implementation<PackagesList>
- {
- Glib::RefPtr<PackagesListModel> real_model;
- Glib::RefPtr<PackagesListFilteredModel> filtered_model;
- MainWindow * const main_window;
- PackagesPage * const repositories_page;
-
- Implementation(MainWindow * const m, PackagesPage * const p) :
- real_model(new PackagesListModel(m, p)),
- filtered_model(new PackagesListFilteredModel(m, p, real_model)),
- main_window(m),
- repositories_page(p)
- {
- }
- };
-}
-
-PackagesList::PackagesList(MainWindow * const m, PackagesPage * const p) :
- Gtk::TreeView(),
- PrivateImplementationPattern<PackagesList>(new Implementation<PackagesList>(m, p))
-{
- set_model(_imp->filtered_model);
-
- append_column("Package", _imp->real_model->columns().col_package);
-
- Gtk::CellRendererText renderer;
- int c(append_column("Status", renderer) - 1);
- get_column(c)->add_attribute(renderer, "markup", _imp->real_model->columns().col_status_markup.index());
-
- append_column("Description", _imp->real_model->columns().col_description);
-
- signal_cursor_changed().connect(sigc::mem_fun(this, &PackagesList::handle_signal_cursor_changed));
-}
-
-PackagesList::~PackagesList()
-{
-}
-
-void
-PackagesList::handle_signal_cursor_changed()
-{
- if (get_selection()->get_selected())
- {
- std::tr1::shared_ptr<const QualifiedPackageName> qpn((*get_selection()->get_selected())[_imp->real_model->columns().col_qpn]);
- _imp->repositories_page->set_qpn(qpn);
- }
- else
- _imp->repositories_page->set_qpn(std::tr1::shared_ptr<QualifiedPackageName>());
-}
-
-void
-PackagesList::populate_real()
-{
- _imp->real_model->populate();
- _imp->main_window->paludis_thread_action(
- sigc::mem_fun(this, &PackagesList::populate_in_paludis_thread), "Populating packages list");
-}
-
-void
-PackagesList::populate_filter()
-{
- _imp->filtered_model->populate();
-}
-
-void
-PackagesList::populate_in_paludis_thread()
-{
- _imp->main_window->gui_thread_action(
- sigc::mem_fun(this, &PackagesList::populate_in_gui_thread));
-}
-
-void
-PackagesList::populate_in_gui_thread()
-{
- expand_all();
- columns_autosize();
-
- if (! get_selection()->get_selected())
- if (! _imp->filtered_model->children().empty())
- set_cursor(_imp->filtered_model->get_path(_imp->filtered_model->children().begin()));
-}
-
diff --git a/src/clients/gtkpaludis/libgtkpaludis/packages_list.hh b/src/clients/gtkpaludis/libgtkpaludis/packages_list.hh
deleted file mode 100644
index e991f66..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/packages_list.hh
+++ /dev/null
@@ -1,33 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#ifndef GTKPALUDIS_GUARD_LIBGTKPALUDIS_PACKAGES_LIST_HH
-#define GTKPALUDIS_GUARD_LIBGTKPALUDIS_PACKAGES_LIST_HH 1
-
-#include <paludis/util/private_implementation_pattern.hh>
-#include <gtkmm/treeview.h>
-
-namespace gtkpaludis
-{
- class MainWindow;
- class PackagesPage;
-
- class PackagesList :
- public Gtk::TreeView,
- private paludis::PrivateImplementationPattern<PackagesList>
- {
- protected:
- void handle_signal_cursor_changed();
- void populate_in_paludis_thread();
- void populate_in_gui_thread();
-
- public:
- PackagesList(MainWindow * const m, PackagesPage * const p);
- ~PackagesList();
-
- void populate_real();
- void populate_filter();
- };
-}
-
-
-#endif
diff --git a/src/clients/gtkpaludis/libgtkpaludis/packages_list_filtered_model.cc b/src/clients/gtkpaludis/libgtkpaludis/packages_list_filtered_model.cc
deleted file mode 100644
index 32bb7cd..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/packages_list_filtered_model.cc
+++ /dev/null
@@ -1,91 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#include "packages_list_filtered_model.hh"
-#include "packages_list_model.hh"
-#include "packages_page.hh"
-#include <algorithm>
-#include <iterator>
-#include <ctype.h>
-#include <paludis/util/private_implementation_pattern-impl.hh>
-
-using namespace gtkpaludis;
-using namespace paludis;
-
-namespace paludis
-{
- template<>
- struct Implementation<PackagesListFilteredModel>
- {
- MainWindow * const main_window;
- PackagesPage * const packages_page;
- Glib::RefPtr<PackagesListModel> real_model;
-
- Implementation(MainWindow * const m, PackagesPage * const p,
- Glib::RefPtr<PackagesListModel> r) :
- main_window(m),
- packages_page(p),
- real_model(r)
- {
- }
- };
-}
-
-PackagesListFilteredModel::PackagesListFilteredModel(MainWindow * const m,
- PackagesPage * const p, Glib::RefPtr<PackagesListModel> d) :
- PrivateImplementationPattern<PackagesListFilteredModel>(new Implementation<PackagesListFilteredModel>(m, p, d)),
- Gtk::TreeModelFilter(d)
-{
- set_visible_func(sigc::mem_fun(this, &PackagesListFilteredModel::handle_visible_func));
-}
-
-PackagesListFilteredModel::~PackagesListFilteredModel()
-{
-}
-
-void
-PackagesListFilteredModel::populate()
-{
- refilter();
-}
-
-bool
-PackagesListFilteredModel::handle_visible_func(const TreeModel::const_iterator & i) const
-{
- bool result(true);
-
- if (result)
- {
- PackagesPackageFilterOption pfo(_imp->packages_page->get_package_filter());
- result &= ((*i)[_imp->real_model->columns().col_best_package_filter_option] >= pfo);
- }
-
- if (result)
- {
- std::string tft(_imp->packages_page->get_text_filter_text());
- if (! tft.empty())
- {
- std::string text;
- switch (_imp->packages_page->get_text_filter())
- {
- case ptfso_name:
- text = Glib::ustring((*i)[_imp->real_model->columns().col_package]).raw();
- break;
-
- case ptfso_description:
- text = Glib::ustring((*i)[_imp->real_model->columns().col_description]).raw();
- break;
- }
-
- if (! text.empty())
- {
- std::string text_lower, tft_lower;
- std::transform(text.begin(), text.end(), std::back_inserter(text_lower), &::tolower);
- std::transform(tft.begin(), tft.end(), std::back_inserter(tft_lower), &::tolower);
- result &= (std::string::npos != text_lower.find(tft_lower));
- }
- }
- }
-
- return result;
-}
-
diff --git a/src/clients/gtkpaludis/libgtkpaludis/packages_list_filtered_model.hh b/src/clients/gtkpaludis/libgtkpaludis/packages_list_filtered_model.hh
deleted file mode 100644
index 5f567fe..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/packages_list_filtered_model.hh
+++ /dev/null
@@ -1,40 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#ifndef GTKPALUDIS_GUARD_LIBGTKPALUDIS_PACKAGES_LIST_FILTERED_MODEL_HH
-#define GTKPALUDIS_GUARD_LIBGTKPALUDIS_PACKAGES_LIST_FILTERED_MODEL_HH 1
-
-#include <gtkmm/treemodelfilter.h>
-#include <paludis/util/private_implementation_pattern.hh>
-#include <paludis/name.hh>
-#include <tr1/memory>
-
-namespace gtkpaludis
-{
- class MainWindow;
- class PackagesPage;
-
- class PackagesListModel;
-
- class PackagesListFilteredModel :
- private paludis::PrivateImplementationPattern<PackagesListFilteredModel>,
- public Gtk::TreeModelFilter
- {
- private:
- bool handle_visible_func(const TreeModel::const_iterator &) const;
-
- protected:
- class PopulateData;
-
- void populate_in_paludis_thread();
- void populate_in_gui_thread(const std::tr1::shared_ptr<const PopulateData> & names);
-
- public:
- PackagesListFilteredModel(MainWindow * const m, PackagesPage * const p,
- Glib::RefPtr<PackagesListModel>);
- ~PackagesListFilteredModel();
-
- void populate();
- };
-}
-
-#endif
diff --git a/src/clients/gtkpaludis/libgtkpaludis/packages_list_model.cc b/src/clients/gtkpaludis/libgtkpaludis/packages_list_model.cc
deleted file mode 100644
index 0ee7765..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/packages_list_model.cc
+++ /dev/null
@@ -1,353 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#include "main_window.hh"
-#include "markup.hh"
-#include "packages_list_model.hh"
-#include "packages_page.hh"
-#include <paludis/dep_spec_flattener.hh>
-#include <paludis/environment.hh>
-#include <paludis/package_database.hh>
-#include <paludis/metadata_key.hh>
-#include <paludis/package_id.hh>
-#include <paludis/user_dep_spec.hh>
-#include <paludis/util/make_shared_ptr.hh>
-#include <paludis/util/private_implementation_pattern-impl.hh>
-#include <paludis/util/visitor-impl.hh>
-#include <paludis/util/iterator_funcs.hh>
-#include <paludis/util/wrapped_forward_iterator-impl.hh>
-#include <paludis/util/options.hh>
-#include <paludis/generator.hh>
-#include <paludis/filter.hh>
-#include <paludis/filtered_generator.hh>
-#include <paludis/selection.hh>
-#include <tr1/functional>
-#include <list>
-#include <algorithm>
-#include <set>
-
-using namespace paludis;
-using namespace gtkpaludis;
-
-namespace paludis
-{
- template<>
- struct Implementation<PackagesListModel>
- {
- MainWindow * const main_window;
- PackagesPage * const packages_page;
- PackagesListModel::Columns columns;
-
- Implementation(MainWindow * const m, PackagesPage * const p) :
- main_window(m),
- packages_page(p)
- {
- }
- };
-}
-
-namespace
-{
- struct PopulateItem
- {
- std::string title;
- std::string status_markup;
- std::string description;
- std::tr1::shared_ptr<const QualifiedPackageName> qpn;
- PackagesPackageFilterOption local_best_option;
- std::list<PopulateItem> children;
- bool merge_if_one_child;
-
- const PackagesPackageFilterOption children_best_option() const
- {
- PackagesPackageFilterOption result(local_best_option);
- for (std::list<PopulateItem>::const_iterator i(children.begin()), i_end(children.end()) ;
- i != i_end ; ++i)
- result = std::max(result, i->children_best_option());
-
- return result;
- }
-
- PopulateItem(const std::string & t) :
- title(t),
- local_best_option(ppfo_all_packages),
- merge_if_one_child(true)
- {
- }
- };
-}
-
-namespace gtkpaludis
-{
- struct PackagesListModel::PopulateData
- {
- std::list<PopulateItem> items;
- };
-
- struct PackagesListModel::PopulateDataIterator :
- WrappedForwardIterator<PackagesListModel::PopulateDataIterator, const PopulateItem>
- {
- PopulateDataIterator(const std::list<PopulateItem>::const_iterator & i) :
- WrappedForwardIterator<PackagesListModel::PopulateDataIterator, const PopulateItem>(i)
- {
- }
- };
-}
-
-
-PackagesListModel::PackagesListModel(MainWindow * const m, PackagesPage * const p) :
- PrivateImplementationPattern<PackagesListModel>(new Implementation<PackagesListModel>(m, p)),
- Gtk::TreeStore(_imp->columns)
-{
-}
-
-PackagesListModel::~PackagesListModel()
-{
-}
-
-PackagesListModel::Columns::Columns()
-{
- add(col_package);
- add(col_status_markup);
- add(col_description);
- add(col_qpn);
- add(col_best_package_filter_option);
-}
-
-PackagesListModel::Columns::~Columns()
-{
-}
-
-PackagesListModel::Columns &
-PackagesListModel::columns()
-{
- return _imp->columns;
-}
-
-void
-PackagesListModel::populate()
-{
- _imp->main_window->paludis_thread_action(
- sigc::mem_fun(this, &PackagesListModel::populate_in_paludis_thread), "Populating packages list model");
-}
-
-namespace
-{
- PopulateItem make_item(const PackageDepSpec & pds,
- const std::tr1::shared_ptr<const PackageID> & id,
- const Environment * const environment)
- {
- PackagesPackageFilterOption best_option(ppfo_all_packages);
- std::string status;
- std::tr1::shared_ptr<const PackageIDSequence> ci(
- (*environment)[selection::AllVersionsSorted(
- (
- generator::Matches(pds) &
- generator::Matches(make_package_dep_spec()
- .package(id->name())
- .slot_requirement(make_shared_ptr(new UserSlotExactRequirement(id->slot()))))
- ) |
- filter::InstalledAtRoot(environment->root()))]);
-
- std::tr1::shared_ptr<const PackageIDSequence> av(
- (*environment)[selection::AllVersionsSorted(
- (
- generator::Matches(pds) &
- generator::Matches(make_package_dep_spec()
- .package(id->name())
- .slot_requirement(make_shared_ptr(new UserSlotExactRequirement(id->slot()))))
- ) |
- filter::SupportsAction<InstallAction>() |
- filter::NotMasked())]);
-
- if (! ci->empty())
- {
- status = markup_escape(((*ci->last())->canonical_form(idcf_version)));
- best_option = ppfo_installed_packages;
-
- if (! av->empty())
- {
- if ((*av->last())->version() < (*ci->last())->version())
- {
- status.append(markup_bold(markup_escape(" > " + (*av->last())->canonical_form(idcf_version))));
- best_option = ppfo_upgradable_packages;
- }
- else if ((*av->last())->version() > (*ci->last())->version())
- {
- status.append(markup_bold(markup_escape(" < " + (*av->last())->canonical_form(idcf_version))));
- best_option = ppfo_upgradable_packages;
- }
- }
- }
- else
- {
- std::tr1::shared_ptr<const PackageIDSequence> av(
- (*environment)[selection::AllVersionsSorted(
- (
- generator::Matches(pds) &
- generator::Matches(make_package_dep_spec()
- .package(id->name())
- .slot_requirement(make_shared_ptr(new UserSlotExactRequirement(id->slot()))))
- ) |
- filter::SupportsAction<InstallAction>() |
- filter::NotMasked())]);
- if (av->empty())
- {
- status.append(markup_foreground("grey", markup_escape("masked")));
- best_option = ppfo_all_packages;
- }
- else
- {
- status.append(markup_foreground("grey", markup_escape((*av->last())->canonical_form(idcf_version))));
- best_option = ppfo_visible_packages;
- }
- }
-
- PopulateItem result(stringify(id->slot()));
- result.status_markup = status;
- if (id->short_description_key())
- result.description = id->short_description_key()->value();
- else
- result.description = "(no description)";
- result.qpn = make_shared_ptr(new QualifiedPackageName(id->name()));
- result.local_best_option = best_option;
- return result;
- }
-}
-
-void
-PackagesListModel::populate_in_paludis_thread()
-{
- std::tr1::shared_ptr<PopulateData> data(new PopulateData);
-
- if (_imp->packages_page->get_category())
- {
- std::tr1::shared_ptr<const PackageIDSequence> c(
- (*_imp->main_window->environment())[selection::BestVersionInEachSlot(
- generator::Category(*_imp->packages_page->get_category()) &
- *_imp->packages_page->get_repository_filter())]);
-
- QualifiedPackageName old_qpn("OLD/OLD");
-
- for (PackageIDSequence::ReverseConstIterator p(c->rbegin()), p_end(c->rend()) ;
- p != p_end ; ++p)
- {
- if (old_qpn != (*p)->name())
- {
- data->items.push_front(PopulateItem(stringify((*p)->name().package)));
- data->items.begin()->children.push_front(make_item(make_package_dep_spec().package((*p)->name()),
- *p, _imp->main_window->environment()));
- data->items.begin()->qpn = data->items.begin()->children.begin()->qpn;
- old_qpn = (*p)->name();
- }
- else
- data->items.begin()->children.push_front(make_item(
- PackageDepSpec(make_package_dep_spec().package((*p)->name())),
- *p, _imp->main_window->environment()));
- }
- }
- else if (_imp->packages_page->get_set())
- {
- DepSpecFlattener<SetSpecTree, PackageDepSpec> f(_imp->main_window->environment());
- _imp->main_window->environment()->set(*_imp->packages_page->get_set())->accept(f);
- std::set<std::string> a;
- std::transform(indirect_iterator(f.begin()), indirect_iterator(f.end()), std::inserter(a, a.begin()),
- std::tr1::mem_fn(&StringDepSpec::text));
-
- for (std::set<std::string>::const_iterator i(a.begin()), i_end(a.end()) ;
- i != i_end ; ++i)
- {
- std::list<PopulateItem>::iterator atom_iter(data->items.insert(data->items.end(), PopulateItem(*i)));
- atom_iter->merge_if_one_child = false;
- PackageDepSpec ds(parse_user_package_dep_spec(*i, _imp->main_window->environment(),
- UserPackageDepSpecOptions() + updso_allow_wildcards + updso_no_disambiguation));
- if (ds.package_ptr())
- {
- std::tr1::shared_ptr<const PackageIDSequence> c(
- (*_imp->main_window->environment())[selection::BestVersionInEachSlot(
- *_imp->packages_page->get_repository_filter() &
- generator::Matches(ds))]);
-
- for (PackageIDSequence::ReverseConstIterator p(c->rbegin()), p_end(c->rend()) ;
- p != p_end ; ++p)
- {
- atom_iter->children.push_back(make_item(ds,
- *p, _imp->main_window->environment()));
- atom_iter->qpn = atom_iter->children.back().qpn;
- }
- }
- else
- {
- std::tr1::shared_ptr<const PackageIDSequence> c(
- (*_imp->main_window->environment())[selection::BestVersionInEachSlot(
- *_imp->packages_page->get_repository_filter() &
- generator::Matches(ds))]);
-
- QualifiedPackageName old_qpn("OLD/OLD");
- std::list<PopulateItem>::iterator pkg_iter;
-
- for (PackageIDSequence::ReverseConstIterator p(c->rbegin()), p_end(c->rend()) ;
- p != p_end ; ++p)
- {
- if (old_qpn != (*p)->name())
- {
- pkg_iter = atom_iter->children.insert(atom_iter->children.end(), PopulateItem(stringify((*p)->name())));
- pkg_iter->children.push_back(make_item(ds,
- *p, _imp->main_window->environment()));
- pkg_iter->qpn = pkg_iter->children.back().qpn;
- old_qpn = (*p)->name();
- }
- else
- pkg_iter->children.push_front(make_item(ds,
- *p, _imp->main_window->environment()));
- }
- }
- }
- }
-
- _imp->main_window->gui_thread_action(
- sigc::bind(sigc::mem_fun(this, &PackagesListModel::populate_in_gui_thread), data));
-}
-
-void
-PackagesListModel::populate_in_gui_thread(const std::tr1::shared_ptr<const PackagesListModel::PopulateData> & names)
-{
- clear();
- Gtk::TreeNodeChildren c(children());
- _populate_in_gui_thread_recursive(c,
- PopulateDataIterator(names->items.begin()),
- PopulateDataIterator(names->items.end()));
-}
-
-void
-PackagesListModel::_populate_in_gui_thread_recursive(
- Gtk::TreeNodeChildren & t,
- PopulateDataIterator i,
- PopulateDataIterator i_end)
-{
- for ( ; i != i_end ; ++i)
- {
- iterator r(append(t));
- (*r)[_imp->columns.col_package] = i->title;
- (*r)[_imp->columns.col_best_package_filter_option] = i->children_best_option();
- (*r)[_imp->columns.col_qpn] = i->qpn;
- (*r)[_imp->columns.col_description] = i->description;
- (*r)[_imp->columns.col_status_markup] = i->status_markup;
-
- if (! i->children.empty())
- {
- if (i->merge_if_one_child && (next(i->children.begin()) == i->children.end()))
- {
- (*r)[_imp->columns.col_description] = i->children.begin()->description;
- (*r)[_imp->columns.col_status_markup] = i->children.begin()->status_markup;
-
- }
- else
- {
- Gtk::TreeNodeChildren c(r->children());
- _populate_in_gui_thread_recursive(c, PopulateDataIterator(i->children.begin()),
- PopulateDataIterator(i->children.end()));
- }
- }
- }
-}
-
diff --git a/src/clients/gtkpaludis/libgtkpaludis/packages_list_model.hh b/src/clients/gtkpaludis/libgtkpaludis/packages_list_model.hh
deleted file mode 100644
index 6e767e0..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/packages_list_model.hh
+++ /dev/null
@@ -1,58 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#ifndef GTKPALUDIS_GUARD_LIBGTKPALUDIS_PACKAGES_LIST_MODEL_HH
-#define GTKPALUDIS_GUARD_LIBGTKPALUDIS_PACKAGES_LIST_MODEL_HH 1
-
-#include <gtkmm/treestore.h>
-#include <paludis/util/private_implementation_pattern.hh>
-#include <paludis/name.hh>
-#include <tr1/memory>
-#include <tr1/functional>
-#include <libgtkpaludis/packages_package_filter_option.hh>
-
-namespace gtkpaludis
-{
- class MainWindow;
- class PackagesPage;
-
- class PackagesListModel :
- private paludis::PrivateImplementationPattern<PackagesListModel>,
- public Gtk::TreeStore
- {
- protected:
- class PopulateData;
- class PopulateDataIterator;
-
- void _populate_in_gui_thread_recursive(
- Gtk::TreeNodeChildren &,
- PopulateDataIterator,
- PopulateDataIterator);
-
- void populate_in_paludis_thread();
- void populate_in_gui_thread(const std::tr1::shared_ptr<const PopulateData> & names);
-
- public:
- PackagesListModel(MainWindow * const m, PackagesPage * const p);
- ~PackagesListModel();
-
- class Columns :
- public Gtk::TreeModelColumnRecord
- {
- public:
- Columns();
- ~Columns();
-
- Gtk::TreeModelColumn<Glib::ustring> col_package;
- Gtk::TreeModelColumn<Glib::ustring> col_status_markup;
- Gtk::TreeModelColumn<Glib::ustring> col_description;
- Gtk::TreeModelColumn<std::tr1::shared_ptr<const paludis::QualifiedPackageName> > col_qpn;
- Gtk::TreeModelColumn<PackagesPackageFilterOption> col_best_package_filter_option;
- };
-
- Columns & columns();
-
- void populate();
- };
-}
-
-#endif
diff --git a/src/clients/gtkpaludis/libgtkpaludis/packages_package_filter.cc b/src/clients/gtkpaludis/libgtkpaludis/packages_package_filter.cc
deleted file mode 100644
index 77beef7..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/packages_package_filter.cc
+++ /dev/null
@@ -1,59 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#include "packages_package_filter.hh"
-#include "packages_package_filter_model.hh"
-#include "packages_page.hh"
-#include <paludis/util/private_implementation_pattern-impl.hh>
-
-using namespace gtkpaludis;
-using namespace paludis;
-
-namespace paludis
-{
- template<>
- struct Implementation<PackagesPackageFilter>
- {
- Glib::RefPtr<PackagesPackageFilterModel> model;
- MainWindow * const main_window;
- PackagesPage * const packages_page;
-
- Implementation(MainWindow * const m, PackagesPage * const p) :
- model(new PackagesPackageFilterModel(m)),
- main_window(m),
- packages_page(p)
- {
- }
- };
-}
-
-PackagesPackageFilter::PackagesPackageFilter(MainWindow * const m, PackagesPage * const p) :
- PrivateImplementationPattern<PackagesPackageFilter>(new Implementation<PackagesPackageFilter>(m, p)),
- Gtk::ComboBox()
-{
- set_model(_imp->model);
- Gtk::CellRendererText renderer;
- pack_start(renderer);
- add_attribute(renderer, "text", _imp->model->columns().col_text.index());
-
- signal_changed().connect(sigc::mem_fun(this, &PackagesPackageFilter::handle_signal_changed));
-}
-
-PackagesPackageFilter::~PackagesPackageFilter()
-{
-}
-
-void
-PackagesPackageFilter::populate()
-{
- _imp->model->populate();
- set_active(0);
-}
-
-void
-PackagesPackageFilter::handle_signal_changed()
-{
- if (get_active())
- _imp->packages_page->set_package_filter((*get_active())[_imp->model->columns().col_filter]);
-}
-
-
diff --git a/src/clients/gtkpaludis/libgtkpaludis/packages_package_filter.hh b/src/clients/gtkpaludis/libgtkpaludis/packages_package_filter.hh
deleted file mode 100644
index 5f89152..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/packages_package_filter.hh
+++ /dev/null
@@ -1,29 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#ifndef GTKPALUDIS_GUARD_LIBGTKPALUDIS_PACKAGES_PACKAGE_FILTER_HH
-#define GTKPALUDIS_GUARD_LIBGTKPALUDIS_PACKAGES_PACKAGE_FILTER_HH 1
-
-#include <gtkmm/combobox.h>
-#include <paludis/util/private_implementation_pattern.hh>
-
-namespace gtkpaludis
-{
- class MainWindow;
- class PackagesPage;
-
- class PackagesPackageFilter :
- private paludis::PrivateImplementationPattern<PackagesPackageFilter>,
- public Gtk::ComboBox
- {
- protected:
- void handle_signal_changed();
-
- public:
- PackagesPackageFilter(MainWindow * const, PackagesPage * const);
- ~PackagesPackageFilter();
-
- void populate();
- };
-}
-
-#endif
diff --git a/src/clients/gtkpaludis/libgtkpaludis/packages_package_filter_model.cc b/src/clients/gtkpaludis/libgtkpaludis/packages_package_filter_model.cc
deleted file mode 100644
index 7b9caec..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/packages_package_filter_model.cc
+++ /dev/null
@@ -1,76 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#include "packages_package_filter_model.hh"
-#include "main_window.hh"
-#include <paludis/environment.hh>
-#include <paludis/util/private_implementation_pattern-impl.hh>
-#include <paludis/package_database.hh>
-#include <paludis/filter.hh>
-
-using namespace paludis;
-using namespace gtkpaludis;
-
-namespace paludis
-{
- template<>
- struct Implementation<PackagesPackageFilterModel>
- {
- MainWindow * const main_window;
- PackagesPackageFilterModel::Columns columns;
-
- Implementation(MainWindow * const m) :
- main_window(m)
- {
- }
- };
-}
-
-PackagesPackageFilterModel::PackagesPackageFilterModel(MainWindow * const m) :
- PrivateImplementationPattern<PackagesPackageFilterModel>(new Implementation<PackagesPackageFilterModel>(m)),
- Gtk::TreeStore(_imp->columns)
-{
-}
-
-PackagesPackageFilterModel::~PackagesPackageFilterModel()
-{
-}
-
-void
-PackagesPackageFilterModel::populate()
-{
- iterator r;
-
- r = append();
- (*r)[_imp->columns.col_text] = "All packages";
- (*r)[_imp->columns.col_filter] = ppfo_all_packages;
-
- r = append();
- (*r)[_imp->columns.col_text] = "Visible packages";
- (*r)[_imp->columns.col_filter] = ppfo_visible_packages;
-
- r = append();
- (*r)[_imp->columns.col_text] = "Installed packages";
- (*r)[_imp->columns.col_filter] = ppfo_installed_packages;
-
- r = append();
- (*r)[_imp->columns.col_text] = "Upgradable packages";
- (*r)[_imp->columns.col_filter] = ppfo_upgradable_packages;
-}
-
-
-PackagesPackageFilterModel::Columns::Columns()
-{
- add(col_text);
- add(col_filter);
-}
-
-PackagesPackageFilterModel::Columns::~Columns()
-{
-}
-
-PackagesPackageFilterModel::Columns &
-PackagesPackageFilterModel::columns()
-{
- return _imp->columns;
-}
-
diff --git a/src/clients/gtkpaludis/libgtkpaludis/packages_package_filter_model.hh b/src/clients/gtkpaludis/libgtkpaludis/packages_package_filter_model.hh
deleted file mode 100644
index ead3bed..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/packages_package_filter_model.hh
+++ /dev/null
@@ -1,39 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#ifndef GTKPALUDIS_GUARD_LIBGTKPALUDIS_PACKAGES_PACKAGE_FILTER_MODEL_HH
-#define GTKPALUDIS_GUARD_LIBGTKPALUDIS_PACKAGES_PACKAGE_FILTER_MODEL_HH 1
-
-#include <gtkmm/treestore.h>
-#include <paludis/util/private_implementation_pattern.hh>
-#include <libgtkpaludis/packages_package_filter_option.hh>
-
-namespace gtkpaludis
-{
- class MainWindow;
-
- class PackagesPackageFilterModel :
- private paludis::PrivateImplementationPattern<PackagesPackageFilterModel>,
- public Gtk::TreeStore
- {
- public:
- PackagesPackageFilterModel(MainWindow * const m);
- ~PackagesPackageFilterModel();
-
- void populate();
-
- class Columns :
- public Gtk::TreeModelColumnRecord
- {
- public:
- Columns();
- ~Columns();
-
- Gtk::TreeModelColumn<Glib::ustring> col_text;
- Gtk::TreeModelColumn<PackagesPackageFilterOption> col_filter;
- };
-
- Columns & columns();
- };
-}
-
-#endif
diff --git a/src/clients/gtkpaludis/libgtkpaludis/packages_package_filter_option.hh b/src/clients/gtkpaludis/libgtkpaludis/packages_package_filter_option.hh
deleted file mode 100644
index c43e189..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/packages_package_filter_option.hh
+++ /dev/null
@@ -1,17 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#ifndef GTKPALUDIS_GUARD_LIBGTKPALUDIS_PACKAGES_PACKAGE_FILTER_OPTION_HH
-#define GTKPALUDIS_GUARD_LIBGTKPALUDIS_PACKAGES_PACKAGE_FILTER_OPTION_HH 1
-
-namespace gtkpaludis
-{
- enum PackagesPackageFilterOption
- {
- ppfo_all_packages,
- ppfo_visible_packages,
- ppfo_installed_packages,
- ppfo_upgradable_packages
- };
-}
-
-#endif
diff --git a/src/clients/gtkpaludis/libgtkpaludis/packages_page.cc b/src/clients/gtkpaludis/libgtkpaludis/packages_page.cc
deleted file mode 100644
index ab9d574..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/packages_page.cc
+++ /dev/null
@@ -1,191 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#include "packages_page.hh"
-#include "packages_filter.hh"
-#include "categories_list.hh"
-#include "sets_list.hh"
-#include "packages_list.hh"
-#include "package_buttons.hh"
-
-#include <paludis/util/private_implementation_pattern-impl.hh>
-#include <gtkmm/scrolledwindow.h>
-
-using namespace gtkpaludis;
-using namespace paludis;
-
-namespace paludis
-{
- template<>
- struct Implementation<PackagesPage>
- {
- MainWindow * const main_window;
-
- PackagesFilter packages_filter;
-
- Gtk::ScrolledWindow categories_list_scroll;
- CategoriesList categories_list;
-
- Gtk::ScrolledWindow sets_list_scroll;
- SetsList sets_list;
-
- Gtk::ScrolledWindow packages_list_scroll;
- PackagesList packages_list;
- PackageButtons package_buttons;
-
- std::tr1::shared_ptr<const Generator> repository_filter;
- std::tr1::shared_ptr<const CategoryNamePart> category;
- std::tr1::shared_ptr<const SetName> set;
- std::tr1::shared_ptr<const QualifiedPackageName> qpn;
- PackagesPackageFilterOption package_filter;
- PackagesTextFilterSourceOption text_filter;
- std::string text_filter_text;
-
- Implementation(MainWindow * const m, PackagesPage * const p) :
- main_window(m),
- packages_filter(m, p),
- categories_list(m, p),
- sets_list(m, p),
- packages_list(m, p),
- package_buttons(m, p),
- repository_filter(new generator::All()),
- package_filter(ppfo_all_packages),
- text_filter(ptfso_name)
- {
- }
- };
-}
-
-PackagesPage::PackagesPage(MainWindow * const m) :
- Gtk::Table(4, 2),
- MainNotebookPage(),
- PrivateImplementationPattern<PackagesPage>(new Implementation<PackagesPage>(m, this))
-{
- attach(_imp->packages_filter, 0, 2, 0, 1, Gtk::FILL, Gtk::FILL, 4, 4);
-
- _imp->categories_list_scroll.set_policy(Gtk::POLICY_NEVER, Gtk::POLICY_ALWAYS);
- _imp->categories_list_scroll.add(_imp->categories_list);
- attach(_imp->categories_list_scroll, 0, 1, 1, 2, Gtk::FILL, Gtk::EXPAND | Gtk::FILL, 4, 4);
-
- _imp->sets_list_scroll.set_policy(Gtk::POLICY_NEVER, Gtk::POLICY_ALWAYS);
- _imp->sets_list_scroll.add(_imp->sets_list);
- attach(_imp->sets_list_scroll, 0, 1, 2, 3, Gtk::FILL, Gtk::EXPAND | Gtk::FILL, 4, 4);
-
- _imp->packages_list_scroll.set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
- _imp->packages_list_scroll.add(_imp->packages_list);
-
- attach(_imp->packages_list_scroll, 1, 2, 1, 3, Gtk::EXPAND | Gtk::FILL, Gtk::EXPAND | Gtk::FILL, 4, 4);
- attach(_imp->package_buttons, 0, 2, 3, 4, Gtk::FILL, Gtk::FILL, 4, 4);
-}
-
-PackagesPage::~PackagesPage()
-{
-}
-
-void
-PackagesPage::populate()
-{
- _imp->categories_list.populate();
- _imp->sets_list.populate();
- _imp->packages_filter.populate();
- _imp->packages_list.populate_real();
- _imp->package_buttons.populate();
-}
-
-void
-PackagesPage::set_category(const std::tr1::shared_ptr<const CategoryNamePart> & c)
-{
- _imp->category = c;
- _imp->set.reset();
- _imp->packages_list.populate_real();
- _imp->package_buttons.populate();
-}
-
-void
-PackagesPage::set_set(const std::tr1::shared_ptr<const SetName> & c)
-{
- _imp->set = c;
- _imp->category.reset();
- _imp->packages_list.populate_real();
- _imp->package_buttons.populate();
-}
-
-std::tr1::shared_ptr<const CategoryNamePart>
-PackagesPage::get_category() const
-{
- return _imp->category;
-}
-
-std::tr1::shared_ptr<const SetName>
-PackagesPage::get_set() const
-{
- return _imp->set;
-}
-
-void
-PackagesPage::set_qpn(const std::tr1::shared_ptr<const QualifiedPackageName> & q)
-{
- _imp->qpn = q;
- _imp->package_buttons.populate();
-}
-
-std::tr1::shared_ptr<const QualifiedPackageName>
-PackagesPage::get_qpn() const
-{
- return _imp->qpn;
-}
-
-void
-PackagesPage::set_repository_filter(const std::tr1::shared_ptr<const Generator> & q)
-{
- _imp->repository_filter = q;
- _imp->categories_list.populate();
- _imp->sets_list.populate();
- _imp->packages_list.populate_real();
- _imp->package_buttons.populate();
-}
-
-std::tr1::shared_ptr<const Generator>
-PackagesPage::get_repository_filter() const
-{
- return _imp->repository_filter;
-}
-
-void
-PackagesPage::set_package_filter(const PackagesPackageFilterOption q)
-{
- _imp->package_filter = q;
- _imp->packages_list.populate_filter();
-}
-
-PackagesPackageFilterOption
-PackagesPage::get_package_filter() const
-{
- return _imp->package_filter;
-}
-
-void
-PackagesPage::set_text_filter(const PackagesTextFilterSourceOption q)
-{
- _imp->text_filter = q;
- _imp->packages_list.populate_filter();
-}
-
-PackagesTextFilterSourceOption
-PackagesPage::get_text_filter() const
-{
- return _imp->text_filter;
-}
-
-void
-PackagesPage::set_text_filter_text(const std::string & q)
-{
- _imp->text_filter_text = q;
- _imp->packages_list.populate_filter();
-}
-
-std::string
-PackagesPage::get_text_filter_text() const
-{
- return _imp->text_filter_text;
-}
-
diff --git a/src/clients/gtkpaludis/libgtkpaludis/packages_page.hh b/src/clients/gtkpaludis/libgtkpaludis/packages_page.hh
deleted file mode 100644
index 62e7ef7..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/packages_page.hh
+++ /dev/null
@@ -1,53 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#ifndef GTKPALUDIS_GUARD_LIBGTKPALUDIS_PACKAGES_PAGE_HH
-#define GTKPALUDIS_GUARD_LIBGTKPALUDIS_PACKAGES_PAGE_HH 1
-
-#include <paludis/util/private_implementation_pattern.hh>
-#include <paludis/name.hh>
-#include <paludis/generator.hh>
-#include <libgtkpaludis/main_notebook_page.hh>
-#include <libgtkpaludis/packages_package_filter_option.hh>
-#include <libgtkpaludis/packages_text_filter_source_option.hh>
-#include <gtkmm/table.h>
-
-namespace gtkpaludis
-{
- class MainWindow;
-
- class PackagesPage :
- public Gtk::Table,
- public MainNotebookPage,
- private paludis::PrivateImplementationPattern<PackagesPage>
- {
- public:
- PackagesPage(MainWindow * const m);
- ~PackagesPage();
-
- virtual void populate();
-
- void set_category(const std::tr1::shared_ptr<const paludis::CategoryNamePart> &);
- std::tr1::shared_ptr<const paludis::CategoryNamePart> get_category() const;
-
- void set_set(const std::tr1::shared_ptr<const paludis::SetName> &);
- std::tr1::shared_ptr<const paludis::SetName> get_set() const;
-
- void set_repository_filter(const std::tr1::shared_ptr<const paludis::Generator> &);
- std::tr1::shared_ptr<const paludis::Generator> get_repository_filter() const;
-
- void set_package_filter(const PackagesPackageFilterOption);
- PackagesPackageFilterOption get_package_filter() const;
-
- void set_text_filter(const PackagesTextFilterSourceOption);
- PackagesTextFilterSourceOption get_text_filter() const;
-
- void set_text_filter_text(const std::string &);
- std::string get_text_filter_text() const;
-
- void set_qpn(const std::tr1::shared_ptr<const paludis::QualifiedPackageName> &);
- std::tr1::shared_ptr<const paludis::QualifiedPackageName> get_qpn() const;
-
- };
-}
-
-#endif
diff --git a/src/clients/gtkpaludis/libgtkpaludis/packages_repository_filter.cc b/src/clients/gtkpaludis/libgtkpaludis/packages_repository_filter.cc
deleted file mode 100644
index c026515..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/packages_repository_filter.cc
+++ /dev/null
@@ -1,61 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#include "packages_repository_filter.hh"
-#include "packages_repository_filter_model.hh"
-#include "packages_page.hh"
-#include <paludis/filter.hh>
-#include <paludis/util/private_implementation_pattern-impl.hh>
-
-using namespace gtkpaludis;
-using namespace paludis;
-
-namespace paludis
-{
- template<>
- struct Implementation<PackagesRepositoryFilter>
- {
- Glib::RefPtr<PackagesRepositoryFilterModel> model;
- MainWindow * const main_window;
- PackagesPage * const packages_page;
-
- Implementation(MainWindow * const m, PackagesPage * const p) :
- model(new PackagesRepositoryFilterModel(m)),
- main_window(m),
- packages_page(p)
- {
- }
- };
-}
-
-PackagesRepositoryFilter::PackagesRepositoryFilter(MainWindow * const m, PackagesPage * const p) :
- PrivateImplementationPattern<PackagesRepositoryFilter>(new Implementation<PackagesRepositoryFilter>(m, p)),
- Gtk::ComboBox()
-{
- set_model(_imp->model);
- Gtk::CellRendererText renderer;
- pack_start(renderer);
- add_attribute(renderer, "text", _imp->model->columns().col_text.index());
- add_attribute(renderer, "sensitive", _imp->model->columns().col_sensitive.index());
-
- signal_changed().connect(sigc::mem_fun(this, &PackagesRepositoryFilter::handle_signal_changed));
-}
-
-PackagesRepositoryFilter::~PackagesRepositoryFilter()
-{
-}
-
-void
-PackagesRepositoryFilter::populate()
-{
- _imp->model->populate();
- set_active(0);
-}
-
-void
-PackagesRepositoryFilter::handle_signal_changed()
-{
- if (get_active())
- _imp->packages_page->set_repository_filter((*get_active())[_imp->model->columns().col_generator].operator
- std::tr1::shared_ptr<const Generator>());
-}
-
diff --git a/src/clients/gtkpaludis/libgtkpaludis/packages_repository_filter.hh b/src/clients/gtkpaludis/libgtkpaludis/packages_repository_filter.hh
deleted file mode 100644
index 3d37eb3..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/packages_repository_filter.hh
+++ /dev/null
@@ -1,29 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#ifndef GTKPALUDIS_GUARD_LIBGTKPALUDIS_PACKAGES_REPOSITORY_FILTER_HH
-#define GTKPALUDIS_GUARD_LIBGTKPALUDIS_PACKAGES_REPOSITORY_FILTER_HH 1
-
-#include <gtkmm/combobox.h>
-#include <paludis/util/private_implementation_pattern.hh>
-
-namespace gtkpaludis
-{
- class MainWindow;
- class PackagesPage;
-
- class PackagesRepositoryFilter :
- private paludis::PrivateImplementationPattern<PackagesRepositoryFilter>,
- public Gtk::ComboBox
- {
- protected:
- void handle_signal_changed();
-
- public:
- PackagesRepositoryFilter(MainWindow * const, PackagesPage * const);
- ~PackagesRepositoryFilter();
-
- void populate();
- };
-}
-
-#endif
diff --git a/src/clients/gtkpaludis/libgtkpaludis/packages_repository_filter_model.cc b/src/clients/gtkpaludis/libgtkpaludis/packages_repository_filter_model.cc
deleted file mode 100644
index 6e4608c..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/packages_repository_filter_model.cc
+++ /dev/null
@@ -1,118 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#include "packages_repository_filter_model.hh"
-#include "main_window.hh"
-#include <paludis/util/private_implementation_pattern-impl.hh>
-#include <paludis/util/sequence.hh>
-#include <paludis/environment.hh>
-#include <paludis/package_database.hh>
-#include <paludis/filter.hh>
-#include <paludis/generator.hh>
-#include <paludis/filtered_generator.hh>
-#include <paludis/selection.hh>
-#include <paludis/util/wrapped_forward_iterator.hh>
-#include <paludis/util/indirect_iterator-impl.hh>
-
-using namespace paludis;
-using namespace gtkpaludis;
-
-namespace paludis
-{
- template<>
- struct Implementation<PackagesRepositoryFilterModel>
- {
- MainWindow * const main_window;
- PackagesRepositoryFilterModel::Columns columns;
-
- Implementation(MainWindow * const m) :
- main_window(m)
- {
- }
- };
-}
-
-PackagesRepositoryFilterModel::PackagesRepositoryFilterModel(MainWindow * const m) :
- PrivateImplementationPattern<PackagesRepositoryFilterModel>(new Implementation<PackagesRepositoryFilterModel>(m)),
- Gtk::TreeStore(_imp->columns)
-{
-}
-
-PackagesRepositoryFilterModel::~PackagesRepositoryFilterModel()
-{
-}
-
-void
-PackagesRepositoryFilterModel::populate()
-{
- iterator r;
-
- r = append();
- (*r)[_imp->columns.col_text] = "All repositories";
- (*r)[_imp->columns.col_sensitive] = true;
- (*r)[_imp->columns.col_generator] = std::tr1::shared_ptr<Generator>(new generator::All());
-
- r = append();
- (*r)[_imp->columns.col_text] = "Installable repositories";
- (*r)[_imp->columns.col_sensitive] = true;
- (*r)[_imp->columns.col_generator] = std::tr1::shared_ptr<Generator>(new generator::SomeIDsMightSupportAction<InstallAction>());
-
- r = append();
- (*r)[_imp->columns.col_text] = "Installed repositories";
- (*r)[_imp->columns.col_sensitive] = true;
- (*r)[_imp->columns.col_generator] = std::tr1::shared_ptr<Generator>(new generator::SomeIDsMightSupportAction<InstalledAction>());
-
- _imp->main_window->paludis_thread_action(
- sigc::mem_fun(this, &PackagesRepositoryFilterModel::populate_in_paludis_thread), "Populating repository filter model");
-}
-
-void
-PackagesRepositoryFilterModel::populate_in_paludis_thread()
-{
- std::tr1::shared_ptr<RepositoryNameSequence> columns(new RepositoryNameSequence);
-
- for (IndirectIterator<PackageDatabase::RepositoryConstIterator>
- r(indirect_iterator(_imp->main_window->environment()->package_database()->begin_repositories())),
- r_end(indirect_iterator(_imp->main_window->environment()->package_database()->end_repositories())) ;
- r != r_end ; ++r)
- columns->push_back(r->name());
-
- _imp->main_window->gui_thread_action(
- sigc::bind(sigc::mem_fun(this, &PackagesRepositoryFilterModel::populate_in_gui_thread), columns));
-}
-
-void
-PackagesRepositoryFilterModel::populate_in_gui_thread(const std::tr1::shared_ptr<const RepositoryNameSequence> & names)
-{
- iterator repositories(append());
- (*repositories)[_imp->columns.col_text] = "Specific repository";
- (*repositories)[_imp->columns.col_sensitive] = false;
-
- for (RepositoryNameSequence::ConstIterator n(names->begin()), n_end(names->end()) ;
- n != n_end ; ++n)
- {
- iterator r(append(repositories->children()));
- (*r)[_imp->columns.col_text] = stringify(*n);
- (*r)[_imp->columns.col_sensitive] = true;
- (*r)[_imp->columns.col_generator] = std::tr1::shared_ptr<Generator>(new generator::InRepository(*n));
- }
-}
-
-
-PackagesRepositoryFilterModel::Columns::Columns()
-{
- add(col_sensitive);
- add(col_text);
- add(col_generator);
-}
-
-PackagesRepositoryFilterModel::Columns::~Columns()
-{
-}
-
-PackagesRepositoryFilterModel::Columns &
-PackagesRepositoryFilterModel::columns()
-{
- return _imp->columns;
-}
-
-
diff --git a/src/clients/gtkpaludis/libgtkpaludis/packages_repository_filter_model.hh b/src/clients/gtkpaludis/libgtkpaludis/packages_repository_filter_model.hh
deleted file mode 100644
index 2be6e95..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/packages_repository_filter_model.hh
+++ /dev/null
@@ -1,46 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#ifndef GTKPALUDIS_GUARD_LIBGTKPALUDIS_PACKAGES_REPOSITORY_FILTER_MODEL_HH
-#define GTKPALUDIS_GUARD_LIBGTKPALUDIS_PACKAGES_REPOSITORY_FILTER_MODEL_HH 1
-
-#include <gtkmm/treestore.h>
-#include <paludis/util/private_implementation_pattern.hh>
-#include <paludis/name.hh>
-#include <paludis/generator.hh>
-#include <tr1/memory>
-
-namespace gtkpaludis
-{
- class MainWindow;
-
- class PackagesRepositoryFilterModel :
- private paludis::PrivateImplementationPattern<PackagesRepositoryFilterModel>,
- public Gtk::TreeStore
- {
- protected:
- void populate_in_paludis_thread();
- void populate_in_gui_thread(const std::tr1::shared_ptr<const paludis::RepositoryNameSequence> & names);
-
- public:
- PackagesRepositoryFilterModel(MainWindow * const m);
- ~PackagesRepositoryFilterModel();
-
- void populate();
-
- class Columns :
- public Gtk::TreeModelColumnRecord
- {
- public:
- Columns();
- ~Columns();
-
- Gtk::TreeModelColumn<bool> col_sensitive;
- Gtk::TreeModelColumn<Glib::ustring> col_text;
- Gtk::TreeModelColumn<std::tr1::shared_ptr<const paludis::Generator> > col_generator;
- };
-
- Columns & columns();
- };
-}
-
-#endif
diff --git a/src/clients/gtkpaludis/libgtkpaludis/packages_text_filter.cc b/src/clients/gtkpaludis/libgtkpaludis/packages_text_filter.cc
deleted file mode 100644
index eceb07f..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/packages_text_filter.cc
+++ /dev/null
@@ -1,60 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#include "packages_text_filter.hh"
-#include "packages_text_filter_source.hh"
-#include "packages_page.hh"
-#include "main_window.hh"
-#include <paludis/util/private_implementation_pattern-impl.hh>
-#include <gtkmm/label.h>
-#include <gtkmm/entry.h>
-
-using namespace gtkpaludis;
-using namespace paludis;
-
-namespace paludis
-{
- template<>
- struct Implementation<PackagesTextFilter>
- {
- MainWindow * const main_window;
- PackagesPage * const packages_page;
-
- PackagesTextFilterSource packages_text_filter_source;
- Gtk::Entry filter_entry;
-
- Implementation(MainWindow * const m, PackagesPage * const p) :
- main_window(m),
- packages_page(p),
- packages_text_filter_source(m, p)
- {
- }
- };
-}
-
-PackagesTextFilter::PackagesTextFilter(MainWindow * const m, PackagesPage * const p) :
- PrivateImplementationPattern<PackagesTextFilter>(new Implementation<PackagesTextFilter>(m, p)),
- Gtk::Table(2, 1)
-{
- attach(_imp->packages_text_filter_source, 0, 1, 0, 1, Gtk::FILL, Gtk::FILL, 4, 4);
- attach(_imp->filter_entry, 1, 2, 0, 1, Gtk::EXPAND | Gtk::FILL, Gtk::FILL, 4, 4);
-
- _imp->filter_entry.signal_changed().connect(
- sigc::mem_fun(this, &PackagesTextFilter::handle_filter_entry_changed));
-}
-
-PackagesTextFilter::~PackagesTextFilter()
-{
-}
-
-void
-PackagesTextFilter::populate()
-{
- _imp->packages_text_filter_source.populate();
-}
-
-void
-PackagesTextFilter::handle_filter_entry_changed()
-{
- _imp->packages_page->set_text_filter_text(_imp->filter_entry.get_text().raw());
-}
-
diff --git a/src/clients/gtkpaludis/libgtkpaludis/packages_text_filter.hh b/src/clients/gtkpaludis/libgtkpaludis/packages_text_filter.hh
deleted file mode 100644
index 5d52428..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/packages_text_filter.hh
+++ /dev/null
@@ -1,29 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#ifndef GTKPALUDIS_GUARD_LIBGTKPALUDIS_PACKAGES_TEXT_FILTER_HH
-#define GTKPALUDIS_GUARD_LIBGTKPALUDIS_PACKAGES_TEXT_FILTER_HH 1
-
-#include <gtkmm/table.h>
-#include <paludis/util/private_implementation_pattern.hh>
-
-namespace gtkpaludis
-{
- class MainWindow;
- class PackagesPage;
-
- class PackagesTextFilter :
- private paludis::PrivateImplementationPattern<PackagesTextFilter>,
- public Gtk::Table
- {
- private:
- void handle_filter_entry_changed();
-
- public:
- PackagesTextFilter(MainWindow * const m, PackagesPage * const p);
- ~PackagesTextFilter();
-
- void populate();
- };
-}
-
-#endif
diff --git a/src/clients/gtkpaludis/libgtkpaludis/packages_text_filter_source.cc b/src/clients/gtkpaludis/libgtkpaludis/packages_text_filter_source.cc
deleted file mode 100644
index e5001c1..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/packages_text_filter_source.cc
+++ /dev/null
@@ -1,59 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#include "packages_text_filter_source.hh"
-#include "packages_text_filter_source_model.hh"
-#include "packages_page.hh"
-#include <paludis/filter.hh>
-#include <paludis/util/private_implementation_pattern-impl.hh>
-
-using namespace gtkpaludis;
-using namespace paludis;
-
-namespace paludis
-{
- template<>
- struct Implementation<PackagesTextFilterSource>
- {
- Glib::RefPtr<PackagesTextFilterSourceModel> model;
- MainWindow * const main_window;
- PackagesPage * const packages_page;
-
- Implementation(MainWindow * const m, PackagesPage * const p) :
- model(new PackagesTextFilterSourceModel(m)),
- main_window(m),
- packages_page(p)
- {
- }
- };
-}
-
-PackagesTextFilterSource::PackagesTextFilterSource(MainWindow * const m, PackagesPage * const p) :
- PrivateImplementationPattern<PackagesTextFilterSource>(new Implementation<PackagesTextFilterSource>(m, p)),
- Gtk::ComboBox()
-{
- set_model(_imp->model);
- Gtk::CellRendererText renderer;
- pack_start(renderer);
- add_attribute(renderer, "text", _imp->model->columns().col_text.index());
-
- signal_changed().connect(sigc::mem_fun(this, &PackagesTextFilterSource::handle_signal_changed));
-}
-
-PackagesTextFilterSource::~PackagesTextFilterSource()
-{
-}
-
-void
-PackagesTextFilterSource::populate()
-{
- _imp->model->populate();
- set_active(0);
-}
-
-void
-PackagesTextFilterSource::handle_signal_changed()
-{
- if (get_active())
- _imp->packages_page->set_text_filter((*get_active())[_imp->model->columns().col_filter]);
-}
-
diff --git a/src/clients/gtkpaludis/libgtkpaludis/packages_text_filter_source.hh b/src/clients/gtkpaludis/libgtkpaludis/packages_text_filter_source.hh
deleted file mode 100644
index 3f0f339..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/packages_text_filter_source.hh
+++ /dev/null
@@ -1,29 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#ifndef GTKPALUDIS_GUARD_LIBGTKPALUDIS_PACKAGES_TEXT_FILTER_SOURCE_HH
-#define GTKPALUDIS_GUARD_LIBGTKPALUDIS_PACKAGES_TEXT_FILTER_SOURCE_HH 1
-
-#include <gtkmm/combobox.h>
-#include <paludis/util/private_implementation_pattern.hh>
-
-namespace gtkpaludis
-{
- class MainWindow;
- class PackagesPage;
-
- class PackagesTextFilterSource :
- private paludis::PrivateImplementationPattern<PackagesTextFilterSource>,
- public Gtk::ComboBox
- {
- protected:
- void handle_signal_changed();
-
- public:
- PackagesTextFilterSource(MainWindow * const, PackagesPage * const);
- ~PackagesTextFilterSource();
-
- void populate();
- };
-}
-
-#endif
diff --git a/src/clients/gtkpaludis/libgtkpaludis/packages_text_filter_source_model.cc b/src/clients/gtkpaludis/libgtkpaludis/packages_text_filter_source_model.cc
deleted file mode 100644
index d557b59..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/packages_text_filter_source_model.cc
+++ /dev/null
@@ -1,68 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#include "packages_text_filter_source_model.hh"
-#include "main_window.hh"
-#include <paludis/environment.hh>
-#include <paludis/package_database.hh>
-#include <paludis/util/private_implementation_pattern-impl.hh>
-#include <paludis/filter.hh>
-
-using namespace paludis;
-using namespace gtkpaludis;
-
-namespace paludis
-{
- template<>
- struct Implementation<PackagesTextFilterSourceModel>
- {
- MainWindow * const main_window;
- PackagesTextFilterSourceModel::Columns columns;
-
- Implementation(MainWindow * const m) :
- main_window(m)
- {
- }
- };
-}
-
-PackagesTextFilterSourceModel::PackagesTextFilterSourceModel(MainWindow * const m) :
- PrivateImplementationPattern<PackagesTextFilterSourceModel>(new Implementation<PackagesTextFilterSourceModel>(m)),
- Gtk::TreeStore(_imp->columns)
-{
-}
-
-PackagesTextFilterSourceModel::~PackagesTextFilterSourceModel()
-{
-}
-
-void
-PackagesTextFilterSourceModel::populate()
-{
- iterator r;
-
- r = append();
- (*r)[_imp->columns.col_text] = "Name contains:";
- (*r)[_imp->columns.col_filter] = ptfso_name;
-
- r = append();
- (*r)[_imp->columns.col_text] = "Description contains:";
- (*r)[_imp->columns.col_filter] = ptfso_description;
-}
-
-
-PackagesTextFilterSourceModel::Columns::Columns()
-{
- add(col_text);
- add(col_filter);
-}
-
-PackagesTextFilterSourceModel::Columns::~Columns()
-{
-}
-
-PackagesTextFilterSourceModel::Columns &
-PackagesTextFilterSourceModel::columns()
-{
- return _imp->columns;
-}
-
diff --git a/src/clients/gtkpaludis/libgtkpaludis/packages_text_filter_source_model.hh b/src/clients/gtkpaludis/libgtkpaludis/packages_text_filter_source_model.hh
deleted file mode 100644
index 3383c32..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/packages_text_filter_source_model.hh
+++ /dev/null
@@ -1,39 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#ifndef GTKPALUDIS_GUARD_LIBGTKPALUDIS_PACKAGES_TEXT_FILTER_SOURCE_MODEL_HH
-#define GTKPALUDIS_GUARD_LIBGTKPALUDIS_PACKAGES_TEXT_FILTER_SOURCE_MODEL_HH 1
-
-#include <gtkmm/treestore.h>
-#include <paludis/util/private_implementation_pattern.hh>
-#include <libgtkpaludis/packages_text_filter_source_option.hh>
-
-namespace gtkpaludis
-{
- class MainWindow;
-
- class PackagesTextFilterSourceModel :
- private paludis::PrivateImplementationPattern<PackagesTextFilterSourceModel>,
- public Gtk::TreeStore
- {
- public:
- PackagesTextFilterSourceModel(MainWindow * const m);
- ~PackagesTextFilterSourceModel();
-
- void populate();
-
- class Columns :
- public Gtk::TreeModelColumnRecord
- {
- public:
- Columns();
- ~Columns();
-
- Gtk::TreeModelColumn<Glib::ustring> col_text;
- Gtk::TreeModelColumn<PackagesTextFilterSourceOption> col_filter;
- };
-
- Columns & columns();
- };
-}
-
-#endif
diff --git a/src/clients/gtkpaludis/libgtkpaludis/packages_text_filter_source_option.hh b/src/clients/gtkpaludis/libgtkpaludis/packages_text_filter_source_option.hh
deleted file mode 100644
index 1a05982..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/packages_text_filter_source_option.hh
+++ /dev/null
@@ -1,15 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#ifndef GTKPALUDIS_GUARD_LIBGTKPALUDIS_PACKAGES_TEXT_FILTER_SOURCE_OPTION_HH
-#define GTKPALUDIS_GUARD_LIBGTKPALUDIS_PACKAGES_TEXT_FILTER_SOURCE_OPTION_HH 1
-
-namespace gtkpaludis
-{
- enum PackagesTextFilterSourceOption
- {
- ptfso_name,
- ptfso_description
- };
-}
-
-#endif
diff --git a/src/clients/gtkpaludis/libgtkpaludis/query_notebook.cc b/src/clients/gtkpaludis/libgtkpaludis/query_notebook.cc
deleted file mode 100644
index 2682d53..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/query_notebook.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#include "query_notebook.hh"
-#include "query_notebook_page.hh"
-#include "versions_page.hh"
-#include <paludis/util/private_implementation_pattern-impl.hh>
-#include <map>
-
-using namespace gtkpaludis;
-using namespace paludis;
-
-namespace paludis
-{
- template<>
- struct Implementation<QueryNotebook>
- {
- QueryWindow * const main_window;
- VersionsPage versions_page;
-
- std::map<int, QueryNotebookPage *> pages_by_index;
-
- sigc::connection signal_switch_page_connection;
-
- Implementation(QueryWindow * const m) :
- main_window(m),
- versions_page(m)
- {
- }
- };
-}
-
-QueryNotebook::QueryNotebook(QueryWindow * const m) :
- Gtk::Notebook(),
- PrivateImplementationPattern<QueryNotebook>(new Implementation<QueryNotebook>(m))
-{
- _imp->pages_by_index.insert(std::make_pair(
- append_page(_imp->versions_page, "Versions"),
- &_imp->versions_page));
-
- _imp->signal_switch_page_connection = signal_switch_page().connect(
- sigc::mem_fun(*this, &QueryNotebook::handle_switch_page));
-}
-
-QueryNotebook::~QueryNotebook()
-{
- _imp->signal_switch_page_connection.disconnect();
-}
-
-void
-QueryNotebook::handle_switch_page(GtkNotebookPage *, guint page)
-{
- std::map<int, QueryNotebookPage *>::const_iterator f(_imp->pages_by_index.find(page));
- if (_imp->pages_by_index.end() != f)
- f->second->populate_once();
-}
-
diff --git a/src/clients/gtkpaludis/libgtkpaludis/query_notebook.hh b/src/clients/gtkpaludis/libgtkpaludis/query_notebook.hh
deleted file mode 100644
index 12aacd8..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/query_notebook.hh
+++ /dev/null
@@ -1,28 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#ifndef GTKPALUDIS_GUARD_LIBGTKPALUDIS_QUERY_NOTEBOOK_HH
-#define GTKPALUDIS_GUARD_LIBGTKPALUDIS_QUERY_NOTEBOOK_HH 1
-
-#include <gtkmm/notebook.h>
-#include <paludis/util/private_implementation_pattern.hh>
-
-namespace gtkpaludis
-{
- class QueryWindow;
-
- class QueryNotebook :
- public Gtk::Notebook,
- private paludis::PrivateImplementationPattern<QueryNotebook>
- {
- protected:
- void handle_switch_page(GtkNotebookPage *, guint);
-
- public:
- QueryNotebook(QueryWindow * const);
- ~QueryNotebook();
-
- void populate();
- };
-}
-
-#endif
diff --git a/src/clients/gtkpaludis/libgtkpaludis/query_notebook_page.cc b/src/clients/gtkpaludis/libgtkpaludis/query_notebook_page.cc
deleted file mode 100644
index d4ffd9f..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/query_notebook_page.cc
+++ /dev/null
@@ -1,26 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#include "query_notebook_page.hh"
-
-using namespace gtkpaludis;
-
-QueryNotebookPage::QueryNotebookPage() :
- _populated(false)
-{
-}
-
-QueryNotebookPage::~QueryNotebookPage()
-{
-}
-
-void
-QueryNotebookPage::populate_once()
-{
- if (_populated)
- return;
-
- populate();
- _populated = true;
-}
-
-
diff --git a/src/clients/gtkpaludis/libgtkpaludis/query_notebook_page.hh b/src/clients/gtkpaludis/libgtkpaludis/query_notebook_page.hh
deleted file mode 100644
index fad5e78..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/query_notebook_page.hh
+++ /dev/null
@@ -1,23 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#ifndef GTKPALUDIS_GUARD_LIBGTKPALUDIS_QUERY_NOTEBOOK_PAGE_HH
-#define GTKPALUDIS_GUARD_LIBGTKPALUDIS_QUERY_NOTEBOOK_PAGE_HH 1
-
-namespace gtkpaludis
-{
- class QueryNotebookPage
- {
- private:
- bool _populated;
-
- public:
- QueryNotebookPage();
- virtual ~QueryNotebookPage() = 0;
-
- void populate_once();
- virtual void populate() = 0;
- };
-}
-
-
-#endif
diff --git a/src/clients/gtkpaludis/libgtkpaludis/query_window.cc b/src/clients/gtkpaludis/libgtkpaludis/query_window.cc
deleted file mode 100644
index ef473b3..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/query_window.cc
+++ /dev/null
@@ -1,122 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#include "query_window.hh"
-#include "query_notebook.hh"
-#include "main_window.hh"
-#include <paludis/name.hh>
-#include <paludis/util/stringify.hh>
-#include <paludis/util/private_implementation_pattern-impl.hh>
-#include <gtkmm/table.h>
-#include <gtkmm/button.h>
-#include <gtkmm/buttonbox.h>
-#include <gtkmm/stock.h>
-#include <gtkmm/statusbar.h>
-
-using namespace gtkpaludis;
-using namespace paludis;
-
-namespace paludis
-{
- template<>
- struct Implementation<QueryWindow>
- {
- MainWindow * const main_window;
-
- Gtk::Table main_table;
- Gtk::HButtonBox main_button_box;
- Gtk::Button ok_button;
- Gtk::Statusbar status_bar;
-
- QueryNotebook query_notebook;
- QualifiedPackageName package_name;
-
- Implementation(MainWindow * const m, QueryWindow * const q, const QualifiedPackageName & n) :
- main_window(m),
- main_table(3, 1),
- ok_button(Gtk::Stock::OK),
- query_notebook(q),
- package_name(n)
- {
- }
- };
-}
-
-QueryWindow::QueryWindow(MainWindow * const m, const QualifiedPackageName & q) :
- ThreadedWindow(Gtk::WINDOW_TOPLEVEL, m->environment()),
- PrivateImplementationPattern<QueryWindow>(new Implementation<QueryWindow>(m, this, q)),
- _imp(PrivateImplementationPattern<QueryWindow>::_imp)
-{
- m->desensitise();
-
- set_modal(true);
- set_transient_for(*m);
- set_position(Gtk::WIN_POS_CENTER_ON_PARENT);
- set_title("Querying '" + stringify(q) + "'");
- set_default_size(700, 500);
- set_border_width(4);
-
- _imp->ok_button.signal_clicked().connect(sigc::mem_fun(this, &QueryWindow::handle_ok_button_clicked));
-
- _imp->main_button_box.set_layout(Gtk::BUTTONBOX_END);
- _imp->main_button_box.set_spacing(10);
- _imp->main_button_box.add(_imp->ok_button);
-
- _imp->status_bar.set_has_resize_grip(true);
-
- _imp->main_table.attach(_imp->query_notebook, 0, 1, 0, 1, Gtk::EXPAND | Gtk::FILL,
- Gtk::EXPAND | Gtk::FILL, 4, 4);
- _imp->main_table.attach(_imp->main_button_box, 0, 1, 1, 2, Gtk::EXPAND | Gtk::FILL,
- Gtk::FILL, 4, 4);
- _imp->main_table.attach(_imp->status_bar, 0, 1, 2, 3, Gtk::EXPAND | Gtk::FILL,
- Gtk::FILL, 4, 4);
-
- add(_imp->main_table);
-
- show_all();
-}
-
-QueryWindow::~QueryWindow()
-{
- _imp->main_window->sensitise();
-}
-
-void
-QueryWindow::handle_ok_button_clicked()
-{
- handle_delete_event(0);
-}
-
-bool
-QueryWindow::handle_delete_event(GdkEventAny * a)
-{
- ThreadedWindow::handle_delete_event(a);
- delete this;
- return false;
-}
-
-const QualifiedPackageName
-QueryWindow::get_package_name() const
-{
- return _imp->package_name;
-}
-
-void
-QueryWindow::push_status_message(const std::string & s)
-{
- _imp->status_bar.push(s);
-}
-
-void
-QueryWindow::pop_status_message()
-{
- _imp->status_bar.pop();
-}
-
-void
-QueryWindow::do_set_sensitive(const bool v)
-{
- _imp->query_notebook.set_sensitive(v);
- _imp->main_button_box.set_sensitive(v);
-}
-
-
diff --git a/src/clients/gtkpaludis/libgtkpaludis/query_window.hh b/src/clients/gtkpaludis/libgtkpaludis/query_window.hh
deleted file mode 100644
index 1a88733..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/query_window.hh
+++ /dev/null
@@ -1,41 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#ifndef GTKPALUDIS_GUARD_LIBGTKPALUDIS_QUERY_WINDOW_HH
-#define GTKPALUDIS_GUARD_LIBGTKPALUDIS_QUERY_WINDOW_HH 1
-
-#include <libgtkpaludis/threaded_window.hh>
-#include <paludis/util/private_implementation_pattern.hh>
-
-namespace paludis
-{
- class QualifiedPackageName;
-}
-
-namespace gtkpaludis
-{
- class MainWindow;
-
- class QueryWindow :
- public ThreadedWindow,
- private paludis::PrivateImplementationPattern<QueryWindow>
- {
- private:
- paludis::PrivateImplementationPattern<QueryWindow>::ImpPtr & _imp;
-
- protected:
- virtual bool handle_delete_event(GdkEventAny *);
- void handle_ok_button_clicked();
- virtual void do_set_sensitive(const bool);
-
- virtual void push_status_message(const std::string &);
- virtual void pop_status_message();
-
- public:
- QueryWindow(MainWindow * const, const paludis::QualifiedPackageName &);
- ~QueryWindow();
-
- const paludis::QualifiedPackageName get_package_name() const;
- };
-}
-
-#endif
diff --git a/src/clients/gtkpaludis/libgtkpaludis/repositories_list.cc b/src/clients/gtkpaludis/libgtkpaludis/repositories_list.cc
deleted file mode 100644
index 917937c..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/repositories_list.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#include "repositories_list.hh"
-#include "repositories_list_model.hh"
-#include "repositories_page.hh"
-#include <paludis/util/private_implementation_pattern-impl.hh>
-
-using namespace gtkpaludis;
-using namespace paludis;
-
-namespace paludis
-{
- template<>
- struct Implementation<RepositoriesList>
- {
- Glib::RefPtr<RepositoriesListModel> model;
- MainWindow * const main_window;
- RepositoriesPage * const repositories_page;
-
- Implementation(MainWindow * const m, RepositoriesPage * const p) :
- model(new RepositoriesListModel(m)),
- main_window(m),
- repositories_page(p)
- {
- }
- };
-}
-
-RepositoriesList::RepositoriesList(MainWindow * const m, RepositoriesPage * const p) :
- Gtk::TreeView(),
- PrivateImplementationPattern<RepositoriesList>(new Implementation<RepositoriesList>(m, p))
-{
- set_model(_imp->model);
-
- append_column("Repository", _imp->model->columns().col_repo_name);
-
- signal_cursor_changed().connect(sigc::mem_fun(this, &RepositoriesList::handle_signal_cursor_changed));
-}
-
-RepositoriesList::~RepositoriesList()
-{
-}
-
-void
-RepositoriesList::populate()
-{
- _imp->model->populate();
-}
-
-void
-RepositoriesList::handle_signal_cursor_changed()
-{
- if (get_selection()->get_selected())
- _imp->repositories_page->set_repository(RepositoryName(
- static_cast<Glib::ustring>((*get_selection()->get_selected())[_imp->model->columns().col_repo_name]).raw()));
-}
-
diff --git a/src/clients/gtkpaludis/libgtkpaludis/repositories_list.hh b/src/clients/gtkpaludis/libgtkpaludis/repositories_list.hh
deleted file mode 100644
index 461d134..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/repositories_list.hh
+++ /dev/null
@@ -1,29 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#ifndef GTKPALUDIS_GUARD_LIBGTKPALUDIS_REPOSITORIES_LIST_HH
-#define GTKPALUDIS_GUARD_LIBGTKPALUDIS_REPOSITORIES_LIST_HH 1
-
-#include <paludis/util/private_implementation_pattern.hh>
-#include <gtkmm/treeview.h>
-
-namespace gtkpaludis
-{
- class MainWindow;
- class RepositoriesPage;
-
- class RepositoriesList :
- public Gtk::TreeView,
- private paludis::PrivateImplementationPattern<RepositoriesList>
- {
- protected:
- void handle_signal_cursor_changed();
-
- public:
- RepositoriesList(MainWindow * const m, RepositoriesPage * const p);
- ~RepositoriesList();
-
- void populate();
- };
-}
-
-#endif
diff --git a/src/clients/gtkpaludis/libgtkpaludis/repositories_list_model.cc b/src/clients/gtkpaludis/libgtkpaludis/repositories_list_model.cc
deleted file mode 100644
index f091d3d..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/repositories_list_model.cc
+++ /dev/null
@@ -1,86 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#include "repositories_list_model.hh"
-#include "main_window.hh"
-#include <paludis/util/private_implementation_pattern-impl.hh>
-#include <paludis/util/sequence.hh>
-#include <paludis/util/wrapped_forward_iterator.hh>
-#include <paludis/util/indirect_iterator-impl.hh>
-#include <paludis/environment.hh>
-#include <paludis/package_database.hh>
-
-using namespace paludis;
-using namespace gtkpaludis;
-
-namespace paludis
-{
- template<>
- struct Implementation<RepositoriesListModel>
- {
- MainWindow * const main_window;
- RepositoriesListModel::Columns columns;
-
- Implementation(MainWindow * const m) :
- main_window(m)
- {
- }
- };
-}
-
-RepositoriesListModel::RepositoriesListModel(MainWindow * const m) :
- PrivateImplementationPattern<RepositoriesListModel>(new Implementation<RepositoriesListModel>(m)),
- Gtk::ListStore(_imp->columns)
-{
-}
-
-RepositoriesListModel::~RepositoriesListModel()
-{
-}
-
-void
-RepositoriesListModel::populate()
-{
- _imp->main_window->paludis_thread_action(
- sigc::mem_fun(this, &RepositoriesListModel::populate_in_paludis_thread), "Populating repositories list model");
-}
-
-void
-RepositoriesListModel::populate_in_paludis_thread()
-{
- std::tr1::shared_ptr<RepositoryNameSequence> columns(new RepositoryNameSequence);
-
- for (IndirectIterator<PackageDatabase::RepositoryConstIterator>
- r(indirect_iterator(_imp->main_window->environment()->package_database()->begin_repositories())),
- r_end(indirect_iterator(_imp->main_window->environment()->package_database()->end_repositories())) ;
- r != r_end ; ++r)
- columns->push_back(r->name());
-
- _imp->main_window->gui_thread_action(
- sigc::bind(sigc::mem_fun(this, &RepositoriesListModel::populate_in_gui_thread), columns));
-}
-
-void
-RepositoriesListModel::populate_in_gui_thread(const std::tr1::shared_ptr<const RepositoryNameSequence> & names)
-{
- clear();
- for (RepositoryNameSequence::ConstIterator n(names->begin()), n_end(names->end()) ;
- n != n_end ; ++n)
- (*append())[_imp->columns.col_repo_name] = stringify(*n);
-}
-
-
-RepositoriesListModel::Columns::Columns()
-{
- add(col_repo_name);
-}
-
-RepositoriesListModel::Columns::~Columns()
-{
-}
-
-RepositoriesListModel::Columns &
-RepositoriesListModel::columns()
-{
- return _imp->columns;
-}
-
diff --git a/src/clients/gtkpaludis/libgtkpaludis/repositories_list_model.hh b/src/clients/gtkpaludis/libgtkpaludis/repositories_list_model.hh
deleted file mode 100644
index 09fff55..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/repositories_list_model.hh
+++ /dev/null
@@ -1,43 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#ifndef GTKPALUDIS_GUARD_LIBGTKPALUDIS_REPOSITORIES_LIST_MODEL_HH
-#define GTKPALUDIS_GUARD_LIBGTKPALUDIS_REPOSITORIES_LIST_MODEL_HH 1
-
-#include <gtkmm/liststore.h>
-#include <paludis/util/private_implementation_pattern.hh>
-#include <paludis/name.hh>
-#include <tr1/memory>
-
-namespace gtkpaludis
-{
- class MainWindow;
-
- class RepositoriesListModel :
- private paludis::PrivateImplementationPattern<RepositoriesListModel>,
- public Gtk::ListStore
- {
- protected:
- void populate_in_paludis_thread();
- void populate_in_gui_thread(const std::tr1::shared_ptr<const paludis::RepositoryNameSequence> & names);
-
- public:
- RepositoriesListModel(MainWindow * const m);
- ~RepositoriesListModel();
-
- void populate();
-
- class Columns :
- public Gtk::TreeModelColumnRecord
- {
- public:
- Columns();
- ~Columns();
-
- Gtk::TreeModelColumn<Glib::ustring> col_repo_name;
- };
-
- Columns & columns();
- };
-}
-
-#endif
diff --git a/src/clients/gtkpaludis/libgtkpaludis/repositories_page.cc b/src/clients/gtkpaludis/libgtkpaludis/repositories_page.cc
deleted file mode 100644
index 683383b..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/repositories_page.cc
+++ /dev/null
@@ -1,70 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#include "repositories_page.hh"
-#include "repositories_list.hh"
-#include "repository_info.hh"
-#include "repository_buttons.hh"
-#include <paludis/util/private_implementation_pattern-impl.hh>
-#include <gtkmm/scrolledwindow.h>
-
-using namespace gtkpaludis;
-using namespace paludis;
-
-namespace paludis
-{
- template<>
- struct Implementation<RepositoriesPage>
- {
- MainWindow * const main_window;
-
- Gtk::ScrolledWindow repositories_list_scroll;
- RepositoriesList repositories_list;
-
- Gtk::ScrolledWindow repository_info_scroll;
- RepositoryInfo repository_info;
-
- RepositoryButtons repository_buttons;
-
- Implementation(MainWindow * const m, RepositoriesPage * const p) :
- main_window(m),
- repositories_list(m, p),
- repository_info(m),
- repository_buttons(m)
- {
- }
- };
-}
-
-RepositoriesPage::RepositoriesPage(MainWindow * const m) :
- Gtk::Table(2, 2),
- MainNotebookPage(),
- PrivateImplementationPattern<RepositoriesPage>(new Implementation<RepositoriesPage>(m, this))
-{
- _imp->repositories_list_scroll.set_policy(Gtk::POLICY_NEVER, Gtk::POLICY_ALWAYS);
- _imp->repositories_list_scroll.add(_imp->repositories_list);
- attach(_imp->repositories_list_scroll, 0, 1, 0, 2, Gtk::SHRINK, Gtk::EXPAND | Gtk::FILL, 4, 4);
-
- _imp->repository_info_scroll.set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
- _imp->repository_info_scroll.add(_imp->repository_info);
- attach(_imp->repository_info_scroll, 1, 2, 0, 1, Gtk::EXPAND | Gtk::FILL, Gtk::EXPAND | Gtk::FILL, 4, 4);
-
- attach(_imp->repository_buttons, 1, 2, 1, 2, Gtk::FILL, Gtk::FILL, 4, 4);
-}
-
-RepositoriesPage::~RepositoriesPage()
-{
-}
-
-void
-RepositoriesPage::populate()
-{
- _imp->repositories_list.populate();
-}
-
-void
-RepositoriesPage::set_repository(const RepositoryName & name)
-{
- _imp->repository_info.set_repository(name);
- _imp->repository_buttons.set_repository(name);
-}
-
diff --git a/src/clients/gtkpaludis/libgtkpaludis/repositories_page.hh b/src/clients/gtkpaludis/libgtkpaludis/repositories_page.hh
deleted file mode 100644
index dc45fc4..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/repositories_page.hh
+++ /dev/null
@@ -1,30 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#ifndef GTKPALUDIS_GUARD_GTKPALUDIS_LIBGTKPALUDIS_REPOSITORIES_PAGE_HH
-#define GTKPALUDIS_GUARD_GTKPALUDIS_LIBGTKPALUDIS_REPOSITORIES_PAGE_HH 1
-
-#include <paludis/util/private_implementation_pattern.hh>
-#include <paludis/name.hh>
-#include <libgtkpaludis/main_notebook_page.hh>
-#include <gtkmm/table.h>
-
-namespace gtkpaludis
-{
- class MainWindow;
-
- class RepositoriesPage :
- public Gtk::Table,
- public MainNotebookPage,
- private paludis::PrivateImplementationPattern<RepositoriesPage>
- {
- public:
- RepositoriesPage(MainWindow * const m);
- ~RepositoriesPage();
-
- virtual void populate();
-
- void set_repository(const paludis::RepositoryName &);
- };
-}
-
-#endif
diff --git a/src/clients/gtkpaludis/libgtkpaludis/repository_buttons.cc b/src/clients/gtkpaludis/libgtkpaludis/repository_buttons.cc
deleted file mode 100644
index dbc077a..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/repository_buttons.cc
+++ /dev/null
@@ -1,92 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#include "repository_buttons.hh"
-#include "main_window.hh"
-#include "gui_sync_task.hh"
-#include <gtkmm/button.h>
-#include <paludis/environment.hh>
-#include <paludis/util/private_implementation_pattern-impl.hh>
-#include <paludis/package_database.hh>
-#include <paludis/repository.hh>
-
-using namespace gtkpaludis;
-using namespace paludis;
-
-namespace paludis
-{
- template<>
- struct Implementation<RepositoryButtons>
- {
- MainWindow * const main_window;
-
- Gtk::Button sync_button;
- Gtk::Button sync_all_button;
-
- std::tr1::shared_ptr<const RepositoryName> repository_name;
-
- Implementation(MainWindow * const m) :
- main_window(m),
- sync_button("Sync"),
- sync_all_button("Sync All")
- {
- }
- };
-}
-
-RepositoryButtons::RepositoryButtons(MainWindow * const m) :
- Gtk::HButtonBox(),
- PrivateImplementationPattern<RepositoryButtons>(new Implementation<RepositoryButtons>(m))
-{
- set_layout(Gtk::BUTTONBOX_END);
- set_spacing(10);
-
- _imp->sync_button.signal_clicked().connect(sigc::mem_fun(this, &RepositoryButtons::handle_sync_button_clicked));
- add(_imp->sync_button);
-
- _imp->sync_all_button.signal_clicked().connect(sigc::mem_fun(this, &RepositoryButtons::handle_sync_all_button_clicked));
- add(_imp->sync_all_button);
-}
-
-RepositoryButtons::~RepositoryButtons()
-{
-}
-
-void
-RepositoryButtons::set_repository(const RepositoryName & name)
-{
- _imp->repository_name.reset(new RepositoryName(name));
- _imp->main_window->paludis_thread_action(
- sigc::bind(sigc::mem_fun(this, &RepositoryButtons::set_repository_in_paludis_thread), name),
- "Preparing repository buttons");
-}
-
-void
-RepositoryButtons::set_repository_in_paludis_thread(const RepositoryName & name)
-{
- _imp->main_window->gui_thread_action(
- sigc::bind(sigc::mem_fun(this, &RepositoryButtons::set_repository_in_gui_thread),
- 0 != (*_imp->main_window->environment()->package_database()->fetch_repository(name)).syncable_interface()));
-}
-
-void
-RepositoryButtons::set_repository_in_gui_thread(const bool v)
-{
- _imp->sync_button.set_sensitive(v);
-}
-
-void
-RepositoryButtons::handle_sync_button_clicked()
-{
- GuiSyncTask * task(new GuiSyncTask(_imp->main_window));
- if (_imp->repository_name)
- task->add_target(stringify(*_imp->repository_name));
- task->run();
-}
-
-void
-RepositoryButtons::handle_sync_all_button_clicked()
-{
- GuiSyncTask * task(new GuiSyncTask(_imp->main_window));
- task->run();
-}
-
diff --git a/src/clients/gtkpaludis/libgtkpaludis/repository_buttons.hh b/src/clients/gtkpaludis/libgtkpaludis/repository_buttons.hh
deleted file mode 100644
index bf2c3ad..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/repository_buttons.hh
+++ /dev/null
@@ -1,34 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#ifndef GTKPALUDIS_GUARD_LIBGTKPALUDIS_REPOSITORY_BUTTONS_HH
-#define GTKPALUDIS_GUARD_LIBGTKPALUDIS_REPOSITORY_BUTTONS_HH 1
-
-#include <gtkmm/buttonbox.h>
-#include <paludis/util/private_implementation_pattern.hh>
-#include <paludis/name.hh>
-
-namespace gtkpaludis
-{
- class MainWindow;
-
- class RepositoryButtons :
- public Gtk::HButtonBox,
- private paludis::PrivateImplementationPattern<RepositoryButtons>
- {
- private:
- void set_repository_in_paludis_thread(const paludis::RepositoryName &);
- void set_repository_in_gui_thread(const bool);
-
- protected:
- void handle_sync_button_clicked();
- void handle_sync_all_button_clicked();
-
- public:
- RepositoryButtons(MainWindow * const m);
- ~RepositoryButtons();
-
- void set_repository(const paludis::RepositoryName &);
- };
-}
-
-#endif
diff --git a/src/clients/gtkpaludis/libgtkpaludis/repository_info.cc b/src/clients/gtkpaludis/libgtkpaludis/repository_info.cc
deleted file mode 100644
index 1fec280..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/repository_info.cc
+++ /dev/null
@@ -1,45 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#include "repository_info.hh"
-#include "repository_info_model.hh"
-#include <paludis/util/private_implementation_pattern-impl.hh>
-
-using namespace gtkpaludis;
-
-namespace paludis
-{
- template<>
- struct Implementation<gtkpaludis::RepositoryInfo>
- {
- MainWindow * const main_window;
-
- Glib::RefPtr<RepositoryInfoModel> model;
-
- Implementation(MainWindow * const m) :
- main_window(m),
- model(new RepositoryInfoModel(m))
- {
- }
- };
-}
-
-RepositoryInfo::RepositoryInfo(MainWindow * const m) :
- Gtk::TreeView(),
- paludis::PrivateImplementationPattern<RepositoryInfo>(new paludis::Implementation<RepositoryInfo>(m))
-{
- set_model(_imp->model);
-
- append_column("Key", _imp->model->columns().col_key);
- append_column("Value", _imp->model->columns().col_value);
-}
-
-RepositoryInfo::~RepositoryInfo()
-{
-}
-
-void
-RepositoryInfo::set_repository(const paludis::RepositoryName & name)
-{
- _imp->model->set_repository(name);
-}
-
diff --git a/src/clients/gtkpaludis/libgtkpaludis/repository_info.hh b/src/clients/gtkpaludis/libgtkpaludis/repository_info.hh
deleted file mode 100644
index d9c26a5..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/repository_info.hh
+++ /dev/null
@@ -1,26 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#ifndef GTKPALUDIS_GUARD_LIBGTKPALUDIS_REPOSITORY_INFO_HH
-#define GTKPALUDIS_GUARD_LIBGTKPALUDIS_REPOSITORY_INFO_HH 1
-
-#include <gtkmm/treeview.h>
-#include <paludis/util/private_implementation_pattern.hh>
-#include <paludis/name.hh>
-
-namespace gtkpaludis
-{
- class MainWindow;
-
- class RepositoryInfo :
- public Gtk::TreeView,
- private paludis::PrivateImplementationPattern<RepositoryInfo>
- {
- public:
- RepositoryInfo(MainWindow * const);
- ~RepositoryInfo();
-
- void set_repository(const paludis::RepositoryName &);
- };
-}
-
-#endif
diff --git a/src/clients/gtkpaludis/libgtkpaludis/repository_info_model.cc b/src/clients/gtkpaludis/libgtkpaludis/repository_info_model.cc
deleted file mode 100644
index d7c4237..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/repository_info_model.cc
+++ /dev/null
@@ -1,99 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#include "repository_info_model.hh"
-#include "main_window.hh"
-#include <paludis/repository.hh>
-#include <paludis/environment.hh>
-#include <paludis/package_database.hh>
-#include <paludis/util/wrapped_forward_iterator.hh>
-#include <paludis/util/private_implementation_pattern-impl.hh>
-#include <paludis/util/indirect_iterator-impl.hh>
-
-using namespace gtkpaludis;
-using namespace paludis;
-
-namespace paludis
-{
- template<>
- struct Implementation<RepositoryInfoModel>
- {
- MainWindow * const main_window;
- RepositoryInfoModel::Columns columns;
-
- Implementation(MainWindow * const m) :
- main_window(m)
- {
- }
- };
-}
-
-RepositoryInfoModel::RepositoryInfoModel(MainWindow * const m) :
- PrivateImplementationPattern<RepositoryInfoModel>(new Implementation<RepositoryInfoModel>(m)),
- Gtk::TreeStore(_imp->columns)
-{
-}
-
-RepositoryInfoModel::~RepositoryInfoModel()
-{
-}
-
-void
-RepositoryInfoModel::set_repository(const RepositoryName &)
-{
-#if 0
- _imp->main_window->paludis_thread_action(
- sigc::bind(sigc::mem_fun(this, &RepositoryInfoModel::set_repository_in_paludis_thread), name),
- "Populating repository information model");
-#endif
-}
-
-#if 0
-void
-RepositoryInfoModel::set_repository_in_paludis_thread(const RepositoryName & name)
-{
- std::tr1::shared_ptr<const RepositoryInfo> info(
- _imp->main_window->environment()->package_database()->fetch_repository(name)->info(true));
-
- _imp->main_window->gui_thread_action(
- sigc::bind(sigc::mem_fun(this, &RepositoryInfoModel::set_repository_in_gui_thread), info));
-}
-
-void
-RepositoryInfoModel::set_repository_in_gui_thread(std::tr1::shared_ptr<const RepositoryInfo> info)
-{
- clear();
- for (IndirectIterator<RepositoryInfo::SectionConstIterator>
- s(indirect_iterator(info->begin_sections())), s_end(indirect_iterator(info->end_sections())) ;
- s != s_end ; ++s)
- {
- iterator i(append());
- (*i)[_imp->columns.col_key] = s->heading();
-
- for (RepositoryInfoSection::KeyValueConstIterator k(s->begin_kvs()), k_end(s->end_kvs()) ;
- k != k_end ; ++k)
- {
- iterator j(append(i->children()));
- (*j)[_imp->columns.col_key] = k->first;
- (*j)[_imp->columns.col_value] = k->second;
- }
- }
-}
-#endif
-
-RepositoryInfoModel::Columns::Columns()
-{
- add(col_key);
- add(col_value);
-}
-
-RepositoryInfoModel::Columns::~Columns()
-{
-}
-
-RepositoryInfoModel::Columns &
-RepositoryInfoModel::columns()
-{
- return _imp->columns;
-}
-
-
diff --git a/src/clients/gtkpaludis/libgtkpaludis/repository_info_model.hh b/src/clients/gtkpaludis/libgtkpaludis/repository_info_model.hh
deleted file mode 100644
index 7ce6cf4..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/repository_info_model.hh
+++ /dev/null
@@ -1,51 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#ifndef GTKPALUDIS_GUARD_LIBGTKPALUDIS_REPOSITORY_INFO_MODEL_HH
-#define GTKPALUDIS_GUARD_LIBGTKPALUDIS_REPOSITORY_INFO_MODEL_HH 1
-
-#include <gtkmm/treestore.h>
-#include <paludis/util/private_implementation_pattern.hh>
-#include <paludis/name.hh>
-#include <tr1/memory>
-
-namespace paludis
-{
- class RepositoryInfo;
-}
-
-namespace gtkpaludis
-{
- class MainWindow;
-
- class RepositoryInfoModel :
- private paludis::PrivateImplementationPattern<RepositoryInfoModel>,
- public Gtk::TreeStore
- {
- private:
-#if 0
- void set_repository_in_paludis_thread(const paludis::RepositoryName &);
- void set_repository_in_gui_thread(std::tr1::shared_ptr<const paludis::RepositoryInfo>);
-#endif
-
- public:
- RepositoryInfoModel(MainWindow * const);
- ~RepositoryInfoModel();
-
- void set_repository(const paludis::RepositoryName &);
-
- class Columns :
- public Gtk::TreeModelColumnRecord
- {
- public:
- Columns();
- ~Columns();
-
- Gtk::TreeModelColumn<Glib::ustring> col_key;
- Gtk::TreeModelColumn<Glib::ustring> col_value;
- };
-
- Columns & columns();
- };
-}
-
-#endif
diff --git a/src/clients/gtkpaludis/libgtkpaludis/sets_list.cc b/src/clients/gtkpaludis/libgtkpaludis/sets_list.cc
deleted file mode 100644
index e08c9e9..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/sets_list.cc
+++ /dev/null
@@ -1,60 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#include "sets_list.hh"
-#include "sets_list_model.hh"
-#include "packages_page.hh"
-#include <paludis/util/private_implementation_pattern-impl.hh>
-
-using namespace gtkpaludis;
-using namespace paludis;
-
-namespace paludis
-{
- template<>
- struct Implementation<SetsList>
- {
- Glib::RefPtr<SetsListModel> model;
- MainWindow * const main_window;
- PackagesPage * const packages_page;
-
- Implementation(MainWindow * const m, PackagesPage * const p) :
- model(new SetsListModel(m, p)),
- main_window(m),
- packages_page(p)
- {
- }
- };
-}
-
-SetsList::SetsList(MainWindow * const m, PackagesPage * const p) :
- Gtk::TreeView(),
- PrivateImplementationPattern<SetsList>(new Implementation<SetsList>(m, p))
-{
- set_model(_imp->model);
-
- append_column("Set", _imp->model->columns().col_set_name);
-
- signal_cursor_changed().connect(sigc::mem_fun(this, &SetsList::handle_signal_cursor_changed));
-}
-
-SetsList::~SetsList()
-{
-}
-
-void
-SetsList::populate()
-{
- _imp->model->populate();
-}
-
-void
-SetsList::handle_signal_cursor_changed()
-{
- if (get_selection()->get_selected())
- _imp->packages_page->set_set(std::tr1::shared_ptr<SetName>(new SetName(
- static_cast<Glib::ustring>((*get_selection()->get_selected())[_imp->model->columns().col_set_name]).raw())));
- else
- _imp->packages_page->set_set(
- std::tr1::shared_ptr<SetName>());
-}
-
diff --git a/src/clients/gtkpaludis/libgtkpaludis/sets_list.hh b/src/clients/gtkpaludis/libgtkpaludis/sets_list.hh
deleted file mode 100644
index dff6a06..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/sets_list.hh
+++ /dev/null
@@ -1,30 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#ifndef GTKPALUDIS_GUARD_LIBGTKPALUDIS_SETS_LIST_HH
-#define GTKPALUDIS_GUARD_LIBGTKPALUDIS_SETS_LIST_HH 1
-
-#include <paludis/util/private_implementation_pattern.hh>
-#include <gtkmm/treeview.h>
-
-namespace gtkpaludis
-{
- class MainWindow;
- class PackagesPage;
-
- class SetsList :
- public Gtk::TreeView,
- private paludis::PrivateImplementationPattern<SetsList>
- {
- protected:
- void handle_signal_cursor_changed();
-
- public:
- SetsList(MainWindow * const m, PackagesPage * const p);
- ~SetsList();
-
- void populate();
- };
-}
-
-
-#endif
diff --git a/src/clients/gtkpaludis/libgtkpaludis/sets_list_model.cc b/src/clients/gtkpaludis/libgtkpaludis/sets_list_model.cc
deleted file mode 100644
index b07c00d..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/sets_list_model.cc
+++ /dev/null
@@ -1,120 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#include "sets_list_model.hh"
-#include "main_window.hh"
-#include "packages_page.hh"
-#include <paludis/util/private_implementation_pattern-impl.hh>
-#include <paludis/util/set.hh>
-#include <paludis/util/sequence.hh>
-#include <paludis/environment.hh>
-#include <paludis/package_database.hh>
-#include <paludis/util/wrapped_forward_iterator.hh>
-#include <paludis/util/wrapped_output_iterator.hh>
-#include <paludis/util/indirect_iterator-impl.hh>
-
-using namespace paludis;
-using namespace gtkpaludis;
-
-namespace paludis
-{
- template<>
- struct Implementation<SetsListModel>
- {
- MainWindow * const main_window;
- PackagesPage * const packages_page;
- SetsListModel::Columns columns;
-
- Implementation(MainWindow * const m, PackagesPage * const p) :
- main_window(m),
- packages_page(p)
- {
- }
- };
-}
-
-SetsListModel::SetsListModel(MainWindow * const m, PackagesPage * const p) :
- PrivateImplementationPattern<SetsListModel>(new Implementation<SetsListModel>(m, p)),
- Gtk::ListStore(_imp->columns)
-{
-}
-
-SetsListModel::~SetsListModel()
-{
-}
-
-void
-SetsListModel::populate()
-{
- _imp->main_window->paludis_thread_action(
- sigc::mem_fun(this, &SetsListModel::populate_in_paludis_thread), "Populating sets list model");
-}
-
-void
-SetsListModel::populate_in_paludis_thread()
-{
- std::tr1::shared_ptr<SetNameSet> columns(new SetNameSet);
-
- std::tr1::shared_ptr<const RepositoryNameSet> repos(
- _imp->packages_page->get_repository_filter()->repositories(_imp->main_window->environment()));
-
- if (repos)
- {
- for (RepositoryNameSet::ConstIterator r(repos->begin()), r_end(repos->end()) ;
- r != r_end ; ++r)
- {
- RepositorySetsInterface * const i((*_imp->main_window->environment()->package_database()->fetch_repository(*r)).sets_interface());
- if (i)
- {
- std::tr1::shared_ptr<const SetNameSet> sets(i->sets_list());
- std::copy(sets->begin(), sets->end(), columns->inserter());
- }
- }
- }
- else
- {
- for (IndirectIterator<PackageDatabase::RepositoryConstIterator>
- r(indirect_iterator(_imp->main_window->environment()->package_database()->begin_repositories())),
- r_end(indirect_iterator(_imp->main_window->environment()->package_database()->end_repositories())) ;
- r != r_end ; ++r)
- {
- RepositorySetsInterface * const i((*r).sets_interface());
- if (i)
- {
- std::tr1::shared_ptr<const SetNameSet> sets(i->sets_list());
- std::copy(sets->begin(), sets->end(), columns->inserter());
- }
- }
- }
-
- std::tr1::shared_ptr<const SetNameSet> sets(_imp->main_window->environment()->set_names());
- std::copy(sets->begin(), sets->end(), columns->inserter());
-
- _imp->main_window->gui_thread_action(
- sigc::bind(sigc::mem_fun(this, &SetsListModel::populate_in_gui_thread), columns));
-}
-
-void
-SetsListModel::populate_in_gui_thread(const std::tr1::shared_ptr<const SetNameSet> & names)
-{
- clear();
- for (SetNameSet::ConstIterator n(names->begin()), n_end(names->end()) ;
- n != n_end ; ++n)
- (*append())[_imp->columns.col_set_name] = stringify(*n);
-}
-
-
-SetsListModel::Columns::Columns()
-{
- add(col_set_name);
-}
-
-SetsListModel::Columns::~Columns()
-{
-}
-
-SetsListModel::Columns &
-SetsListModel::columns()
-{
- return _imp->columns;
-}
-
diff --git a/src/clients/gtkpaludis/libgtkpaludis/sets_list_model.hh b/src/clients/gtkpaludis/libgtkpaludis/sets_list_model.hh
deleted file mode 100644
index 31f5b84..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/sets_list_model.hh
+++ /dev/null
@@ -1,45 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#ifndef GTKPALUDIS_GUARD_LIBGTKPALUDIS_SETS_LIST_MODEL_HH
-#define GTKPALUDIS_GUARD_LIBGTKPALUDIS_SETS_LIST_MODEL_HH 1
-
-#include <gtkmm/liststore.h>
-#include <paludis/util/private_implementation_pattern.hh>
-#include <paludis/name.hh>
-#include <tr1/memory>
-
-namespace gtkpaludis
-{
- class MainWindow;
- class PackagesPage;
-
- class SetsListModel :
- private paludis::PrivateImplementationPattern<SetsListModel>,
- public Gtk::ListStore
- {
- protected:
- void populate_in_paludis_thread();
- void populate_in_gui_thread(const std::tr1::shared_ptr<const paludis::SetNameSet> & names);
-
- public:
- SetsListModel(MainWindow * const m, PackagesPage * const p);
- ~SetsListModel();
-
- void populate();
-
- class Columns :
- public Gtk::TreeModelColumnRecord
- {
- public:
- Columns();
- ~Columns();
-
- Gtk::TreeModelColumn<Glib::ustring> col_set_name;
- };
-
- Columns & columns();
- };
-}
-
-
-#endif
diff --git a/src/clients/gtkpaludis/libgtkpaludis/task_sequence_list.cc b/src/clients/gtkpaludis/libgtkpaludis/task_sequence_list.cc
deleted file mode 100644
index 83a988a..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/task_sequence_list.cc
+++ /dev/null
@@ -1,50 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#include "task_sequence_list.hh"
-#include "task_sequence_list_model.hh"
-#include <paludis/util/private_implementation_pattern-impl.hh>
-
-using namespace gtkpaludis;
-using namespace paludis;
-
-namespace paludis
-{
- template<>
- struct Implementation<TaskSequenceList>
- {
- Glib::RefPtr<TaskSequenceListModel> model;
-
- Implementation() :
- model(new TaskSequenceListModel)
- {
- }
- };
-}
-
-TaskSequenceList::TaskSequenceList() :
- Gtk::TreeView(),
- PrivateImplementationPattern<TaskSequenceList>(new Implementation<TaskSequenceList>())
-{
- set_model(_imp->model);
-
- append_column("Action", _imp->model->columns().col_description);
- append_column("Status", _imp->model->columns().col_status);
-}
-
-TaskSequenceList::~TaskSequenceList()
-{
-}
-
-void
-TaskSequenceList::append_sequence_item(const std::string & id, const std::string & description,
- const std::string & status)
-{
- _imp->model->append_sequence_item(id, description, status);
-}
-
-void
-TaskSequenceList::set_sequence_item_status(const std::string & id, const std::string & status)
-{
- _imp->model->set_sequence_item_status(id, status);
-}
-
diff --git a/src/clients/gtkpaludis/libgtkpaludis/task_sequence_list.hh b/src/clients/gtkpaludis/libgtkpaludis/task_sequence_list.hh
deleted file mode 100644
index c72967f..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/task_sequence_list.hh
+++ /dev/null
@@ -1,27 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#ifndef GTKPALUDIS_GUARD_LIBGTKPALUDIS_TASK_SEQUENCE_LIST_HH
-#define GTKPALUDIS_GUARD_LIBGTKPALUDIS_TASK_SEQUENCE_LIST_HH 1
-
-#include <paludis/util/private_implementation_pattern.hh>
-#include <gtkmm/treeview.h>
-
-namespace gtkpaludis
-{
- class TaskSequenceList :
- public Gtk::TreeView,
- private paludis::PrivateImplementationPattern<TaskSequenceList>
- {
- public:
- TaskSequenceList();
- ~TaskSequenceList();
-
- void append_sequence_item(const std::string & id, const std::string & description,
- const std::string & status);
-
- void set_sequence_item_status(const std::string & id, const std::string & status);
- };
-}
-
-
-#endif
diff --git a/src/clients/gtkpaludis/libgtkpaludis/task_sequence_list_model.cc b/src/clients/gtkpaludis/libgtkpaludis/task_sequence_list_model.cc
deleted file mode 100644
index 4f9cc58..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/task_sequence_list_model.cc
+++ /dev/null
@@ -1,63 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#include "task_sequence_list_model.hh"
-#include <paludis/util/private_implementation_pattern-impl.hh>
-
-using namespace paludis;
-using namespace gtkpaludis;
-
-namespace paludis
-{
- template<>
- struct Implementation<TaskSequenceListModel>
- {
- TaskSequenceListModel::Columns columns;
- };
-}
-
-TaskSequenceListModel::TaskSequenceListModel() :
- PrivateImplementationPattern<TaskSequenceListModel>(new Implementation<TaskSequenceListModel>()),
- Gtk::ListStore(_imp->columns)
-{
-}
-
-TaskSequenceListModel::~TaskSequenceListModel()
-{
-}
-
-TaskSequenceListModel::Columns::Columns()
-{
- add(col_id);
- add(col_description);
- add(col_status);
-}
-
-TaskSequenceListModel::Columns::~Columns()
-{
-}
-
-TaskSequenceListModel::Columns &
-TaskSequenceListModel::columns()
-{
- return _imp->columns;
-}
-
-void
-TaskSequenceListModel::append_sequence_item(const std::string & id, const std::string & description,
- const std::string & status)
-{
- iterator r(append());
- (*r)[_imp->columns.col_id] = id;
- (*r)[_imp->columns.col_description] = description;
- (*r)[_imp->columns.col_status] = status;
-}
-
-void
-TaskSequenceListModel::set_sequence_item_status(const std::string & id, const std::string & status)
-{
- Children c(children());
- for (iterator r(c.begin()), r_end(c.end()) ; r != r_end ; ++r)
- if ((*r)[_imp->columns.col_id] == id)
- (*r)[_imp->columns.col_status] = status;
-}
-
diff --git a/src/clients/gtkpaludis/libgtkpaludis/task_sequence_list_model.hh b/src/clients/gtkpaludis/libgtkpaludis/task_sequence_list_model.hh
deleted file mode 100644
index 2b24ced..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/task_sequence_list_model.hh
+++ /dev/null
@@ -1,41 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#ifndef GTKPALUDIS_GUARD_LIBGTKPALUDIS_TASK_SEQUENCE_LIST_MODEL_HH
-#define GTKPALUDIS_GUARD_LIBGTKPALUDIS_TASK_SEQUENCE_LIST_MODEL_HH 1
-
-#include <gtkmm/liststore.h>
-#include <paludis/util/private_implementation_pattern.hh>
-
-namespace gtkpaludis
-{
- class TaskSequenceListModel :
- private paludis::PrivateImplementationPattern<TaskSequenceListModel>,
- public Gtk::ListStore
- {
- public:
- TaskSequenceListModel();
- ~TaskSequenceListModel();
-
- class Columns :
- public Gtk::TreeModelColumnRecord
- {
- public:
- Columns();
- ~Columns();
-
- Gtk::TreeModelColumn<Glib::ustring> col_id;
- Gtk::TreeModelColumn<Glib::ustring> col_description;
- Gtk::TreeModelColumn<Glib::ustring> col_status;
- };
-
- Columns & columns();
-
- void append_sequence_item(const std::string & id, const std::string & description,
- const std::string & status);
-
- void set_sequence_item_status(const std::string & id, const std::string & status);
- };
-}
-
-
-#endif
diff --git a/src/clients/gtkpaludis/libgtkpaludis/task_window.cc b/src/clients/gtkpaludis/libgtkpaludis/task_window.cc
deleted file mode 100644
index c7c452c..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/task_window.cc
+++ /dev/null
@@ -1,173 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#include "task_window.hh"
-#include "main_window.hh"
-#include "gui_task.hh"
-#include "task_sequence_list.hh"
-#include <paludis/util/private_implementation_pattern-impl.hh>
-#include <paludis/util/fd_output_stream.hh>
-#include <paludis/util/system.hh>
-#include <paludis/util/log.hh>
-#include <gtkmm/table.h>
-#include <gtkmm/button.h>
-#include <gtkmm/buttonbox.h>
-#include <gtkmm/stock.h>
-#include <gtkmm/statusbar.h>
-#include <gtkmm/scrolledwindow.h>
-#include <vtemm/terminal_widget.hh>
-#include <tr1/memory>
-#include <cstdlib>
-#include <fcntl.h>
-
-using namespace gtkpaludis;
-using namespace paludis;
-
-namespace paludis
-{
- template<>
- struct Implementation<TaskWindow>
- {
- MainWindow * const main_window;
- GuiTask * const task;
-
- Gtk::Table main_table;
- Gtk::HButtonBox main_button_box;
- Gtk::Button ok_button;
- Gtk::Statusbar status_bar;
-
- Gtk::ScrolledWindow task_sequence_list_scroll;
- TaskSequenceList task_sequence_list;
-
- Vte::Terminal terminal;
- int master_fd, slave_fd;
-
- std::tr1::shared_ptr<FDOutputStream> messages_stream;
-
- Implementation(MainWindow * const m, GuiTask * const t) :
- main_window(m),
- task(t),
- main_table(4, 1),
- ok_button(Gtk::Stock::OK),
- master_fd(posix_openpt(O_RDWR | O_NOCTTY))
- {
- grantpt(master_fd);
- unlockpt(master_fd);
- slave_fd = open(ptsname(master_fd), O_RDWR);
-
- messages_stream.reset(new FDOutputStream(slave_fd));
- }
-
- ~Implementation()
- {
- close(master_fd);
- close(slave_fd);
- }
- };
-}
-
-TaskWindow::TaskWindow(MainWindow * const m, GuiTask * const t) :
- ThreadedWindow(Gtk::WINDOW_TOPLEVEL, m->environment()),
- PrivateImplementationPattern<TaskWindow>(new Implementation<TaskWindow>(m, t)),
- _imp(PrivateImplementationPattern<TaskWindow>::_imp)
-{
- m->desensitise();
-
- set_modal(true);
- set_transient_for(*m);
- set_position(Gtk::WIN_POS_CENTER_ON_PARENT);
- set_title("Task");
- set_default_size(700, 500);
- set_border_width(4);
-
- _imp->ok_button.signal_clicked().connect(sigc::mem_fun(this, &TaskWindow::handle_ok_button_clicked));
-
- _imp->terminal.set_pty(dup(_imp->master_fd));
- set_run_command_stdout_fds(_imp->slave_fd, _imp->master_fd);
- set_run_command_stderr_fds(_imp->slave_fd, _imp->master_fd);
- Log::get_instance()->set_log_stream(_imp->messages_stream.get());
-
- _imp->terminal.set_scroll_on_output(true);
-
- _imp->main_button_box.set_layout(Gtk::BUTTONBOX_END);
- _imp->main_button_box.set_spacing(10);
- _imp->main_button_box.add(_imp->ok_button);
-
- _imp->status_bar.set_has_resize_grip(true);
-
- _imp->task_sequence_list_scroll.set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
- _imp->task_sequence_list_scroll.add(_imp->task_sequence_list);
- _imp->main_table.attach(_imp->task_sequence_list_scroll, 0, 1, 0, 1, Gtk::EXPAND | Gtk::FILL,
- Gtk::EXPAND | Gtk::FILL, 4, 4);
-
- _imp->main_table.attach(_imp->terminal, 0, 1, 1, 2, Gtk::EXPAND | Gtk::FILL,
- Gtk::EXPAND | Gtk::FILL, 4, 4);
-
- _imp->main_table.attach(_imp->main_button_box, 0, 1, 2, 3, Gtk::EXPAND | Gtk::FILL,
- Gtk::FILL, 4, 4);
- _imp->main_table.attach(_imp->status_bar, 0, 1, 3, 4, Gtk::EXPAND | Gtk::FILL,
- Gtk::FILL, 4, 4);
-
- add(_imp->main_table);
-
- show_all();
-}
-
-TaskWindow::~TaskWindow()
-{
- _imp->main_window->set_capture_output_options();
- _imp->main_window->sensitise();
-}
-
-void
-TaskWindow::handle_ok_button_clicked()
-{
- handle_delete_event(0);
-}
-
-bool
-TaskWindow::handle_delete_event(GdkEventAny * a)
-{
- ThreadedWindow::handle_delete_event(a);
- delete _imp->task;
- delete this;
- return false;
-}
-
-void
-TaskWindow::push_status_message(const std::string & s)
-{
- _imp->status_bar.push(s);
-}
-
-void
-TaskWindow::pop_status_message()
-{
- _imp->status_bar.pop();
-}
-
-void
-TaskWindow::do_set_sensitive(const bool v)
-{
- _imp->main_button_box.set_sensitive(v);
-}
-
-void
-TaskWindow::run()
-{
- show_all();
- paludis_thread_action(sigc::mem_fun(_imp->task, &GuiTask::paludis_thread_execute), "Executing task");
-}
-
-void
-TaskWindow::append_sequence_item(const std::string & id, const std::string & description,
- const std::string & status)
-{
- _imp->task_sequence_list.append_sequence_item(id, description, status);
-}
-
-void
-TaskWindow::set_sequence_item_status(const std::string & id, const std::string & status)
-{
- _imp->task_sequence_list.set_sequence_item_status(id, status);
-}
-
diff --git a/src/clients/gtkpaludis/libgtkpaludis/task_window.hh b/src/clients/gtkpaludis/libgtkpaludis/task_window.hh
deleted file mode 100644
index 358c50b..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/task_window.hh
+++ /dev/null
@@ -1,41 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#ifndef PALUDIS_GUARD_SRC_CLIENTS_GTKPALUDIS_LIBGTKPALUDIS_TASK_WINDOW_HH
-#define PALUDIS_GUARD_SRC_CLIENTS_GTKPALUDIS_LIBGTKPALUDIS_TASK_WINDOW_HH 1
-
-#include <libgtkpaludis/threaded_window.hh>
-#include <paludis/util/private_implementation_pattern.hh>
-
-namespace gtkpaludis
-{
- class MainWindow;
- class GuiTask;
-
- class TaskWindow :
- public ThreadedWindow,
- private paludis::PrivateImplementationPattern<TaskWindow>
- {
- private:
- paludis::PrivateImplementationPattern<TaskWindow>::ImpPtr & _imp;
-
- protected:
- virtual bool handle_delete_event(GdkEventAny *);
- void handle_ok_button_clicked();
- virtual void do_set_sensitive(const bool);
-
- virtual void push_status_message(const std::string &);
- virtual void pop_status_message();
-
- public:
- TaskWindow(MainWindow * const, GuiTask * const);
- ~TaskWindow();
-
- void run();
-
- void append_sequence_item(const std::string & id, const std::string & description,
- const std::string & status);
- void set_sequence_item_status(const std::string & id, const std::string & status);
- };
-}
-
-#endif
diff --git a/src/clients/gtkpaludis/libgtkpaludis/threaded_window.cc b/src/clients/gtkpaludis/libgtkpaludis/threaded_window.cc
deleted file mode 100644
index a7c8452..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/threaded_window.cc
+++ /dev/null
@@ -1,208 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#include "threaded_window.hh"
-#include <paludis/util/exception.hh>
-#include <paludis/util/stringify.hh>
-#include <paludis/util/private_implementation_pattern-impl.hh>
-#include <gtkmm/dialog.h>
-#include <gtkmm/messagedialog.h>
-#include <gtkmm/stock.h>
-#include <tr1/functional>
-#include <unistd.h>
-#include <algorithm>
-#include <list>
-
-using namespace paludis;
-using namespace gtkpaludis;
-
-namespace paludis
-{
- template<>
- struct Implementation<ThreadedWindow>
- {
- Environment * const environment;
-
- int sensitivity;
- Gtk::Widget * saved_focus;
-
- Glib::Mutex gui_queue_lock;
- std::list<sigc::slot<void> > gui_queue;
-
- Glib::Mutex paludis_queue_lock;
- std::list<sigc::slot<void> > paludis_queue;
- int paludis_queue_pipe[2];
-
- bool paludis_queue_exit;
-
- Glib::Thread * paludis_thread;
-
- Implementation(Environment * const e) :
- environment(e),
- sensitivity(0),
- saved_focus(0),
- paludis_queue_exit(false)
- {
- if (0 != pipe(paludis_queue_pipe))
- throw InternalError(PALUDIS_HERE, "pipe() failed");
- }
- };
-}
-
-ThreadedWindow::ThreadedWindow(Gtk::WindowType w, Environment * const e) :
- Gtk::Window(w),
- PrivateImplementationPattern<ThreadedWindow>(new Implementation<ThreadedWindow>(e))
-{
- Glib::signal_timeout().connect(sigc::mem_fun(this, &ThreadedWindow::run_gui_queue), 10);
- _imp->paludis_thread = Glib::Thread::create(sigc::mem_fun(this, &ThreadedWindow::run_paludis_queue), true);
- signal_delete_event().connect(sigc::mem_fun(this, &ThreadedWindow::handle_delete_event));
-}
-
-ThreadedWindow::~ThreadedWindow()
-{
-}
-
-bool
-ThreadedWindow::handle_delete_event(GdkEventAny *)
-{
- desensitise();
-
- _imp->paludis_queue_exit = true;
- char x('x');
- write(_imp->paludis_queue_pipe[1], &x, 1);
- _imp->paludis_thread->join();
-
- return false;
-}
-
-void
-ThreadedWindow::paludis_thread_action(const sigc::slot<void> & a, const std::string & status_message)
-{
- desensitise();
- Glib::Mutex::Lock l(_imp->paludis_queue_lock);
- _imp->paludis_queue.push_back(sigc::bind(sigc::mem_fun(this, &ThreadedWindow::paludis_thread_action_then_sensitise),
- a, status_message));
-
- char x('x');
- write(_imp->paludis_queue_pipe[1], &x, 1);
-}
-
-void
-ThreadedWindow::paludis_thread_action_then_sensitise(const sigc::slot<void> & a, const std::string & status_message)
-{
- if (! status_message.empty())
- gui_thread_action(sigc::bind(sigc::mem_fun(this, &ThreadedWindow::push_status_message), status_message));
-
- try
- {
- a();
- }
- catch (const Exception & e)
- {
- gui_thread_action(sigc::bind(sigc::mem_fun(this, &ThreadedWindow::notify_exception),
- std::string(e.message()), std::string(e.what()), std::string(e.backtrace("\n"))));
- }
- catch (const std::exception & e)
- {
- gui_thread_action(sigc::bind(sigc::mem_fun(this, &ThreadedWindow::notify_exception),
- std::string(""), std::string(e.what()), std::string("")));
- }
-
- if (! status_message.empty())
- gui_thread_action(sigc::mem_fun(this, &ThreadedWindow::pop_status_message));
-
- gui_thread_action(sigc::mem_fun(this, &ThreadedWindow::sensitise));
-}
-
-void
-ThreadedWindow::gui_thread_action(const sigc::slot<void> & a)
-{
- Glib::Mutex::Lock l(_imp->gui_queue_lock);
- _imp->gui_queue.push_back(a);
-}
-
-void
-ThreadedWindow::sensitise()
-{
- if (0 == --_imp->sensitivity)
- {
- do_set_sensitive(true);
- if (_imp->saved_focus)
- {
- set_focus(*_imp->saved_focus);
- _imp->saved_focus = 0;
- }
- }
-}
-
-void
-ThreadedWindow::desensitise()
-{
- if (0 == _imp->sensitivity++)
- {
- _imp->saved_focus = get_focus();
- do_set_sensitive(false);
- }
-}
-
-bool
-ThreadedWindow::run_gui_queue()
-{
- std::list<sigc::slot<void> > local_queue;
-
- {
- Glib::Mutex::Lock l(_imp->gui_queue_lock);
- if (! _imp->gui_queue.empty())
- local_queue.splice(local_queue.begin(), _imp->gui_queue, _imp->gui_queue.begin(), _imp->gui_queue.end());
- }
-
- std::for_each(local_queue.begin(), local_queue.end(), std::tr1::mem_fn(&sigc::slot<void>::operator ()));
-
- return true;
-}
-
-void
-ThreadedWindow::run_paludis_queue()
-{
- while (! _imp->paludis_queue_exit)
- {
- std::list<sigc::slot<void> > local_queue;
-
- {
- Glib::Mutex::Lock l(_imp->paludis_queue_lock);
- if (! _imp->paludis_queue.empty())
- local_queue.splice(local_queue.begin(), _imp->paludis_queue, _imp->paludis_queue.begin(), _imp->paludis_queue.end());
- }
-
- if (local_queue.empty())
- {
- char buf[1024];
- read(_imp->paludis_queue_pipe[0], &buf, 1023);
- }
- else
- std::for_each(local_queue.begin(), local_queue.end(), std::tr1::mem_fn(&sigc::slot<void>::operator ()));
- }
-}
-
-Environment *
-ThreadedWindow::environment()
-{
- return _imp->environment;
-}
-
-void
-ThreadedWindow::do_set_sensitive(const bool v)
-{
- set_sensitive(v);
-}
-
-void
-ThreadedWindow::notify_exception(const std::string & message, const std::string & what,
- const std::string & backtrace)
-{
- Gtk::MessageDialog dialog(*this, "Caught exception", false, Gtk::MESSAGE_ERROR,
- Gtk::BUTTONS_OK);
- dialog.set_title("Caught exception '" + what + "'");
- dialog.set_secondary_text(backtrace + "Caught exception '" + message + "' (" + what + ")");
- dialog.run();
-}
-
diff --git a/src/clients/gtkpaludis/libgtkpaludis/threaded_window.hh b/src/clients/gtkpaludis/libgtkpaludis/threaded_window.hh
deleted file mode 100644
index e4ce78c..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/threaded_window.hh
+++ /dev/null
@@ -1,49 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#ifndef GTKPALUDIS_GUARD_LIBGTKPALUDIS_THREADED_WINDOW_HH
-#define GTKPALUDIS_GUARD_LIBGTKPALUDIS_THREADED_WINDOW_HH 1
-
-#include <gtkmm/window.h>
-#include <paludis/util/private_implementation_pattern.hh>
-
-namespace paludis
-{
- class Environment;
-}
-
-namespace gtkpaludis
-{
- class ThreadedWindow :
- public Gtk::Window,
- private paludis::PrivateImplementationPattern<ThreadedWindow>
- {
- protected:
- virtual bool handle_delete_event(GdkEventAny *);
-
- void paludis_thread_action_then_sensitise(const sigc::slot<void> &, const std::string & status_message);
- void desensitise();
- void sensitise();
- virtual void do_set_sensitive(const bool);
-
- bool run_gui_queue();
- void run_paludis_queue();
-
- ThreadedWindow(Gtk::WindowType, paludis::Environment * const);
-
- virtual void push_status_message(const std::string &) = 0;
- virtual void pop_status_message() = 0;
-
- public:
- ~ThreadedWindow();
-
- void paludis_thread_action(const sigc::slot<void> &, const std::string & status_message);
- void gui_thread_action(const sigc::slot<void> &);
-
- virtual void notify_exception(const std::string & message, const std::string & what,
- const std::string & backtrace);
-
- paludis::Environment * environment();
- };
-}
-
-#endif
diff --git a/src/clients/gtkpaludis/libgtkpaludis/version_info.cc b/src/clients/gtkpaludis/libgtkpaludis/version_info.cc
deleted file mode 100644
index b120a23..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/version_info.cc
+++ /dev/null
@@ -1,68 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#include "version_info.hh"
-#include "version_info_model.hh"
-#include "versions_page.hh"
-#include "query_window.hh"
-#include <paludis/util/private_implementation_pattern-impl.hh>
-
-using namespace gtkpaludis;
-using namespace paludis;
-
-namespace paludis
-{
- template<>
- struct Implementation<VersionInfo>
- {
- Glib::RefPtr<VersionInfoModel> model;
- QueryWindow * const query_window;
- VersionsPage * const versions_page;
-
- Implementation(QueryWindow * const m, VersionsPage * const p) :
- model(new VersionInfoModel(m, p)),
- query_window(m),
- versions_page(p)
- {
- }
- };
-}
-
-VersionInfo::VersionInfo(QueryWindow * const m, VersionsPage * const p) :
- Gtk::TreeView(),
- PrivateImplementationPattern<VersionInfo>(new Implementation<VersionInfo>(m, p))
-{
- set_model(_imp->model);
-
- append_column("Key", _imp->model->columns().col_key);
-
- Gtk::CellRendererText renderer;
- int c(append_column("Value", renderer) - 1);
- get_column(c)->add_attribute(renderer, "markup", _imp->model->columns().col_value_markup.index());
-}
-
-VersionInfo::~VersionInfo()
-{
-}
-
-void
-VersionInfo::populate()
-{
- _imp->model->populate();
- _imp->query_window->paludis_thread_action(
- sigc::mem_fun(this, &VersionInfo::populate_in_paludis_thread), "Populating version information");
-}
-
-void
-VersionInfo::populate_in_paludis_thread()
-{
- _imp->query_window->gui_thread_action(
- sigc::mem_fun(this, &VersionInfo::populate_in_gui_thread));
-}
-
-void
-VersionInfo::populate_in_gui_thread()
-{
- expand_all();
- columns_autosize();
-}
-
diff --git a/src/clients/gtkpaludis/libgtkpaludis/version_info.hh b/src/clients/gtkpaludis/libgtkpaludis/version_info.hh
deleted file mode 100644
index 7d587ae..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/version_info.hh
+++ /dev/null
@@ -1,30 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#ifndef GTKPALUDIS_GUARD_LIBGTKPALUDIS_VERSION_INFO_HH
-#define GTKPALUDIS_GUARD_LIBGTKPALUDIS_VERSION_INFO_HH 1
-
-#include <paludis/util/private_implementation_pattern.hh>
-#include <gtkmm/treeview.h>
-
-namespace gtkpaludis
-{
- class QueryWindow;
- class VersionsPage;
-
- class VersionInfo :
- public Gtk::TreeView,
- private paludis::PrivateImplementationPattern<VersionInfo>
- {
- protected:
- void populate_in_paludis_thread();
- void populate_in_gui_thread();
-
- public:
- VersionInfo(QueryWindow * const m, VersionsPage * const p);
- ~VersionInfo();
-
- void populate();
- };
-}
-
-#endif
diff --git a/src/clients/gtkpaludis/libgtkpaludis/version_info_model.cc b/src/clients/gtkpaludis/libgtkpaludis/version_info_model.cc
deleted file mode 100644
index 92723f3..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/version_info_model.cc
+++ /dev/null
@@ -1,335 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#include "version_info_model.hh"
-#include "query_window.hh"
-#include "versions_page.hh"
-#include "markup.hh"
-#include "markup_formatter.hh"
-#include <paludis/util/visitor-impl.hh>
-#include <paludis/util/set.hh>
-#include <paludis/util/strip.hh>
-#include <paludis/package_id.hh>
-#include <paludis/environment.hh>
-#include <paludis/package_database.hh>
-#include <paludis/util/private_implementation_pattern-impl.hh>
-#include <paludis/mask.hh>
-#include <paludis/metadata_key.hh>
-#include <list>
-
-using namespace paludis;
-using namespace gtkpaludis;
-
-namespace paludis
-{
- template<>
- struct Implementation<VersionInfoModel>
- {
- QueryWindow * const query_window;
- VersionsPage * const versions_page;
- VersionInfoModel::Columns columns;
-
- Implementation(QueryWindow * const m, VersionsPage * const p) :
- query_window(m),
- versions_page(p)
- {
- }
- };
-}
-
-namespace
-{
- struct PopulateDataItem
- {
- std::string key;
- std::string value_markup;
-
- PopulateDataItem(const std::string & k, const std::string & m) :
- key(k),
- value_markup(m)
- {
- }
- };
-}
-
-namespace gtkpaludis
-{
- struct VersionInfoModel::PopulateData
- {
- std::list<PopulateDataItem> items;
- };
-}
-
-
-VersionInfoModel::VersionInfoModel(QueryWindow * const m, VersionsPage * const p) :
- PrivateImplementationPattern<VersionInfoModel>(new Implementation<VersionInfoModel>(m, p)),
- Gtk::TreeStore(_imp->columns)
-{
-}
-
-VersionInfoModel::~VersionInfoModel()
-{
-}
-
-VersionInfoModel::Columns::Columns()
-{
- add(col_key);
- add(col_value_markup);
-}
-
-VersionInfoModel::Columns::~Columns()
-{
-}
-
-VersionInfoModel::Columns &
-VersionInfoModel::columns()
-{
- return _imp->columns;
-}
-
-void
-VersionInfoModel::populate()
-{
- _imp->query_window->paludis_thread_action(
- sigc::bind(sigc::mem_fun(this, &VersionInfoModel::populate_in_paludis_thread),
- _imp->versions_page->get_id()), "Populating version information model");
-}
-
-namespace gtkpaludis
-{
- struct VersionInfoModel::MetadataPopulator :
- ConstVisitor<MetadataKeyVisitorTypes>
- {
- MarkupFormatter formatter;
-
- virtual void got_key(const MetadataKey & k, const std::string & s) = 0;
-
- void visit(const MetadataCollectionKey<IUseFlagSet> & k)
- {
- got_key(k, k.pretty_print_flat(formatter));
- }
-
- void visit(const MetadataCollectionKey<Set<std::string> > & k)
- {
- got_key(k, k.pretty_print_flat(formatter));
- }
-
- void visit(const MetadataCollectionKey<Sequence<std::string> > & k)
- {
- got_key(k, k.pretty_print_flat(formatter));
- }
-
- void visit(const MetadataCollectionKey<FSEntrySequence> & k)
- {
- got_key(k, k.pretty_print_flat(formatter));
- }
-
- void visit(const MetadataCollectionKey<UseFlagNameSet> & k)
- {
- got_key(k, k.pretty_print_flat(formatter));
- }
-
- void visit(const MetadataCollectionKey<KeywordNameSet> & k)
- {
- got_key(k, k.pretty_print_flat(formatter));
- }
-
- void visit(const MetadataSpecTreeKey<DependencySpecTree> & k)
- {
- got_key(k, k.pretty_print_flat(formatter));
- }
-
- void visit(const MetadataSpecTreeKey<SimpleURISpecTree> & k)
- {
- got_key(k, k.pretty_print_flat(formatter));
- }
-
- void visit(const MetadataSpecTreeKey<FetchableURISpecTree> & k)
- {
- got_key(k, k.pretty_print_flat(formatter));
- }
-
- void visit(const MetadataSpecTreeKey<LicenseSpecTree> & k)
- {
- got_key(k, k.pretty_print_flat(formatter));
- }
-
- void visit(const MetadataSpecTreeKey<ProvideSpecTree> & k)
- {
- got_key(k, k.pretty_print_flat(formatter));
- }
-
- void visit(const MetadataSpecTreeKey<PlainTextSpecTree> & k)
- {
- got_key(k, k.pretty_print_flat(formatter));
- }
-
- void visit(const MetadataCollectionKey<PackageIDSequence> & k)
- {
- got_key(k, k.pretty_print_flat(formatter));
- }
-
- void visit(const MetadataValueKey<std::tr1::shared_ptr<const PackageID> > & k)
- {
- got_key(k, markup_escape(stringify(*k.value())));
- }
-
- void visit(const MetadataValueKey<std::string> & k)
- {
- got_key(k, markup_escape(stringify(k.value())));
- }
-
- void visit(const MetadataValueKey<long> & k)
- {
- got_key(k, markup_escape(stringify(k.value())));
- }
-
- void visit(const MetadataValueKey<bool> & k)
- {
- got_key(k, markup_escape(stringify(k.value())));
- }
-
- void visit(const MetadataTimeKey & k)
- {
- char buf[255];
- time_t t(k.value());
- if (! strftime(buf, 254, "%c", gmtime(&t)))
- buf[0] = '\0';
-
- got_key(k, markup_escape(stringify(buf)));
- }
-
- void visit(const MetadataValueKey<std::tr1::shared_ptr<const RepositoryMaskInfo> > & k)
- {
- if (! k.value())
- return;
-
- got_key(k, markup_escape(stringify((*k.value()).mask_file()) + ": " +
- join((*k.value()).comment()->begin(), (*k.value()).comment()->end(), " ")));
- }
-
- void visit(const MetadataValueKey<FSEntry> & k)
- {
- got_key(k, markup_escape(stringify(k.value())));
- }
-
- void visit(const MetadataValueKey<std::tr1::shared_ptr<const Contents> > &)
- {
- }
-
- void visit(const MetadataSectionKey &)
- {
- }
- };
-
- struct VersionInfoModel::KeyMetadataPopulator :
- VersionInfoModel::MetadataPopulator
- {
- std::tr1::shared_ptr<VersionInfoModel::PopulateData> data;
- const MetadataKeyType type;
-
- KeyMetadataPopulator(const std::tr1::shared_ptr<VersionInfoModel::PopulateData> & d, const MetadataKeyType t) :
- data(d),
- type(t)
- {
- }
-
- virtual void got_key(const MetadataKey & k, const std::string & s)
- {
- if (k.type() != type)
- return;
-
- data->items.push_back(PopulateDataItem(k.human_name(), s));
- }
- };
-
- struct VersionInfoModel::MaskMetadataPopulator :
- VersionInfoModel::MetadataPopulator
- {
- std::string result;
-
- virtual void got_key(const MetadataKey &, const std::string & s)
- {
- result = s;
- }
- };
-
- struct VersionInfoModel::MaskPopulator :
- ConstVisitor<MaskVisitorTypes>
- {
- std::tr1::shared_ptr<VersionInfoModel::PopulateData> data;
-
- MaskPopulator(const std::tr1::shared_ptr<VersionInfoModel::PopulateData> & d) :
- data(d)
- {
- }
-
- void visit(const UserMask & k)
- {
- data->items.push_back(PopulateDataItem("Masked by " + strip_leading_string(k.description(), "by "),
- markup_escape(k.description())));
- }
-
- void visit(const AssociationMask & k)
- {
- data->items.push_back(PopulateDataItem("Masked by " + strip_leading_string(k.description(), "by "),
- markup_escape(stringify(*k.associated_package()))));
- }
-
- void visit(const UnsupportedMask & k)
- {
- data->items.push_back(PopulateDataItem("Masked by " + strip_leading_string(k.description(), "by "),
- markup_escape(k.explanation())));
- }
-
- void visit(const RepositoryMask & k)
- {
- MaskMetadataPopulator p;
- if (k.mask_key())
- k.mask_key()->accept(p);
- data->items.push_back(PopulateDataItem("Masked by " + strip_leading_string(k.description(), "by "), p.result));
- }
-
- void visit(const UnacceptedMask & k)
- {
- MaskMetadataPopulator p;
- if (k.unaccepted_key())
- k.unaccepted_key()->accept(p);
- data->items.push_back(PopulateDataItem("Masked by " + strip_leading_string(k.description(), "by "), p.result));
- }
- };
-}
-
-void
-VersionInfoModel::populate_in_paludis_thread(const std::tr1::shared_ptr<const PackageID> & p)
-{
- std::tr1::shared_ptr<PopulateData> data(new PopulateData);
- if (p)
- {
- KeyMetadataPopulator mps(data, mkt_significant);
- std::for_each(indirect_iterator(p->begin_metadata()), indirect_iterator(p->end_metadata()), accept_visitor(mps));
-
- KeyMetadataPopulator mpn(data, mkt_normal);
- std::for_each(indirect_iterator(p->begin_metadata()), indirect_iterator(p->end_metadata()), accept_visitor(mpn));
-
- MaskPopulator mpm(data);
- std::for_each(indirect_iterator(p->begin_masks()), indirect_iterator(p->end_masks()), accept_visitor(mpm));
- }
-
- _imp->query_window->gui_thread_action(
- sigc::bind(sigc::mem_fun(this, &VersionInfoModel::populate_in_gui_thread), data));
-}
-
-void
-VersionInfoModel::populate_in_gui_thread(const std::tr1::shared_ptr<const VersionInfoModel::PopulateData> & names)
-{
- clear();
-
- for (std::list<PopulateDataItem>::const_iterator i(names->items.begin()), i_end(names->items.end()) ;
- i != i_end ; ++i)
- {
- iterator r(append());
- (*r)[_imp->columns.col_key] = i->key;
- (*r)[_imp->columns.col_value_markup] = i->value_markup;
- }
-}
-
diff --git a/src/clients/gtkpaludis/libgtkpaludis/version_info_model.hh b/src/clients/gtkpaludis/libgtkpaludis/version_info_model.hh
deleted file mode 100644
index 3f3a3f8..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/version_info_model.hh
+++ /dev/null
@@ -1,52 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#ifndef GTKPALUDIS_GUARD_LIBGTKPALUDIS_VERSION_INFO_MODEL_HH
-#define GTKPALUDIS_GUARD_LIBGTKPALUDIS_VERSION_INFO_MODEL_HH 1
-
-#include <gtkmm/treestore.h>
-#include <paludis/util/private_implementation_pattern.hh>
-#include <paludis/package_id-fwd.hh>
-#include <paludis/name.hh>
-#include <tr1/memory>
-
-namespace gtkpaludis
-{
- class QueryWindow;
- class VersionsPage;
-
- class VersionInfoModel :
- private paludis::PrivateImplementationPattern<VersionInfoModel>,
- public Gtk::TreeStore
- {
- protected:
- class MetadataPopulator;
- class KeyMetadataPopulator;
- class MaskMetadataPopulator;
- class MaskPopulator;
- class PopulateData;
-
- void populate_in_paludis_thread(const std::tr1::shared_ptr<const paludis::PackageID> &);
- void populate_in_gui_thread(const std::tr1::shared_ptr<const PopulateData> & names);
-
- public:
- VersionInfoModel(QueryWindow * const m, VersionsPage * const p);
- ~VersionInfoModel();
-
- class Columns :
- public Gtk::TreeModelColumnRecord
- {
- public:
- Columns();
- ~Columns();
-
- Gtk::TreeModelColumn<Glib::ustring> col_key;
- Gtk::TreeModelColumn<Glib::ustring> col_value_markup;
- };
-
- Columns & columns();
-
- void populate();
- };
-}
-
-#endif
diff --git a/src/clients/gtkpaludis/libgtkpaludis/versions_list.cc b/src/clients/gtkpaludis/libgtkpaludis/versions_list.cc
deleted file mode 100644
index 8488323..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/versions_list.cc
+++ /dev/null
@@ -1,99 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#include "versions_list.hh"
-#include "versions_list_model.hh"
-#include "versions_page.hh"
-#include "query_window.hh"
-#include <paludis/util/private_implementation_pattern-impl.hh>
-
-using namespace gtkpaludis;
-using namespace paludis;
-
-namespace paludis
-{
- template<>
- struct Implementation<VersionsList>
- {
- Glib::RefPtr<VersionsListModel> model;
- QueryWindow * const query_window;
- VersionsPage * const versions_page;
-
- Implementation(QueryWindow * const m, VersionsPage * const p) :
- model(new VersionsListModel(m, p)),
- query_window(m),
- versions_page(p)
- {
- }
- };
-}
-
-VersionsList::VersionsList(QueryWindow * const m, VersionsPage * const p) :
- Gtk::TreeView(),
- PrivateImplementationPattern<VersionsList>(new Implementation<VersionsList>(m, p))
-{
- set_model(_imp->model);
-
- append_column("Version", _imp->model->columns().col_version_string);
- append_column("Repository", _imp->model->columns().col_repo_name);
- append_column("Slot", _imp->model->columns().col_slot);
-
- Gtk::CellRendererText renderer;
- int c(append_column("Masks", renderer) - 1);
- get_column(c)->add_attribute(renderer, "markup", _imp->model->columns().col_masks_markup.index());
-
- signal_cursor_changed().connect(sigc::mem_fun(this, &VersionsList::handle_signal_cursor_changed));
-}
-
-VersionsList::~VersionsList()
-{
-}
-
-void
-VersionsList::handle_signal_cursor_changed()
-{
- if (get_selection()->get_selected())
- _imp->versions_page->set_id(std::tr1::shared_ptr<const PackageID>(
- (*get_selection()->get_selected())[_imp->model->columns().col_id].operator
- std::tr1::shared_ptr<const PackageID> ()));
- else
- _imp->versions_page->set_id(std::tr1::shared_ptr<const PackageID>());
-}
-
-void
-VersionsList::populate()
-{
- _imp->model->populate();
- _imp->query_window->paludis_thread_action(
- sigc::mem_fun(this, &VersionsList::populate_in_paludis_thread), "Populating versions list");
-}
-
-void
-VersionsList::populate_in_paludis_thread()
-{
- _imp->query_window->gui_thread_action(
- sigc::mem_fun(this, &VersionsList::populate_in_gui_thread));
-}
-
-void
-VersionsList::populate_in_gui_thread()
-{
- expand_all();
- columns_autosize();
-
- if (! get_selection()->get_selected())
- if (! _imp->model->children().empty())
- {
- bool found(false);
- for (Gtk::TreeModel::iterator i(_imp->model->children().begin()), i_end(_imp->model->children().end()) ;
- i != i_end && ! found; ++i)
- if ((*i)[_imp->model->columns().col_prefer_default])
- {
- set_cursor(_imp->model->get_path(*i));
- found = true;
- }
-
- if (! found)
- set_cursor(_imp->model->get_path(_imp->model->children().begin()));
- }
-}
-
diff --git a/src/clients/gtkpaludis/libgtkpaludis/versions_list.hh b/src/clients/gtkpaludis/libgtkpaludis/versions_list.hh
deleted file mode 100644
index d0ccb26..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/versions_list.hh
+++ /dev/null
@@ -1,31 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#ifndef GTKPALUDIS_GUARD_LIBGTKPALUDIS_VERSIONS_LIST_HH
-#define GTKPALUDIS_GUARD_LIBGTKPALUDIS_VERSIONS_LIST_HH 1
-
-#include <paludis/util/private_implementation_pattern.hh>
-#include <gtkmm/treeview.h>
-
-namespace gtkpaludis
-{
- class QueryWindow;
- class VersionsPage;
-
- class VersionsList :
- public Gtk::TreeView,
- private paludis::PrivateImplementationPattern<VersionsList>
- {
- protected:
- void handle_signal_cursor_changed();
- void populate_in_paludis_thread();
- void populate_in_gui_thread();
-
- public:
- VersionsList(QueryWindow * const m, VersionsPage * const p);
- ~VersionsList();
-
- void populate();
- };
-}
-
-#endif
diff --git a/src/clients/gtkpaludis/libgtkpaludis/versions_list_model.cc b/src/clients/gtkpaludis/libgtkpaludis/versions_list_model.cc
deleted file mode 100644
index 4e4bd7e..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/versions_list_model.cc
+++ /dev/null
@@ -1,155 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#include "versions_list_model.hh"
-#include "query_window.hh"
-#include "versions_page.hh"
-#include "markup.hh"
-#include <paludis/util/private_implementation_pattern-impl.hh>
-#include <paludis/util/sequence.hh>
-#include <paludis/util/wrapped_forward_iterator.hh>
-#include <paludis/environment.hh>
-#include <paludis/package_database.hh>
-#include <paludis/package_id.hh>
-#include <paludis/mask.hh>
-#include <paludis/generator.hh>
-#include <paludis/filter.hh>
-#include <paludis/filtered_generator.hh>
-#include <paludis/selection.hh>
-#include <tr1/functional>
-#include <list>
-
-using namespace paludis;
-using namespace gtkpaludis;
-
-namespace paludis
-{
- template<>
- struct Implementation<VersionsListModel>
- {
- QueryWindow * const query_window;
- VersionsPage * const versions_page;
- VersionsListModel::Columns columns;
-
- Implementation(QueryWindow * const m, VersionsPage * const p) :
- query_window(m),
- versions_page(p)
- {
- }
- };
-}
-
-namespace
-{
- struct PopulateDataItem
- {
- std::tr1::shared_ptr<const PackageID> id;
- std::string masks;
- bool prefer_default;
-
- PopulateDataItem(const std::tr1::shared_ptr<const PackageID> & d,
- const std::string & m, const bool p) :
- id(d),
- masks(m),
- prefer_default(p)
- {
- }
- };
-}
-
-namespace gtkpaludis
-{
- struct VersionsListModel::PopulateData
- {
- std::list<PopulateDataItem> items;
- };
-}
-
-
-VersionsListModel::VersionsListModel(QueryWindow * const m, VersionsPage * const p) :
- PrivateImplementationPattern<VersionsListModel>(new Implementation<VersionsListModel>(m, p)),
- Gtk::TreeStore(_imp->columns)
-{
-}
-
-VersionsListModel::~VersionsListModel()
-{
-}
-
-VersionsListModel::Columns::Columns()
-{
- add(col_version_string);
- add(col_repo_name);
- add(col_slot);
- add(col_masks_markup);
- add(col_id);
- add(col_prefer_default);
-}
-
-VersionsListModel::Columns::~Columns()
-{
-}
-
-VersionsListModel::Columns &
-VersionsListModel::columns()
-{
- return _imp->columns;
-}
-
-void
-VersionsListModel::populate()
-{
- _imp->query_window->paludis_thread_action(
- sigc::mem_fun(this, &VersionsListModel::populate_in_paludis_thread),
- "Populating versions list model");
-}
-
-void
-VersionsListModel::populate_in_paludis_thread()
-{
- std::tr1::shared_ptr<PopulateData> data(new PopulateData);
- std::tr1::shared_ptr<const PackageIDSequence> c(
- (*_imp->query_window->environment())[selection::AllVersionsSorted(
- generator::Package(_imp->query_window->get_package_name()))]);
-
- for (PackageIDSequence::ReverseConstIterator p(c->rbegin()), p_end(c->rend()) ;
- p != p_end ; ++p)
- {
- bool prefer_default(true);
- std::string mr_string;
-
- for (PackageID::MasksConstIterator m((*p)->begin_masks()), m_end((*p)->end_masks()) ;
- m != m_end ; ++m)
- {
- prefer_default = false;
- if (! mr_string.empty())
- mr_string.append(", ");
-
- mr_string.append((*m)->description());
- }
-
- data->items.push_back(PopulateDataItem(*p, mr_string, prefer_default));
- }
-
- _imp->query_window->gui_thread_action(
- sigc::bind(sigc::mem_fun(this, &VersionsListModel::populate_in_gui_thread), data));
-}
-
-void
-VersionsListModel::populate_in_gui_thread(const std::tr1::shared_ptr<const VersionsListModel::PopulateData> & names)
-{
- clear();
-
- for (std::list<PopulateDataItem>::const_iterator i(names->items.begin()), i_end(names->items.end()) ;
- i != i_end ; ++i)
- {
- iterator r(append());
- (*r)[_imp->columns.col_id] = i->id;
- (*r)[_imp->columns.col_repo_name] = stringify(i->id->repository()->name());
- (*r)[_imp->columns.col_version_string] = stringify(i->id->canonical_form(idcf_version));
- (*r)[_imp->columns.col_slot] = stringify(i->id->slot());
- (*r)[_imp->columns.col_masks_markup] = i->masks;
- (*r)[_imp->columns.col_prefer_default] = i->prefer_default;
- }
-}
-
-
diff --git a/src/clients/gtkpaludis/libgtkpaludis/versions_list_model.hh b/src/clients/gtkpaludis/libgtkpaludis/versions_list_model.hh
deleted file mode 100644
index 60a9daa..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/versions_list_model.hh
+++ /dev/null
@@ -1,52 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#ifndef GTKPALUDIS_GUARD_LIBGTKPALUDIS_VERSIONS_LIST_MODEL_HH
-#define GTKPALUDIS_GUARD_LIBGTKPALUDIS_VERSIONS_LIST_MODEL_HH 1
-
-#include <gtkmm/treestore.h>
-#include <paludis/util/private_implementation_pattern.hh>
-#include <paludis/name.hh>
-#include <paludis/package_id-fwd.hh>
-#include <tr1/memory>
-
-namespace gtkpaludis
-{
- class QueryWindow;
- class VersionsPage;
-
- class VersionsListModel :
- private paludis::PrivateImplementationPattern<VersionsListModel>,
- public Gtk::TreeStore
- {
- protected:
- class PopulateData;
-
- void populate_in_paludis_thread();
- void populate_in_gui_thread(const std::tr1::shared_ptr<const PopulateData> & names);
-
- public:
- VersionsListModel(QueryWindow * const m, VersionsPage * const p);
- ~VersionsListModel();
-
- class Columns :
- public Gtk::TreeModelColumnRecord
- {
- public:
- Columns();
- ~Columns();
-
- Gtk::TreeModelColumn<Glib::ustring> col_version_string;
- Gtk::TreeModelColumn<Glib::ustring> col_repo_name;
- Gtk::TreeModelColumn<Glib::ustring> col_slot;
- Gtk::TreeModelColumn<Glib::ustring> col_masks_markup;
- Gtk::TreeModelColumn<std::tr1::shared_ptr<const paludis::PackageID> > col_id;
- Gtk::TreeModelColumn<bool> col_prefer_default;
- };
-
- Columns & columns();
-
- void populate();
- };
-}
-
-#endif
diff --git a/src/clients/gtkpaludis/libgtkpaludis/versions_page.cc b/src/clients/gtkpaludis/libgtkpaludis/versions_page.cc
deleted file mode 100644
index 3cb50c8..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/versions_page.cc
+++ /dev/null
@@ -1,72 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#include "versions_page.hh"
-#include "versions_list.hh"
-#include "version_info.hh"
-#include <gtkmm/scrolledwindow.h>
-#include <paludis/util/private_implementation_pattern-impl.hh>
-
-using namespace gtkpaludis;
-using namespace paludis;
-
-namespace paludis
-{
- template<>
- struct Implementation<VersionsPage>
- {
- QueryWindow * const query_window;
-
- Gtk::ScrolledWindow versions_list_scroll;
- VersionsList versions_list;
-
- Gtk::ScrolledWindow version_info_scroll;
- VersionInfo version_info;
-
- std::tr1::shared_ptr<const PackageID> id;
-
- Implementation(QueryWindow * const m, VersionsPage * const p) :
- query_window(m),
- versions_list(m, p),
- version_info(m, p)
- {
- }
- };
-}
-
-VersionsPage::VersionsPage(QueryWindow * const m) :
- Gtk::Table(2, 1),
- QueryNotebookPage(),
- PrivateImplementationPattern<VersionsPage>(new Implementation<VersionsPage>(m, this))
-{
- _imp->versions_list_scroll.set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_ALWAYS);
- _imp->versions_list_scroll.add(_imp->versions_list);
- attach(_imp->versions_list_scroll, 0, 1, 0, 1, Gtk::FILL, Gtk::EXPAND | Gtk::FILL, 4, 4);
-
- _imp->version_info_scroll.set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
- _imp->version_info_scroll.add(_imp->version_info);
- attach(_imp->version_info_scroll, 0, 1, 1, 2, Gtk::EXPAND | Gtk::FILL, Gtk::EXPAND | Gtk::FILL, 4, 4);
-}
-
-VersionsPage::~VersionsPage()
-{
-}
-
-void
-VersionsPage::populate()
-{
- _imp->versions_list.populate();
-}
-
-void
-VersionsPage::set_id(const std::tr1::shared_ptr<const PackageID> & c)
-{
- _imp->id = c;
- _imp->version_info.populate();
-}
-
-std::tr1::shared_ptr<const PackageID>
-VersionsPage::get_id() const
-{
- return _imp->id;
-}
-
diff --git a/src/clients/gtkpaludis/libgtkpaludis/versions_page.hh b/src/clients/gtkpaludis/libgtkpaludis/versions_page.hh
deleted file mode 100644
index edb36cc..0000000
--- a/src/clients/gtkpaludis/libgtkpaludis/versions_page.hh
+++ /dev/null
@@ -1,32 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-#ifndef GTKPALUDIS_GUARD_LIBGTKPALUDIS_VERSIONS_PAGE_HH
-#define GTKPALUDIS_GUARD_LIBGTKPALUDIS_VERSIONS_PAGE_HH 1
-
-#include <paludis/util/private_implementation_pattern.hh>
-#include <paludis/package_id-fwd.hh>
-#include <tr1/memory>
-#include <libgtkpaludis/query_notebook_page.hh>
-#include <gtkmm/table.h>
-
-namespace gtkpaludis
-{
- class QueryWindow;
-
- class VersionsPage :
- public Gtk::Table,
- public QueryNotebookPage,
- private paludis::PrivateImplementationPattern<VersionsPage>
- {
- public:
- VersionsPage(QueryWindow * const m);
- ~VersionsPage();
-
- virtual void populate();
-
- void set_id(const std::tr1::shared_ptr<const paludis::PackageID> &);
- std::tr1::shared_ptr<const paludis::PackageID> get_id() const;
- };
-}
-
-#endif
diff --git a/src/clients/gtkpaludis/vtemm/Makefile.am b/src/clients/gtkpaludis/vtemm/Makefile.am
deleted file mode 100644
index bf7f14e..0000000
--- a/src/clients/gtkpaludis/vtemm/Makefile.am
+++ /dev/null
@@ -1,78 +0,0 @@
-EXTRA_DIST = \
- terminal_widget.hg terminal_widget.ccg \
- reaper.hg reaper.ccg
-
-AM_CXXFLAGS = -I$(top_srcdir) @PALUDIS_CXXFLAGS@ @PALUDIS_CXXFLAGS_NO_WOLD_STYLE_CAST@ \
- @PALUDIS_CXXFLAGS_NO_WSHADOW@ @PALUDIS_CXXFLAGS_NO_WREDUNDANT_DECLS@
-
-DEFS = \
- -DSYSCONFDIR=\"$(sysconfdir)\" \
- -DLIBEXECDIR=\"$(libexecdir)\" \
- -DGLIBMM_EXCEPTIONS_ENABLED=1
-
-vte_generated_sources = \
- terminal_widget.cc terminal_widget.hh private/terminal_widget_p.hh \
- reaper.cc reaper.hh private/reaper_p.hh
-
-SUBDIRS = defs converts .
-
-BUILT_SOURCES = terminal_widget.hh reaper.hh $(vte_generated_sources)
-
-# automake is rather weird on this one...
-automake-deps-hack.tmp :
- $(MAKE) -C defs
- touch $@
-
-terminal_widget.cc private/terminal_widget_p.hh : terminal_widget.hh
-terminal_widget.hh : terminal_widget.hg terminal_widget.ccg automake-deps-hack.tmp
- mkdir -p private
- @GMMPROC@ --unwrapped -I converts --defs defs terminal_widget . .
- sed -e 's@/\* vim: set @/* vim: set ro @' < ./terminal_widget.h > ./terminal_widget.hh
- rm terminal_widget.h
- mv ./terminal_widget.cc ./terminal_widget.cc.tmp
- sed \
- -e 's@#include <vtemm/terminal_widget.h>@#include "terminal_widget.hh"@' \
- -e 's@#include <vtemm/private/terminal_widget_p.h>@#include "private/terminal_widget_p.hh"@' \
- -e 's@/\* vim: set @/* vim: set ro @' \
- < ./terminal_widget.cc.tmp > ./terminal_widget.cc
- rm ./terminal_widget.cc.tmp
- mv ./private/terminal_widget_p.h ./private/terminal_widget_p.hh
-
-reaper.cc private/reaper_p.hh : reaper.hh
-reaper.hh : reaper.hg reaper.ccg automake-deps-hack.tmp
- mkdir -p private
- @GMMPROC@ --unwrapped -I converts --defs defs reaper . .
- sed -e 's@/\* vim: set @/* vim: set ro @' < ./reaper.h > ./reaper.hh
- rm reaper.h
- mv ./reaper.cc ./reaper.cc.tmp
- sed \
- -e 's@#include <vtemm/reaper.h>@#include "reaper.hh"@' \
- -e 's@#include <vtemm/private/reaper_p.h>@#include "private/reaper_p.hh"@' \
- -e 's@/\* vim: set @/* vim: set ro @' \
- < ./reaper.cc.tmp > ./reaper.cc
- rm ./reaper.cc.tmp
- mv ./private/reaper_p.h ./private/reaper_p.hh
-
-noinst_LIBRARIES = libvtemm.a
-
-nodist_libvtemm_a_SOURCES = \
- $(vte_generated_sources)
-
-INCLUDES = $(gtkmm_CFLAGS) $(vte_CFLAGS)
-
-clean-local :
- rm -fr private || true
-
-CLEANFILES = *~ gmon.out *.gcov *.gcno *.gcda *.loT $(vte_generated_sources) automake-deps-hack.tmp *.epicfail
-MAINTAINERCLEANFILES = Makefile.in
-
-built-sources : $(BUILT_SOURCES)
- for s in `echo $(SUBDIRS) | tr -d .` ; do $(MAKE) -C $$s built-sources || exit 1 ; done
-
-distcheck-deps-local : $(DISTCHECK_DEPS)
-
-distcheck-deps : distcheck-deps-subdirs
-
-distcheck-deps-subdirs :
- for s in $(SUBDIRS) . ; do if test x$$s = x. ; then $(MAKE) distcheck-deps-local || exit 1 ; \
- else $(MAKE) -C $$s distcheck-deps || exit 1 ; fi ; done
diff --git a/src/clients/gtkpaludis/vtemm/converts/Makefile.am b/src/clients/gtkpaludis/vtemm/converts/Makefile.am
deleted file mode 100644
index a1ff3ef..0000000
--- a/src/clients/gtkpaludis/vtemm/converts/Makefile.am
+++ /dev/null
@@ -1,15 +0,0 @@
-noinst_DATA = convert.m4 convert_base.m4
-CLEANFILES = *~ *.epicfail
-MAINTAINERCLEANFILES = Makefile.in
-EXTRA_DIST = $(noinst_DATA)
-
-built-sources : $(BUILT_SOURCES)
- for s in `echo $(SUBDIRS) | tr -d .` ; do $(MAKE) -C $$s built-sources || exit 1 ; done
-
-distcheck-deps-local : $(DISTCHECK_DEPS)
-
-distcheck-deps : distcheck-deps-subdirs
-
-distcheck-deps-subdirs :
- for s in $(SUBDIRS) . ; do if test x$$s = x. ; then $(MAKE) distcheck-deps-local || exit 1 ; \
- else $(MAKE) -C $$s distcheck-deps || exit 1 ; fi ; done
diff --git a/src/clients/gtkpaludis/vtemm/converts/convert.m4 b/src/clients/gtkpaludis/vtemm/converts/convert.m4
deleted file mode 100644
index 319807e..0000000
--- a/src/clients/gtkpaludis/vtemm/converts/convert.m4
+++ /dev/null
@@ -1,30 +0,0 @@
-dnl $Id: convert.m4,v 1.1.1.1 2003/01/21 13:41:24 murrayc Exp $
-
-# Other libraries, such as libgnomeuimm, can provide their own convert.m4 files,
-# Maybe choosing to include the same files as this one.
-
-include(convert_gtkmm.m4)
-
-_CONV_ENUM(Vte,TerminalEraseBinding)
-_CONV_ENUM(Vte,TerminalAntiAlias)
-
-_EQUAL(glong, long)
-_EQUAL(guint, unsigned)
-
-_CONVERSION(int&, int*, &($3))
-_CONVERSION(long&, glong*, &($3))
-_CONVERSION(return-char*, char*, ($3))
-
-# Gtk conversions
-_CONVERSION(const Gtk::MenuShell&, GtkMenuShell*, (const_cast<Gtk::MenuShell&>($3)).gobj())
-
-# Gdk conversions
-_CONVERSION(const Gdk::Color&, const GdkColor*, ($3).gobj())
-_CONVERSION(Gdk::Color&, GdkColor*, ($3).gobj())
-_CONVERSION(Gdk::Cursor&, GdkCursor*, ($3).gobj())
-
-# Pango conversions
-_CONVERSION(const Pango::FontDescription&, const PangoFontDescription*, ($3).gobj())
-_CONVERSION(const PangoFontDescription*, const Pango::FontDescription, Glib::wrap(const_cast<PangoFontDescription*>(($3)), true))
-
-
diff --git a/src/clients/gtkpaludis/vtemm/converts/convert_base.m4 b/src/clients/gtkpaludis/vtemm/converts/convert_base.m4
deleted file mode 100644
index feaf583..0000000
--- a/src/clients/gtkpaludis/vtemm/converts/convert_base.m4
+++ /dev/null
@@ -1,69 +0,0 @@
-dnl $Id: convert_base.m4,v 1.1.1.1 2003/01/21 13:41:24 murrayc Exp $
-
-#
-# Define a hashing for names
-#
-define(`__HASH',`__`'m4_translit(`$*',`ABCDEFGHIJKLMNOPQRSTUVWXYZ<>[]&*, ',`abcdefghijklmnopqrstuvwxyzVBNMRSC_')`'')
-define(`__EQUIV',`m4_ifdef(EV`'__HASH(`$1'),EV`'__HASH(`$1'),`$1')')
-
-define(`__HASH2',`dnl
-pushdef(`__E1',__EQUIV(`$1'))pushdef(`__E2',__EQUIV(`$2'))dnl
-m4_ifelse(__E1,__E2,`__EQ',__HASH(__E1)`'__HASH(__E2))`'dnl
-popdef(`__E1')popdef(`__E2')`'')
-
-define(`CF__EQ',`$3')
-
-#
-# _CONVERT(ctype, cpptype, name, wrap_line)
-# Print the conversion from ctype to cpptype
-define(`_CONVERT',`dnl
-pushdef(`__COV',`CF`'__HASH2(`$1',`$2')')dnl
-m4_ifdef(__COV,`m4_indir(__COV,`$1',`$2',`$3')',`
-m4_errprint(`No conversion from $1 to $2 defined (line: $4, parameter name: $3)
-')
-m4_m4exit(1)
-')`'dnl
-')
-
-
-#
-# Functions for populating the tables.
-#
-define(`_CONVERSION',`
-m4_ifelse(`$3',,,`define(CF`'__HASH2(`$1',`$2'),`$3')')
-')
-
-define(`_EQUAL',`define(EV`'__HASH(`$1'),`$2')')
-
-/*******************************************************************/
-
-
-define(`__ARG3__',`$`'3')
-define(`_CONV_ENUM',`dnl
-_CONVERSION(`$1$2', `$2', (($2)(__ARG3__)))
-_CONVERSION(`$1$2', `$1::$2', (($1::$2)(__ARG3__)))
-_CONVERSION(`$2', `$1$2', (($1$2)(__ARG3__)))
-_CONVERSION(`$1::$2', `$1$2', (($1$2)(__ARG3__)))
-')dnl
-
-# e.g. Glib::RefPtr<Gdk::Something> to GdkSomething*
-define(`__CONVERT_REFPTR_TO_P',`Glib::unwrap($`'3)')
-
-# e.g. Glib::RefPtr<const Gdk::Something> to GdkSomething*
-#define(`__CONVERT_CONST_REFPTR_TO_P',`const_cast<$`'2>($`'3->gobj())')
-define(`__CONVERT_CONST_REFPTR_TO_P',`const_cast<$`'2>(Glib::unwrap($`'3))')
-
-# The Sun Forte compiler doesn't seem to be able to handle these, so we are using the altlernative, __CONVERT_CONST_REFPTR_TO_P_SUN.
-# The Sun compiler gives this error, for instance:
-#  "widget.cc", line 4463: Error: Overloading ambiguity between "Glib::unwrap<Gdk::Window>(const Glib::RefPtr<const Gdk::Window>&)" and
-# "Glib::unwrap<const Gdk::Window>(const Glib::RefPtr<const Gdk::Window>&)".
-#
-define(`__CONVERT_CONST_REFPTR_TO_P_SUN',`const_cast<$`'2>(Glib::unwrap<$1>($`'3))')
-
-
-include(convert_gtk.m4)
-include(convert_pango.m4)
-include(convert_gdk.m4)
-include(convert_atk.m4)
-include(convert_glib.m4)
-
diff --git a/src/clients/gtkpaludis/vtemm/defs/Makefile.am b/src/clients/gtkpaludis/vtemm/defs/Makefile.am
deleted file mode 100644
index 15b0c55..0000000
--- a/src/clients/gtkpaludis/vtemm/defs/Makefile.am
+++ /dev/null
@@ -1,57 +0,0 @@
-vte_defs_included = \
- vte_methods.defs \
- vte_vfuncs.defs \
- vte_enums.defs \
- vte_signals.defs
-
-vte_defs = \
- $(vte_defs_included) \
- vte.defs
-
-noinst_DATA = $(vte_defs)
-noinst_PROGRAMS = force_automake_to_include_cxxcompile
-
-INCLUDES = $(gtkmm_CFLAGS) $(vte_CFLAGS)
-
-force_automake_to_include_cxxcompile_SOURCES = force_automake_to_include_cxxcompile.cc
-
-force_automake_to_include_cxxcompile.cc :
- echo 'int main(int, char *[]) { }' > $@
-
-generate_defs_vte : generate_defs_vte.cc
- $(CXXCOMPILE) $(gtkmm_LIBS) $(vte_LIBS) -lglibmm_generate_extra_defs-2.4 -o $@ $<
-
-CLEANFILES = *~ force_automake_to_include_cxxcompile.cc generate_defs_vte *.epicfail
-MAINTAINERCLEANFILES = Makefile.in $(vte_defs)
-
-vte_methods.defs :
- if ! python `pkg-config --variable=codegendir pygtk-2.0`/h2def.py \
- `pkg-config --variable=includedir vte`/vte/*.h \
- > $@ ; then rm $@ ; false ; fi
-
-vte_enums.defs :
- if ! perl $(srcdir)/enum.pl `pkg-config --variable=includedir vte`/vte/*.h > $@ ; \
- then rm $@ ; false ; fi
-
-vte_signals.defs : generate_defs_vte
- ./generate_defs_vte | sed -e 's~const-gchar\*~gchar*~' > $@
-
-vte.defs :
- echo > $@
- for a in $(vte_defs_included) ; do echo "(include $${a})" >> $@ ; done
-
-vte_vfuncs.defs :
- touch $@
-
-EXTRA_DIST = enum.pl generate_defs_vte.cc
-
-built-sources : $(BUILT_SOURCES)
- for s in `echo $(SUBDIRS) | tr -d .` ; do $(MAKE) -C $$s built-sources || exit 1 ; done
-
-distcheck-deps-local : $(DISTCHECK_DEPS)
-
-distcheck-deps : distcheck-deps-subdirs
-
-distcheck-deps-subdirs :
- for s in $(SUBDIRS) . ; do if test x$$s = x. ; then $(MAKE) distcheck-deps-local || exit 1 ; \
- else $(MAKE) -C $$s distcheck-deps || exit 1 ; fi ; done
diff --git a/src/clients/gtkpaludis/vtemm/defs/enum.pl b/src/clients/gtkpaludis/vtemm/defs/enum.pl
deleted file mode 100644
index df41545..0000000
--- a/src/clients/gtkpaludis/vtemm/defs/enum.pl
+++ /dev/null
@@ -1,230 +0,0 @@
-#! /usr/bin/perl
-
-# The lisp definitions for flags does not include order.
-# thus we must extract it ourselves.
-# Usage: ./enum.pl /gnome/head/cvs/gconf/gconf/*.h > gconf_enums.defs
-
-
-my %token;
-$module="none";
-
-while ($ARGV[0] =~ /^--(\S+)/)
-{
- shift @ARGV;
- $module=shift @ARGV if ($1 eq "module");
- if ($1 eq "help")
- {
- print "enum.pl [--module modname] header_files ....\n";
- exit 0;
- }
-}
-
-foreach $file (@ARGV)
-{
- &parse($file);
-}
-
-exit;
-
-
-
-# parse enums from C
-sub parse
-{
- my ($file)=@_;
-
- $from=0;
- open(FILE,$file);
-
- $enum=0;
- $deprecated=0;
- $comment=0;
-
- while(<FILE>)
- {
- if($comment)
- {
- # end of multiline comment
- $comment = 0 if(/\*\//);
- next;
- }
-
- $deprecated = 1 if(s/^#ifndef [A-Z_]+_DISABLE_DEPRECATED//);
-
- ++$deprecated if($deprecated > 0 && /^#\s*if/);
- --$deprecated if($deprecated > 0 && /^#\s*endif/);
-
- next if($deprecated > 0);
-
- # filter single-line comments
- s/\/\*.*\*\///g;
-
- # begin of multiline comment
- if(/\/\*/)
- {
- $comment = 1;
- next;
- }
-
- s/','/\%\%COMMA\%\%/;
- s/'}'/\%\%RBRACE\%\%/;
- if (/^typedef enum/ )
- {
- print ";; From $file\n\n" if (!$from);
- $from=1;
- $enum=1;
- next;
- }
-
- if ($enum && /\}/)
- {
- $enum=0;
- &process($line,$_);
- $line="";
- }
- $line.=$_ if ($enum);
- }
-}
-
-
-# convert enums to lisp
-sub process
-{
- my ($line,$def)=@_;
-
- $def=~s/\s*\}\s*//g;
- $def=~s/\s*;\s*$//;
- my $c_name=$def;
-
- $line=~s/\s+/ /g;
- $line=~s/\/\*.*\*\///g;
- $line=~s/\s*{\s*//;
-
- my $entity = "enum";
- $c_name =~ /^([A-Z][a-z]*)/;
- $module = $1;
- $def =~ s/$module//;
-
- @c_name=();
- @name=();
- @number=();
-
- $val=0;
- foreach $i (split(/,/,$line))
- {
- $i=~s/^\s+//;
- $i=~s/\s+$//;
- if ($i =~ /^\S+$/)
- {
- push(@c_name,$i);
- push(@number,sprintf("%d",$val));
- $token{$i}=$val;
- }
- elsif ($i =~ /^(\S+)\s*=\s*(0x[0-9a-fA-F]+)$/ ||
- $i =~ /^(\S+)\s*=\s*(-?[0-9]+)$/ ||
- $i =~ /^(\S+)\s*=\s*(1\s*<<\s*[0-9]+)$/
- )
- {
- my ($tmp1, $tmp2) = ($1, $2);
- push(@c_name, $tmp1);
- eval("\$val = $tmp2;");
- $entity = "flags" if($tmp2 =~ /^1\s*<</ || $tmp2 =~ /^0x/);
- push(@number, $tmp2);
- $token{$tmp1} = $tmp2;
- }
- elsif ($i =~ /^(\S+)\s*=\s*([ _x0-9a-fA-Z|()~]+)$/)
- {
- my ($tmp1, $tmp2) = ($1, $2);
- push(@c_name, $tmp1);
- $tmp2 =~ s/([A-Z_]+)/($token{$1})/;
- eval("\$val = $tmp2;");
- $val = "#error" if(!$val);
- $val = sprintf("0x%X", $val) if($entity eq "flags");
- push(@number, $val);
- $token{$tmp1} = $val;
- }
- elsif ($i =~ /^(\S+)\s*=\s*'(.)'$/)
- {
- push(@c_name,$1);
- push(@number,"\'$2\'");
- $val=ord($2);
- $token{$1}=$val;
- }
- elsif ($i =~ /^(\S+)\s*=\s*(\%\%[A-Z]+\%\%)$/)
- {
- $tmp=$1;
- $_=$2;
- s/\%\%COMMA\%\%/,/;
- s/\%\%RBRACE\%\%/]/;
- push(@c_name,$tmp);
- push(@number,"\'$_\'");
- $val=ord($_);
- $token{$tmp}=$val;
- }
- else
- {
- #print STDERR "$i\n";
- }
- $val++;
- }
-
- # remove the prefix to form names
- &form_names(\@name,\@c_name);
-
- my $format = "%d";
- $format = "0x%X" if($entity eq "flags");
-
- # evaluate any unevaluated values
- my $j;
- for ($j=0;$j<$#number+1;$j++)
- {
- if ($number[$j]=~/\$/)
- {
- $number[$j]=sprintf($format, eval($number[$j]));
- }
- }
-
- #print ";; Enum $def\n\n";
- print "(define-$entity-extended $def\n";
- print " (in-module \"$module\")\n";
- print " (c-name \"$c_name\")\n";
-
- print " (values\n";
- for ($j=0;$j<$#c_name+1;$j++)
- {
- print " \'(\"$name[$j]\" \"$c_name[$j]\"";
- print " \"$number[$j]\"" if ($number[$j] ne "");
- print ")\n";
- }
- print " )\n";
- print ")\n\n";
-}
-
-
-sub form_names
-{
- my ($name,$c_name)=@_;
-
- my $len=length($$c_name[0]) - 1;
- my $j;
- for ($j=0;$j<$#c_name;$j++)
- {
- while (substr($$c_name[$j],$len-1,1) ne "_" ||
- substr($$c_name[$j],0,$len) ne substr($$c_name[$j+1],0,$len))
- {
- $len--;
- }
- #print substr($$c_name[$j],0,$len),"\n";
- }
-
- my $prefix=substr($$c_name[0],0,$len);
-
- for ($j=0;$j<$#c_name+1;$j++)
- {
- $_=$$c_name[$j];
- s/^$prefix//;
- tr/A-Z_/a-z-/;
- push(@$name,$_);
- }
-
-}
diff --git a/src/clients/gtkpaludis/vtemm/defs/generate_defs_vte.cc b/src/clients/gtkpaludis/vtemm/defs/generate_defs_vte.cc
deleted file mode 100644
index 51e6181..0000000
--- a/src/clients/gtkpaludis/vtemm/defs/generate_defs_vte.cc
+++ /dev/null
@@ -1,35 +0,0 @@
-/* $Id: generate_defs_gtk.cc,v 1.22 2006/05/16 18:03:21 murrayc Exp $ */
-
-/* generate_defs_gtk.cc
- *
- * Copyright (C) 2001 The Free Software Foundation
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free
- * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include "glibmm_generate_extra_defs/generate_extra_defs.h"
-#include <glib-object.h>
-#include <vte/vte.h>
-#include <vte/reaper.h>
-
-int main (int argc, char *argv[])
-{
- g_type_init();
-
-std::cout << get_defs(VTE_TYPE_TERMINAL)
- << get_defs(VTE_TYPE_REAPER);
-
- return 0;
-}
diff --git a/src/clients/gtkpaludis/vtemm/reaper.ccg b/src/clients/gtkpaludis/vtemm/reaper.ccg
deleted file mode 100644
index 4e73844..0000000
--- a/src/clients/gtkpaludis/vtemm/reaper.ccg
+++ /dev/null
@@ -1,65 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-/*
- * Copyright (c) 2006 Piotr Rak
- *
- * This file is part of the Paludis package manager. Paludis is free software;
- * you can redistribute it and/or modify it under the terms of the GNU General
- * Public License version 2, as published by the Free Software Foundation.
- *
- * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#include <vte/reaper.h>
-#include <paludis/util/exception.hh>
-
-namespace
-{
-
- void Reaper_proxy_signal_child_exited(GObject*, int pid, int status, gpointer data)
- {
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
- try
- {
- #endif //GLIBMM_EXCEPTIONS_ENABLED
- if (Vte::Reaper::get_instance() == data) //ignore signals connected using c api
- Vte::Reaper::get_instance()->signal_child_exited().emit(pid, status);
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
- }
- catch(...)
- {
- Glib::exception_handlers_invoke();
- }
- #endif //GLIBMM_EXCEPTIONS_ENABLED
- }
-} /* anonymous namspace */
-
-namespace Vte
-{
-
- Reaper::Reaper() :
- Glib::Object(reinterpret_cast<GObject*>(::vte_reaper_get()))
- {
- //TODO: looks like vte-0.13.3 has child-exited renamed abi/api breakage??
- //propably shoud be also unregistred if Reaper will stop be singleton
- g_signal_connect(G_OBJECT(gobj()), "child-exited", G_CALLBACK(Reaper_proxy_signal_child_exited) , this);
- }
-
- int Reaper::add_child(GPid pid)
- {
- return vte_reaper_add_child(pid);
- }
-
- sigc::signal<void, int, int>& Reaper::signal_child_exited()
- {
- return _signal_child_exited;
- }
-}
-
diff --git a/src/clients/gtkpaludis/vtemm/reaper.hg b/src/clients/gtkpaludis/vtemm/reaper.hg
deleted file mode 100644
index 9fcbb99..0000000
--- a/src/clients/gtkpaludis/vtemm/reaper.hg
+++ /dev/null
@@ -1,50 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-/*
- * Copyright (c) 2006 Piotr Rak
- *
- * This file is part of the Paludis package manager. Paludis is free software;
- * you can redistribute it and/or modify it under the terms of the GNU General
- * Public License version 2, as published by the Free Software Foundation.
- *
- * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#include <sys/types.h>
-#include <paludis/util/instantiation_policy.hh>
-#include <paludis/util/private_implementation_pattern.hh>
-#include <glibmm/object.h>
-#include <sigc++/sigc++.h>
-
-_DEFS(vtemm,vte)
-_PINCLUDE(glibmm/private/object_p.h)
-
-namespace Vte
-{
- class Reaper :
- public Glib::Object,
- public paludis::InstantiationPolicy<Reaper, paludis::instantiation_method::SingletonTag>
-
- {
- friend class paludis::InstantiationPolicy<Reaper, paludis::instantiation_method::SingletonTag>;
-
- sigc::signal<void, int, int> _signal_child_exited;
-
- _CLASS_GOBJECT(Reaper,VteReaper,VTE_REAPER,Glib::Object,GObject)
-
- Reaper();
-
- public:
-
- int add_child(GPid pid);
- sigc::signal<void, int, int>& signal_child_exited();
-
- };
-}
diff --git a/src/clients/gtkpaludis/vtemm/terminal_widget.ccg b/src/clients/gtkpaludis/vtemm/terminal_widget.ccg
deleted file mode 100644
index dda862f..0000000
--- a/src/clients/gtkpaludis/vtemm/terminal_widget.ccg
+++ /dev/null
@@ -1,159 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-/*
- * Copyright (c) 2006 Piotr Rak
- *
- * This file is part of the Paludis package manager. Paludis is free software;
- * you can redistribute it and/or modify it under the terms of the GNU General
- * Public License version 2, as published by the Free Software Foundation.
- *
- * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA
- */
-#include <vte/vte.h>
-
-namespace
-{
-
-gboolean proxy_slot_selected_callback(VteTerminal * /* term */ , glong column, glong row, gpointer data)
-{
- typedef Vte::Terminal::SlotIsSelected SlotType;
- SlotType& slot(*static_cast<SlotType*>(data));
-
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
- try
- {
- #endif //GLIBMM_EXCEPTIONS_ENABLED
- return slot(column, row);
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
- }
- catch(...)
- {
- Glib::exception_handlers_invoke();
- }
- #endif //GLIBMM_EXCEPTIONS_ENABLED
-
- return 0;
-}
-
-} /* anonymous namespace */
-
-
-namespace Vte
-{
-
-CharAttributes::CharAttributes(VteCharAttributes* obj) :
- _gobject(new VteCharAttributes(*obj))
-{
-}
-
-CharAttributes::~CharAttributes()
-{
- delete _gobject;
-}
-
-CharAttributes::CharAttributes(const CharAttributes& rhs) :
- _gobject(new VteCharAttributes(*rhs._gobject))
-{
-}
-
-CharAttributes& CharAttributes::operator= (const CharAttributes& rhs)
-{
- if (this != &rhs)
- {
- delete _gobject;
- _gobject = new VteCharAttributes(*rhs._gobject);
- }
- return *this;
-}
-
-int CharAttributes::row() const
-{
- return _gobject->row;
-}
-
-int CharAttributes::column() const
-{
- return _gobject->column;
-}
-
-Gdk::Color CharAttributes::foreground() const
-{
- return Gdk::Color(&_gobject->fore, true);
-}
-
-Gdk::Color CharAttributes::background() const
-{
- return Gdk::Color(&_gobject->back, true);
-}
-
-bool CharAttributes::underline() const
-{
- return _gobject->underline;
-}
-
-bool CharAttributes::strikethrough() const
-{
- return _gobject->strikethrough;
-}
-
-char* Terminal::get_text(const Terminal::SlotIsSelected& slot, std::vector<CharAttributes>& attributes)
-{
- GArray* garray(g_array_new(false, true, sizeof(VteCharAttributes)));
- Terminal::SlotIsSelected slot_copy(slot);
-
- char * result(vte_terminal_get_text(gobj(), &proxy_slot_selected_callback, &slot_copy, garray));
-
- for (size_t i=0; i< garray->len; ++i)
- {
- attributes.push_back(new VteCharAttributes(g_array_index(garray, VteCharAttributes, i))); //TODO suboptimal deep copy
- }
-
- g_array_free(garray, false);
-
- return result;
-}
-
-char* Terminal::get_text_include_trailing_spaces(const Terminal::SlotIsSelected& slot, std::vector<CharAttributes>& attributes)
-{
- GArray* garray(g_array_new(false, true, sizeof(VteCharAttributes)));
- Terminal::SlotIsSelected slot_copy(slot);
-
- char * result(vte_terminal_get_text_include_trailing_spaces(gobj(),
- &proxy_slot_selected_callback, &slot_copy, garray));
-
- for (size_t i=0; i< garray->len; ++i)
- {
- attributes.push_back(new VteCharAttributes(g_array_index(garray, VteCharAttributes, i))); //TODO suboptimal deep copy
- }
-
- g_array_free(garray, true);
-
- return result;
-}
-
-char* Terminal::get_text_range(long start_row, long start_col, long end_row, long end_col, const SlotIsSelected& slot, std::vector<CharAttributes>& attributes)
-{
- GArray* garray(g_array_new(false, true, sizeof(VteCharAttributes)));
- Terminal::SlotIsSelected slot_copy(slot);
-
- char * result(vte_terminal_get_text_range(gobj(),start_row, start_col, end_row, end_col,
- &proxy_slot_selected_callback, &slot_copy, garray));
-
- for (size_t i=0; i< garray->len; ++i)
- {
- attributes.push_back(new VteCharAttributes(g_array_index(garray, VteCharAttributes, i))); //TODO suboptimal deep copy
- }
-
- g_array_free(garray, true);
-
- return result;
-}
-
-} /* namespace Vte */
diff --git a/src/clients/gtkpaludis/vtemm/terminal_widget.hg b/src/clients/gtkpaludis/vtemm/terminal_widget.hg
deleted file mode 100644
index 26b4d71..0000000
--- a/src/clients/gtkpaludis/vtemm/terminal_widget.hg
+++ /dev/null
@@ -1,181 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-/*
- * Copyright (c) 2006 Piotr Rak
- *
- * This file is part of the Paludis package manager. Paludis is free software;
- * you can redistribute it and/or modify it under the terms of the GNU General
- * Public License version 2, as published by the Free Software Foundation.
- *
- * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#include <gtkmm/widget.h>
-#include <gtkmm/menushell.h>
-#include <gtkmm/adjustment.h>
-#include <gdkmm/cursor.h>
-#include <pangomm/fontdescription.h>
-
-#include <vector>
-
-_DEFS(vtemm,vte)
-_PINCLUDE(gtkmm/private/widget_p.h)
-
-/* we don't want whole vte.h in this file */
-typedef struct _VteCharAttributes VteCharAttributes;
-
-namespace Vte
-{
-
-
-class CharAttributes
-{
-private:
- VteCharAttributes * _gobject;
-
-public:
- CharAttributes(VteCharAttributes *obj);
- CharAttributes(const CharAttributes&);
-
- ~CharAttributes();
-
- CharAttributes& operator= (const CharAttributes&);
-
- int row() const;
- int column() const;
- Gdk::Color foreground() const;
- Gdk::Color background() const;
- bool underline() const;
- bool strikethrough() const;
-};
-
-_WRAP_ENUM(TerminalEraseBinding, VteTerminalEraseBinding)
-_WRAP_ENUM(TerminalAntiAlias, VteTerminalAntiAlias)
-
-class Terminal :
- public Gtk::Widget
-{
-
-_CLASS_GTKOBJECT(Terminal,VteTerminal,VTE_TERMINAL,Gtk::Widget,GtkWidget)
-public:
-
-typedef sigc::slot<bool, long, long> SlotIsSelected;
-
-_CTOR_DEFAULT
-
-_WRAP_METHOD(void im_append_menuitems(const Gtk::MenuShell& menushell), vte_terminal_im_append_menuitems)
-_WRAP_METHOD(pid_t fork_command(const char* command, char** argv, char** envv, const char* directory, bool lastlog, bool utmp, bool wtmp), vte_terminal_fork_command)
-_WRAP_METHOD(pid_t forkpty(char** env, const char* directory, bool lastlog, bool utmp, bool wtmp), vte_terminal_forkpty)
-_WRAP_METHOD(void set_pty(int pty_master), vte_terminal_set_pty)
-_WRAP_METHOD(void feed(const char* data, glong length), vte_terminal_feed)
-_WRAP_METHOD(void feed_child(const char* text, glong length), vte_terminal_feed_child)
-_WRAP_METHOD(void feed_child_binary(const char* data, glong length), vte_terminal_feed_child_binary)
-_WRAP_METHOD(void copy_clipboard(), vte_terminal_copy_clipboard)
-_WRAP_METHOD(void paste_clipboard(), vte_terminal_paste_clipboard)
-_WRAP_METHOD(void copy_primary(), vte_terminal_copy_primary)
-_WRAP_METHOD(void paste_primary(), vte_terminal_paste_primary)
-_WRAP_METHOD(void set_size(glong columns, glong rows), vte_terminal_set_size)
-_WRAP_METHOD(void set_audible_bell(bool is_audible), vte_terminal_set_audible_bell)
-_WRAP_METHOD(bool get_audible_bell(), vte_terminal_get_audible_bell)
-_WRAP_METHOD(void set_visible_bell(bool is_visible), vte_terminal_set_visible_bell)
-_WRAP_METHOD(bool get_visible_bell(), vte_terminal_get_visible_bell)
-_WRAP_METHOD(void set_allow_bold(bool allow_bold), vte_terminal_set_allow_bold)
-_WRAP_METHOD(bool get_allow_bold(), vte_terminal_get_allow_bold)
-_WRAP_METHOD(void set_scroll_on_output(bool scroll), vte_terminal_set_scroll_on_output)
-_WRAP_METHOD(void set_scroll_on_keystroke(bool scroll), vte_terminal_set_scroll_on_keystroke)
-_WRAP_METHOD(void set_color_bold(const Gdk::Color& bold), vte_terminal_set_color_bold )
-_WRAP_METHOD(void set_color_foreground(const Gdk::Color& foreground), vte_terminal_set_color_foreground)
-_WRAP_METHOD(void set_color_background(const Gdk::Color& background), vte_terminal_set_color_background)
-_WRAP_METHOD(void set_color_dim(const Gdk::Color& dim), vte_terminal_set_color_dim)
-_WRAP_METHOD(void set_color_cursor(const Gdk::Color& cursor), vte_terminal_set_color_cursor)
-_WRAP_METHOD(void set_color_highlight(const Gdk::Color& highlight), vte_terminal_set_color_highlight)
-_WRAP_METHOD(void set_colors(const Gdk::Color& foreground, const Gdk::Color& background, const Gdk::Color& palete_size, glong palette_size), vte_terminal_set_colors)
-_WRAP_METHOD(void set_default_colors(), vte_terminal_set_default_colors)
-_WRAP_METHOD(void set_background_image(Glib::RefPtr<Gdk::Pixbuf> pixbuf), vte_terminal_set_background_image)
-_WRAP_METHOD(void set_background_image_file(const char* path), vte_terminal_set_background_image_file)
-_WRAP_METHOD(void set_background_saturation(double saturation), vte_terminal_set_background_saturation)
-_WRAP_METHOD(void set_background_transparent(bool transparent), vte_terminal_set_background_transparent)
-_WRAP_METHOD(void set_background_tint_color(const Gdk::Color& color), vte_terminal_set_background_tint_color)
-_WRAP_METHOD(void set_scroll_background(bool scroll), vte_terminal_set_scroll_background)
-_WRAP_METHOD(void set_cursor_blinks(bool blink), vte_terminal_set_cursor_blinks)
-_WRAP_METHOD(void set_scrollback_lines(long lines), vte_terminal_set_scrollback_lines)
-_WRAP_METHOD(void set_font(const Pango::FontDescription& font_desc), vte_terminal_set_font)
-_WRAP_METHOD(void set_font_from_string(const char* name), vte_terminal_set_font_from_string)
-_WRAP_METHOD(void set_font_from_string_full(const char* name, TerminalAntiAlias antialas), vte_terminal_set_font_from_string_full)
-_WRAP_METHOD(void set_font_full(const Pango::FontDescription& font_desc, TerminalAntiAlias antialas), vte_terminal_set_font_full)
-_WRAP_METHOD(const Pango::FontDescription get_font(), vte_terminal_get_font)
-_WRAP_METHOD(bool get_using_xft(), vte_terminal_get_using_xft)
-_WRAP_METHOD(bool get_has_selection(), vte_terminal_get_has_selection)
-_WRAP_METHOD(void set_word_chars(const char* spec), vte_terminal_set_word_chars)
-_WRAP_METHOD(bool is_word_char(gunichar), vte_terminal_is_word_char)
-_WRAP_METHOD(void set_backspace_binding(TerminalEraseBinding binding), vte_terminal_set_backspace_binding)
-_WRAP_METHOD(void set_delete_binding(TerminalEraseBinding binding), vte_terminal_set_delete_binding)
-_WRAP_METHOD(void set_mouse_autohide(bool setting), vte_terminal_set_mouse_autohide)
-_WRAP_METHOD(bool get_mouse_autohide(), vte_terminal_get_mouse_autohide)
-_WRAP_METHOD(void reset(bool full, bool clear_history), vte_terminal_reset)
-//_WRAP_METHOD(char* get_text(bool (*is_selected) (glong column,glong row,gpointer data), gpointer data, GArray *attributes), vte_terminal_get_text) //Manualy wrapped below
-//_WRAP_METHOD(char* get_text_range(glong start_row, glong start_col, glong end_row, glong end_col, gboolean (*is_selected) (glong column,glong row,gpointer data), gpointer data, GArray *attributes), vte_terminal_get_text_range) //Manualy wrapped bellow
-_WRAP_METHOD(void get_cursor_position(long& column, long& row), vte_terminal_get_cursor_position)
-_WRAP_METHOD(void match_clear_all(), vte_terminal_match_clear_all)
-_WRAP_METHOD(int match_add(const char* match), vte_terminal_match_add)
-_WRAP_METHOD(void match_remove(int tag), vte_terminal_match_remove)
-_WRAP_METHOD(char* match_check(glong column, glong row, int& tag), vte_terminal_match_check)
-_WRAP_METHOD(void match_set_cursor(int tag, Gdk::Cursor& ), vte_terminal_match_set_cursor)
-_WRAP_METHOD(void match_set_cursor_type(int tag, Gdk::CursorType), vte_terminal_match_set_cursor_type)
-_WRAP_METHOD(void set_emulation(const char* emulation), vte_terminal_set_emulation)
-_WRAP_METHOD(const char* get_emulation(), vte_terminal_get_emulation)
-_WRAP_METHOD(const char* get_default_emulation(), vte_terminal_get_default_emulation)
-_WRAP_METHOD(void set_encoding(const char* codeset), vte_terminal_set_encoding)
-_WRAP_METHOD(const char* get_encoding(), vte_terminal_get_encoding)
-_WRAP_METHOD(const char* get_status_line(), vte_terminal_get_status_line)
-_WRAP_METHOD(void get_padding(int& xpad, int& ypad), vte_terminal_get_padding)
-_WRAP_METHOD(Gtk::Adjustment* get_adjustment(), vte_terminal_get_adjustment)
-_WRAP_METHOD(glong get_char_ascent(), vte_terminal_get_char_ascent)
-_WRAP_METHOD(glong get_char_descent(), vte_terminal_get_char_descent)
-_WRAP_METHOD(glong get_char_height(), vte_terminal_get_char_height)
-_WRAP_METHOD(glong get_char_width(), vte_terminal_get_char_width)
-_WRAP_METHOD(glong get_column_count(), vte_terminal_get_column_count)
-_WRAP_METHOD(const char* get_icon_title(), vte_terminal_get_icon_title)
-_WRAP_METHOD(glong get_row_count(), vte_terminal_get_row_count)
-_WRAP_METHOD(const char* get_window_title(), vte_terminal_get_window_title)
-
-_WRAP_SIGNAL(void char_size_changed(unsigned w, unsigned h), "char-size-changed")
-_WRAP_SIGNAL(void child_exited(), "child-exited")
-_WRAP_SIGNAL(void commit(gchar* text, unsigned length), "commit")
-_WRAP_SIGNAL(void contents_changed(), "contents-changed")
-_WRAP_SIGNAL(void cursor_moved(), "cursor-moved")
-_WRAP_SIGNAL(void decrease_font_size(), "decrease-font-size")
-_WRAP_SIGNAL(void deiconify_window(), "deiconify-window")
-_WRAP_SIGNAL(void emulation_changed(), "emulation-changed")
-_WRAP_SIGNAL(void encoding_changed(), "encoding-changed")
-_WRAP_SIGNAL(void eof(), "eof")
-_WRAP_SIGNAL(void icon_title_changed(), "icon-title-changed")
-_WRAP_SIGNAL(void iconify_window(), "iconify-window")
-_WRAP_SIGNAL(void increase_font_size(), "increase-font-size")
-_WRAP_SIGNAL(void lower_window(), "lower-window")
-_WRAP_SIGNAL(void maximize_window(), "maximize-window")
-_WRAP_SIGNAL(void move_window(unsigned x, unsigned y), "move-window")
-_WRAP_SIGNAL(void raise_window(), "raise-window")
-_WRAP_SIGNAL(void refresh_window(), "refresh-window")
-_WRAP_SIGNAL(void resize_window(unsigned w, unsigned h), "resize-window")
-_WRAP_SIGNAL(void restore_window(), "restore-window")
-_WRAP_SIGNAL(void selection_changed(), "selection-changed")
-_WRAP_SIGNAL(void status_line_changed(), "status-line-changed")
-_WRAP_SIGNAL(void text_deleted(), "text-deleted")
-_WRAP_SIGNAL(void text_inserted(), "text-inserted")
-_WRAP_SIGNAL(void text_modified(), "text-modified")
-_WRAP_SIGNAL(void text_scrolled(int arg), "text-scrolled")
-_WRAP_SIGNAL(void window_title_changed(), "window-title-changed")
- char* get_text(const SlotIsSelected& slot, std::vector<CharAttributes>& attributes);
- char* get_text_include_trailing_spaces(const SlotIsSelected& slot, std::vector<CharAttributes>& attributes);
- char* get_text_range(long start_row, long start_col, long end_row, long end_col, const SlotIsSelected& slot, std::vector<CharAttributes>& attributes);
-};
-
-} /* namespace Vte */
diff --git a/src/output/colour.hh b/src/output/colour.hh
index 14fb62e..ac3a3a7 100644
--- a/src/output/colour.hh
+++ b/src/output/colour.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2006, 2007 Ciaran McCreesh
+ * Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -78,11 +78,7 @@ enum Colour
cl_sym = cl_pink,
cl_misc = cl_red,
cl_fifo = cl_red,
- cl_dev = cl_red,
-
- /* Contrarius colours */
- cl_stage_short_name = cl_blue,
- cl_stage_long_name = cl_yellow
+ cl_dev = cl_red
};
bool PALUDIS_VISIBLE use_colour();