[ekiga/ds-gtk-application] Forms: Allow specifying an action name.
- From: Damien Sandras <dsandras src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ekiga/ds-gtk-application] Forms: Allow specifying an action name.
- Date: Sun, 28 Sep 2014 12:28:10 +0000 (UTC)
commit 7062dfb81f0c98a3010249bcf000c8da7debc0b4
Author: Damien Sandras <dsandras seconix com>
Date: Sat Sep 27 16:55:16 2014 +0200
Forms: Allow specifying an action name.
This is much nicer than "OK" and also more explicit.
lib/engine/framework/form-builder.cpp | 8 ++++++++
lib/engine/framework/form-builder.h | 3 +++
lib/engine/framework/form-dumper.cpp | 6 ++++++
lib/engine/framework/form-dumper.h | 4 +++-
lib/engine/framework/form-visitor.h | 4 +++-
5 files changed, 23 insertions(+), 2 deletions(-)
---
diff --git a/lib/engine/framework/form-builder.cpp b/lib/engine/framework/form-builder.cpp
index 5ab8438..87800db 100644
--- a/lib/engine/framework/form-builder.cpp
+++ b/lib/engine/framework/form-builder.cpp
@@ -53,6 +53,7 @@ Ekiga::FormBuilder::visit (Ekiga::FormVisitor &visitor) const
std::list<struct EditableListField>::const_iterator iter_editable_list = editable_lists.begin ();
visitor.title (my_title);
+ visitor.action (my_action);
visitor.instructions (my_instructions);
if (!my_link.first.empty () && !my_link.second.empty ())
visitor.link (my_link.first, my_link.second);
@@ -245,6 +246,13 @@ Ekiga::FormBuilder::title (const std::string _title)
}
void
+Ekiga::FormBuilder::action (const std::string _action)
+{
+ my_action = _action;
+}
+
+
+void
Ekiga::FormBuilder::instructions (const std::string _instructions)
{
my_instructions = _instructions;
diff --git a/lib/engine/framework/form-builder.h b/lib/engine/framework/form-builder.h
index 68a517f..322dd48 100644
--- a/lib/engine/framework/form-builder.h
+++ b/lib/engine/framework/form-builder.h
@@ -78,6 +78,8 @@ namespace Ekiga
void title (const std::string title);
+ void action (const std::string action);
+
void instructions (const std::string instructions);
void link (const std::string link,
@@ -265,6 +267,7 @@ namespace Ekiga
} FieldType;
std::string my_title;
+ std::string my_action;
std::string my_instructions;
std::pair<std::string, std::string> my_link;
std::string my_error;
diff --git a/lib/engine/framework/form-dumper.cpp b/lib/engine/framework/form-dumper.cpp
index e7e91e3..eab4937 100644
--- a/lib/engine/framework/form-dumper.cpp
+++ b/lib/engine/framework/form-dumper.cpp
@@ -52,6 +52,12 @@ Ekiga::FormDumper::title (const std::string _title)
}
void
+Ekiga::FormDumper::action (const std::string _action)
+{
+ out << "Action: " << _action << std::endl;
+}
+
+void
Ekiga::FormDumper::instructions (const std::string _instructions)
{
out << "Instructions: " << std::endl << _instructions << std::endl;
diff --git a/lib/engine/framework/form-dumper.h b/lib/engine/framework/form-dumper.h
index 4e342ed..e971987 100644
--- a/lib/engine/framework/form-dumper.h
+++ b/lib/engine/framework/form-dumper.h
@@ -57,7 +57,9 @@ namespace Ekiga
void dump (const Form &form);
- void title (const std::string );
+ void title (const std::string);
+
+ void action (const std::string);
void instructions (const std::string );
diff --git a/lib/engine/framework/form-visitor.h b/lib/engine/framework/form-visitor.h
index 193613a..65549d5 100644
--- a/lib/engine/framework/form-visitor.h
+++ b/lib/engine/framework/form-visitor.h
@@ -57,8 +57,10 @@ namespace Ekiga
virtual void title (const std::string title) = 0;
+ virtual void action (const std::string action) = 0;
+
virtual void instructions (const std::string instructions) = 0;
-
+
virtual void link (const std::string link,
const std::string uri) = 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]