Hi there, While trying to build modest packages configured for the maemo platform (really hildon) under Ubuntu, I noticed hildon-fm broke with Gtk 2.13. It doesn't seem easy to fix (I tried a couple of hours only to realize it would probably take me days and days), however modest doesn't call too many hildon-fm functions.
Could you please consider the attached patch against trunk allowing one to build the hildon version of modest without hildon-fm libs? NB: I replaced some occurrences of "test ==" by "test =" in the parts of configure I touched as this is a bashism (try with dash for instance). Thanks! -- Loïc Minier
Index: src/maemo/modest-msg-edit-window.c =================================================================== --- src/maemo/modest-msg-edit-window.c (revision 1099) +++ src/maemo/modest-msg-edit-window.c (working copy) @@ -2153,7 +2153,11 @@ priv = MODEST_MSG_EDIT_WINDOW_GET_PRIVATE (window); +#ifdef MODEST_HAVE_HILDON_FM dialog = hildon_file_chooser_dialog_new (GTK_WINDOW (window), GTK_FILE_CHOOSER_ACTION_OPEN); +#else + dialog = gtk_file_chooser_dialog_new (NULL, GTK_WINDOW (window), GTK_FILE_CHOOSER_ACTION_OPEN, NULL); +#endif gtk_window_set_title (GTK_WINDOW (dialog), _("mcen_ia_select_inline_image_title")); gtk_file_chooser_set_select_multiple (GTK_FILE_CHOOSER (dialog), TRUE); @@ -2271,7 +2275,11 @@ if (modest_platform_check_memory_low (MODEST_WINDOW(window), TRUE)) return; +#ifdef MODEST_HAVE_HILDON_FM dialog = hildon_file_chooser_dialog_new (GTK_WINDOW (window), GTK_FILE_CHOOSER_ACTION_OPEN); +#else + dialog = gtk_file_chooser_dialog_new (NULL, GTK_WINDOW (window), GTK_FILE_CHOOSER_ACTION_OPEN, NULL); +#endif gtk_window_set_title (GTK_WINDOW (dialog), _("mcen_ti_select_attachment_title")); gtk_file_chooser_set_select_multiple (GTK_FILE_CHOOSER (dialog), TRUE); modest_window_mgr_set_modal (modest_runtime_get_window_mgr (), GTK_WINDOW (dialog)); Index: src/maemo/modest-hildon-includes.h =================================================================== --- src/maemo/modest-hildon-includes.h (revision 1099) +++ src/maemo/modest-hildon-includes.h (working copy) @@ -65,7 +65,9 @@ #include <hildon-widgets/hildon-caption.h> #include <hildon-widgets/hildon-number-editor.h> #include <hildon-widgets/hildon-note.h> +#ifdef MODEST_HAVE_HILDON_FM #include <hildon-widgets/hildon-file-chooser-dialog.h> +#endif #include <hildon-widgets/hildon-font-selection-dialog.h> #include <hildon-widgets/hildon-find-toolbar.h> #include <hildon-widgets/hildon-sort-dialog.h> @@ -75,7 +77,9 @@ #ifdef MODEST_HAVE_HILDON1_WIDGETS #include <hildon/hildon-helper.h> +#ifdef MODEST_HAVE_HILDON_FM #include <hildon/hildon-file-chooser-dialog.h> +#endif #include <hildon/hildon-color-chooser.h> #include <hildon/hildon-banner.h> #include <hildon/hildon-color-button.h> Index: src/maemo/modest-msg-view-window.c =================================================================== --- src/maemo/modest-msg-view-window.c (revision 1099) +++ src/maemo/modest-msg-view-window.c (working copy) @@ -2844,8 +2844,15 @@ tny_list_get_length (mime_parts)); } +#ifdef MODEST_HAVE_HILDON_FM save_dialog = hildon_file_chooser_dialog_new (GTK_WINDOW (window), GTK_FILE_CHOOSER_ACTION_SAVE); +#else + save_dialog = gtk_file_chooser_dialog_new (NULL, + GTK_WINDOW (window), + GTK_FILE_CHOOSER_ACTION_SAVE, + NULL); +#endif /* set folder */ folder = g_build_filename (g_get_home_dir (), DEFAULT_FOLDER, NULL); Index: src/modest-tny-account.c =================================================================== --- src/modest-tny-account.c (revision 1099) +++ src/modest-tny-account.c (working copy) @@ -47,7 +47,7 @@ #include <tny-merge-folder.h> #include <modest-debug.h> #include <string.h> -#ifdef MODEST_PLATFORM_MAEMO +#if defined(MODEST_PLATFORM_MAEMO) && defined(MODEST_HAVE_HILDON_FM) #ifdef MODEST_HAVE_HILDON0_WIDGETS #include <hildon-widgets/hildon-file-system-info.h> #else @@ -642,7 +642,7 @@ -#ifdef MODEST_PLATFORM_MAEMO +#if defined(MODEST_PLATFORM_MAEMO) && defined(MODEST_HAVE_HILDON_FM) /* Gets the memory card name: */ static void on_modest_file_system_info (HildonFileSystemInfoHandle *handle, @@ -683,7 +683,7 @@ void modest_tny_account_get_mmc_account_name (TnyStoreAccount* self, ModestTnyAccountGetMmcAccountNameCallback callback, gpointer user_data) { -#ifdef MODEST_PLATFORM_MAEMO +#if defined(MODEST_PLATFORM_MAEMO) && defined(MODEST_HAVE_HILDON_FM) /* Just use the hard-coded path for the single memory card, * rather than try to figure out the path to the specific card by * looking at the maildir URI: Index: configure.ac =================================================================== --- configure.ac (revision 1099) +++ configure.ac (working copy) @@ -345,11 +345,18 @@ # # check the version of the widgets on maemo # -if test "x$with_platform" == "xmaemo"; then -PKG_CHECK_MODULES(MODEST_HILDON_WIDGETS, hildon-1 >= 0.9.9 hildon-fm-2, have_hildon1=true,have_hildon1=false) -if test "x$have_hildon1" == "xfalse"; then - PKG_CHECK_MODULES(MODEST_HILDON_WIDGETS, hildon-libs >= 0.12.0 hildon-fm, have_hildon0=true,have_hildon0=false) - if test "x$have_hildon0" == "xtrue"; then +if test "x$with_platform" = "xmaemo"; then +PKG_CHECK_MODULES(MODEST_HILDON_FM, hildon-fm-2, hildon_fm=hildon-fm-2, hildon_fm="") +if test "x$hildon_fm" = "x"; then + PKG_CHECK_MODULES(MODEST_HILDON_FM, hildon-fm, hildon_fm=hildon-fm, hildon_fm="") +fi +if test "x$hildon_fm" != "x"; then + AC_DEFINE_UNQUOTED(MODEST_HAVE_HILDON_FM, 1, ["Whether hildon-fm is used."]) +fi +PKG_CHECK_MODULES(MODEST_HILDON_WIDGETS, hildon-1 >= 0.9.9 $hildon_fm, have_hildon1=true,have_hildon1=false) +if test "x$have_hildon1" = "xfalse"; then + PKG_CHECK_MODULES(MODEST_HILDON_WIDGETS, hildon-libs >= 0.12.0 $hildon_fm, have_hildon0=true,have_hildon0=false) + if test "x$have_hildon0" = "xtrue"; then AC_DEFINE_UNQUOTED(MODEST_HAVE_HILDON0_WIDGETS, 1, ["Whether hildon0 widgets are used."]) else AC_MSG_ERROR([hildon widgets and/or hildon-fm not found])
_______________________________________________ Modest-devel mailing list Modest-devel@garage.maemo.org https://garage.maemo.org/mailman/listinfo/modest-devel