* Fixes NB#81009, show the proper title when saving multiple attachments
[modest] / src / maemo / modest-maemo-global-settings-dialog.c
index 9e48a69..ad4e4c5 100644 (file)
 #include <config.h>
 #endif /*HAVE_CONFIG_H*/
 
+#ifdef MODEST_HAVE_CONIC
+#include <coniciap.h>
+#endif /*MODEST_HAVE_CONIC*/
+
 #include <modest-hildon-includes.h>
 #include <modest-maemo-utils.h>
 
@@ -51,7 +55,6 @@
 #include <tny-maemo-conic-device.h>
 
 
-
 #define MSG_SIZE_MAX_VAL 5000
 #define MSG_SIZE_DEF_VAL 1000
 #define MSG_SIZE_MIN_VAL 1
@@ -181,13 +184,8 @@ on_switch_page (GtkNotebook *notebook, GtkNotebookPage *page, guint page_num, gp
 {
        /* grab the focus to the default element in the current page */
        GtkWidget *selected_page = NULL, *focus_item = NULL;
-       ModestGlobalSettingsDialogPrivate *ppriv;
-       ModestMaemoGlobalSettingsDialogPrivate *priv;
        SwitchPageHelper *helper;
 
-       priv  = MODEST_MAEMO_GLOBAL_SETTINGS_DIALOG_GET_PRIVATE (user_data);
-       ppriv = MODEST_GLOBAL_SETTINGS_DIALOG_GET_PRIVATE (user_data);
-
        selected_page = gtk_notebook_get_nth_page (notebook, page_num);
        focus_item = GTK_WIDGET(g_object_get_data (G_OBJECT(selected_page), DEFAULT_FOCUS_WIDGET));
        if (!focus_item) {
@@ -262,12 +260,8 @@ modest_maemo_global_settings_dialog_finalize (GObject *obj)
        ppriv = MODEST_GLOBAL_SETTINGS_DIALOG_GET_PRIVATE (obj);
 
        if (priv->switch_handler && ppriv->notebook) {
-               /* TODO: This causes a g_warning:
-                modest[13409]: GLIB WARNING ** GLib-GObject - invalid unclassed pointer in cast to `GObject'
-               modest[13409]: GLIB WARNING ** GLib-GObject - instance with invalid (NULL) class pointer
-               modest[13409]: GLIB CRITICAL ** GLib-GObject - g_signal_handler_disconnect: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed
-                */
-               g_signal_handler_disconnect (G_OBJECT (ppriv->notebook), priv->switch_handler);
+               /* TODO: This causes a g_warning and a valgrind mem error: */
+               /* g_signal_handler_disconnect (G_OBJECT (ppriv->notebook), priv->switch_handler);*/
                priv->switch_handler = 0;
        }
 
@@ -513,6 +507,7 @@ current_connection (void)
        if (!tny_device_is_online (device))
                return MODEST_CONNECTED_VIA_ANY;
 
+#ifdef MODEST_HAVE_CONIC
        /* Get iap id */
        const gchar *iap_id = tny_maemo_conic_device_get_current_iap_id (TNY_MAEMO_CONIC_DEVICE (device));
        if (iap_id) {
@@ -529,6 +524,9 @@ current_connection (void)
        
                g_object_unref (iap);
        }
+#else
+       retval = MODEST_CONNECTED_VIA_WLAN; /* assume WLAN (fast) internet */  
+#endif /* MODEST_HAVE_CONIC */
        
        g_object_unref (device);