2001-04-28 23:11:29 +08:00
|
|
|
/* The GIMP -- an image manipulation program
|
|
|
|
* Copyright (C) 1995, 1996, 1997 Spencer Kimball and Peter Mattis
|
|
|
|
* Copyright (C) 1997 Josh MacDonald
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
#include <gtk/gtk.h>
|
|
|
|
|
2002-04-18 09:18:24 +08:00
|
|
|
#include "libgimpwidgets/gimpwidgets.h"
|
|
|
|
|
2001-10-17 19:33:43 +08:00
|
|
|
#include "gui-types.h"
|
2001-05-26 00:04:54 +08:00
|
|
|
|
2002-04-18 09:18:24 +08:00
|
|
|
#include "core/gimp.h"
|
|
|
|
|
2002-03-21 01:46:13 +08:00
|
|
|
#include "plug-in/plug-in-proc.h"
|
2001-12-01 08:14:14 +08:00
|
|
|
|
2003-05-04 07:02:26 +08:00
|
|
|
#include "widgets/gimpdialogfactory.h"
|
2004-02-27 22:20:19 +08:00
|
|
|
#include "widgets/gimpfiledialog.h"
|
2001-11-28 03:27:55 +08:00
|
|
|
#include "widgets/gimpitemfactory.h"
|
2003-01-11 01:55:53 +08:00
|
|
|
#include "widgets/gimpmenufactory.h"
|
2001-04-28 23:11:29 +08:00
|
|
|
|
2001-12-01 08:14:14 +08:00
|
|
|
#include "file-dialog-utils.h"
|
2001-04-28 23:11:29 +08:00
|
|
|
|
2003-03-26 00:38:19 +08:00
|
|
|
#include "gimp-intl.h"
|
2002-04-18 09:18:24 +08:00
|
|
|
|
|
|
|
|
2001-04-28 23:11:29 +08:00
|
|
|
void
|
2003-11-10 06:05:37 +08:00
|
|
|
file_dialog_show (GtkWidget *filesel,
|
|
|
|
GtkWidget *parent)
|
2001-04-28 23:11:29 +08:00
|
|
|
{
|
2002-12-11 00:38:16 +08:00
|
|
|
gimp_item_factories_set_sensitive ("<Toolbox>", "/File/Open...", FALSE);
|
2002-03-21 01:46:13 +08:00
|
|
|
|
2002-12-11 00:38:16 +08:00
|
|
|
gimp_item_factories_set_sensitive ("<Image>", "/File/Open...", FALSE);
|
|
|
|
gimp_item_factories_set_sensitive ("<Image>", "/File/Save", FALSE);
|
|
|
|
gimp_item_factories_set_sensitive ("<Image>", "/File/Save as...", FALSE);
|
|
|
|
gimp_item_factories_set_sensitive ("<Image>", "/File/Save a Copy...", FALSE);
|
2001-04-28 23:11:29 +08:00
|
|
|
|
2003-11-10 06:05:37 +08:00
|
|
|
gtk_window_set_screen (GTK_WINDOW (filesel),
|
|
|
|
gtk_widget_get_screen (parent));
|
|
|
|
|
2001-04-28 23:11:29 +08:00
|
|
|
gtk_widget_grab_focus (GTK_FILE_SELECTION (filesel)->selection_entry);
|
2003-05-04 07:02:26 +08:00
|
|
|
gtk_window_present (GTK_WINDOW (filesel));
|
2001-04-28 23:11:29 +08:00
|
|
|
}
|
|
|
|
|
2004-02-27 04:40:20 +08:00
|
|
|
void
|
2001-04-28 23:11:29 +08:00
|
|
|
file_dialog_hide (GtkWidget *filesel)
|
|
|
|
{
|
2001-10-17 19:33:43 +08:00
|
|
|
gtk_widget_hide (filesel);
|
2003-11-10 06:05:37 +08:00
|
|
|
|
2002-12-11 00:38:16 +08:00
|
|
|
gimp_item_factories_set_sensitive ("<Toolbox>", "/File/Open...", TRUE);
|
|
|
|
|
|
|
|
gimp_item_factories_set_sensitive ("<Image>", "/File/Open...", TRUE);
|
|
|
|
gimp_item_factories_set_sensitive ("<Image>", "/File/Save", TRUE);
|
|
|
|
gimp_item_factories_set_sensitive ("<Image>", "/File/Save as...", TRUE);
|
|
|
|
gimp_item_factories_set_sensitive ("<Image>", "/File/Save a Copy...", TRUE);
|
2001-04-28 23:11:29 +08:00
|
|
|
}
|