From cbecf763eb1ac1c1aa583234639c33124ef437ea Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Fri, 27 Apr 2007 16:04:27 +0000 Subject: [PATCH] * fixes for latest hildon version pmo-trunk-r1704 --- src/maemo/Makefile.am | 1 + src/maemo/easysetup/modest-easysetup-wizard.c | 1 - src/maemo/easysetup/modest-easysetup-wizard.h | 5 ++ src/maemo/easysetup/modest-wizard-dialog.c | 13 ++++- src/maemo/modest-account-settings-dialog.c | 4 +- src/maemo/modest-account-settings-dialog.h | 2 +- src/maemo/modest-address-book.c | 4 +- .../modest-connection-specific-smtp-edit-window.c | 3 +- src/maemo/modest-hildon-includes.h | 61 ++++++++++++++++++++ src/maemo/modest-main-window.c | 4 +- src/maemo/modest-msg-edit-window.c | 29 +--------- src/maemo/modest-msg-view-window.c | 4 +- src/maemo/modest-platform.c | 12 +--- src/maemo/modest-signature-editor-dialog.c | 3 +- 14 files changed, 89 insertions(+), 57 deletions(-) create mode 100644 src/maemo/modest-hildon-includes.h diff --git a/src/maemo/Makefile.am b/src/maemo/Makefile.am index d645887..58cc5d2 100644 --- a/src/maemo/Makefile.am +++ b/src/maemo/Makefile.am @@ -50,6 +50,7 @@ libmodest_ui_la_SOURCES= \ modest-maemo-ui-constants.h \ modest-main-window.c \ modest-main-window-ui.h \ + modest-hildon-includes.h \ modest-platform.c \ modest-signature-editor-dialog.c \ modest-signature-editor-dialog.h \ diff --git a/src/maemo/easysetup/modest-easysetup-wizard.c b/src/maemo/easysetup/modest-easysetup-wizard.c index 4e8ca3b..7a8361e 100644 --- a/src/maemo/easysetup/modest-easysetup-wizard.c +++ b/src/maemo/easysetup/modest-easysetup-wizard.c @@ -15,7 +15,6 @@ #include #include #include -#include #include "maemo/easysetup/modest-easysetup-country-combo-box.h" #include "maemo/easysetup/modest-easysetup-provider-combo-box.h" #include "maemo/easysetup/modest-easysetup-servertype-combo-box.h" diff --git a/src/maemo/easysetup/modest-easysetup-wizard.h b/src/maemo/easysetup/modest-easysetup-wizard.h index adb610b..5724547 100644 --- a/src/maemo/easysetup/modest-easysetup-wizard.h +++ b/src/maemo/easysetup/modest-easysetup-wizard.h @@ -9,7 +9,12 @@ /* #include */ #include "modest-wizard-dialog.h" /* We use a copied-and-improved HildonWizardDialog. */ #include "modest-account-mgr.h" + +#ifdef MODEST_HILDON_VERSION_0 #include +#else +#include +#endif /*MODEST_HILDON_VERSION_0*/ G_BEGIN_DECLS diff --git a/src/maemo/easysetup/modest-wizard-dialog.c b/src/maemo/easysetup/modest-wizard-dialog.c index 5283e61..7682679 100644 --- a/src/maemo/easysetup/modest-wizard-dialog.c +++ b/src/maemo/easysetup/modest-wizard-dialog.c @@ -28,7 +28,12 @@ #include #include #include + +#ifdef MODEST_HILDON_VERSION_0 #include +#else +#include +#endif /*MODEST_HILDON_VERSION_0*/ #include "modest-wizard-dialog.h" @@ -229,9 +234,13 @@ init (ModestWizardDialog *wizard_dialog) gtk_dialog_set_has_separator (dialog, FALSE); wizard_dialog->priv = priv; priv->box = GTK_BOX (gtk_hbox_new (FALSE, 0)); - priv->image = gtk_image_new_from_icon_name ("qgn_widg_wizard", +#ifdef MODEST_HILDON_VERSION_0 + 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); +#endif /*MODEST_HILDON_VERSION_0*/ /* Default values for user provided properties */ priv->notebook = NULL; priv->wizard_name = NULL; diff --git a/src/maemo/modest-account-settings-dialog.c b/src/maemo/modest-account-settings-dialog.c index e2fdee2..6632390 100644 --- a/src/maemo/modest-account-settings-dialog.c +++ b/src/maemo/modest-account-settings-dialog.c @@ -15,8 +15,8 @@ #include #include #include -#include -#include +#include "modest-hildon-includes.h" + #include "widgets/modest-serversecurity-combo-box.h" #include "widgets/modest-secureauth-combo-box.h" #include "widgets/modest-validating-entry.h" diff --git a/src/maemo/modest-account-settings-dialog.h b/src/maemo/modest-account-settings-dialog.h index 9aa8248..9aff911 100644 --- a/src/maemo/modest-account-settings-dialog.h +++ b/src/maemo/modest-account-settings-dialog.h @@ -8,7 +8,7 @@ #include #include "modest-account-mgr.h" -#include +#include "modest-hildon-includes.h" G_BEGIN_DECLS diff --git a/src/maemo/modest-address-book.c b/src/maemo/modest-address-book.c index 835b968..b28a51d 100644 --- a/src/maemo/modest-address-book.c +++ b/src/maemo/modest-address-book.c @@ -36,9 +36,7 @@ #include #include #include -#include -#include -#include +#include "modest-hildon-includes.h" #include #include #include diff --git a/src/maemo/modest-connection-specific-smtp-edit-window.c b/src/maemo/modest-connection-specific-smtp-edit-window.c index c251a48..790852e 100644 --- a/src/maemo/modest-connection-specific-smtp-edit-window.c +++ b/src/maemo/modest-connection-specific-smtp-edit-window.c @@ -2,8 +2,7 @@ #include "modest-connection-specific-smtp-edit-window.h" #include "maemo/modest-maemo-ui-constants.h" -#include -#include +#include "modest-hildon-includes.h" #include "widgets/modest-serversecurity-combo-box.h" #include "widgets/modest-secureauth-combo-box.h" #include "widgets/modest-validating-entry.h" diff --git a/src/maemo/modest-hildon-includes.h b/src/maemo/modest-hildon-includes.h new file mode 100644 index 0000000..d52642c --- /dev/null +++ b/src/maemo/modest-hildon-includes.h @@ -0,0 +1,61 @@ +/* Copyright (c) 2006, Nokia Corporation + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the Nokia Corporation nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS + * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER +k * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef __MODEST_HILDON_INCLUDES__ +#define __MODEST_HILDON_INCLUDES__ + + +#ifdef MODEST_HILDON_VERSION_0 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#else +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#endif /* MODEST_HILDON_VERSION_0*/ + + +#endif /*__MODEST_HILDON_INCLUDES__*/ diff --git a/src/maemo/modest-main-window.c b/src/maemo/modest-main-window.c index 72dade6..6f3be3f 100644 --- a/src/maemo/modest-main-window.c +++ b/src/maemo/modest-main-window.c @@ -27,13 +27,11 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include -#include - #include #include #include #include +#include "modest-hildon-includes.h" #include diff --git a/src/maemo/modest-msg-edit-window.c b/src/maemo/modest-msg-edit-window.c index 95492f7..fe64bf1 100644 --- a/src/maemo/modest-msg-edit-window.c +++ b/src/maemo/modest-msg-edit-window.c @@ -60,34 +60,9 @@ #include #include "modest-scroll-area.h" -#ifdef MODEST_HILDON_VERSION_0 -#include -#include -#include -#include -#include -#include -#include -#else -#include -#include -#include -#include -#include -#include -#include -#include -#endif /* MODEST_HILDON_VERSION_0*/ - - +#include "modest-hildon-includes.h" #include "widgets/modest-msg-edit-window-ui.h" -#ifdef MODEST_HILDON_VERSION_0 -#else - -#endif /*MODEST_HILDON_VERSION_0 */ - - #define DEFAULT_FONT_SIZE 3 #define DEFAULT_FONT 2 @@ -1169,7 +1144,7 @@ modest_msg_edit_window_select_color (ModestMsgEditWindow *window) #else dialog = hildon_color_chooser_new (); hildon_color_chooser_set_color (HILDON_COLOR_CHOOSER (dialog), &(buffer_format->color)); -#endif /*MODEST_HILDON_VERSION_9*/ +#endif /*MODEST_HILDON_VERSION_0*/ g_free (buffer_format); response = gtk_dialog_run (GTK_DIALOG (dialog)); diff --git a/src/maemo/modest-msg-view-window.c b/src/maemo/modest-msg-view-window.c index 49e042e..e141e68 100644 --- a/src/maemo/modest-msg-view-window.c +++ b/src/maemo/modest-msg-view-window.c @@ -39,9 +39,7 @@ #include #include #include -#include -#include -#include +#include "modest-hildon-includes.h" #include #include diff --git a/src/maemo/modest-platform.c b/src/maemo/modest-platform.c index 6798bcb..c91d394 100644 --- a/src/maemo/modest-platform.c +++ b/src/maemo/modest-platform.c @@ -33,20 +33,10 @@ #include #include #include - -#ifdef MODEST_HILDON_VERSION_0 -#include -#include -#else -#include -#include -#endif /*MODEST_HILDON_VERSION_0*/ - +#include #include #include #include -#include -#include #include #include #include diff --git a/src/maemo/modest-signature-editor-dialog.c b/src/maemo/modest-signature-editor-dialog.c index 23f76c9..745b1b6 100644 --- a/src/maemo/modest-signature-editor-dialog.c +++ b/src/maemo/modest-signature-editor-dialog.c @@ -2,8 +2,7 @@ #include "modest-signature-editor-dialog.h" #include "maemo/modest-maemo-ui-constants.h" -#include -#include +#include "modest-hildon-includes.h" #include "widgets/modest-serversecurity-combo-box.h" #include "widgets/modest-secureauth-combo-box.h" #include "widgets/modest-validating-entry.h" -- 1.7.9.5