GNOME Bugzilla – Bug 441854
Maemo support
Last modified: 2008-12-16 10:26:12 UTC
Make glom build and run in a somewhat stripped-down version on maemo.
Created attachment 88950 [details] [review] Halfway done build fixes This is a half-done patch that tries to fix the glom build with reduced glibmm API on maemo bora. It does not compile yet, but there shouldn't be much left. It is still some rough around the edges (some things are unconditionally commented out that eventually require an --enable-maemo configure option). It also depends on a slightly hacked glibmm and libgdamm that compile against glib-2.8.
Note that we can now use gtkmm 2.10 (and glibmm 2.14) so some changes might not be necessary. I only see a 2.10->2.6 change in configure.in, but maybe there are others.
Created attachment 96438 [details] [review] Make glom build and work on maemo This patch (applying against the GLOM_CLIENTONLY branch) makes glom build and work on maemo (in client only mode). There are several rough edges, especially UI-wise, but the functionality should all be there. Places that still need some further work are marked with TODO_maemo in the code.
Excellent. Could you please: - make sure that this is applied to GLOM_CLIENTONLY. - make sure that this is merged with svn trunk. - make sure that the GLOM_CLIENTONLY branch has updates from the glom-1-6 branch. - prefix ENABLE_MAEMO so that it is GLOM_ENABLE_MAEMO. - Try to make Maemo sardine packages. (I guess that the GLOM_CLIENTONLY branch would be best rather than svn trunk, because it is based on Glom 1.6).
> - prefix ENABLE_MAEMO so that it is GLOM_ENABLE_MAEMO. Should I also do this for ENABLE_CLIENT_ONLY, while I'm on it?
Yes, please.
I did the merges and renamed ENABLE_MAEMO and ENABLE_CLIENT_ONLY. I will try to do the sardine packages, but I'm not too confident with debian-based distributions.
OK, you could ask Johannes to do the packaging, if you like.
You probably also want to #ifdef the amount of space between layout items on the details layout - 1 pixel seems to be standard in Maemo. I haven't run this yet, but I guess you didn't think of that already. We might want to do something similar for all widgets in dialogs, etc, even the ones created from Glade. I'm not sure how best to do that.
In both the GLOM_CLIENTONLY branch and trunk, I get this build error. Strangely, I don't see a typedef for ParentWindow anywhere: application.cc: In constructor ‘Glom::App_Glom::App_Glom(GtkWindow*, const Glib::RefPtr<Gnome::Glade::Xml>&)’: application.cc:91: error: no matching function for call to ‘Gtk::Window::Window(HildonWindow*)’ /opt/gnome220/include/gtkmm-2.4/gtkmm/window.h:215: note: candidates are: Gtk::Window::Window(Gtk::WindowType) /opt/gnome220/include/gtkmm-2.4/gtkmm/window.h:177: note: Gtk::Window::Window(GtkWindow*) /opt/gnome220/include/gtkmm-2.4/gtkmm/window.h:176: note: Gtk::Window::Window(const Glib::ConstructParams&) /opt/gnome220/include/gtkmm-2.4/gtkmm/window.h:172: note: Gtk::Window::Window(const Gtk::Window&) application.cc: In member function ‘virtual void Glom::App_Glom::init_layout()’: application.cc:190: error: ‘set_menu’ was not declared in this scope make[3]: *** [application.o] Error 1 make[3]: Leaving directory `/home/murrayc/svn/gnome220/branches/glom-clientonly/glom' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/home/murrayc/svn/gnome220/branches/glom-clientonly/glom' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/murrayc/svn/gnome220/branches/glom-clientonly' make: *** [all] Error 2
The ParentWindow typedef is in bakery's App_Gtk class. Make sure to build it with the --enable-maemo configure option.
OK. I'll add a comment there as a hint. You might also investigate making libglom statically link with the main glom application, at least for Maemo. That should save some code size and load time.
It would probably be a good idea to use maemo specific widgets such as HildonDateEditor and HildonTimeEditor for appropriate fields. However, these do not support being empty (have no date/time set). Perhaps we can bring up a hildon calendar widgets instead of a GTK calendar widget, though, when the "..." button is pressed.
> It would probably be a good idea to use maemo specific widgets such as > HildonDateEditor and HildonTimeEditor Maybe. Though that's not essential at first. We could submit bugs/patches to allow these to be empty, later.
I started to change spacings to 1 pixel on maemo. I basically see two possibilities for how to affect the glade-created widgets: * Create the glade file from a glom.glade.in that has placeholders for the spacings and process it with some script to generate the final glom.glade out of that. The problem with this is that the (non-generated) glade file cannot be easily edited with glade then, anymore. We could try to write a tool to make merging easier when editing the generated file, but that's still not optimal. * Use the glade file as is, but walk the widget hierarchy for any loaded widget and scan for spacings on boxes and tables, and border-width for containers. If these match the Gnome defaults (6 or 12), replace them by 1. However, this adds some runtime overhead, and such a replace might not be wanted in some rare situations. Are there other possibilities? Which one should we go with? We could also decide this later, in which case I would start the Win32 port now.
Let's decide this later. We can already make a difference just by changing the spacings that are hardcoded in the code itself.
This is mostly done for now, so let's close this bug. svn trunk also allows maemo-specific layouts. We will need to do lots of work to port to Maemo 5, but that API has not yet been published.