GNOME Bugzilla – Bug 337959
Save as on read-only open project
Last modified: 2006-06-03 21:32:35 UTC
If I hit "Save As" on a read-only project and not modify the project name, I should get a "Read only bla bla.." error, instead I get an "project is already open" error.
Created attachment 66333 [details] [review] This patch should fix the bug 2006-05-27 Vincent Geddes <vgeddes@metroweb.co.za> * src/glade-project-window.c, src/glade-app.[ch], src/glade-utils.[ch]: Fix for bug 337959. * src/main.c, glade-editor-property.c: Fixed memory leaks.
Hey hey, thanks for the patch ! A few comments on this one: o glade_app_get_loaded_project () should probably call glade_util_canonical_path() before comparing with project->path. o Strings shown in the UI must always be marked for translation: - "Could not save project to file %s" + _("Could not save project to file %s") o glade_util_ui_alert(): is there a good reason to have two different flexable functions to display a simple error in the UI ? Maybe what we're looking for here is a glade_util_ui_message like this: gboolean glade_util_ui_message (GtkWidget *parent, GladeUIMessageType type, const gchar *secondary_text, const gchar *format, ...); IMO this is also quite undesirable, because it leaves the caller with the responsability of formatting the secondary_text argument :( The caller should be able to put up a message completely in one function call, I suppose it would be ok to make an exception for corner cases where 'secondary_text' argument is not left NULL.
Sure, I was a bit hasty with this patch. I was trying to beautify (in accordance with the GNOME HIG) the error dialogs that Glade pops up. It would have been impossible to implement the recommended guidelines using glade_util_ui_message(). Somehow, it would be nice to show a dialog that has a primary message and a secondary message. I suppose we can leave this for after glade-3's release, as it is of rather low priority. Anyway, I will resubmit the patch without the glade_util_ui_alert() code.
Created attachment 66714 [details] [review] a patch 2006-06-03 Vincent Geddes <vgeddes@metroweb.co.za> * src/glade-app.[ch], src/glade-project-window.c: fix for bug 337959. * src/main.c, src/glade-editor-property: plug some memory leaks.
applied, thanks.