aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog11
-rw-r--r--embed/mozilla/ContentHandler.cpp12
-rw-r--r--embed/mozilla/ContentHandler.h2
-rw-r--r--src/ephy-window.c4
4 files changed, 24 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index cb3e7aa2d..1467fa626 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2004-01-22 Marco Pesenti Gritti <marco@gnome.org>
+
+ * embed/mozilla/ContentHandler.cpp:
+ * embed/mozilla/ContentHandler.h:
+
+ Set the parent of the dialogs.
+
+ * src/ephy-window.c:
+
+ Use Save Link As and correct icons.
+
2004-01-21 Adam Hooper <adamh@cvs.gnome.org>
* embed/downloader-view.c: (downloader_view_build_ui):
diff --git a/embed/mozilla/ContentHandler.cpp b/embed/mozilla/ContentHandler.cpp
index 0e5664019..a92f2ce02 100644
--- a/embed/mozilla/ContentHandler.cpp
+++ b/embed/mozilla/ContentHandler.cpp
@@ -89,6 +89,7 @@ NS_IMETHODIMP GContentHandler::Show(nsIHelperAppLauncher *aLauncher,
EphyEmbedSingle *single;
gboolean handled = FALSE;
+ mContext = aContext;
mLauncher = aLauncher;
rv = Init ();
NS_ENSURE_SUCCESS (rv, rv);
@@ -129,7 +130,10 @@ NS_IMETHODIMP GContentHandler::PromptForSaveToFile(
_retval);
}
- dialog = ephy_file_chooser_new (_("Save"), NULL,
+ nsCOMPtr<nsIDOMWindow> parentDOMWindow = do_QueryInterface (aWindowContext);
+ GtkWidget *parentWindow = GTK_WIDGET (MozillaFindGtkParent (parentDOMWindow));
+
+ dialog = ephy_file_chooser_new (_("Save"), parentWindow,
GTK_FILE_CHOOSER_ACTION_SAVE,
CONF_STATE_DOWNLOAD_DIR);
gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (dialog),
@@ -250,13 +254,17 @@ NS_METHOD GContentHandler::MIMEConfirmAction ()
char *text;
int response;
+ nsCOMPtr<nsIDOMWindow> parentDOMWindow = do_QueryInterface (mContext);
+ GtkWindow *parentWindow = GTK_WINDOW (MozillaFindGtkParent(parentDOMWindow));
+
dialog = gtk_dialog_new_with_buttons
- ("", NULL, GTK_DIALOG_NO_SEPARATOR,
+ ("", parentWindow, GTK_DIALOG_NO_SEPARATOR,
_("_Save As..."), CONTENT_ACTION_SAVEAS,
GTK_STOCK_CANCEL, CONTENT_ACTION_NONE,
mAction == CONTENT_ACTION_OPEN ?
_("_Open") : _("_Download"), mAction,
NULL);
+ gtk_dialog_set_default_response (GTK_DIALOG (dialog), (guint)mAction);
gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
diff --git a/embed/mozilla/ContentHandler.h b/embed/mozilla/ContentHandler.h
index b692675f5..6aa39658d 100644
--- a/embed/mozilla/ContentHandler.h
+++ b/embed/mozilla/ContentHandler.h
@@ -77,9 +77,9 @@ class GContentHandler : public nsIHelperAppLauncherDialog
NS_METHOD CheckAppSupportScheme ();
nsCOMPtr<nsIHelperAppLauncher> mLauncher;
-
nsCOMPtr<nsIURI> mUri;
nsCOMPtr<nsIFile> mTempFile;
+ nsCOMPtr<nsISupports> mContext;
char *mMimeType;
PRBool mAppSupportScheme;
diff --git a/src/ephy-window.c b/src/ephy-window.c
index e33de91d5..09a231a90 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -271,9 +271,9 @@ static GtkActionEntry ephy_popups_entries [] = {
NULL, G_CALLBACK (popup_cmd_link_in_new_window) },
{ "OpenLinkInNewTab", NULL, N_("Open Link in New _Tab"),
NULL, NULL, G_CALLBACK (popup_cmd_link_in_new_tab) },
- { "DownloadLink", GTK_STOCK_SAVE, N_("_Download Link"), NULL,
+ { "DownloadLink", NULL, N_("_Download Link"), NULL,
NULL, G_CALLBACK (popup_cmd_download_link) },
- { "DownloadLinkAs", GTK_STOCK_SAVE, N_("_Download Link As..."), NULL,
+ { "DownloadLinkAs", GTK_STOCK_SAVE_AS, N_("_Save Link As..."), NULL,
NULL, G_CALLBACK (popup_cmd_download_link_as) },
{ "BookmarkLink", STOCK_ADD_BOOKMARK, N_("_Bookmark Link..."),
NULL, NULL, G_CALLBACK (popup_cmd_bookmark_link) },