Commit 443bf8b2 authored by Sven Neumann's avatar Sven Neumann
Browse files

Fixed a few bugs in the new MRU list.

I'm not very happy with this new feature as it doubles functionality and
code with the new docindex. Probably the two should be merged somehow. The
user interface should stay as it is, but the MRU functions should be
provided by the docindex code.


--Sven
parent 5d0a6dfe
Tue Jul 14 00:26:49 MEST 1998 Sven Neumann <sven@gimp.org>
* app/fileops.c
* app/menus.c
* app/preferences_dialog.c: fixed a few bugs in the new MRU list
Mon Jul 13 03:00:46 PDT 1998 Jay Cox <jaycox@earthlink.net>
* brush_select.c gimpbrushlist.c: fixed brush ref counting
......
......@@ -1070,7 +1070,7 @@ file_pref_cmd_callback (GtkWidget *widget,
gtk_box_pack_start (GTK_BOX (hbox), spinbutton, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (spinbutton), "changed",
(GtkSignalFunc) file_prefs_spinbutton_callback,
&last_opened_size);
&edit_last_opened_size);
gtk_widget_show (spinbutton);
label = gtk_label_new ("Interface");
......
......@@ -750,9 +750,10 @@ file_open (char *filename, char* raw_filename)
/* display the image */
gdisplay_new (gimage, 0x0101);
}
idea_add( filename );
idea_add (filename);
menus_last_opened_add (filename);
}
return return_val;
}
......@@ -803,12 +804,14 @@ file_save (GimpImage* gimage,
/* set the image title */
gimage_set_filename (gimage, filename);
idea_add( filename );
menus_last_opened_add (filename);
}
g_free (return_vals);
g_free (args);
idea_add( filename );
return return_val;
}
......@@ -856,7 +859,6 @@ file_open_ok_callback (GtkWidget *w,
{
file_dialog_hide (client_data);
gtk_widget_set_sensitive (GTK_WIDGET (fs), TRUE);
menus_last_opened_add (filename);
return;
}
......
......@@ -39,7 +39,6 @@
static void menus_init (void);
static GSList *last_opened_raw_filenames = NULL;
static gint num_entries = 0;
static GtkItemFactoryEntry toolbox_entries[] =
{
......@@ -415,11 +414,13 @@ menus_last_opened_update_labels ()
GString *entry_filename, *path;
GtkWidget *widget;
gint i;
guint num_entries;
entry_filename = g_string_new ("");
path = g_string_new ("");
filename_slist = last_opened_raw_filenames;
num_entries = g_slist_length (last_opened_raw_filenames);
for (i = 1; i <= num_entries; i++)
{
......@@ -444,10 +445,14 @@ menus_last_opened_add (gchar *filename)
{
GString *raw_filename;
GtkWidget *widget;
guint num_entries;
num_entries = g_slist_length (last_opened_raw_filenames);
if (num_entries == last_opened_size)
{
g_slist_free (g_slist_last (last_opened_raw_filenames));
g_slist_remove_link (last_opened_raw_filenames,
g_slist_last (last_opened_raw_filenames));
}
raw_filename = g_string_new (filename);
......@@ -459,9 +464,6 @@ menus_last_opened_add (gchar *filename)
gtk_widget_show (widget);
}
if (num_entries < last_opened_size)
num_entries++;
menus_last_opened_update_labels ();
}
......
......@@ -1070,7 +1070,7 @@ file_pref_cmd_callback (GtkWidget *widget,
gtk_box_pack_start (GTK_BOX (hbox), spinbutton, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (spinbutton), "changed",
(GtkSignalFunc) file_prefs_spinbutton_callback,
&last_opened_size);
&edit_last_opened_size);
gtk_widget_show (spinbutton);
label = gtk_label_new ("Interface");
......
......@@ -39,7 +39,6 @@
static void menus_init (void);
static GSList *last_opened_raw_filenames = NULL;
static gint num_entries = 0;
static GtkItemFactoryEntry toolbox_entries[] =
{
......@@ -415,11 +414,13 @@ menus_last_opened_update_labels ()
GString *entry_filename, *path;
GtkWidget *widget;
gint i;
guint num_entries;
entry_filename = g_string_new ("");
path = g_string_new ("");
filename_slist = last_opened_raw_filenames;
num_entries = g_slist_length (last_opened_raw_filenames);
for (i = 1; i <= num_entries; i++)
{
......@@ -444,10 +445,14 @@ menus_last_opened_add (gchar *filename)
{
GString *raw_filename;
GtkWidget *widget;
guint num_entries;
num_entries = g_slist_length (last_opened_raw_filenames);
if (num_entries == last_opened_size)
{
g_slist_free (g_slist_last (last_opened_raw_filenames));
g_slist_remove_link (last_opened_raw_filenames,
g_slist_last (last_opened_raw_filenames));
}
raw_filename = g_string_new (filename);
......@@ -459,9 +464,6 @@ menus_last_opened_add (gchar *filename)
gtk_widget_show (widget);
}
if (num_entries < last_opened_size)
num_entries++;
menus_last_opened_update_labels ();
}
......
......@@ -39,7 +39,6 @@
static void menus_init (void);
static GSList *last_opened_raw_filenames = NULL;
static gint num_entries = 0;
static GtkItemFactoryEntry toolbox_entries[] =
{
......@@ -415,11 +414,13 @@ menus_last_opened_update_labels ()
GString *entry_filename, *path;
GtkWidget *widget;
gint i;
guint num_entries;
entry_filename = g_string_new ("");
path = g_string_new ("");
filename_slist = last_opened_raw_filenames;
num_entries = g_slist_length (last_opened_raw_filenames);
for (i = 1; i <= num_entries; i++)
{
......@@ -444,10 +445,14 @@ menus_last_opened_add (gchar *filename)
{
GString *raw_filename;
GtkWidget *widget;
guint num_entries;
num_entries = g_slist_length (last_opened_raw_filenames);
if (num_entries == last_opened_size)
{
g_slist_free (g_slist_last (last_opened_raw_filenames));
g_slist_remove_link (last_opened_raw_filenames,
g_slist_last (last_opened_raw_filenames));
}
raw_filename = g_string_new (filename);
......@@ -459,9 +464,6 @@ menus_last_opened_add (gchar *filename)
gtk_widget_show (widget);
}
if (num_entries < last_opened_size)
num_entries++;
menus_last_opened_update_labels ();
}
......
......@@ -1070,7 +1070,7 @@ file_pref_cmd_callback (GtkWidget *widget,
gtk_box_pack_start (GTK_BOX (hbox), spinbutton, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (spinbutton), "changed",
(GtkSignalFunc) file_prefs_spinbutton_callback,
&last_opened_size);
&edit_last_opened_size);
gtk_widget_show (spinbutton);
label = gtk_label_new ("Interface");
......
......@@ -39,7 +39,6 @@
static void menus_init (void);
static GSList *last_opened_raw_filenames = NULL;
static gint num_entries = 0;
static GtkItemFactoryEntry toolbox_entries[] =
{
......@@ -415,11 +414,13 @@ menus_last_opened_update_labels ()
GString *entry_filename, *path;
GtkWidget *widget;
gint i;
guint num_entries;
entry_filename = g_string_new ("");
path = g_string_new ("");
filename_slist = last_opened_raw_filenames;
num_entries = g_slist_length (last_opened_raw_filenames);
for (i = 1; i <= num_entries; i++)
{
......@@ -444,10 +445,14 @@ menus_last_opened_add (gchar *filename)
{
GString *raw_filename;
GtkWidget *widget;
guint num_entries;
num_entries = g_slist_length (last_opened_raw_filenames);
if (num_entries == last_opened_size)
{
g_slist_free (g_slist_last (last_opened_raw_filenames));
g_slist_remove_link (last_opened_raw_filenames,
g_slist_last (last_opened_raw_filenames));
}
raw_filename = g_string_new (filename);
......@@ -459,9 +464,6 @@ menus_last_opened_add (gchar *filename)
gtk_widget_show (widget);
}
if (num_entries < last_opened_size)
num_entries++;
menus_last_opened_update_labels ();
}
......
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