aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-12-16 21:06:31 +0800
committerChristian Persch <chpe@src.gnome.org>2004-12-16 21:06:31 +0800
commit2d80c1635d0deafaae46a0237f2d76f76b5ed265 (patch)
tree167770f11a5d1b1b5e8595ab0ff690bb8698734c
parent763386d357847f92e95b62497b1cb3707d36c695 (diff)
downloadgsoc2013-epiphany-2d80c1635d0deafaae46a0237f2d76f76b5ed265.tar
gsoc2013-epiphany-2d80c1635d0deafaae46a0237f2d76f76b5ed265.tar.gz
gsoc2013-epiphany-2d80c1635d0deafaae46a0237f2d76f76b5ed265.tar.bz2
gsoc2013-epiphany-2d80c1635d0deafaae46a0237f2d76f76b5ed265.tar.lz
gsoc2013-epiphany-2d80c1635d0deafaae46a0237f2d76f76b5ed265.tar.xz
gsoc2013-epiphany-2d80c1635d0deafaae46a0237f2d76f76b5ed265.tar.zst
gsoc2013-epiphany-2d80c1635d0deafaae46a0237f2d76f76b5ed265.zip
Tell the user with which application we're going to open the content.
2004-12-16 Christian Persch <chpe@cvs.gnome.org> * embed/mozilla/ContentHandler.cpp: Tell the user with which application we're going to open the content. Fixes bug #141327.
-rw-r--r--ChangeLog7
-rw-r--r--embed/mozilla/ContentHandler.cpp58
2 files changed, 39 insertions, 26 deletions
diff --git a/ChangeLog b/ChangeLog
index e0c6b6123..ef42d1463 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2004-12-16 Christian Persch <chpe@cvs.gnome.org>
+
+ * embed/mozilla/ContentHandler.cpp:
+
+ Tell the user with which application we're going to open the content.
+ Fixes bug #141327.
+
2004-12-14 Christian Persch <chpe@cvs.gnome.org>
* src/prefs-dialog.c:
diff --git a/embed/mozilla/ContentHandler.cpp b/embed/mozilla/ContentHandler.cpp
index acba45c3a..d4b9d378f 100644
--- a/embed/mozilla/ContentHandler.cpp
+++ b/embed/mozilla/ContentHandler.cpp
@@ -232,8 +232,7 @@ release_cb (GContentHandler *data)
NS_METHOD GContentHandler::MIMEConfirmAction ()
{
GtkWidget *dialog;
- const char *action_label, *primary, *secondary;
- //int response;
+ const char *action_label;
nsCOMPtr<nsIDOMWindow> parentDOMWindow = do_GetInterface (mContext);
GtkWindow *parentWindow = GTK_WINDOW (EphyUtils::FindGtkParent(parentDOMWindow));
@@ -244,37 +243,44 @@ NS_METHOD GContentHandler::MIMEConfirmAction ()
if (mPermission == EPHY_MIME_PERMISSION_UNSAFE && mHelperApp)
{
- primary = _("Download the unsafe file?");
- secondary = _("This type of file could potentially damage "
- "your documents or invade your privacy. "
- "It's not safe to open it directly. "
- "You can save it instead.");
+ dialog = gtk_message_dialog_new
+ (parentWindow, GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_MESSAGE_WARNING, GTK_BUTTONS_NONE,
+ _("Download the unsafe file?"));
+ gtk_message_dialog_format_secondary_text
+ (GTK_MESSAGE_DIALOG (dialog),
+ _("This type of file could potentially damage "
+ "your documents or invade your privacy. "
+ "It's not safe to open it directly. "
+ "You can save it instead."));
}
- else if (mAction == CONTENT_ACTION_OPEN_TMP)
+ else if (mAction == CONTENT_ACTION_OPEN_TMP && mHelperApp)
{
- primary = _("Open the file in another application?");
- secondary = _("It's not possible to view this file type "
- "directly in the browser. You can open it with "
- "another application or save it.");
+ dialog = gtk_message_dialog_new
+ (parentWindow, GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_MESSAGE_WARNING, GTK_BUTTONS_NONE,
+ _("Open the file in another application?"));
+ gtk_message_dialog_format_secondary_markup
+ (GTK_MESSAGE_DIALOG (dialog),
+ /* translators: this %s is the name of the application */
+ _("It's not possible to view this file type "
+ "directly in the browser. You can open it with "
+ "<tt>%s</tt> or save it."),
+ mHelperApp->name);
}
else
{
- primary = _("Download the file?");
- secondary = _("It's not possible to view this file because "
- "there is no application installed that can open"
- " it. You can save it instead.");
+ dialog = gtk_message_dialog_new
+ (parentWindow, GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_MESSAGE_WARNING, GTK_BUTTONS_NONE,
+ _("Download the file?"));
+ gtk_message_dialog_format_secondary_text
+ (GTK_MESSAGE_DIALOG (dialog),
+ _("It's not possible to view this file because "
+ "there is no application installed that can open"
+ " it. You can save it instead."));
}
- dialog = gtk_message_dialog_new
- (parentWindow,
- GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_WARNING,
- GTK_BUTTONS_NONE,
- primary);
-
- gtk_message_dialog_format_secondary_text
- (GTK_MESSAGE_DIALOG (dialog), secondary);
-
gtk_dialog_add_button (GTK_DIALOG (dialog),
_("_Save As..."), CONTENT_ACTION_SAVEAS);
gtk_dialog_add_button (GTK_DIALOG (dialog),