aboutsummaryrefslogtreecommitdiffstats
path: root/embed/ephy-embed-utils.c
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@it.gnome.org>2003-07-14 18:23:22 +0800
committerMarco Pesenti Gritti <mpeseng@src.gnome.org>2003-07-14 18:23:22 +0800
commit7fd10d1e4ad4a3cf1ffe93cbbdc4f519bf1a5225 (patch)
treef869c9b1fa2b232f67b2aab5c2e37db6bfdad9c3 /embed/ephy-embed-utils.c
parentaaf367e6ca143eb22deeee902cbb9955de68305b (diff)
downloadgsoc2013-epiphany-7fd10d1e4ad4a3cf1ffe93cbbdc4f519bf1a5225.tar.gz
gsoc2013-epiphany-7fd10d1e4ad4a3cf1ffe93cbbdc4f519bf1a5225.tar.zst
gsoc2013-epiphany-7fd10d1e4ad4a3cf1ffe93cbbdc4f519bf1a5225.zip
Update
2003-07-14 Marco Pesenti Gritti <marco@it.gnome.org> * lib/egg/eggtreemultidnd.c: (egg_tree_multi_drag_button_press_event): Update * embed/ephy-embed-popup-control.c: (save_property_url), (embed_popup_download_link_cmd), (embed_popup_save_image_as_cmd), (save_url), (embed_popup_save_page_as_cmd), (embed_popup_save_background_as_cmd): * src/popup-commands.c: (save_property_url), (popup_cmd_download_link), (popup_cmd_save_image_as), (popup_cmd_save_background_as): * src/window-commands.c: (window_cmd_file_open), (window_cmd_file_save_as): Higgy titles for file pickers. * embed/ephy-embed-utils.c: (ephy_embed_utils_save): * embed/ephy-embed-utils.h: Allow to pass a title to _save. Show an error message when saving doesnt succeed.
Diffstat (limited to 'embed/ephy-embed-utils.c')
-rw-r--r--embed/ephy-embed-utils.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/embed/ephy-embed-utils.c b/embed/ephy-embed-utils.c
index 3ea0f1095..bddab9191 100644
--- a/embed/ephy-embed-utils.c
+++ b/embed/ephy-embed-utils.c
@@ -38,6 +38,7 @@
/**
* ephy_embed_utils_save:
* @window: the referrer window. Used to parent the dialogs.
+ * @title: title of the file picker
* @default_dir_pref: the gconf path to persist the directory selected by the user.
* @ask_dest: ask the user the destination path
* @ask_content: show the user an option to save the content
@@ -48,6 +49,7 @@
**/
void
ephy_embed_utils_save (GtkWidget *window,
+ const char *title,
const char *default_dir_pref,
gboolean ask_dest,
gboolean with_content,
@@ -134,8 +136,7 @@ ephy_embed_utils_save (GtkWidget *window,
{
/* show the file picker */
ret = ephy_embed_single_show_file_picker
- (single, window,
- _("Select the destination filename"),
+ (single, window, title,
dirName, fileName, modeSave, &retPath,
NULL, NULL);
}
@@ -154,7 +155,20 @@ ephy_embed_utils_save (GtkWidget *window,
ephy_embed_persist_set_dest (persist, retPath);
- ephy_embed_persist_save (persist);
+ if (ephy_embed_persist_save (persist) == G_FAILED)
+ {
+ GtkWidget *dialog;
+
+ dialog = gtk_message_dialog_new
+ (GTK_WINDOW (window),
+ GTK_DIALOG_MODAL,
+ GTK_MESSAGE_ERROR,
+ GTK_BUTTONS_CLOSE,
+ _("The file has not been saved."));
+ gtk_dialog_run (GTK_DIALOG (dialog));
+ gtk_widget_destroy (dialog);
+ }
+
}
/* set default save dir */