mirror of https://github.com/GNOME/gimp.git
Just a few quick bug fixes for the document index.
This commit is contained in:
parent
3f81a90182
commit
99bbc38a1c
22
ChangeLog
22
ChangeLog
|
@ -1,3 +1,25 @@
|
|||
1998-07-08 Chris Lahey <clahey@umich.edu>
|
||||
|
||||
* app/menus.c (toolbox_entries): Made it so that you won't get two
|
||||
document indexes open at the same time. (docindex.c assumes that
|
||||
you only have one open.)
|
||||
|
||||
* app/docindex.h: Added a function to close the document index
|
||||
from outside docindex.c.
|
||||
|
||||
* app/docindex.c: Got rid of warnings about isspace().
|
||||
(create_idea_toolbar): Got rid of the warnings about pixmaps.
|
||||
(close_idea_window): Added a function to close the document index
|
||||
from outside docindex.c.
|
||||
(idea_hide_callback): Made this function work correctly if called
|
||||
when ideas is NULL.
|
||||
|
||||
* app/app_procs.c (really_quit_callback):
|
||||
(app_exit): Made it so that the document index saves even if you
|
||||
quit without closing it.
|
||||
|
||||
* app/fileops.c (file_save): Made Save As add to the document index.
|
||||
|
||||
1998-07-08 Chris Lahey <clahey@umich.edu>
|
||||
|
||||
* app/docindex.h:
|
||||
|
|
|
@ -59,6 +59,7 @@
|
|||
#include "undo.h"
|
||||
#include "xcf.h"
|
||||
#include "errors.h"
|
||||
#include "docindex.h"
|
||||
|
||||
#include "config.h"
|
||||
|
||||
|
@ -592,7 +593,10 @@ app_exit (int kill_it)
|
|||
if (kill_it == 0 && gdisplays_dirty () && no_interface == FALSE)
|
||||
really_quit_dialog ();
|
||||
else if (no_interface == FALSE)
|
||||
toolbox_free ();
|
||||
{
|
||||
toolbox_free ();
|
||||
close_idea_window();
|
||||
}
|
||||
else
|
||||
app_exit_finish ();
|
||||
}
|
||||
|
@ -607,6 +611,7 @@ really_quit_callback (GtkButton *button,
|
|||
{
|
||||
gtk_widget_destroy (dialog);
|
||||
toolbox_free ();
|
||||
close_idea_window();
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
#include <gdk/gdkprivate.h>
|
||||
|
||||
#include "gimage.h"
|
||||
|
@ -38,53 +39,30 @@ static char *image_drop_types[] = {"url:ALL"};
|
|||
|
||||
GtkWidget *create_idea_toolbar()
|
||||
{
|
||||
GtkWidget *wpixmap;
|
||||
GdkPixmap *pixmap;
|
||||
GdkBitmap *mask;
|
||||
GtkWidget *toolbar;
|
||||
|
||||
toolbar = gtk_toolbar_new( GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_BOTH);
|
||||
gtk_widget_show( toolbar );
|
||||
gtk_toolbar_set_button_relief( GTK_TOOLBAR( toolbar ), GTK_RELIEF_NONE );
|
||||
|
||||
pixmap = gdk_pixmap_create_from_xpm( (GdkWindow *)&gdk_root_parent, &mask,
|
||||
&toolbar->style->bg[GTK_STATE_NORMAL],
|
||||
DATADIR "/go/tb_up_arrow.xpm" );
|
||||
wpixmap = gtk_pixmap_new( pixmap, mask );
|
||||
|
||||
gtk_toolbar_append_item( GTK_TOOLBAR( toolbar ),
|
||||
"Up", "Move the selected entry up in the index", "Toolbar/Up",
|
||||
wpixmap,
|
||||
NULL,
|
||||
(GtkSignalFunc) idea_up_callback, NULL);
|
||||
|
||||
pixmap = gdk_pixmap_create_from_xpm( (GdkWindow *)&gdk_root_parent, &mask,
|
||||
&toolbar->style->bg[GTK_STATE_NORMAL],
|
||||
DATADIR "/go/tb_down_arrow.xpm" );
|
||||
wpixmap = gtk_pixmap_new( pixmap, mask );
|
||||
|
||||
gtk_toolbar_append_item( GTK_TOOLBAR( toolbar ),
|
||||
"Down", "Move the selected entry down in the index", "Toolbar/Down",
|
||||
wpixmap,
|
||||
NULL,
|
||||
(GtkSignalFunc) idea_down_callback, NULL );
|
||||
|
||||
pixmap = gdk_pixmap_create_from_xpm( (GdkWindow *)&gdk_root_parent, &mask,
|
||||
&toolbar->style->bg[GTK_STATE_NORMAL],
|
||||
DATADIR "/go/cancel.xpm" );
|
||||
wpixmap = gtk_pixmap_new( pixmap, mask );
|
||||
|
||||
gtk_toolbar_append_item( GTK_TOOLBAR( toolbar ),
|
||||
"Remove", "Remove the selected entry from the index", "Toolbar/Remove",
|
||||
wpixmap,
|
||||
NULL,
|
||||
(GtkSignalFunc) idea_remove_callback, NULL );
|
||||
|
||||
pixmap = gdk_pixmap_create_from_xpm( (GdkWindow *)&gdk_root_parent, &mask,
|
||||
&toolbar->style->bg[GTK_STATE_NORMAL],
|
||||
DATADIR "/go/tb_exit.xpm" );
|
||||
wpixmap = gtk_pixmap_new( pixmap, mask );
|
||||
|
||||
gtk_toolbar_append_item( GTK_TOOLBAR( toolbar ),
|
||||
"Hide", "Hide the Document Index", "Toolbar/Hide",
|
||||
wpixmap,
|
||||
NULL,
|
||||
(GtkSignalFunc) idea_hide_callback, NULL );
|
||||
return toolbar;
|
||||
}
|
||||
|
@ -226,10 +204,13 @@ idea_window_delete_event_callback( GtkWidget *widget, GdkEvent *event, gpointer
|
|||
static void
|
||||
idea_hide_callback( GtkWidget *widget, gpointer data )
|
||||
{
|
||||
save_idea_manager( ideas );
|
||||
gtk_widget_destroy( ideas->window );
|
||||
free( ideas );
|
||||
ideas = 0;
|
||||
if ( ideas )
|
||||
{
|
||||
save_idea_manager( ideas );
|
||||
gtk_widget_destroy( ideas->window );
|
||||
free( ideas );
|
||||
ideas = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -238,6 +219,12 @@ open_idea_window()
|
|||
make_idea_window( -1, -1 );
|
||||
}
|
||||
|
||||
void
|
||||
close_idea_window()
|
||||
{
|
||||
idea_hide_callback( NULL, NULL );
|
||||
}
|
||||
|
||||
void
|
||||
make_idea_window( int x, int y )
|
||||
{
|
||||
|
|
|
@ -43,6 +43,7 @@ typedef struct idea_manager
|
|||
|
||||
void make_idea_window( gint x, gint y );
|
||||
void open_idea_window();
|
||||
void close_idea_window();
|
||||
void idea_add( gchar *label );
|
||||
void idea_add_in_position( gchar *label, gint position );
|
||||
void raise_idea_callback( GtkWidget *widget, gpointer data );
|
||||
|
|
|
@ -808,6 +808,8 @@ file_save (GimpImage* gimage,
|
|||
g_free (return_vals);
|
||||
g_free (args);
|
||||
|
||||
idea_add( filename );
|
||||
|
||||
return return_val;
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ static GtkItemFactoryEntry toolbox_entries[] =
|
|||
{ "/File/Dialogs/Input Devices...", NULL, dialogs_input_devices_cmd_callback, 0 },
|
||||
{ "/File/Dialogs/Device Status...", NULL, dialogs_device_status_cmd_callback, 0 },
|
||||
{ "/File/---", NULL, NULL, 0, "<Separator>" },
|
||||
{ "/File/Document Index...", NULL, open_idea_window, 0 },
|
||||
{ "/File/Document Index...", NULL, raise_idea_callback, 0 },
|
||||
{ "/File/Quit", "<control>Q", file_quit_cmd_callback, 0 },
|
||||
};
|
||||
static guint n_toolbox_entries = sizeof (toolbox_entries) / sizeof (toolbox_entries[0]);
|
||||
|
|
|
@ -51,7 +51,7 @@ static GtkItemFactoryEntry toolbox_entries[] =
|
|||
{ "/File/Dialogs/Input Devices...", NULL, dialogs_input_devices_cmd_callback, 0 },
|
||||
{ "/File/Dialogs/Device Status...", NULL, dialogs_device_status_cmd_callback, 0 },
|
||||
{ "/File/---", NULL, NULL, 0, "<Separator>" },
|
||||
{ "/File/Document Index...", NULL, open_idea_window, 0 },
|
||||
{ "/File/Document Index...", NULL, raise_idea_callback, 0 },
|
||||
{ "/File/Quit", "<control>Q", file_quit_cmd_callback, 0 },
|
||||
};
|
||||
static guint n_toolbox_entries = sizeof (toolbox_entries) / sizeof (toolbox_entries[0]);
|
||||
|
|
|
@ -51,7 +51,7 @@ static GtkItemFactoryEntry toolbox_entries[] =
|
|||
{ "/File/Dialogs/Input Devices...", NULL, dialogs_input_devices_cmd_callback, 0 },
|
||||
{ "/File/Dialogs/Device Status...", NULL, dialogs_device_status_cmd_callback, 0 },
|
||||
{ "/File/---", NULL, NULL, 0, "<Separator>" },
|
||||
{ "/File/Document Index...", NULL, open_idea_window, 0 },
|
||||
{ "/File/Document Index...", NULL, raise_idea_callback, 0 },
|
||||
{ "/File/Quit", "<control>Q", file_quit_cmd_callback, 0 },
|
||||
};
|
||||
static guint n_toolbox_entries = sizeof (toolbox_entries) / sizeof (toolbox_entries[0]);
|
||||
|
|
|
@ -51,7 +51,7 @@ static GtkItemFactoryEntry toolbox_entries[] =
|
|||
{ "/File/Dialogs/Input Devices...", NULL, dialogs_input_devices_cmd_callback, 0 },
|
||||
{ "/File/Dialogs/Device Status...", NULL, dialogs_device_status_cmd_callback, 0 },
|
||||
{ "/File/---", NULL, NULL, 0, "<Separator>" },
|
||||
{ "/File/Document Index...", NULL, open_idea_window, 0 },
|
||||
{ "/File/Document Index...", NULL, raise_idea_callback, 0 },
|
||||
{ "/File/Quit", "<control>Q", file_quit_cmd_callback, 0 },
|
||||
};
|
||||
static guint n_toolbox_entries = sizeof (toolbox_entries) / sizeof (toolbox_entries[0]);
|
||||
|
|
Loading…
Reference in New Issue