diff options
-rw-r--r-- | ChangeLog | 25 | ||||
-rw-r--r-- | embed/ephy-embed-popup-control.c | 23 | ||||
-rw-r--r-- | embed/ephy-embed-utils.c | 20 | ||||
-rw-r--r-- | embed/ephy-embed-utils.h | 1 | ||||
-rw-r--r-- | lib/egg/eggtreemultidnd.c | 2 | ||||
-rw-r--r-- | src/popup-commands.c | 16 | ||||
-rw-r--r-- | src/window-commands.c | 3 |
7 files changed, 68 insertions, 22 deletions
@@ -1,3 +1,28 @@ +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. + 2003-07-14 Xan Lopez <xan@masilla.org> * lib/widgets/ephy-node-view.c: (ephy_node_view_remove): diff --git a/embed/ephy-embed-popup-control.c b/embed/ephy-embed-popup-control.c index 2f8b20b8a..05c6cc91b 100644 --- a/embed/ephy-embed-popup-control.c +++ b/embed/ephy-embed-popup-control.c @@ -26,6 +26,7 @@ #include <gtk/gtkmain.h> #include <string.h> #include <bonobo/bonobo-ui-component.h> +#include <bonobo/bonobo-i18n.h> #include <gtk/gtkclipboard.h> #include <libgnome/gnome-exec.h> @@ -481,6 +482,7 @@ embed_popup_copy_link_location_cmd (BonoboUIComponent *uic, static void save_property_url (EphyEmbedPopupControl *popup, + const char *title, gboolean ask_dest, gboolean show_progress, const char *property) @@ -509,11 +511,9 @@ save_property_url (EphyEmbedPopupControl *popup, EMBED_PERSIST_SHOW_PROGRESS); } - ephy_embed_utils_save (window, + ephy_embed_utils_save (window, title, CONF_STATE_DOWNLOADING_DIR, - ask_dest, - FALSE, - persist); + ask_dest, FALSE, persist); } /* commands */ @@ -540,6 +540,7 @@ embed_popup_download_link_cmd (BonoboUIComponent *uic, const char* verbname) { save_property_url (popup, + _("Download Link"), eel_gconf_get_boolean (CONF_ASK_DOWNLOAD_DEST), TRUE, "link"); @@ -550,7 +551,7 @@ embed_popup_save_image_as_cmd (BonoboUIComponent *uic, EphyEmbedPopupControl *popup, const char* verbname) { - save_property_url (popup, TRUE, FALSE, "image"); + save_property_url (popup, _("Save Image As"), TRUE, FALSE, "image"); } #define CONF_DESKTOP_BG_PICTURE "/desktop/gnome/background/picture_filename" @@ -629,6 +630,7 @@ embed_popup_copy_image_location_cmd (BonoboUIComponent *uic, static void save_url (EphyEmbedPopupControl *popup, + const char *title, gboolean ask_dest, gboolean show_progress, const char *url) @@ -649,11 +651,9 @@ save_url (EphyEmbedPopupControl *popup, EMBED_PERSIST_SHOW_PROGRESS); } - ephy_embed_utils_save (window, + ephy_embed_utils_save (window, title, CONF_STATE_DOWNLOADING_DIR, - ask_dest, - FALSE, - persist); + ask_dest, FALSE, persist); } static void @@ -665,7 +665,7 @@ embed_popup_save_page_as_cmd (BonoboUIComponent *uic, ephy_embed_get_location (popup->priv->embed, FALSE, &location); - save_url (popup, TRUE, FALSE, location); + save_url (popup, _("Save Page As"), TRUE, FALSE, location); g_free (location); } @@ -674,7 +674,8 @@ embed_popup_save_background_as_cmd (BonoboUIComponent *uic, EphyEmbedPopupControl *popup, const char* verbname) { - save_property_url (popup, TRUE, FALSE, "background_image"); + save_property_url (popup, _("Save Background As"), + TRUE, FALSE, "background_image"); } static void 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 */ diff --git a/embed/ephy-embed-utils.h b/embed/ephy-embed-utils.h index 5ce61cb7e..f6ccce7d8 100644 --- a/embed/ephy-embed-utils.h +++ b/embed/ephy-embed-utils.h @@ -27,6 +27,7 @@ G_BEGIN_DECLS void ephy_embed_utils_save (GtkWidget *window, + const char *title, const char *default_dir_pref, gboolean ask_dest, gboolean with_content, diff --git a/lib/egg/eggtreemultidnd.c b/lib/egg/eggtreemultidnd.c index ae7a4d5aa..3a7da919c 100644 --- a/lib/egg/eggtreemultidnd.c +++ b/lib/egg/eggtreemultidnd.c @@ -391,6 +391,8 @@ egg_tree_multi_drag_button_press_event (GtkWidget *widget, priv_data->drag_data_get_handler = g_signal_connect (G_OBJECT (tree_view), "drag_data_get", G_CALLBACK (egg_tree_multi_drag_drag_data_get), NULL); } + + gtk_tree_path_free (path); return TRUE; } diff --git a/src/popup-commands.c b/src/popup-commands.c index 4d37e4e23..18dd5585c 100644 --- a/src/popup-commands.c +++ b/src/popup-commands.c @@ -26,6 +26,7 @@ #include "ephy-file-helpers.h" #include <string.h> +#include <bonobo/bonobo-i18n.h> static EphyEmbedEvent * get_event_info (EphyWindow *window) @@ -249,6 +250,7 @@ popup_cmd_copy_link_address (EggAction *action, static void save_property_url (EggAction *action, + const char *title, EphyWindow *window, gboolean ask_dest, gboolean show_progress, @@ -280,11 +282,9 @@ save_property_url (EggAction *action, EMBED_PERSIST_SHOW_PROGRESS); } - ephy_embed_utils_save (GTK_WIDGET (window), + ephy_embed_utils_save (GTK_WIDGET (window), title, CONF_STATE_DOWNLOADING_DIR, - ask_dest, - FALSE, - persist); + ask_dest, FALSE, persist); g_object_unref (G_OBJECT(persist)); } @@ -312,7 +312,7 @@ void popup_cmd_download_link (EggAction *action, EphyWindow *window) { - save_property_url (action, window, + save_property_url (action, _("Download link"), window, eel_gconf_get_boolean (CONF_ASK_DOWNLOAD_DEST), TRUE, "link"); @@ -322,7 +322,8 @@ void popup_cmd_save_image_as (EggAction *action, EphyWindow *window) { - save_property_url (action, window, TRUE, FALSE, "image"); + save_property_url (action, _("Save Image As"), + window, TRUE, FALSE, "image"); } #define CONF_DESKTOP_BG_PICTURE "/desktop/gnome/background/picture_filename" @@ -409,7 +410,8 @@ void popup_cmd_save_background_as (EggAction *action, EphyWindow *window) { - save_property_url (action, window, TRUE, FALSE, "background_image"); + save_property_url (action, _("Save Background As"), + window, TRUE, FALSE, "background_image"); } void diff --git a/src/window-commands.c b/src/window-commands.c index 7712ce8b7..53b134eef 100644 --- a/src/window-commands.c +++ b/src/window-commands.c @@ -327,7 +327,7 @@ window_cmd_file_open (EggAction *action, result = ephy_embed_single_show_file_picker (single, wmain, - _("Select the file to open"), + _("Open"), dir, NULL, modeOpen, &file, NULL, NULL); @@ -368,6 +368,7 @@ window_cmd_file_save_as (EggAction *action, EMBED_PERSIST_MAINDOC); ephy_embed_utils_save (GTK_WIDGET(window), + _("Save As"), CONF_STATE_SAVE_DIR, TRUE, TRUE, |