X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Fmaemo%2Fmodest-maemo-utils.c;h=0c0639588d2884f6b41c03f7fe163471353be32e;hb=97b8abd58253731cfab9e6eba29a126a2fcc6df1;hp=19ba8ef784f1524ce7809a8c42c027ac676ae50e;hpb=de2d9a7e88e25c2b3128cdc69a27c334cb9635ea;p=modest diff --git a/src/maemo/modest-maemo-utils.c b/src/maemo/modest-maemo-utils.c index 19ba8ef..0c06395 100644 --- a/src/maemo/modest-maemo-utils.c +++ b/src/maemo/modest-maemo-utils.c @@ -49,6 +49,7 @@ #include #include "modest-maemo-utils.h" +#include "modest-text-utils.h" #include "modest-platform.h" /* @@ -209,21 +210,12 @@ modest_maemo_utils_setup_images_filechooser (GtkFileChooser *chooser) /* Set the images mime filter */ file_filter = gtk_file_filter_new (); -#ifdef MODEST_HAVE_HILDON0_WIDGETS - image_mimetypes_list = osso_mime_get_mime_types_for_category (OSSO_MIME_CATEGORY_IMAGES); -#else image_mimetypes_list = hildon_mime_get_mime_types_for_category (HILDON_MIME_CATEGORY_IMAGES); -#endif for (node = image_mimetypes_list; node != NULL; node = g_list_next (node)) { gtk_file_filter_add_mime_type (file_filter, node->data); } gtk_file_chooser_set_filter (chooser, file_filter); -#ifdef MODEST_HAVE_HILDON0_WIDGETS - osso_mime_types_list_free (image_mimetypes_list); -#else hildon_mime_types_list_free (image_mimetypes_list); -#endif - } void @@ -236,34 +228,6 @@ modest_maemo_set_thumbable_scrollbar (GtkScrolledWindow *win, #endif /* MODEST_HAVE_HILDON1_WIDGETS */ } -FILE* -modest_maemo_open_mcc_mapping_file (void) -{ - FILE* result; - - const gchar* path; - const gchar* path1 = MODEST_OPERATOR_WIZARD_MCC_MAPPING; - const gchar* path2 = MODEST_MCC_MAPPING; - - if (access(path1, R_OK) == 0) - path = path1; - else if (access(path2, R_OK) == 0) - path = path2; - else { - g_warning ("%s: neither '%s' nor '%s' is a readable mapping file", - __FUNCTION__, path1, path2); - return NULL; - } - - result = fopen (path, "r"); - if (!result) { - g_warning ("%s: error opening mapping file '%s': %s", - __FUNCTION__, path, strerror(errno)); - return NULL; - } - return result; -} - GtkWidget * modest_maemo_utils_get_manager_menubar_as_menu (GtkUIManager *manager, const gchar *item_name)