2007-07-22 Johannes Schmid <johannes.schmid@openismus.com>
[modest] / src / maemo / modest-maemo-utils.h
index b1d52fc..3fa9ef3 100644 (file)
 #include <gtk/gtk.h>
 #include <modest-protocol-info.h>
 
+#define MODEST_MAEMO_UTILS_MYDOCS_FOLDER "MyDocs"
+#define MODEST_MAEMO_UTILS_DEFAULT_IMAGE_FOLDER ".images"
+
+typedef enum {
+       MODEST_MAEMO_UTILS_GET_SUPPORTED_SECURE_AUTHENTICATION_ERROR_CANCELED
+} ModestMaemoUtilsGetSupportedSecureAuthenticationError;
+
+GQuark modest_maemo_utils_get_supported_secure_authentication_error_quark (void);
+
 /**
  * modest_maemo_utils_menubar_to_menu:
  * @ui_manager: a ui manager, with the menubar at "/MenuBar" 
@@ -102,6 +111,47 @@ TnyFsStream *modest_maemo_utils_create_temp_stream (const gchar *extension, gcha
  */
 
 GList* modest_maemo_utils_get_supported_secure_authentication_methods (ModestTransportStoreProtocol proto, 
-       const gchar* hostname, gint port, const gchar* username, GtkWindow *parent_window);
+       const gchar* hostname, gint port, const gchar* username, GtkWindow *parent_window, GError** error);
+
+/**
+ * modest_maemo_utils_setup_images_filechooser:
+ * @chooser: a #GtkFileChooser
+ *
+ * Configures the default folder, and mime filter of a filechooser
+ * for images.
+ */
+void modest_maemo_utils_setup_images_filechooser (GtkFileChooser *chooser);
+
+/** modest_maemo_show_information_note_and_forget:
+ * @parent_window: The window for which the note should be transient.
+ * @message: The text to show.
+ * 
+ * Show the information note and destroy it when it is closed, without 
+ * blocking. Use this when you don't want to use gtk_dialog_run(), which might lead 
+ * to hangs.
+ */
+void modest_maemo_show_information_note_and_forget (GtkWindow *parent_window, const gchar* message);
+
+/** modest_maemo_show_dialog_and_forget:
+ * @parent_window: The window for which the note should be transient.
+ * @message: The dialog to show.
+ * 
+ * Show the dialog and destroy it when it is closed, without 
+ * blocking. Use this when you don't want to use gtk_dialog_run(), which might lead 
+ * to hangs.
+ */
+void modest_maemo_show_dialog_and_forget (GtkWindow *parent_window, GtkDialog *dialog);
+
+
+void modest_maemo_set_thumbable_scrollbar (GtkScrolledWindow *win, gboolean thumbable);
+
+/**
+ * modest_maemo_toggle_action_set_active_block_notify:
+ * @action: a #GtkToggleAction
+ * @value: a #gboolean
+ *
+ * updates the toggle action active status, but blocking the notification of the changes.
+ */
+void modest_maemo_toggle_action_set_active_block_notify (GtkToggleAction *action, gboolean value);
 
 #endif /*__MODEST_MAEMO_UTILS_H__*/