[ekiga/gnome-2-26] Reviewed the menu builder tools - not 100% satisfying
- From: Eugen Dedu <ededu src gnome org>
- To: svn-commits-list gnome org
- Subject: [ekiga/gnome-2-26] Reviewed the menu builder tools - not 100% satisfying
- Date: Mon, 27 Apr 2009 11:57:04 -0400 (EDT)
commit dff47038f28b1cf375b53627616cfe7d48387fa0
Author: Julien Puydt <jpuydt src gnome org>
Date: Tue Mar 17 20:28:00 2009 +0000
Reviewed the menu builder tools - not 100% satisfying
svn path=/trunk/; revision=7776
---
lib/engine/framework/menu-builder-tools.cpp | 21 +++++++++++++++++----
lib/engine/framework/menu-builder-tools.h | 4 ++++
2 files changed, 21 insertions(+), 4 deletions(-)
diff --git a/lib/engine/framework/menu-builder-tools.cpp b/lib/engine/framework/menu-builder-tools.cpp
index c491fc9..573dd86 100644
--- a/lib/engine/framework/menu-builder-tools.cpp
+++ b/lib/engine/framework/menu-builder-tools.cpp
@@ -110,8 +110,10 @@ public:
const std::string label_,
sigc::slot0<void> callback_):
icon(icon_), label(label_), callback(callback_)
- {
- }
+ {}
+
+ ~TemporaryMenuBuilderHelperAction ()
+ {}
bool populate_menu (Ekiga::MenuBuilder& builder)
{
@@ -134,6 +136,9 @@ public:
TemporaryMenuBuilderHelperSeparator ()
{}
+ ~TemporaryMenuBuilderHelperSeparator ()
+ {}
+
bool populate_menu (Ekiga::MenuBuilder& builder)
{
builder.add_separator ();
@@ -149,8 +154,10 @@ public:
TemporaryMenuBuilderHelperGhost (const std::string icon_,
const std::string label_):
icon(icon_), label(label_)
- {
- }
+ {}
+
+ ~TemporaryMenuBuilderHelperGhost ()
+ {}
bool populate_menu (Ekiga::MenuBuilder& builder)
{
@@ -209,6 +216,12 @@ Ekiga::TemporaryMenuBuilder::add_ghost (const std::string icon,
helpers.push_back (helper);
}
+bool
+Ekiga::TemporaryMenuBuilder::empty () const
+{
+ return (count == 0);
+}
+
int
Ekiga::TemporaryMenuBuilder::size () const
{
diff --git a/lib/engine/framework/menu-builder-tools.h b/lib/engine/framework/menu-builder-tools.h
index a74ad66..5f7fed5 100644
--- a/lib/engine/framework/menu-builder-tools.h
+++ b/lib/engine/framework/menu-builder-tools.h
@@ -158,6 +158,8 @@ namespace Ekiga
{
public:
+ virtual ~TemporaryMenuBuilderHelper () {}
+
virtual bool populate_menu (Ekiga::MenuBuilder& builder) = 0;
};
@@ -178,6 +180,8 @@ namespace Ekiga
void add_ghost (const std::string icon,
const std::string label);
+ bool empty () const;
+
int size () const;
/* this empties this temporary builder, so it can be reused */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]