From: Johannes Schmid Date: Mon, 25 Jun 2007 08:50:55 +0000 (+0000) Subject: 2007-06-25 Johannes Schmid X-Git-Tag: git_migration_finished~3140 X-Git-Url: http://git.maemo.org/git/?p=modest;a=commitdiff_plain;h=9047ba28c2aeacd7fa7c092044390b1c5912cdea 2007-06-25 Johannes Schmid * 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 --- diff --git a/ChangeLog2 b/ChangeLog2 index 3da9f84..60bdbf3 100644 --- a/ChangeLog2 +++ b/ChangeLog2 @@ -1,3 +1,27 @@ +2007-06-25 Johannes Schmid + + * 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 * src/dbus_api/modest-dbus-callbacks.c: (on_dbus_method_search): diff --git a/src/dbus_api/modest-dbus-callbacks.c b/src/dbus_api/modest-dbus-callbacks.c index 6440c34..da14c7a 100644 --- a/src/dbus_api/modest-dbus-callbacks.c +++ b/src/dbus_api/modest-dbus-callbacks.c @@ -42,7 +42,11 @@ #include #include #include +#ifdef MODEST_HAVE_HILDON0_WIDGETS +#include +#else #include +#endif #include #include diff --git a/src/maemo/easysetup/modest-easysetup-wizard.h b/src/maemo/easysetup/modest-easysetup-wizard.h index 133d17f..6814280 100644 --- a/src/maemo/easysetup/modest-easysetup-wizard.h +++ b/src/maemo/easysetup/modest-easysetup-wizard.h @@ -39,11 +39,11 @@ #include #endif -#ifdef MODEST_HILDON_VERSION_0 +#ifdef MODEST_HAVE_HILDON0_WIDGETS #include #else #include -#endif /*MODEST_HILDON_VERSION_0*/ +#endif /*MODEST_HAVE_HILDON0_WIDGETS*/ G_BEGIN_DECLS diff --git a/src/maemo/easysetup/modest-wizard-dialog.c b/src/maemo/easysetup/modest-wizard-dialog.c index 8af9e34..00cb01d 100644 --- a/src/maemo/easysetup/modest-wizard-dialog.c +++ b/src/maemo/easysetup/modest-wizard-dialog.c @@ -54,11 +54,11 @@ #include #endif -#ifdef MODEST_HILDON_VERSION_0 +#ifdef MODEST_HAVE_HILDON0_WIDGETS #include #else #include -#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; diff --git a/src/maemo/modest-connection-specific-smtp-edit-window.c b/src/maemo/modest-connection-specific-smtp-edit-window.c index ae1a07d..4f49954 100644 --- a/src/maemo/modest-connection-specific-smtp-edit-window.c +++ b/src/maemo/modest-connection-specific-smtp-edit-window.c @@ -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); diff --git a/src/maemo/modest-maemo-global-settings-dialog.c b/src/maemo/modest-maemo-global-settings-dialog.c index 3eee973..d8d7c6a 100644 --- a/src/maemo/modest-maemo-global-settings-dialog.c +++ b/src/maemo/modest-maemo-global-settings-dialog.c @@ -31,7 +31,7 @@ #include #endif /*HAVE_CONFIG_H*/ -#ifdef MODEST_HILDON_VERSION_0 +#ifdef MODEST_HAVE_HILDON0_WIDGETS #include #include #include @@ -39,7 +39,7 @@ #include #include #include -#endif /*MODEST_HILDON_VERSION_0*/ +#endif /*MODEST_HAVE_HILDON0_WIDGETS*/ #include #include @@ -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: diff --git a/src/maemo/modest-maemo-utils.c b/src/maemo/modest-maemo-utils.c index 1162573..150dbcf 100644 --- a/src/maemo/modest-maemo-utils.c +++ b/src/maemo/modest-maemo-utils.c @@ -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); diff --git a/src/maemo/modest-main-window.c b/src/maemo/modest-main-window.c index c1edd47..0facd90 100644 --- a/src/maemo/modest-main-window.c +++ b/src/maemo/modest-main-window.c @@ -59,11 +59,11 @@ #include "modest-ui-dimming-manager.h" #include "maemo/modest-osso-state-saving.h" -#ifdef MODEST_HILDON_VERSION_0 +#ifdef MODEST_HAVE_HILDON0_WIDGETS #include #else #include -#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)) { diff --git a/src/maemo/modest-msg-edit-window.c b/src/maemo/modest-msg-edit-window.c index 0969ea6..aa1bfa0 100644 --- a/src/maemo/modest-msg-edit-window.c +++ b/src/maemo/modest-msg-edit-window.c @@ -63,8 +63,15 @@ #include "modest-scroll-area.h" #include "modest-hildon-includes.h" +#ifdef MODEST_HAVE_HILDON0_WIDGETS +#include +#endif #include "widgets/modest-msg-edit-window-ui.h" +#ifdef MODEST_HAVE_HILDON0_WIDGETS +#include +#else #include +#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 diff --git a/src/modest-mail-operation.c b/src/modest-mail-operation.c index bbe2806..bc20375 100644 --- a/src/modest-mail-operation.c +++ b/src/modest-mail-operation.c @@ -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; diff --git a/src/modest-tny-account-store.c b/src/modest-tny-account-store.c index dacd687..1d4409d 100644 --- a/src/modest-tny-account-store.c +++ b/src/modest-tny-account-store.c @@ -60,7 +60,7 @@ #ifdef MODEST_PLATFORM_MAEMO #include -#ifdef MODEST_HILDON_VERSION_0 +#ifdef MODEST_HAVE_HILDON0_WIDGETS #include #include #else diff --git a/src/modest-tny-account.c b/src/modest-tny-account.c index 0a1a16e..42dffc8 100644 --- a/src/modest-tny-account.c +++ b/src/modest-tny-account.c @@ -42,7 +42,7 @@ #include #include #include -#ifdef MODEST_HILDON_VERSION_0 +#ifdef MODEST_HAVE_HILDON0_WIDGETS #include #else #include diff --git a/src/widgets/modest-global-settings-dialog.c b/src/widgets/modest-global-settings-dialog.c index 83e221b..d534a5a 100644 --- a/src/widgets/modest-global-settings-dialog.c +++ b/src/widgets/modest-global-settings-dialog.c @@ -42,11 +42,11 @@ #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 #else #include -#endif /*MODEST_HILDON_VERSION_0*/ +#endif /*MODEST_HAVE_HILDON0_WIDGETS*/ #endif /* include other impl specific header files */ diff --git a/src/widgets/modest-window.h b/src/widgets/modest-window.h index d41f16c..eaad895 100644 --- a/src/widgets/modest-window.h +++ b/src/widgets/modest-window.h @@ -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 #else #include -#endif /*MODEST_HILDON_VERSION_0*/ +#endif /*MODEST_HAVE_HILDON0_WIDGETS*/ typedef HildonWindow ModestWindowParent; typedef HildonWindowClass ModestWindowParentClass;