#ifdef HAVE_GECKO_1_8 mime_description = gnome_vfs_mime_get_description (mMimeType.get());#else mime_description = gnome_vfs_mime_get_description (mMimeType);#endif if (mime_description == NULL) mime_description = Q_("File Type:|Unknown"); file_uri = gnome_vfs_uri_new (mUrl.get()); file_name = gnome_vfs_uri_extract_short_name (file_uri); gnome_vfs_uri_unref (file_uri); if (mPermission != EPHY_MIME_PERMISSION_SAFE && mHelperApp) { dialog = gtk_message_dialog_new (parentWindow, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_WARNING, GTK_BUTTONS_NONE, _("Download this unsafe file?")); secondary_text = g_strdup_printf ( /* translators: First %s is the file type description Second %s id the file name */ _("File Type: %s.\nIt is unsafe to open \"%s\", " "it could potentially damage your documents or " "invade your privacy. You can download it instead."), mime_description, file_name); } else if (mAction == CONTENT_ACTION_OPEN_TMP && mHelperApp) { dialog = gtk_message_dialog_new (parentWindow, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_QUESTION, GTK_BUTTONS_NONE, _("Open this file?")); secondary_text = g_strdup_printf ( /* translators: First %s is the file type description Second %s is the file name Third %s is the application used to open the file */ _("File Type: %s.\nYou can open \"%s\" using %s or save it."), mime_description, file_name, mHelperApp->name); } else { dialog = gtk_message_dialog_new (parentWindow, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_QUESTION, GTK_BUTTONS_NONE, _("Download this file?")); secondary_text = g_markup_printf_escaped ( /* translators: First %s is the file type description Second %s is the file name */ _("File Type: %s.\nYou have no application able to open \"%s\". " "You can download it instead."), mime_description, file_name); } gtk_message_dialog_format_secondary_markup (GTK_MESSAGE_DIALOG (dialog), secondary_text); g_free (file_name); g_free (secondary_text);