[Debtags-commits] [svn] r1348 - in debtags-edit/trunk: . debian src

Enrico Zini enrico at costa.debian.org
Fri Sep 9 00:04:41 UTC 2005


Author: enrico
Date: Fri Sep  9 00:04:40 2005
New Revision: 1348

Modified:
   debtags-edit/trunk/configure.ac
   debtags-edit/trunk/debian/changelog
   debtags-edit/trunk/debian/control
   debtags-edit/trunk/src/DebtagsDocument.cc
   debtags-edit/trunk/src/DebtagsDocument.h
   debtags-edit/trunk/src/FilterPanel.cc
   debtags-edit/trunk/src/FilterPanel.h
   debtags-edit/trunk/src/Makefile.am
   debtags-edit/trunk/src/TagMenu.cc
   debtags-edit/trunk/src/TagMenu.h
Log:
Started porting to new libapt-front
We don't need to depend on libdebtags1-dev anymore

Modified: debtags-edit/trunk/configure.ac
==============================================================================
--- debtags-edit/trunk/configure.ac	(original)
+++ debtags-edit/trunk/configure.ac	Fri Sep  9 00:04:40 2005
@@ -22,7 +22,6 @@
 dnl AM_PROG_LIBTOOL
 
 LIBTAGCOLL1_DEFS
-LIBDEBTAGS1_DEFS
 LIBAPT_FRONT_DEFS
 
 PKG_CHECK_MODULES([GTKMM], [sigc++-2.0 >= 2.0 gtkmm-2.4 >= 2.4.0])AC_SUBST([GTKMM_CFLAGS])

Modified: debtags-edit/trunk/debian/changelog
==============================================================================
--- debtags-edit/trunk/debian/changelog	(original)
+++ debtags-edit/trunk/debian/changelog	Fri Sep  9 00:04:40 2005
@@ -1,3 +1,11 @@
+debtags-edit (1.1.2) unstable; urgency=low
+
+  * Ported to new libapt-front
+  * We don't depend on libdebtags1 anymore, as it has been merged in
+    libapt-front
+
+ -- Enrico Zini <enrico at debian.org>  Fri,  9 Sep 2005 01:26:59 +0200
+
 debtags-edit (1.1.1) experimental; urgency=low
 
   * Ported to new libapt-front

Modified: debtags-edit/trunk/debian/control
==============================================================================
--- debtags-edit/trunk/debian/control	(original)
+++ debtags-edit/trunk/debian/control	Fri Sep  9 00:04:40 2005
@@ -2,7 +2,7 @@
 Section: misc
 Priority: optional
 Maintainer: Enrico Zini <enrico at debian.org>
-Build-Depends: cdbs, debhelper (>= 4.1), dh-buildinfo, pkg-config, libapt-front-dev (>= 0.2), libdebtags1-dev (>= 1.4), libdebtags1-dev (<< 1.5), libgtkmm-2.4-dev
+Build-Depends: cdbs, debhelper (>= 4.1), dh-buildinfo, pkg-config, libapt-front-dev (>= 0.3), libapt-front-dev (<< 0.4), libgtkmm-2.4-dev
 Standards-Version: 3.6.2.0
 
 Package: debtags-edit

Modified: debtags-edit/trunk/src/DebtagsDocument.cc
==============================================================================
--- debtags-edit/trunk/src/DebtagsDocument.cc	(original)
+++ debtags-edit/trunk/src/DebtagsDocument.cc	Fri Sep  9 00:04:40 2005
@@ -34,15 +34,19 @@
 #include <errno.h>
 
 using namespace std;
-using namespace Debtags;
+using namespace Tagcoll;
+using namespace aptFront;
+using namespace aptFront::cache;
+using namespace aptFront::cache::component;
 
 DebtagsDocument::DebtagsDocument() throw () :
 	//DebtagsSimple<aptFront::cache::entity::Package>(true),
 	_packages(aptFront::cache::Global::get().packages()),
-	debtags(aptFront::cache::Global::get().debtags()),
+	_debtags(aptFront::cache::Global::get().debtags()),
+	_voc(aptFront::cache::Global::get().tags()),
 	_changed(false),
-	_lastPatch(Tagcoll::Patch<package, Debtags::Tag>(package())),
-	_undoTail(0), /*specialsGen(*this),*/ computeIntensive(false), specials(100), hasSpecials(NO)
+	_lastPatch(Tagcoll::Patch<Package, Tag>(Package())),
+	_undoTail(0), /*specialsGen(*this),*/ computeIntensive(false)/*, specials(100)*/, hasSpecials(NO)
 {
 #if 0
 	regenerateSpecials();
@@ -144,7 +148,7 @@
 		hasSpecials = GENERATING;
 	}
 	specialsGen.interrupt(false);
-	specialsGen.coll = Tagcoll::ItemGrouper<aptFront::cache::entity::Package, Debtags::Tag>();
+	specialsGen.coll = Tagcoll::ItemGrouper<aptFront::cache::entity::Package, Tag>();
 	tagdb().output(specialsGen.coll);
 	specialsGen.start();
 }
@@ -197,9 +201,9 @@
 	return _undoTail < _undoBuffer.size();
 }
 
-bool DebtagsDocument::canReapply(const package& pkg) const
+bool DebtagsDocument::canReapply(const Package& pkg) const
 {
-	return _lastPatch.getItem() != package() &&
+	return _lastPatch.getItem() != Package() &&
 		   _lastPatch.getItem() != pkg;
 }
 
@@ -211,7 +215,7 @@
 	debug("Pre undo: tail: %d, size: %d\n", _undoTail, _undoBuffer.size());
 
 	_undoTail--;
-	tagdb().applyChange(_undoBuffer[_undoTail]);
+	debtags().tagdb().applyChange(_undoBuffer[_undoTail]);
 	_undoBuffer[_undoTail] = _undoBuffer[_undoTail].getReverse();
 
 	debug("Post undo: tail: %d, size: %d\n", _undoTail, _undoBuffer.size());
@@ -226,7 +230,7 @@
 
 	debug("Pre redo: tail: %d, size: %d\n", _undoTail, _undoBuffer.size());
 
-	tagdb().applyChange(_undoBuffer[_undoTail]);
+	debtags().tagdb().applyChange(_undoBuffer[_undoTail]);
 	_undoBuffer[_undoTail] = _undoBuffer[_undoTail].getReverse();
 	_undoTail++;
 
@@ -236,13 +240,13 @@
 	do_changed();
 }
 
-void DebtagsDocument::reapply(const package& pkg)
+void DebtagsDocument::reapply(const Package& pkg)
 {
 	if (!canReapply(pkg))
 		return;
 
 	// Build the new patch
-	Tagcoll::Patch<package, Debtags::Tag> newPatch(
+	Tagcoll::Patch<Package, Tag> newPatch(
 			pkg,
 			_lastPatch.getAdded(),
 			_lastPatch.getRemoved());
@@ -250,7 +254,7 @@
 	applyChange(newPatch);
 }
 
-void DebtagsDocument::setCurrent(const package& pkg)
+void DebtagsDocument::setCurrent(const Package& pkg)
 {
 	if (_current != pkg)
 	{
@@ -259,17 +263,16 @@
 	}
 }
 
-void DebtagsDocument::applyChange(const Patch<package, Tag>& change)
+void DebtagsDocument::applyChange(const Patch<Package, Tag>& change)
 {
-	PatchList<package, Debtags::Tag> patchList;
+	PatchList<Package, Tag> patchList;
 	patchList.addPatch(change);
 	applyChange(patchList);
 }
 
-void DebtagsDocument::applyChange(const PatchList<package, Tag>& change)
+void DebtagsDocument::applyChange(const PatchList<Package, Tag>& change)
 {
-	//TagcollChange<Debtags::Package, Tag> reverse = Debtags::Environment::get().tagDB().applyChange(change);
-	tagdb().applyChange(change);
+	debtags().tagdb().applyChange(change);
 	
 	if (1 /*reverse != change*/)
 	{
@@ -291,7 +294,7 @@
 		if (change.size() == 1)
 			_lastPatch = change.begin()->second;
 		else
-			_lastPatch = Tagcoll::Patch<package, Debtags::Tag>(package());
+			_lastPatch = Tagcoll::Patch<Package, Tag>(Package());
 
 		debug("Post change: tail: %d, size: %d\n", _undoTail, _undoBuffer.size());
 
@@ -327,7 +330,7 @@
 
 void DebtagsDocument::save() throw (FileException)
 {
-	tagdb().savePatch();
+	debtags().savePatch();
 	_changed = false;
 	//DebtagsEnvironment::get().savePatch(_collection);
 	/*
@@ -353,7 +356,7 @@
 
 void DebtagsDocument::send() throw (FileException)
 {
-	tagdb().sendPatch();
+	debtags().sendPatch();
 }
 
 /*

Modified: debtags-edit/trunk/src/DebtagsDocument.h
==============================================================================
--- debtags-edit/trunk/src/DebtagsDocument.h	(original)
+++ debtags-edit/trunk/src/DebtagsDocument.h	Fri Sep  9 00:04:40 2005
@@ -24,14 +24,15 @@
 #include <sigc++/sigc++.h>
 
 #include <apt-front/cache/entity/package.h>
-#include <apt-front/cache/component/debtags.h>
+#include <apt-front/cache/entity/tag.h>
+#include <apt-front/cache/component/packagetags.h>
+#include <apt-front/cache/component/tags.h>
 
-#include <debtags/Tag.h>
 #include <tagcoll/Patches.h>
 #include <tagcoll/InputMerger.h>
 #include <tagcoll/ItemGrouper.h>
 
-#include <debtags/Utils.h>
+//#include <debtags/Utils.h>
 
 #include "Mutex.h"
 #include "Thread.h"
@@ -46,7 +47,9 @@
 	typedef SigC::Signal0<void> type_signal_reselected;
 	typedef SigC::Signal0<void> type_signal_filename_changed;
 
-	typedef aptFront::cache::entity::Package package;
+	typedef aptFront::cache::entity::Package Package;
+	typedef aptFront::cache::entity::Facet Facet;
+	typedef aptFront::cache::entity::Tag Tag;
 
 protected:
 #if 0
@@ -54,7 +57,7 @@
 	{
 	protected:
 		DebtagsDocument& doc;
-		Tagcoll::ItemGrouper<package, Debtags::Tag> coll;
+		Tagcoll::ItemGrouper<package, Tag> coll;
 		bool _interrupt;
 
 		virtual const char* threadTag() { return "SpecialsGen"; }
@@ -73,14 +76,15 @@
 #endif
 
 	aptFront::cache::component::Packages& _packages;
-	aptFront::cache::component::Tags& debtags;
+	aptFront::cache::component::PackageTags& _debtags;
+	aptFront::cache::component::Tags& _voc;
 	
 	bool _changed;
 
-	package _current;
+	Package _current;
 
-	Tagcoll::Patch<package, Debtags::Tag> _lastPatch;
-	std::vector<Tagcoll::PatchList<package, Debtags::Tag> > _undoBuffer;
+	Tagcoll::Patch<Package, Tag> _lastPatch;
+	std::vector<Tagcoll::PatchList<Package, Tag> > _undoBuffer;
 	unsigned int _undoTail;
 
 	type_signal_changed _signal_changed;
@@ -102,15 +106,15 @@
 	aptFront::cache::component::Packages& packages() { return _packages; }
 	const aptFront::cache::component::Packages& packages() const { return _packages; }
 
-	Debtags::Tags<package>& tagdb() { return debtags.tagdb(); }
-	const Debtags::Tags<package>& tagdb() const { return debtags.tagdb(); }
+	aptFront::cache::component::PackageTags& debtags() { return _debtags; }
+	const aptFront::cache::component::PackageTags& debtags() const { return _debtags; }
 
-	Debtags::Vocabulary& vocabulary() { return debtags.vocabulary(); }
-	const Debtags::Vocabulary& vocabulary() const { return debtags.vocabulary(); }
+	aptFront::cache::component::Tags& vocabulary() { return _voc; }
+	const aptFront::cache::component::Tags& vocabulary() const { return _voc; }
 
-	const Tagcoll::PatchList<package, Debtags::Tag>& getPatch() const
+	const Tagcoll::PatchList<Package, Tag>& getPatch() const
 	{
-		return tagdb().getChanges();
+		return debtags().tagdb().getChanges();
 	}
 
 	bool getComputeIntensive() const throw () { return computeIntensive; }
@@ -132,32 +136,32 @@
 
 	bool changed() const { return _changed; }
 
-	package& current() { return _current; }
-	const package& current() const { return _current; }
+	Package& current() { return _current; }
+	const Package& current() const { return _current; }
 
-	Tagcoll::OpSet<Debtags::Tag> currentTags() const
+	Tagcoll::OpSet<Tag> currentTags() const
 	{
 		if (_current.valid())
-			return tagdb().getTags(_current);
+			return debtags().tagdb().getTags(_current);
 		else
-			return Tagcoll::OpSet<Debtags::Tag>();
+			return Tagcoll::OpSet<Tag>();
 	}
 
-	void setCurrent(const package& pkg);
+	void setCurrent(const Package& pkg);
 
 	// Apply a change, appending the reverse change in the undo buffer
-	void applyChange(const Tagcoll::Patch<package, Debtags::Tag>& change);
-	void applyChange(const Tagcoll::PatchList<package, Debtags::Tag>& change);
+	void applyChange(const Tagcoll::Patch<Package, Tag>& change);
+	void applyChange(const Tagcoll::PatchList<Package, Tag>& change);
 
 	bool canUndo() const;
 	bool canRedo() const;
-	bool canReapply(const package& pkg) const;
+	bool canReapply(const Package& pkg) const;
 
 	void undo();
 	void redo();
 	void reapplyToCurrent() { reapply(current()); }
 	void reapply() { reapply(current()); }
-	void reapply(const package& pkg);
+	void reapply(const Package& pkg);
 
 	//void load() throw (FileException, ParserException);
 	void save() throw (Tagcoll::FileException);
@@ -168,9 +172,9 @@
 
 	// Results of the package filter
 	//Debtags::PackageSet currentPackages;
-	Tagcoll::InputMerger<package, Debtags::Tag> subCollection;
+	Tagcoll::InputMerger<Package, Tag> subCollection;
 
-	Debtags::Specials<package> specials;
+	//Debtags::Specials<Package> specials;
 	enum { YES, NO, GENERATING } hasSpecials;
 	Mutex specialsMutex;
 

Modified: debtags-edit/trunk/src/FilterPanel.cc
==============================================================================
--- debtags-edit/trunk/src/FilterPanel.cc	(original)
+++ debtags-edit/trunk/src/FilterPanel.cc	Fri Sep  9 00:04:40 2005
@@ -21,6 +21,7 @@
 #include "FilterPanel.h"
 
 #include <tagcoll/stringf.h>
+
 #include <tagcoll/Expression.h>
 #include <tagcoll/Filters.h>
 #include <debtags/Filters.h>

Modified: debtags-edit/trunk/src/FilterPanel.h
==============================================================================
--- debtags-edit/trunk/src/FilterPanel.h	(original)
+++ debtags-edit/trunk/src/FilterPanel.h	Fri Sep  9 00:04:40 2005
@@ -23,9 +23,7 @@
 
 #include <tagcoll/OpSet.h>
 #include <tagcoll/Consumer.h>
-//#include <debtags/PackageSet.h>
 
-//#include "PackageBuffer.h"
 #include "TagSelector.h"
 
 #include <sigc++/sigc++.h>
@@ -47,7 +45,6 @@
 
 protected:
 	DOC& doc;
-	//Debtags::BasicPackageMatcher<typename DOC::package> filter;
 	Gtk::Entry nameFilter;
 	Gtk::Entry maintFilter;
 	Gtk::Entry ftextFilter;

Modified: debtags-edit/trunk/src/Makefile.am
==============================================================================
--- debtags-edit/trunk/src/Makefile.am	(original)
+++ debtags-edit/trunk/src/Makefile.am	Fri Sep  9 00:04:40 2005
@@ -17,12 +17,11 @@
 	PatchReview.cc \
 	DebtagsEditor.cc \
 	debtags-edit.cc \
+	instantiations.cc
 	instantiations.cc \
 	instantiations1.cc
+debtags_edit_LDADD = $(LIBAPT_FRONT_LIBS) $(LIBTAGCOLL1_LIBS) $(GTKMM_LIBS) -lpthread
 
-# Dependency on -lrt is a bit dubious
-debtags_edit_LDADD = $(LIBAPT_FRONT_LIBS) $(LIBDEBTAGS1_LIBS) $(LIBTAGCOLL1_LIBS) $(GTKMM_LIBS) -lpthread -lrt
-
-INCLUDES = $(LIBAPT_FRONT_CFLAGS) $(LIBTAGCOLL1_CFLAGS) $(LIBDEBTAGS1_CFLAGS) $(GTKMM_CFLAGS)
+INCLUDES = $(LIBAPT_FRONT_CFLAGS) $(LIBTAGCOLL1_CFLAGS) $(GTKMM_CFLAGS)
 
 EXTRA_DIST = CommandlineParser.h DebtagsDocument.h DebtagsEditor.h Environment.h FilterPanel.h Mutex.h PatchReview.h RelatedPanel.h TagEditor.h TagMenu.h TagSelector.h Thread.h

Modified: debtags-edit/trunk/src/TagMenu.cc
==============================================================================
--- debtags-edit/trunk/src/TagMenu.cc	(original)
+++ debtags-edit/trunk/src/TagMenu.cc	Fri Sep  9 00:04:40 2005
@@ -23,7 +23,7 @@
 #include "Environment.h"
 #include "DebtagsDocument.h"
 
-#include <debtags/Utils.h>
+//#include <debtags/Utils.h>
 #include <tagcoll/CardinalityStore.h>
 #include <tagcoll/SmartHierarchy.h>
 
@@ -32,7 +32,6 @@
 #include <string>
 
 using namespace std;
-using namespace Debtags;
 using namespace Tagcoll;
 
 //template class TagMenu<DebtagsDocument>;
@@ -48,16 +47,16 @@
 {
 	// Needs std:: not to be confused with some other map in gtkmm
 	std::map<Facet, vector<Tag> > contents;
-	for (OpSet<Tag>::const_iterator i = tags.begin(); i != tags.end(); i++)
+	for (typename OpSet<Tag>::const_iterator i = tags.begin(); i != tags.end(); i++)
 		contents[i->facet()].push_back(*i);
 
-	for (std::map<Facet, vector<Tag> >::const_iterator i = contents.begin(); i != contents.end(); i++)
+	for (typename std::map<Facet, vector<Tag> >::const_iterator i = contents.begin(); i != contents.end(); i++)
 	{
 		Gtk::Menu* submenu = manage(new Gtk::Menu);
-		for (vector<Tag>::const_iterator j = i->second.begin(); j != i->second.end(); j++)
+		for (typename vector<Tag>::const_iterator j = i->second.begin(); j != i->second.end(); j++)
 		{
 			submenu->items().push_back(Gtk::Menu_Helpers::MenuElem(
-						"[" + j->name() + "] " + j->sdesc(),
+						"[" + j->name() + "] " + j->shortDescription(),
 						sigc::bind<Tag>(
 							sigc::mem_fun(*this, &TagMenu::do_selected), *j)));
 			//printf("Adding %.*s::%.*s\n", PFSTR(i->first), PFSTR(*j));
@@ -65,14 +64,14 @@
 		if (i->first.name().empty())
 			items().push_back(Gtk::Menu_Helpers::MenuElem("(legacy)", *submenu));
 		else
-			items().push_back(Gtk::Menu_Helpers::MenuElem("[" + i->first.name() + "] " + i->first.sdesc(), *submenu));
+			items().push_back(Gtk::Menu_Helpers::MenuElem("[" + i->first.name() + "] " + i->first.shortDescription(), *submenu));
 	}
 }
 
 template<class DOC>
 void TagMenu<DOC>::populateWith(const OpSet<Tag>& tags, const Facet& facet) throw ()
 {
-	for (OpSet<Tag>::const_iterator i = tags.begin(); i != tags.end(); i++)
+	for (typename OpSet<Tag>::const_iterator i = tags.begin(); i != tags.end(); i++)
 	{
 		//printf("Facet: %.*s, tag: %.*s\n", PFSTR(f), PFSTR(t));
 		if (i->facet() == facet)
@@ -91,13 +90,13 @@
 {
 	// Needs std:: not to be confused with some other map
 	std::map<Facet, vector<Tag> > contents;
-    for (OpSet<Tag>::const_iterator i = tags.begin(); i != tags.end(); i++)
+    for (typename OpSet<Tag>::const_iterator i = tags.begin(); i != tags.end(); i++)
 	{
 		// Filter out non-toplevel facets
 		if (!toplevelFacets.contains(i->facet()))
 			continue;
 
-		std::map<Facet, vector<Tag> >::iterator j = contents.find(i->facet());
+		typename std::map<Facet, vector<Tag> >::iterator j = contents.find(i->facet());
 		if (j != contents.end())
 			j->second.push_back(*i);
 		else
@@ -108,10 +107,10 @@
 		}
 	}
 
-	for (std::map<Facet, vector<Tag> >::const_iterator i = contents.begin(); i != contents.end(); i++)
+	for (typename std::map<Facet, vector<Tag> >::const_iterator i = contents.begin(); i != contents.end(); i++)
 	{
 		Gtk::Menu* submenu = manage(new Gtk::Menu);
-		for (vector<Tag>::const_iterator j = i->second.begin(); j != i->second.end(); j++)
+		for (typename vector<Tag>::const_iterator j = i->second.begin(); j != i->second.end(); j++)
 		{
 			submenu->items().push_back(Gtk::Menu_Helpers::MenuElem(
 						j->name(),
@@ -130,11 +129,11 @@
 template<class DOC>
 void TagMenu<DOC>::populateAll(const DOC& doc) throw ()
 {
-	populateWith(doc.vocabulary().getTags());
+	populateWith(doc.vocabulary().tags());
 }
 
 template<class DOC>
-void TagMenu<DOC>::populateAvailable(const DOC& doc, const OpSet<Tag>& selectedTags, const Collection<typename DOC::package, Tag>& items) throw ()
+void TagMenu<DOC>::populateAvailable(const DOC& doc, const OpSet<Tag>& selectedTags, const Collection<Package, Tag>& items) throw ()
 {
 	/*
 	OpSet<Tag> merged;
@@ -162,21 +161,21 @@
 void TagMenu<DOC>::populateAvailableSmart(
 		const DOC& doc,
 		const OpSet<Tag>& selectedTags,
-		const Collection<typename DOC::package, Tag>& items) throw ()
+		const Collection<Package, Tag>& items) throw ()
 {
 	// Compute the minimum set of toplevel facets that can be used to select
 	// all items in `items'
 
-	CardinalityStore<typename DOC::package, Facet> coll;
+	CardinalityStore<Package, Facet> coll;
 	OpSet<Facet> toplevelFacets;
 
 	// Make a new collection tagged with facets instead of tags
-	TagToFacet<typename DOC::package> tagStripper(coll);
+	TagToFacet<Package> tagStripper(coll);
 	items.output(tagStripper);
 
 	Facet f;
-	SmartHierarchyNode<typename DOC::package, Facet> node(f, coll, 0);
-	for (typename HierarchyNode<typename DOC::package, Facet>::iterator i = node.begin();
+	SmartHierarchyNode<Package, Facet> node(f, coll, 0);
+	for (typename HierarchyNode<Package, Facet>::iterator i = node.begin();
 			i != node.end(); i++)
 		toplevelFacets += (*i)->tag();
 
@@ -190,8 +189,8 @@
 void TagMenu<DOC>::populateAvailable(const DOC& doc, const OpSet<Tag>& selectedTags) throw ()
 {
 	OpSet<Tag> tags = selectedTags.empty() ?
-		  doc.tagdb().getAllTags()
-		: doc.tagdb().getCompanionTags(selectedTags);
+		  doc.debtags().tagdb().getAllTags()
+		: doc.debtags().tagdb().getCompanionTags(selectedTags);
 	//OpSet<Tag> tags = Debtags::Environment::get().tagdb().getCompanionTags(selectedTags);
 	populateWith(tags);
 }
@@ -199,14 +198,14 @@
 template<class DOC>
 void TagMenu<DOC>::populateAvailable(const DOC& doc, const OpSet<Tag>& selectedTags, const Facet& facet) throw ()
 {
-	OpSet<Tag> tags = doc.tagdb().getCompanionTags(selectedTags);
+	OpSet<Tag> tags = doc.debtags().tagdb().getCompanionTags(selectedTags);
 	populateWith(tags, facet);
 }
 
 template<class DOC>
 void TagMenu<DOC>::populateUnselected(const DOC& doc, const OpSet<Tag>& selectedTags) throw ()
 {
-	OpSet<Tag> tags = doc.vocabulary().getTags() - selectedTags;
+	OpSet<Tag> tags = doc.vocabulary().tags() - selectedTags;
 	//for (OpSet<string>::const_iterator i = tags.begin(); i != tags.end(); i++)
 		//printf("Sel: %.*s\n", PFSTR(*i));
 	populateWith(tags);
@@ -215,7 +214,7 @@
 template<class DOC>
 void TagMenu<DOC>::populateUnselected(const DOC& doc, const OpSet<Tag>& selectedTags, const Facet& facet) throw ()
 {
-	OpSet<Tag> tags = doc.vocabulary().getTags() - selectedTags;
+	OpSet<Tag> tags = doc.vocabulary().tags() - selectedTags;
 	//for (OpSet<string>::const_iterator i = tags.begin(); i != tags.end(); i++)
 		//printf("Sel: %.*s\n", PFSTR(*i));
 	populateWith(tags, facet);

Modified: debtags-edit/trunk/src/TagMenu.h
==============================================================================
--- debtags-edit/trunk/src/TagMenu.h	(original)
+++ debtags-edit/trunk/src/TagMenu.h	Fri Sep  9 00:04:40 2005
@@ -22,7 +22,7 @@
  */
 
 #include <gtkmm/menu.h>
-#include <debtags/Tag.h>
+#include <apt-front/cache/entity/tag.h>
 //#include <debtags/PackageSet.h>
 #include <tagcoll/Collection.h>
 
@@ -32,11 +32,15 @@
 class TagMenu : public Gtk::Menu
 {
 public:
-	typedef SigC::Signal1<void, Debtags::Tag> type_signal_selected;
+	typedef SigC::Signal1<void, typename DOC::Tag> type_signal_selected;
 
 protected:
 	type_signal_selected _signal_selected;
 
+	typedef typename DOC::Package Package;
+	typedef typename DOC::Facet Facet;
+	typedef typename DOC::Tag Tag;
+
 	/*
 	void on_filter_changed();
 	void on_document_changed();
@@ -45,9 +49,9 @@
 	void on_canceled() Se è intercettabile
 	*/
 
-	void populateWith(const Tagcoll::OpSet<Debtags::Tag>& tags) throw ();
-	void populateWith(const Tagcoll::OpSet<Debtags::Tag>& tags, const Debtags::Facet& facet) throw ();
-	void populateWith(const Tagcoll::OpSet<Debtags::Tag>& tags, const Tagcoll::OpSet<Debtags::Facet>& toplevelFacets) throw ();
+	void populateWith(const Tagcoll::OpSet<Tag>& tags) throw ();
+	void populateWith(const Tagcoll::OpSet<Tag>& tags, const Facet& facet) throw ();
+	void populateWith(const Tagcoll::OpSet<Tag>& tags, const Tagcoll::OpSet<Facet>& toplevelFacets) throw ();
 
 public:
 	TagMenu() throw () : Gtk::Menu() {}
@@ -55,21 +59,21 @@
 
 	type_signal_selected signal_selected() throw () { return _signal_selected; }
 
-	void do_selected(Debtags::Tag tag);
+	void do_selected(Tag tag);
 
 	// Populate with all tags
 	void populateAll(const DOC& doc) throw ();
 	// Populate with all companion tags of the given tag set
-	void populateAvailable(const DOC& doc, const Tagcoll::OpSet<Debtags::Tag>& selectedTags) throw ();
+	void populateAvailable(const DOC& doc, const Tagcoll::OpSet<Tag>& selectedTags) throw ();
 	// Populate with all companion tags of the tags with which the given packages have been tagged
-	void populateAvailable(const DOC& doc, const Tagcoll::OpSet<Debtags::Tag>& selectedTags, const Tagcoll::Collection<typename DOC::package, Debtags::Tag>& items) throw ();
-	void populateAvailableSmart(const DOC& doc, const Tagcoll::OpSet<Debtags::Tag>& selectedTags, const Tagcoll::Collection<typename DOC::package, Debtags::Tag>& items) throw ();
+	void populateAvailable(const DOC& doc, const Tagcoll::OpSet<Tag>& selectedTags, const Tagcoll::Collection<Package, Tag>& items) throw ();
+	void populateAvailableSmart(const DOC& doc, const Tagcoll::OpSet<Tag>& selectedTags, const Tagcoll::Collection<Package, Tag>& items) throw ();
 	// Populate with all companion tags of the given tag set in the given facet
-	void populateAvailable(const DOC& doc, const Tagcoll::OpSet<Debtags::Tag>& selectedTags, const Debtags::Facet& facet) throw ();
+	void populateAvailable(const DOC& doc, const Tagcoll::OpSet<Tag>& selectedTags, const Facet& facet) throw ();
 	// Populate with all tags except the ones in selectedTags
-	void populateUnselected(const DOC& doc, const Tagcoll::OpSet<Debtags::Tag>& selectedTags) throw ();
+	void populateUnselected(const DOC& doc, const Tagcoll::OpSet<Tag>& selectedTags) throw ();
 	// Populate with all tags except the ones in selectedTags
-	void populateUnselected(const DOC& doc, const Tagcoll::OpSet<Debtags::Tag>& selectedTags, const Debtags::Facet& facet) throw ();
+	void populateUnselected(const DOC& doc, const Tagcoll::OpSet<Tag>& selectedTags, const Facet& facet) throw ();
 };
 
 // vim:set ts=4 sw=4:



More information about the Debtags-commits mailing list