Re: Don't ask option for unmounting
Bernard Jungen <[email protected]> Fri, 29 May 2009 16:45:21 +0200
| Newsgroups | gmane.comp.desktop.rox.devel |
|---|---|
| Message-ID | <[email protected]> |
On Wed, May 27, 2009 at 09:15:10PM +0100, Tony Houghton wrote: > OK, I've made both of these changes. Thanks. I've attached a patch with tiny improvements. Feel free to merge it anonymously with your patches. By the way, are we sure GPOINTER_TO_INT(NULL) always yields 0? It's assumed in filer_get_unmount_action(). Bernard. ------------------------------------------------------------------------------ Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers & brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, & iPhoneDevCamp as they present alongside digital heavyweights like Barbarian Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com _______________________________________________ rox-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/rox-devel
Some-tiny-changes.patch
(text/x-diff, 2.2 KB)
>From 2d8b58af4786ae24ca1bbcf86936eaef9086a147 Mon Sep 17 00:00:00 2001 From: Bernard Jungen <[email protected]> Date: Fri, 29 May 2009 16:42:07 +0200 Subject: [PATCH 1/1] Some tiny changes --- ROX-Filer/src/filer.c | 8 ++++++-- ROX-Filer/src/infobox.c | 8 ++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/ROX-Filer/src/filer.c b/ROX-Filer/src/filer.c index af1fbeb..cfaae6f 100644 --- a/ROX-Filer/src/filer.c +++ b/ROX-Filer/src/filer.c @@ -514,7 +514,7 @@ static void unmount_dialog_response(GtkWidget *dialog, int response, char *mount) { GList *list = NULL; - UnmountPrompt prompt_val = 0; + UnmountPrompt prompt_val = UNMOUNT_PROMPT_ASK; switch (response) { @@ -3223,6 +3223,8 @@ static void load_learnt_mounts(void) static void save_mount(char *path, gpointer value, FILE **pfp) { + int v; + if (!*pfp) { gchar *spath = choices_find_xdg_path_save("Mounts", @@ -3235,7 +3237,9 @@ static void save_mount(char *path, gpointer value, FILE **pfp) if (!*pfp) return; } - fprintf(*pfp, "%s %d\n", path, GPOINTER_TO_INT(value)); + + if ((v = GPOINTER_TO_INT(value)) != UNMOUNT_PROMPT_ASK) + fprintf(*pfp, "%s %d\n", path, v); } static void save_learnt_mounts(void) diff --git a/ROX-Filer/src/infobox.c b/ROX-Filer/src/infobox.c index d2d589c..c89ab6a 100644 --- a/ROX-Filer/src/infobox.c +++ b/ROX-Filer/src/infobox.c @@ -1044,13 +1044,13 @@ static GtkWidget *make_unmount_options(const char *path) hbox = gtk_hbox_new(TRUE, 4); radio = pack_unmount_radio(path, upval, - "No change", UNMOUNT_PROMPT_NO_CHANGE, NULL, hbox); + _("Do nothing"), UNMOUNT_PROMPT_NO_CHANGE, NULL, hbox); radio = pack_unmount_radio(path, upval, - "Unmount", UNMOUNT_PROMPT_UNMOUNT, radio, hbox); + _("Unmount"), UNMOUNT_PROMPT_UNMOUNT, radio, hbox); radio = pack_unmount_radio(path, upval, - "Eject", UNMOUNT_PROMPT_EJECT, radio, hbox); + _("Eject"), UNMOUNT_PROMPT_EJECT, radio, hbox); pack_unmount_radio(path, upval, - "Ask", UNMOUNT_PROMPT_ASK, radio, hbox); + _("Ask"), UNMOUNT_PROMPT_ASK, radio, hbox); return hbox; } -- 1.6.2.1