Commit fd75df2a authored by scott's avatar scott

Changes to deal with new GTK refcounting regime.

--sg
parent 6eee5bd4
Tue Feb 3 17:52:34 1998 Scott Goehring <scott@poverty.bloomington.in.us>
* app/interface.[ch] app/app_procs.[ch]: Changes to deal with new
GTK refcounting regime.
Mon Feb 2 19:19:16 1998 Scott Goehring <scott@poverty.bloomington.in.us>
* app/channels_dialog.c:
......
......@@ -56,7 +56,6 @@
#include <gtk/gtk.h>
/* Function prototype for affirmation dialog when exiting application */
static void app_exit_finish (void);
static void really_quit_dialog (void);
static Argument* quit_invoker (Argument *args);
static void make_initialization_status_window(void);
......@@ -284,9 +283,13 @@ app_init ()
}
static void
void
app_exit_finish ()
{
static gint once = 0;
if (once) return;
once = 1;
lc_dialog_free ();
gdisplays_delete ();
global_edit_free ();
......@@ -315,8 +318,8 @@ app_exit_finish ()
render_free ();
tools_options_dialog_free ();
}
gtk_exit (0);
/* gtk_exit (0); */
gtk_main_quit();
}
void
......@@ -326,7 +329,7 @@ app_exit (int kill_it)
if (kill_it == 0 && gdisplays_dirty () && no_interface == FALSE)
really_quit_dialog ();
else
app_exit_finish ();
toolbox_free ();
}
/********************************************************
......@@ -338,7 +341,7 @@ really_quit_callback (GtkButton *button,
GtkWidget *dialog)
{
gtk_widget_destroy (dialog);
app_exit_finish ();
toolbox_free ();
}
static void
......
......@@ -22,6 +22,7 @@
void gimp_init (int, char **);
void app_init (void);
void app_exit (int);
void app_exit_finish (void);
void app_init_update_status(char *label1val, char *label2val, float pct_progress);
#endif /* APP_PROCS_H */
......@@ -226,7 +226,7 @@ tools_button_press (GtkWidget *w,
static gint
toolbox_delete (GtkWidget *w, GdkEvent *e, gpointer data)
{
{
app_exit (FALSE);
return FALSE;
......@@ -234,8 +234,8 @@ toolbox_delete (GtkWidget *w, GdkEvent *e, gpointer data)
static void
toolbox_destroy ()
{
app_exit (TRUE);
{
app_exit_finish ();
}
static void
......@@ -550,6 +550,21 @@ create_toolbox ()
toolbox_shell = window;
}
void
toolbox_free ()
{
int i;
gtk_widget_destroy (toolbox_shell);
for (i = 21; i < NUM_TOOLS; i++)
{
gtk_object_sink (GTK_OBJECT (tool_widgets[i]));
gtk_widget_destroy (GTK_WIDGET (tool_widgets[i]));
}
gtk_object_destroy (GTK_OBJECT (tool_tips));
gtk_object_unref (GTK_OBJECT (tool_tips));
}
void
toolbox_raise_callback (GtkWidget *widget,
gpointer client_data)
......
......@@ -29,6 +29,7 @@ extern GtkTooltips *tool_tips;
/* function declarations */
GtkWidget * create_pixmap_widget (GdkWindow *, char **, int, int);
void create_toolbox (void);
void toolbox_free (void);
void toolbox_raise_callback (GtkWidget *, gpointer);
void create_display_shell (int, int, int, char *, int);
void position_dialog (GtkWidget *, gpointer, gpointer);
......
......@@ -226,7 +226,7 @@ tools_button_press (GtkWidget *w,
static gint
toolbox_delete (GtkWidget *w, GdkEvent *e, gpointer data)
{
{
app_exit (FALSE);
return FALSE;
......@@ -234,8 +234,8 @@ toolbox_delete (GtkWidget *w, GdkEvent *e, gpointer data)
static void
toolbox_destroy ()
{
app_exit (TRUE);
{
app_exit_finish ();
}
static void
......@@ -550,6 +550,21 @@ create_toolbox ()
toolbox_shell = window;
}
void
toolbox_free ()
{
int i;
gtk_widget_destroy (toolbox_shell);
for (i = 21; i < NUM_TOOLS; i++)
{
gtk_object_sink (GTK_OBJECT (tool_widgets[i]));
gtk_widget_destroy (GTK_WIDGET (tool_widgets[i]));
}
gtk_object_destroy (GTK_OBJECT (tool_tips));
gtk_object_unref (GTK_OBJECT (tool_tips));
}
void
toolbox_raise_callback (GtkWidget *widget,
gpointer client_data)
......
......@@ -29,6 +29,7 @@ extern GtkTooltips *tool_tips;
/* function declarations */
GtkWidget * create_pixmap_widget (GdkWindow *, char **, int, int);
void create_toolbox (void);
void toolbox_free (void);
void toolbox_raise_callback (GtkWidget *, gpointer);
void create_display_shell (int, int, int, char *, int);
void position_dialog (GtkWidget *, gpointer, gpointer);
......
......@@ -226,7 +226,7 @@ tools_button_press (GtkWidget *w,
static gint
toolbox_delete (GtkWidget *w, GdkEvent *e, gpointer data)
{
{
app_exit (FALSE);
return FALSE;
......@@ -234,8 +234,8 @@ toolbox_delete (GtkWidget *w, GdkEvent *e, gpointer data)
static void
toolbox_destroy ()
{
app_exit (TRUE);
{
app_exit_finish ();
}
static void
......@@ -550,6 +550,21 @@ create_toolbox ()
toolbox_shell = window;
}
void
toolbox_free ()
{
int i;
gtk_widget_destroy (toolbox_shell);
for (i = 21; i < NUM_TOOLS; i++)
{
gtk_object_sink (GTK_OBJECT (tool_widgets[i]));
gtk_widget_destroy (GTK_WIDGET (tool_widgets[i]));
}
gtk_object_destroy (GTK_OBJECT (tool_tips));
gtk_object_unref (GTK_OBJECT (tool_tips));
}
void
toolbox_raise_callback (GtkWidget *widget,
gpointer client_data)
......
......@@ -29,6 +29,7 @@ extern GtkTooltips *tool_tips;
/* function declarations */
GtkWidget * create_pixmap_widget (GdkWindow *, char **, int, int);
void create_toolbox (void);
void toolbox_free (void);
void toolbox_raise_callback (GtkWidget *, gpointer);
void create_display_shell (int, int, int, char *, int);
void position_dialog (GtkWidget *, gpointer, gpointer);
......
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