Commit 5948e2ab authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer
Browse files

app/fileops.c return silently from save/save_as and grey out the menu

2000-05-08  Michael Natterer  <mitch@gimp.org>

	* app/fileops.c
	* app/gdisplay.c: return silently from save/save_as and grey out
	the menu entries if there is no active drawable. Fixes #10239.
parent f034d23e
2000-05-08 Michael Natterer <mitch@gimp.org>
* app/fileops.c
* app/gdisplay.c: return silently from save/save_as and grey out
the menu entries if there is no active drawable. Fixes #10239.
2000-05-08 Michael Natterer <mitch@gimp.org>
 
* app/docindex.c (open_idea_window): put the ops_buttons box
......
......@@ -1652,8 +1652,8 @@ gdisplay_set_menu_sensitivity (GDisplay *gdisp)
#define SET_STATE(menu,condition) \
menus_set_state ("<Image>/" menu, (condition) != 0)
SET_SENSITIVE ("File/Save", gdisp);
SET_SENSITIVE ("File/Save As...", gdisp);
SET_SENSITIVE ("File/Save", gdisp && drawable);
SET_SENSITIVE ("File/Save As...", gdisp && drawable);
SET_SENSITIVE ("File/Revert", gdisp && gdisp->gimage->filename);
SET_SENSITIVE ("File/Close", gdisp);
......
......@@ -1652,8 +1652,8 @@ gdisplay_set_menu_sensitivity (GDisplay *gdisp)
#define SET_STATE(menu,condition) \
menus_set_state ("<Image>/" menu, (condition) != 0)
SET_SENSITIVE ("File/Save", gdisp);
SET_SENSITIVE ("File/Save As...", gdisp);
SET_SENSITIVE ("File/Save", gdisp && drawable);
SET_SENSITIVE ("File/Save As...", gdisp && drawable);
SET_SENSITIVE ("File/Revert", gdisp && gdisp->gimage->filename);
SET_SENSITIVE ("File/Close", gdisp);
......
......@@ -417,7 +417,10 @@ file_save_callback (GtkWidget *widget,
GDisplay *gdisplay;
gdisplay = gdisplay_active ();
if (!gdisplay)
if (! gdisplay)
return;
if (! gimage_active_drawable (gdisplay->gimage))
return;
/* Only save if the gimage has been modified */
......@@ -459,7 +462,10 @@ file_save_as_callback (GtkWidget *widget,
GDisplay *gdisplay;
gdisplay = gdisplay_active ();
if (!gdisplay)
if (! gdisplay)
return;
if (! gimage_active_drawable (gdisplay->gimage))
return;
the_gimage = gdisplay->gimage;
......
......@@ -1652,8 +1652,8 @@ gdisplay_set_menu_sensitivity (GDisplay *gdisp)
#define SET_STATE(menu,condition) \
menus_set_state ("<Image>/" menu, (condition) != 0)
SET_SENSITIVE ("File/Save", gdisp);
SET_SENSITIVE ("File/Save As...", gdisp);
SET_SENSITIVE ("File/Save", gdisp && drawable);
SET_SENSITIVE ("File/Save As...", gdisp && drawable);
SET_SENSITIVE ("File/Revert", gdisp && gdisp->gimage->filename);
SET_SENSITIVE ("File/Close", gdisp);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment