mirror of https://github.com/GNOME/gimp.git
app/app_procs.c renamed init_parse_buffers() to parse_buffers_init().
1999-06-01 Michael Natterer <mitschel@cs.tu-berlin.de> * app/app_procs.c * app/gimprc.c: renamed init_parse_buffers() to parse_buffers_init(). * app/gimprc.[ch] (parse_gimprc_file): return a boolean indicating success to find out if sessionrc exists. * app/session.c: open L&C and Brushes on first gimp invocation to help first-time users.
This commit is contained in:
parent
0aaaba09c5
commit
177aeb9f27
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
|||
1999-06-01 Michael Natterer <mitschel@cs.tu-berlin.de>
|
||||
|
||||
* app/app_procs.c
|
||||
* app/gimprc.c: renamed init_parse_buffers() to
|
||||
parse_buffers_init().
|
||||
|
||||
* app/gimprc.[ch] (parse_gimprc_file): return a boolean indicating
|
||||
success to find out if sessionrc exists.
|
||||
|
||||
* app/session.c: open L&C and Brushes on first gimp invocation to
|
||||
help first-time users.
|
||||
|
||||
Mon May 31 06:48:56 CEST 1999 Marc Lehmann <pcg@goof.com>
|
||||
|
||||
* configure.in, README: Set the PREFIX env. var. to the value of
|
||||
|
|
|
@ -490,7 +490,7 @@ app_init (void)
|
|||
internal_procs_init ();
|
||||
|
||||
RESET_BAR();
|
||||
init_parse_buffers ();
|
||||
parse_buffers_init ();
|
||||
parse_unitrc (); /* this needs to be done before gimprc loading */
|
||||
parse_gimprc (); /* parse the local GIMP configuration file */
|
||||
|
||||
|
|
23
app/gimprc.c
23
app/gimprc.c
|
@ -15,7 +15,6 @@
|
|||
* 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 <stdlib.h>
|
||||
|
@ -247,8 +246,7 @@ static ParseFunc funcs[] =
|
|||
{ "default-threshold", TT_INT, &default_threshold, NULL },
|
||||
{ "stingy-memory-use", TT_BOOLEAN, &stingy_memory_use, NULL },
|
||||
{ "allow-resize-windows", TT_BOOLEAN, &allow_resize_windows, NULL },
|
||||
{ "dont-allow-resize-windows",
|
||||
TT_BOOLEAN, NULL, &allow_resize_windows },
|
||||
{ "dont-allow-resize-windows", TT_BOOLEAN, NULL, &allow_resize_windows },
|
||||
{ "cursor-updating", TT_BOOLEAN, NULL, &no_cursor_updating },
|
||||
{ "no-cursor-updating", TT_BOOLEAN, &no_cursor_updating, NULL },
|
||||
{ "preview-size", TT_XPREVSIZE, NULL, NULL },
|
||||
|
@ -289,7 +287,7 @@ static ParseFunc funcs[] =
|
|||
{ "image-title-format", TT_STRING, &image_title_format, NULL },
|
||||
{ "parasite", TT_XPARASITE, NULL, NULL },
|
||||
{ "global-paint-options", TT_BOOLEAN, &global_paint_options, NULL },
|
||||
{ "no-global-paint-options",TT_BOOLEAN, NULL, &global_paint_options },
|
||||
{ "no-global-paint-options", TT_BOOLEAN, NULL, &global_paint_options },
|
||||
{ "module-load-inhibit", TT_PATH, &module_db_load_inhibit, NULL },
|
||||
{ "max-new-image-size", TT_MEMSIZE, &max_new_image_size, NULL }
|
||||
};
|
||||
|
@ -328,7 +326,7 @@ gimp_system_rc_file ()
|
|||
}
|
||||
|
||||
void
|
||||
init_parse_buffers ()
|
||||
parse_buffers_init ()
|
||||
{
|
||||
parse_info.buffer = g_new (char, 4096);
|
||||
parse_info.tokenbuf = parse_info.buffer + 2048;
|
||||
|
@ -370,7 +368,7 @@ parse_gimprc ()
|
|||
image_title_format = g_strdup(DEFAULT_IMAGE_TITLE_FORMAT);
|
||||
}
|
||||
|
||||
void
|
||||
gboolean
|
||||
parse_gimprc_file (char *filename)
|
||||
{
|
||||
int status;
|
||||
|
@ -385,7 +383,7 @@ parse_gimprc_file (char *filename)
|
|||
|
||||
parse_info.fp = fopen (filename, "rt");
|
||||
if (!parse_info.fp)
|
||||
return;
|
||||
return FALSE;
|
||||
|
||||
if ((be_verbose == TRUE) || (no_splash == TRUE))
|
||||
g_print (_("parsing \"%s\"\n"), filename);
|
||||
|
@ -410,7 +408,11 @@ parse_gimprc_file (char *filename)
|
|||
g_print (_("error parsing: \"%s\"\n"), filename);
|
||||
g_print (_(" at line %d column %d\n"), parse_info.linenum, parse_info.charnum);
|
||||
g_print (_(" unexpected token: %s\n"), token_sym);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static GList *
|
||||
|
@ -1185,11 +1187,11 @@ parse_units (gpointer val1p,
|
|||
return ERROR;
|
||||
token = get_next_token ();
|
||||
|
||||
*((GUnit*)val1p) = UNIT_INCH;
|
||||
for (i=UNIT_INCH; i<gimp_unit_get_number_of_units (); i++)
|
||||
*((GUnit *) val1p) = UNIT_INCH;
|
||||
for (i = UNIT_INCH; i < gimp_unit_get_number_of_units (); i++)
|
||||
if (strcmp (token_sym, gimp_unit_get_identifier (i)) == 0)
|
||||
{
|
||||
*((GUnit*)val1p) = i;
|
||||
*((GUnit *) val1p) = i;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -2559,7 +2561,6 @@ open_backup_file (char *filename,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
char*
|
||||
gimprc_find_token (char *token)
|
||||
{
|
||||
|
|
|
@ -78,11 +78,11 @@ extern int max_new_image_size;
|
|||
|
||||
|
||||
/* function prototypes */
|
||||
void init_parse_buffers (); /* this has to be called before any file
|
||||
void parse_buffers_init (); /* this has to be called before any file
|
||||
* is parsed
|
||||
*/
|
||||
void parse_gimprc (void);
|
||||
void parse_gimprc_file (char *filename);
|
||||
gboolean parse_gimprc_file (char *filename);
|
||||
void save_gimprc (GList **updated_options, GList **conflicting_options);
|
||||
char * gimprc_find_token (char *token);
|
||||
char * gimprc_value_to_str (char *name);
|
||||
|
|
|
@ -156,11 +156,23 @@ save_sessionrc (void)
|
|||
void
|
||||
session_init (void)
|
||||
{
|
||||
char *filename;
|
||||
gchar *filename;
|
||||
|
||||
filename = gimp_personal_rc_file ("sessionrc");
|
||||
app_init_update_status(NULL, filename, -1);
|
||||
parse_gimprc_file (filename);
|
||||
app_init_update_status (NULL, filename, -1);
|
||||
|
||||
/* always show L&C and Brushes on first invocation */
|
||||
if (! parse_gimprc_file (filename) && save_session_info)
|
||||
{
|
||||
lc_dialog_session_info.open = TRUE;
|
||||
session_info_updates =
|
||||
g_list_append (session_info_updates, &lc_dialog_session_info);
|
||||
|
||||
brush_select_session_info.open = TRUE;
|
||||
session_info_updates =
|
||||
g_list_append (session_info_updates, &brush_select_session_info);
|
||||
}
|
||||
|
||||
g_free (filename);
|
||||
}
|
||||
|
||||
|
@ -207,12 +219,3 @@ session_reset_open_state (SessionInfo *info)
|
|||
|
||||
info->open = FALSE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -156,11 +156,23 @@ save_sessionrc (void)
|
|||
void
|
||||
session_init (void)
|
||||
{
|
||||
char *filename;
|
||||
gchar *filename;
|
||||
|
||||
filename = gimp_personal_rc_file ("sessionrc");
|
||||
app_init_update_status(NULL, filename, -1);
|
||||
parse_gimprc_file (filename);
|
||||
app_init_update_status (NULL, filename, -1);
|
||||
|
||||
/* always show L&C and Brushes on first invocation */
|
||||
if (! parse_gimprc_file (filename) && save_session_info)
|
||||
{
|
||||
lc_dialog_session_info.open = TRUE;
|
||||
session_info_updates =
|
||||
g_list_append (session_info_updates, &lc_dialog_session_info);
|
||||
|
||||
brush_select_session_info.open = TRUE;
|
||||
session_info_updates =
|
||||
g_list_append (session_info_updates, &brush_select_session_info);
|
||||
}
|
||||
|
||||
g_free (filename);
|
||||
}
|
||||
|
||||
|
@ -207,12 +219,3 @@ session_reset_open_state (SessionInfo *info)
|
|||
|
||||
info->open = FALSE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue