2007-07-09 Murray Cumming <murrayc@murrayc.com>
[modest] / src / maemo / modest-maemo-utils.c
index 1e00c5a..3f5eff2 100644 (file)
@@ -272,7 +272,7 @@ static void on_camel_account_get_supported_secure_authentication_status (
 }
 
 static gboolean
-on_secure_auth_finished (gpointer user_data)
+on_idle_secure_auth_finished (gpointer user_data)
 {
        ModestGetSupportedAuthInfo *info = (ModestGetSupportedAuthInfo*)user_data;
        /* Operation has finished, close the dialog. Control continues after
@@ -345,7 +345,7 @@ on_camel_account_get_supported_secure_authentication (
                printf("DEBUG: finished\n");
 
                /* Close the dialog in a main thread */
-               g_idle_add(on_secure_auth_finished, info);
+               g_idle_add(on_idle_secure_auth_finished, info);
        }
 
        gdk_threads_leave();
@@ -389,6 +389,8 @@ GList* modest_maemo_utils_get_supported_secure_authentication_methods (ModestTra
        default:
                tny_account = NULL;
        }
+
+       /* TODO: Handle connection requests. */
        
        if (!tny_account) {
                g_printerr ("%s could not create tny account.", __FUNCTION__);
@@ -505,3 +507,20 @@ modest_maemo_utils_setup_images_filechooser (GtkFileChooser *chooser)
 #endif
 
 }
+
+static void
+on_response (GtkDialog *dialog, gint response, gpointer user_data)
+{
+       /* Just destroy the dialog: */
+       gtk_widget_destroy (GTK_WIDGET (dialog));
+}
+
+void modest_maemo_show_information_note_and_forget (GtkWindow *parent_window, const gchar* message)
+{
+       GtkDialog *dialog = GTK_DIALOG (hildon_note_new_information (parent_window, message));
+       
+       /* Destroy the dialog when it is closed: */
+       g_signal_connect (G_OBJECT (dialog), "response", G_CALLBACK (on_response), NULL);
+       gtk_widget_show (GTK_WIDGET (dialog));
+}
+