Commit cdeba56b authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann
Browse files

don't check filename for internal GimpData objects because they are never

2002-12-02  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdata.c (gimp_data_save): don't check filename for
	internal GimpData objects because they are never saved.

	* app/config/gimprc.c: made verbose an object property so that its
	value is copied by gimp_config_duplicate().
parent 8aaf226d
2002-12-02 Sven Neumann <sven@gimp.org>
* app/core/gimpdata.c (gimp_data_save): don't check filename for
internal GimpData objects because they are never saved.
* app/config/gimprc.c: made verbose an object property so that its
value is copied by gimp_config_duplicate().
2002-12-02 Sven Neumann <sven@gimp.org>
 
* app/config/gimpconfig-blurbs.h
......
......@@ -50,6 +50,7 @@
enum {
PROP_0,
PROP_VERBOSE,
PROP_SYSTEM_GIMPRC,
PROP_USER_GIMPRC
};
......@@ -139,14 +140,22 @@ gimp_rc_class_init (GimpRcClass *klass)
object_class->set_property = gimp_rc_set_property;
object_class->get_property = gimp_rc_get_property;
g_object_class_install_property (object_class, PROP_VERBOSE,
g_param_spec_boolean ("verbose",
NULL, NULL,
FALSE,
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT));
g_object_class_install_property (object_class, PROP_SYSTEM_GIMPRC,
g_param_spec_string ("system-gimprc",
NULL, NULL, NULL,
NULL, NULL,
NULL,
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT));
g_object_class_install_property (object_class, PROP_USER_GIMPRC,
g_param_spec_string ("user-gimprc",
NULL, NULL, NULL,
NULL, NULL,
NULL,
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT));
}
......@@ -154,11 +163,8 @@ gimp_rc_class_init (GimpRcClass *klass)
static void
gimp_rc_init (GimpRc *rc)
{
rc->system_gimprc = NULL;
rc->user_gimprc = NULL;
rc->verbose = FALSE;
rc->autosave = FALSE;
rc->save_idle_id = 0;
rc->autosave = FALSE;
rc->save_idle_id = 0;
}
static void
......@@ -204,10 +210,16 @@ gimp_rc_set_property (GObject *object,
case PROP_USER_GIMPRC:
filename = g_value_get_string (value);
break;
default:
break;
}
switch (property_id)
{
case PROP_VERBOSE:
rc->verbose = g_value_get_boolean (value);
break;
case PROP_SYSTEM_GIMPRC:
g_free (rc->system_gimprc);
......@@ -242,6 +254,9 @@ gimp_rc_get_property (GObject *object,
switch (property_id)
{
case PROP_VERBOSE:
g_value_set_boolean (value, rc->verbose);
break;
case PROP_SYSTEM_GIMPRC:
g_value_set_string (value, rc->system_gimprc);
break;
......
......@@ -177,7 +177,6 @@ gimp_data_save (GimpData *data,
g_return_val_if_fail (GIMP_IS_DATA (data), FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
g_return_val_if_fail (data->filename != NULL, FALSE);
if (data->internal)
{
......@@ -185,6 +184,8 @@ gimp_data_save (GimpData *data,
return TRUE;
}
g_return_val_if_fail (data->filename != NULL, FALSE);
if (GIMP_DATA_GET_CLASS (data)->save)
success = GIMP_DATA_GET_CLASS (data)->save (data, error);
......
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