2007-06-25 Johannes Schmid <johannes.schmid@openismus.com>
authorJohannes Schmid <johannes.schmid@openismus.com>
Mon, 25 Jun 2007 08:50:55 +0000 (08:50 +0000)
committerJohannes Schmid <johannes.schmid@openismus.com>
Mon, 25 Jun 2007 08:50:55 +0000 (08:50 +0000)
* src/dbus_api/modest-dbus-callbacks.c:
* src/maemo/easysetup/modest-easysetup-wizard.h:
* src/maemo/easysetup/modest-wizard-dialog.c: (init):
* src/maemo/modest-connection-specific-smtp-edit-window.c:
(modest_connection_specific_smtp_edit_window_init):
* src/maemo/modest-maemo-global-settings-dialog.c:
(on_range_error):
* src/maemo/modest-maemo-utils.c:
(modest_maemo_utils_setup_images_filechooser):
* src/maemo/modest-main-window.c: (create_details_widget):
* src/maemo/modest-msg-edit-window.c:
(modest_msg_edit_window_attach_file_noninteractive),
(modest_msg_edit_window_color_button_change),
(modest_msg_edit_window_set_zoom):
* src/modest-mail-operation.c: (update_account_thread):
* src/modest-tny-account-store.c:
* src/modest-tny-account.c:
* src/widgets/modest-global-settings-dialog.c:
* src/widgets/modest-window.h:

Fixed build on bora!

pmo-trunk-r2391

14 files changed:
ChangeLog2
src/dbus_api/modest-dbus-callbacks.c
src/maemo/easysetup/modest-easysetup-wizard.h
src/maemo/easysetup/modest-wizard-dialog.c
src/maemo/modest-connection-specific-smtp-edit-window.c
src/maemo/modest-maemo-global-settings-dialog.c
src/maemo/modest-maemo-utils.c
src/maemo/modest-main-window.c
src/maemo/modest-msg-edit-window.c
src/modest-mail-operation.c
src/modest-tny-account-store.c
src/modest-tny-account.c
src/widgets/modest-global-settings-dialog.c
src/widgets/modest-window.h

index 3da9f84..60bdbf3 100644 (file)
@@ -1,3 +1,27 @@
+2007-06-25  Johannes Schmid <johannes.schmid@openismus.com>
+
+       * src/dbus_api/modest-dbus-callbacks.c:
+       * src/maemo/easysetup/modest-easysetup-wizard.h:
+       * src/maemo/easysetup/modest-wizard-dialog.c: (init):
+       * src/maemo/modest-connection-specific-smtp-edit-window.c:
+       (modest_connection_specific_smtp_edit_window_init):
+       * src/maemo/modest-maemo-global-settings-dialog.c:
+       (on_range_error):
+       * src/maemo/modest-maemo-utils.c:
+       (modest_maemo_utils_setup_images_filechooser):
+       * src/maemo/modest-main-window.c: (create_details_widget):
+       * src/maemo/modest-msg-edit-window.c:
+       (modest_msg_edit_window_attach_file_noninteractive),
+       (modest_msg_edit_window_color_button_change),
+       (modest_msg_edit_window_set_zoom):
+       * src/modest-mail-operation.c: (update_account_thread):
+       * src/modest-tny-account-store.c:
+       * src/modest-tny-account.c:
+       * src/widgets/modest-global-settings-dialog.c:
+       * src/widgets/modest-window.h:
+       
+       Fixed build on bora!
+
 2007-06-25  Murray Cumming  <murrayc@murrayc.com>
 
        * src/dbus_api/modest-dbus-callbacks.c: (on_dbus_method_search):
index 6440c34..da14c7a 100644 (file)
 #include <stdio.h>
 #include <string.h>
 #include <glib/gstdio.h>
+#ifdef MODEST_HAVE_HILDON0_WIDGETS
+#include <libgnomevfs/gnome-vfs-mime-utils.h>
+#else
 #include <libgnomevfs/gnome-vfs-mime.h>
+#endif
 #include <tny-fs-stream.h>
 
 #include <tny-list.h>
index 133d17f..6814280 100644 (file)
 #include <config.h>
 #endif
 
-#ifdef MODEST_HILDON_VERSION_0
+#ifdef MODEST_HAVE_HILDON0_WIDGETS
 #include <hildon-widgets/hildon-caption.h>
 #else
 #include <hildon/hildon-caption.h>
-#endif /*MODEST_HILDON_VERSION_0*/
+#endif /*MODEST_HAVE_HILDON0_WIDGETS*/
 
 G_BEGIN_DECLS
 
index 8af9e34..00cb01d 100644 (file)
 #include <config.h>
 #endif
 
-#ifdef MODEST_HILDON_VERSION_0
+#ifdef MODEST_HAVE_HILDON0_WIDGETS
 #include <hildon-widgets/hildon-defines.h>
 #else
 #include <hildon/hildon-defines.h>
-#endif /*MODEST_HILDON_VERSION_0*/
+#endif /*MODEST_HAVE_HILDON0_WIDGETS*/
 
 #include "modest-wizard-dialog.h"
 
@@ -255,12 +255,12 @@ init (ModestWizardDialog *wizard_dialog)
     gtk_dialog_set_has_separator (dialog, FALSE);
     wizard_dialog->priv = priv;
     priv->box = GTK_BOX (gtk_hbox_new (FALSE, 0));
-#ifdef MODEST_HILDON_VERSION_0
+#ifdef MODEST_HAVE_HILDON0_WIDGETS
     priv->image = gtk_image_new_from_icon_name ("qgn_widg_wizard",
                                                HILDON_ICON_SIZE_WIDG_WIZARD);
 #else
     priv->image = gtk_image_new_from_icon_name ("qgn_widg_wizard",
-                                               HILDON_ICON_SIZE_WIZARD);
+                                               MODEST_HAVE_HILDON0_WIDGETS;
 #endif /*MODEST_HILDON_VERSION_0*/
     /* Default values for user provided properties */
     priv->notebook = NULL;
index ae1a07d..4f49954 100644 (file)
@@ -235,7 +235,7 @@ modest_connection_specific_smtp_edit_window_init (ModestConnectionSpecificSmtpEd
                priv->entry_port = GTK_WIDGET (hildon_number_editor_new (0, 65535));
        caption = hildon_caption_new (sizegroup, 
                _("mcen_li_emailsetup_smtp"), priv->entry_port, NULL, HILDON_CAPTION_OPTIONAL);
-       /* FIXME: There is no changed signal for hildon_number_editor */
+       g_signal_connect(G_OBJECT(priv->entry_port), "changed", G_CALLBACK(on_change), self);
        gtk_widget_show (priv->entry_port);
        gtk_box_pack_start (GTK_BOX (box), caption, FALSE, FALSE, MODEST_MARGIN_HALF);
        gtk_widget_show (caption);
index 3eee973..d8d7c6a 100644 (file)
@@ -31,7 +31,7 @@
 #include <config.h>
 #endif /*HAVE_CONFIG_H*/
 
-#ifdef MODEST_HILDON_VERSION_0
+#ifdef MODEST_HAVE_HILDON0_WIDGETS
 #include <hildon-widgets/hildon-caption.h>
 #include <hildon-widgets/hildon-number-editor.h>
 #include <hildon-widgets/hildon-banner.h>
@@ -39,7 +39,7 @@
 #include <hildon/hildon-caption.h>
 #include <hildon/hildon-number-editor.h>
 #include <hildon/hildon-banner.h>
-#endif /*MODEST_HILDON_VERSION_0*/
+#endif /*MODEST_HAVE_HILDON0_WIDGETS*/
 
 #include <glib/gi18n.h>
 #include <string.h>
@@ -370,7 +370,7 @@ on_range_error (HildonNumberEditor *editor,
        gint new_val;
 
        switch (type) {
-#ifdef MODEST_HILDON_VERSION_0
+#ifdef MODEST_HAVE_HILDON0_WIDGETS
        case MAXIMUM_VALUE_EXCEED:
 #else
        case HILDON_NUMBER_EDITOR_ERROR_MAXIMUM_VALUE_EXCEED:
@@ -378,7 +378,7 @@ on_range_error (HildonNumberEditor *editor,
                msg = g_strdup_printf (_("ckct_ib_maximum_value"), MSG_SIZE_MAX_VAL);
                new_val = MSG_SIZE_MAX_VAL;
                break;
-#ifdef MODEST_HILDON_VERSION_0
+#ifdef MODEST_HAVE_HILDON0_WIDGETS
        case MINIMUM_VALUE_EXCEED:
 #else
        case HILDON_NUMBER_EDITOR_ERROR_MINIMUM_VALUE_EXCEED:
@@ -386,7 +386,7 @@ on_range_error (HildonNumberEditor *editor,
                msg = g_strdup_printf (_("ckct_ib_minimum_value"), MSG_SIZE_MIN_VAL);
                new_val = MSG_SIZE_MIN_VAL;
                break;
-#ifdef MODEST_HILDON_VERSION_0
+#ifdef MODEST_HAVE_HILDON0_WIDGETS
        case ERRONEOUS_VALUE:
 #else
        case HILDON_NUMBER_EDITOR_ERROR_ERRONEOUS_VALUE:
index 1162573..150dbcf 100644 (file)
@@ -457,7 +457,7 @@ modest_maemo_utils_setup_images_filechooser (GtkFileChooser *chooser)
 
        /* Set the images mime filter */
        file_filter = gtk_file_filter_new ();
-#ifdef MODEST_HILDON_VERSION_0
+#ifdef MODEST_HAVE_HILDON0_WIDGETS
        image_mimetypes_list = osso_mime_get_mime_types_for_category (OSSO_MIME_CATEGORY_IMAGES);
 #else
        image_mimetypes_list = hildon_mime_get_mime_types_for_category (HILDON_MIME_CATEGORY_IMAGES);
@@ -466,7 +466,7 @@ modest_maemo_utils_setup_images_filechooser (GtkFileChooser *chooser)
                gtk_file_filter_add_mime_type (file_filter, node->data);
        }
        gtk_file_chooser_set_filter (chooser, file_filter);
-#ifdef MODEST_HILDON_VERSION_0
+#ifdef MODEST_HAVE_HILDON0_WIDGETS
        osso_mime_types_list_free (image_mimetypes_list);
 #else
        hildon_mime_types_list_free (image_mimetypes_list);
index c1edd47..0facd90 100644 (file)
 #include "modest-ui-dimming-manager.h"
 #include "maemo/modest-osso-state-saving.h"
 
-#ifdef MODEST_HILDON_VERSION_0
+#ifdef MODEST_HAVE_HILDON0_WIDGETS
 #include <hildon-widgets/hildon-program.h>
 #else
 #include <hildon/hildon-program.h>
-#endif /*MODEST_HILDON_VERSION_0*/
+#endif /*MODEST_HAVE_HILDON0_WIDGETS*/
 
 #define MODEST_MAIN_WINDOW_ACTION_GROUP_ADDITIONS "ModestMainWindowActionAdditions"
 
@@ -1405,15 +1405,18 @@ create_details_widget (GtkWidget *styled_widget, TnyAccount *account)
        GtkWidget *label_w;
        gchar *label;
        gchar *gray_color_markup;
-       GdkColor color;
 
        vbox = gtk_vbox_new (FALSE, 0);
 
        /* Obtain the secondary text color. We need a realized widget, that's why 
           we get styled_widget from outside */
+#ifndef MODEST_HAVE_HILDON0_WIDGETS
+       GdkColor color;
        gtk_style_lookup_color (styled_widget->style, "SecondaryTextColor", &color);
        gray_color_markup = modest_text_utils_get_color_string (&color);
-
+#else
+       gray_color_markup = "#BBBBBB";  
+#endif 
        /* Account description: */
        
        if (modest_tny_account_is_virtual_local_folders (account)) {
index 0969ea6..aa1bfa0 100644 (file)
 #include "modest-scroll-area.h"
 
 #include "modest-hildon-includes.h"
+#ifdef MODEST_HAVE_HILDON0_WIDGETS
+#include <hildon-widgets/hildon-color-chooser.h>
+#endif
 #include "widgets/modest-msg-edit-window-ui.h"
+#ifdef MODEST_HAVE_HILDON0_WIDGETS
+#include <libgnomevfs/gnome-vfs-mime-utils.h>
+#else
 #include <libgnomevfs/gnome-vfs-mime.h>
+#endif
 #include "modest-maemo-utils.h"
 
 
@@ -1640,8 +1647,11 @@ modest_msg_edit_window_attach_file_noninteractive (
                        const gchar *mime_type;
                        gchar *basename;
                        gchar *content_id;
-                       
+#ifdef MODEST_HAVE_HILDON0_WIDGETS
+                       mime_type = gnome_vfs_get_mime_type(filename);
+#else
                        mime_type = gnome_vfs_get_file_mime_type_fast (filename, NULL);
+#endif
                        mime_part = tny_platform_factory_new_mime_part
                                (modest_runtime_get_platform_factory ());
                        stream = TNY_STREAM (tny_fs_stream_new (file_id));
@@ -1743,13 +1753,13 @@ modest_msg_edit_window_color_button_change (ModestMsgEditWindow *window,
        GdkColor *new_color;
        priv = MODEST_MSG_EDIT_WINDOW_GET_PRIVATE (window);
        
-#ifdef MODEST_HILDON_VERSION_0 
+#ifdef MODEST_HAVE_HILDON0_WIDGETS     
        new_color = hildon_color_button_get_color (HILDON_COLOR_BUTTON (priv->font_color_button));
 #else 
        GdkColor col;
        hildon_color_button_get_color (HILDON_COLOR_BUTTON(priv->font_color_button), &col);
        new_color = &col;
-#endif /*MODEST_HILDON_VERSION_0*/
+#endif /*#ifdef MODEST_HAVE_HILDON0_WIDGETS*/
 
        wp_text_buffer_set_attribute (WP_TEXT_BUFFER (priv->text_buffer), WPT_FORECOLOR, (gpointer) new_color);
        
@@ -1847,7 +1857,11 @@ modest_msg_edit_window_set_zoom (ModestWindow *window,
        parent_priv = MODEST_WINDOW_GET_PRIVATE (window);
        zoom_radio_action = GTK_RADIO_ACTION (gtk_ui_manager_get_action (parent_priv->ui_manager, 
                                                                         "/MenuBar/ViewMenu/ZoomMenu/Zoom50Menu"));
+#ifdef MODEST_HAVE_HILDON0_WIDGETS
+       /* FIXME: Not availible before Gtk 2.10 */
+#else
        gtk_radio_action_set_current_value (zoom_radio_action, (gint) (zoom*100.0+0.1));
+#endif
 }
 
 static gdouble
index bbe2806..bc20375 100644 (file)
@@ -982,12 +982,15 @@ update_account_thread (gpointer thr_user_data)
                }
                tny_folder_remove_observer (TNY_FOLDER (folder), TNY_FOLDER_OBSERVER (observer));
                g_object_unref (observer);
-               observer = NULL;
+               observer = NULL;                        
 
+               g_object_unref (G_OBJECT (folder));
                if (priv->error)
+               {
                        priv->status = MODEST_MAIL_OPERATION_STATUS_FAILED;
-
-               g_object_unref (G_OBJECT (folder));
+                       goto out;
+               }
+               
                tny_iterator_next (iter);
        }
 
@@ -1047,7 +1050,7 @@ update_account_thread (gpointer thr_user_data)
                g_ptr_array_foreach (new_headers, (GFunc) g_object_unref, NULL);
                g_ptr_array_free (new_headers, FALSE);
        }
-
+       
        /* Perform send */
        priv->op_type = MODEST_MAIL_OPERATION_TYPE_SEND;
        priv->done = 0;
index dacd687..1d4409d 100644 (file)
@@ -60,7 +60,7 @@
 
 #ifdef MODEST_PLATFORM_MAEMO
 #include <tny-maemo-conic-device.h>
-#ifdef MODEST_HILDON_VERSION_0
+#ifdef MODEST_HAVE_HILDON0_WIDGETS
 #include <hildon-widgets/hildon-note.h>
 #include <hildon-widgets/hildon-banner.h>
 #else
index 0a1a16e..42dffc8 100644 (file)
@@ -42,7 +42,7 @@
 #include <tny-camel-pop-store-account.h>
 #include <tny-folder-stats.h>
 #include <string.h>
-#ifdef MODEST_HILDON_VERSION_0
+#ifdef MODEST_HAVE_HILDON0_WIDGETS
 #include <hildon-widgets/hildon-file-system-info.h>
 #else
 #include <hildon/hildon-file-system-info.h>
index 83e221b..d534a5a 100644 (file)
 #include "modest-platform.h"
 #include "widgets/modest-combo-box.h"
 #ifdef MODEST_PLATFORM_MAEMO
-#ifdef MODEST_HILDON_VERSION_0
+#ifdef MODEST_HAVE_HILDON0_WIDGETS
 #include <hildon-widgets/hildon-number-editor.h>
 #else
 #include <hildon/hildon-number-editor.h>
-#endif /*MODEST_HILDON_VERSION_0*/
+#endif /*MODEST_HAVE_HILDON0_WIDGETS*/
 #endif
 /* include other impl specific header files */
 
index d41f16c..eaad895 100644 (file)
@@ -52,11 +52,11 @@ typedef GtkWindowClass ModestWindowParentClass;
 #endif /* MODEST_PLATFORM_GNOME */
 
 #ifdef MODEST_PLATFORM_MAEMO
-#ifdef MODEST_HILDON_VERSION_0
+#ifdef MODEST_HAVE_HILDON0_WIDGETS
 #include <hildon-widgets/hildon-window.h>
 #else
 #include <hildon/hildon-window.h>
-#endif /*MODEST_HILDON_VERSION_0*/
+#endif /*MODEST_HAVE_HILDON0_WIDGETS*/
 typedef HildonWindow      ModestWindowParent;
 typedef HildonWindowClass ModestWindowParentClass;