mime_str = g_string_new (mime_type);
g_string_ascii_down (mime_str);
}
-#ifdef MODEST_HILDON_VERSION_0
+#ifdef MODEST_HAVE_OSSO_MIME
icons = osso_mime_get_icon_names (mime_str->str, NULL);
#else
icons = hildon_mime_get_icon_names (mime_str->str, NULL);
-#endif /*MODEST_HILDON_VERSION_0*/
+#endif /*MODEST_HAVE_OSSO_MIME*/
for (cursor = icons; cursor; ++cursor) {
if (gtk_icon_theme_has_icon (gtk_icon_theme_get_default(), *cursor)) {
icon_name = g_strdup (*cursor);
-#ifdef MODEST_HILDON_VERSION_0
-
+#ifdef MODEST_HAVE_OSSO_MIME
gboolean
modest_platform_activate_uri (const gchar *uri)
{
return result;
}
-#else /* !MODEST_HILDON_VERSION_0*/
-
+#else /* !MODEST_HAVE_OSSO_MIME*/
gboolean
modest_platform_activate_uri (const gchar *uri)
}
-#endif /* MODEST_HILDON_VERSION_0*/
+#endif /* MODEST_HAVE_OSSO_MIME*/
gboolean
modest_platform_activate_file (const gchar *path, const gchar *mime_type)
uri_path = g_strconcat ("file://", path, NULL);
con = osso_get_dbus_connection (osso_context);
-#ifdef MODEST_HILDON_VERSION_0
+#ifdef MODEST_HAVE_OSSO_MIME
result = osso_mime_open_file_with_mime_type (con, uri_path, mime_str->str);
g_string_free (mime_str, TRUE);
if (result != 1)
hildon_banner_show_information (NULL, NULL, _("mcen_ni_noregistered_viewer"));
return result != 1;
-#endif
+#endif /*MODEST_HAVE_OSSO_MIME*/
}
ModestPlatformPopupInfo *popup_info = (ModestPlatformPopupInfo *) userdata;
g_free (popup_info->uri);
-#ifdef MODEST_HILDON_VERSION_0
+#ifdef MODEST_HAVE_OSSO_MIME
osso_uri_free_actions (popup_info->actions);
#else
hildon_uri_free_actions (popup_info->actions);
-#endif
+#endif /*MODEST_HAVE_OSSO_MIME*/
return FALSE;
}
/* now, the real uri-actions... */
for (node = popup_info->actions; node != NULL; node = g_slist_next (node)) {
-#ifdef MODEST_HILDON_VERSION_0
+#ifdef MODEST_HAVE_OSSO_MIME
OssoURIAction *action = (OssoURIAction *) node->data;
if (strcmp (action_name, osso_uri_action_get_name (action))==0) {
osso_uri_open (popup_info->uri, action, NULL);
hildon_uri_open (popup_info->uri, action, NULL);
break;
}
-#endif
+#endif /*MODEST_HAVE_OSSO_MIME*/
}
}
if (uri == NULL)
return FALSE;
-#ifdef MODEST_HILDON_VERSION_0
+#ifdef MODEST_HAVE_OSSO_MIME
scheme = osso_uri_get_scheme_from_uri (uri, NULL);
actions_list = osso_uri_get_actions (scheme, NULL);
#else
scheme = hildon_uri_get_scheme_from_uri (uri, NULL);
actions_list = hildon_uri_get_actions (scheme, NULL);
-#endif
+#endif /* MODEST_HAVE_OSSO_MIME */
if (actions_list != NULL) {
GSList *node;
GtkWidget *menu = gtk_menu_new ();
GtkWidget *menu_item;
const gchar *action_name;
const gchar *translation_domain;
-#ifdef MODEST_HILDON_VERSION_0
+#ifdef MODEST_HAVE_OSSO_MIME
OssoURIAction *action = (OssoURIAction *) node->data;
action_name = osso_uri_action_get_name (action);
translation_domain = osso_uri_action_get_translation_domain (action);
} else {
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
}
-#endif
+#endif /*MODEST_HAVE_OSSO_MIME*/
gtk_widget_show (menu_item);
}
void
modest_platform_on_new_msg (void)
{
-#ifndef MODEST_HILDON_VERSION_0
+#ifdef MODEST_HAVE_HILDON_NOTIFY
HildonNotification *not;
/* Create a new notification. FIXME put the right values, need
g_error ("Failed to send notification");
g_object_unref (not);
-#endif /*MODEST_HILDON_VERSION_0*/
+#endif /*MODEST_HAVE_HILDON_NOTIFY*/
}
g_return_if_fail (osso_context);
/* Show help */
-#ifdef MODEST_HILDON_VERSION_0
+#ifdef MODEST_HAVE_OSSO_HELP
result = ossohelp_show (osso_context, help_id, OSSO_HELP_SHOW_DIALOG);
#else
result = hildon_help_show (osso_context, help_id, OSSO_HELP_SHOW_DIALOG);