[glom] Maemo: Use some Hildon widgets.
- From: Murray Cumming <murrayc src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [glom] Maemo: Use some Hildon widgets.
- Date: Fri, 18 Sep 2009 14:38:55 +0000 (UTC)
commit 5bbc84a8df26c0b467372d5927ceb945eb9b0964
Author: Murray Cumming <murrayc murrayc com>
Date: Fri Sep 18 16:38:49 2009 +0200
Maemo: Use some Hildon widgets.
* glom/utility_widgets/entryglom.[h|cc]:
* glom/utility_widgets/textviewglom.h: Use Hildon::TextView and Hildon::Entry.
ChangeLog | 7 +++++++
glom/utility_widgets/entryglom.cc | 13 +++++++++++--
glom/utility_widgets/entryglom.h | 12 +++++++++++-
glom/utility_widgets/textviewglom.h | 9 +++++++++
4 files changed, 38 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 7ae6cfb..e452e10 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2009-09-18 Murray Cumming <murrayc murrayc com>
+ Maemo: Use some Hildon widgets.
+
+ * glom/utility_widgets/entryglom.[h|cc]:
+ * glom/utility_widgets/textviewglom.h: Use Hildon::TextView and Hildon::Entry.
+
+2009-09-18 Murray Cumming <murrayc murrayc com>
+
* configure.ac: Add a full configure example for maemo in a comment,
to help my memory.
* glom/dialog_import_csv.cc: Fix a typo to fix the build on maemo.
diff --git a/glom/utility_widgets/entryglom.cc b/glom/utility_widgets/entryglom.cc
index f8a5ef0..8d91f90 100644
--- a/glom/utility_widgets/entryglom.cc
+++ b/glom/utility_widgets/entryglom.cc
@@ -35,7 +35,12 @@ namespace Glom
{
EntryGlom::EntryGlom(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& /* builder */)
-: Gtk::Entry(cobject),
+:
+#ifdef GLOM_ENABLE_MAEMO
+ Hildon::Entry(cobject),
+#else
+ Gtk::Entry(cobject),
+#endif
m_glom_type(Field::TYPE_TEXT)
{
#ifndef GLOM_ENABLE_CLIENT_ONLY
@@ -45,7 +50,11 @@ EntryGlom::EntryGlom(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>&
}
EntryGlom::EntryGlom(Field::glom_field_type glom_type)
-: m_glom_type(glom_type)
+:
+#ifdef GLOM_ENABLE_MAEMO
+ Hildon::Entry(Gtk::Hildon::SIZE_AUTO),
+#endif
+ m_glom_type(glom_type)
{
#ifndef GLOM_ENABLE_CLIENT_ONLY
setup_menu();
diff --git a/glom/utility_widgets/entryglom.h b/glom/utility_widgets/entryglom.h
index f29a1e0..12a5d1d 100644
--- a/glom/utility_widgets/entryglom.h
+++ b/glom/utility_widgets/entryglom.h
@@ -28,13 +28,23 @@
#include "layoutwidgetfield.h"
#include <gtkmm/builder.h>
+#ifdef GLOM_ENABLE_MAEMO
+#include <hildonmm/entry.h>
+#endif
+
namespace Glom
{
class App_Glom;
+
class EntryGlom
-: public Gtk::Entry,
+:
+#ifdef GLOM_ENABLE_MAEMO
+ public Hildon::Entry,
+#else
+ public Gtk::Entry,
+#endif
public LayoutWidgetField
{
public:
diff --git a/glom/utility_widgets/textviewglom.h b/glom/utility_widgets/textviewglom.h
index bfef253..ccd0371 100644
--- a/glom/utility_widgets/textviewglom.h
+++ b/glom/utility_widgets/textviewglom.h
@@ -28,6 +28,10 @@
#include "layoutwidgetfield.h"
#include <gtkmm/builder.h>
+#ifdef GLOM_ENABLE_MAEMO
+#include <hildonmm/text-view.h>
+#endif
+
namespace Glom
{
@@ -75,7 +79,12 @@ private:
Field::glom_field_type m_glom_type; //Store the type so we can validate the text accordingly.
//Gnome::Gda::Value m_value; //The last-stored value. We have this because the displayed value might be unparseable.
+
+#ifdef GLOM_ENABLE_MAEMO
+ Hildon::TextView m_TextView;
+#else
Gtk::TextView m_TextView;
+#endif
};
} //namespace Glom
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]