* modest-outside-sbox patch 1:
authorDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Mon, 26 Nov 2007 19:15:15 +0000 (19:15 +0000)
committerDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Mon, 26 Nov 2007 19:15:15 +0000 (19:15 +0000)
- remove dependency on scratchbox/hildon/maemo specific gtk+

pmo-trunk-r3819

src/maemo/easysetup/modest-easysetup-wizard.c
src/maemo/modest-hildon-includes.h
src/widgets/modest-gtkhtml-msg-view.c
src/widgets/modest-recpt-editor.c

index bb66143..091f0aa 100644 (file)
@@ -1,3 +1,4 @@
+
 /* Copyright (c) 2006, Nokia Corporation
  * All rights reserved.
  *
 /* Copyright (c) 2006, Nokia Corporation
  * All rights reserved.
  *
@@ -55,6 +56,7 @@
 #include "maemo/modest-maemo-utils.h"
 #include <gconf/gconf-client.h>
 #include <string.h> /* For strlen(). */
 #include "maemo/modest-maemo-utils.h"
 #include <gconf/gconf-client.h>
 #include <string.h> /* For strlen(). */
+#include "maemo/modest-hildon-includes.h"
 
 /* Include config.h so that _() works: */
 #ifdef HAVE_CONFIG_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",
        /* 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);
        /* 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);
index 2b056f4..d92ec05 100644 (file)
@@ -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*/
 
 #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
 /* 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*/
 
 #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__*/
 
 #endif /*__MODEST_HILDON_INCLUDES__*/
index c5c5a3f..bb8e8a6 100644 (file)
 #include <widgets/modest-gtkhtml-msg-view.h>
 #include <widgets/modest-isearch-view.h>
 
 #include <widgets/modest-gtkhtml-msg-view.h>
 #include <widgets/modest-isearch-view.h>
 
+/* 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);
 
 /* 'private'/'protected' functions */
 static void     modest_gtkhtml_msg_view_class_init   (ModestGtkhtmlMsgViewClass *klass);
index 9e7e06b..357c1bd 100644 (file)
 #include <gdk/gdkkeysyms.h>
 #include <gtk/gtk.h>
 
 #include <gdk/gdkkeysyms.h>
 #include <gtk/gtk.h>
 
+/* 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"
 static GObjectClass *parent_class = NULL;
 
 #define RECIPIENT_TAG_ID "recpt-id"