X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=src%2Fmaemo%2Fmodest-maemo-utils.h;h=95a9697313ac70ac16a68610275d8e7ec4cd313f;hb=119a9504f03dc6f35c5343331e64ba1750227766;hp=99fb67bb823f76309035a0cabfd5828a0af29433;hpb=26bbed080f7d04a8434a8b348fb4136aba4c6f23;p=modest diff --git a/src/maemo/modest-maemo-utils.h b/src/maemo/modest-maemo-utils.h index 99fb67b..95a9697 100644 --- a/src/maemo/modest-maemo-utils.h +++ b/src/maemo/modest-maemo-utils.h @@ -31,16 +31,101 @@ #ifndef __MODEST_MAEMO_UTILS_H__ #define __MODEST_MAEMO_UTILS_H__ +#include +#include /* for FILE* */ +#include +#include +#include +#include "widgets/modest-global-settings-dialog.h" +#include "widgets/modest-validating-entry.h" + +#define MODEST_MAEMO_UTILS_MYDOCS_FOLDER "MyDocs" +#define MODEST_MAEMO_UTILS_DEFAULT_IMAGE_FOLDER ".images" + + /** * modest_maemo_utils_get_device_name * * get the name for this device. Note: this queries the bluetooth * name over DBUS, and may block. The result will be available in - * MODEST_DEVICE_NAME in ModestConf; it will be updated when it + * MODEST_CONF_DEVICE_NAME in ModestConf; it will be updated when it * changes * */ void modest_maemo_utils_get_device_name (void); +/** + * 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_utils_get_osso_context: + * + * get the osso_context pointer for this application + * + * Return: the osso context pointer + */ +osso_context_t *modest_maemo_utils_get_osso_context (void); + +/** + * modest_maemo_open_mcc_mapping_file: + * + * open the mcc mapping file, or NULL if it fails + * + * Returns: file ptr or NULL in case of error + */ +FILE* modest_maemo_open_mcc_mapping_file (void); + +/** + * modest_maemo_set_thumbable_scrollbar: + * @win: a scrollable window + * @thumbable: set it to thumbable (TRUE) or small (FALSE) + * + * changes the thumbability of scrollbars in a scrollable window + */ +void modest_maemo_set_thumbable_scrollbar (GtkScrolledWindow *win, gboolean thumbable); + + +/** + * modest_maemo_get_osso_context: + * + * retrieve the osso context for this application + * + * Returns: the current osso_context_t ptr + */ +osso_context_t* modest_maemo_utils_get_osso_context (void); + +/** + * modest_maemo_set_osso_context: + * + * remember the osso-context for this application + * + * @osso_context: a valid osso_context_t pointer + * + */ +void modest_maemo_utils_set_osso_context (osso_context_t *osso_context); + +/** + * modest_maemo_utils_get_manager_menubar_as_menu: + * @manager: a #GtkUIManager + * @item_name: a string + * + * obtains the node with name @item_name in @manager (which happens to be a menubar) as a + * #GtkMenu. + * + * Returns: a #GtkMenu + */ +GtkWidget *modest_maemo_utils_get_manager_menubar_as_menu (GtkUIManager *manager, const gchar *item_name); + +void modest_maemo_utils_on_entry_invalid_character (ModestValidatingEntry *self, + const gchar* character, + gpointer user_data); + #endif /*__MODEST_MAEMO_UTILS_H__*/