From: Dirk-Jan C. Binnema Date: Mon, 26 Nov 2007 19:15:15 +0000 (+0000) Subject: * modest-outside-sbox patch 1: X-Git-Tag: git_migration_finished~2016 X-Git-Url: http://git.maemo.org/git/?p=modest;a=commitdiff_plain;h=74a9c50ab4d857d13fbefd9c0dbe04d43a9c2898 * modest-outside-sbox patch 1: - remove dependency on scratchbox/hildon/maemo specific gtk+ pmo-trunk-r3819 --- diff --git a/src/maemo/easysetup/modest-easysetup-wizard.c b/src/maemo/easysetup/modest-easysetup-wizard.c index bb66143..091f0aa 100644 --- a/src/maemo/easysetup/modest-easysetup-wizard.c +++ b/src/maemo/easysetup/modest-easysetup-wizard.c @@ -1,3 +1,4 @@ + /* Copyright (c) 2006, Nokia Corporation * All rights reserved. * @@ -55,6 +56,7 @@ #include "maemo/modest-maemo-utils.h" #include #include /* For strlen(). */ +#include "maemo/modest-hildon-includes.h" /* Include config.h so that _() works: */ #ifdef HAVE_CONFIG_H @@ -498,7 +500,7 @@ create_page_account_details (ModestEasysetupWizardDialog *self) /* The description widgets: */ self->entry_account_title = GTK_WIDGET (modest_validating_entry_new ()); g_signal_connect(G_OBJECT(self->entry_account_title), "changed", - G_CALLBACK(on_easysetup_changed), self); + G_CALLBACK(on_easysetup_changed), self); /* Do use auto-capitalization: */ hildon_gtk_entry_set_input_mode (GTK_ENTRY (self->entry_account_title), HILDON_GTK_INPUT_MODE_FULL | HILDON_GTK_INPUT_MODE_AUTOCAP); diff --git a/src/maemo/modest-hildon-includes.h b/src/maemo/modest-hildon-includes.h index 2b056f4..d92ec05 100644 --- a/src/maemo/modest-hildon-includes.h +++ b/src/maemo/modest-hildon-includes.h @@ -111,8 +111,6 @@ k * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, #define hildon_mime_get_icon_names osso_mime_get_icon_names #endif /*MODEST_HAVE_OSSO_MIME*/ - - /* helplib to use */ #ifdef MODEST_HAVE_OSSO_HELP #define hildon_help_show ossohelp_show @@ -124,5 +122,37 @@ k * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, #endif /*MODEST_HAVE_HILDON_HELP*/ #endif /*MODEST_HAVE_OSSO_HELP*/ +/* some extra #defines, so it will compile with the 'normal' gtk */ +#ifndef MODEST_HAVE_HILDON_GTK +#define hildon_gtk_entry_set_input_mode(a,b) \ + g_warning ("%s: hildon_gtk_entry_set_input_mode requires gtk-hildon", __FUNCTION__) +#define hildon_gtk_text_view_set_input_mode(a,b) \ + g_warning ("%s: hildon_gtk_text_view_set_input_mode requires gtk-hildon", __FUNCTION__) +#define gtk_widget_tap_and_hold_setup(a,b,c,d) \ + g_warning ("%s: gtk_widget_tap_and_hold_setup requires gtk-hildon", __FUNCTION__) + +typedef enum +{ + GTK_INVALID_INPUT_MAX_CHARS_REACHED, + GTK_INVALID_INPUT_MODE_RESTRICTION +} GtkInvalidInputType; + +typedef enum +{ + HILDON_GTK_INPUT_MODE_ALPHA = 1 << 0, + HILDON_GTK_INPUT_MODE_NUMERIC = 1 << 1, + HILDON_GTK_INPUT_MODE_SPECIAL = 1 << 2, + HILDON_GTK_INPUT_MODE_HEXA = 1 << 3, + HILDON_GTK_INPUT_MODE_TELE = 1 << 4, + HILDON_GTK_INPUT_MODE_FULL = (HILDON_GTK_INPUT_MODE_ALPHA | HILDON_GTK_INPUT_MODE_NUMERIC | HILDON_GTK_INPUT_MODE_SPECIAL), + HILDON_GTK_INPUT_MODE_MULTILINE = 1 << 28, + HILDON_GTK_INPUT_MODE_INVISIBLE = 1 << 29, + HILDON_GTK_INPUT_MODE_AUTOCAP = 1 << 30, + HILDON_GTK_INPUT_MODE_DICTIONARY = 1 << 31 +} HildonGtkInputMode; +#endif /* !MODEST_HAVE_HILDON_GTK */ + + + #endif /*__MODEST_HILDON_INCLUDES__*/ diff --git a/src/widgets/modest-gtkhtml-msg-view.c b/src/widgets/modest-gtkhtml-msg-view.c index c5c5a3f..bb8e8a6 100644 --- a/src/widgets/modest-gtkhtml-msg-view.c +++ b/src/widgets/modest-gtkhtml-msg-view.c @@ -47,6 +47,11 @@ #include #include +/* FIXNE: we should have no maemo-deps in widgets/ */ +#ifdef MODEST_PLATFORM_MAEMO +#include "maemo/modest-hildon-includes.h" +#endif /*MODEST_PLATFORM_MAEMO*/ + /* 'private'/'protected' functions */ static void modest_gtkhtml_msg_view_class_init (ModestGtkhtmlMsgViewClass *klass); diff --git a/src/widgets/modest-recpt-editor.c b/src/widgets/modest-recpt-editor.c index 9e7e06b..357c1bd 100644 --- a/src/widgets/modest-recpt-editor.c +++ b/src/widgets/modest-recpt-editor.c @@ -44,6 +44,12 @@ #include #include +/* FIXNE: we should have no maemo-deps in widgets/ */ +#ifdef MODEST_PLATFORM_MAEMO +#include "maemo/modest-hildon-includes.h" +#endif /*MODEST_PLATFORM_MAEMO*/ + + static GObjectClass *parent_class = NULL; #define RECIPIENT_TAG_ID "recpt-id"