Commit 010dc35e authored by Matt Wilson's avatar Matt Wilson

Wee!!! No more curves crash! (Hopefully ;) Watch for this kind of stuff

in other dialog code.  Widget event handlers get called before the data that
they reference gets initialized.  Move all that init code inside the dialog
creation.

-Matt
parent 333356ec
Mon Apr 27 20:57:26 1998 EDT Matthew Wilson <msw@gimp.org>
* app/curves: Initialize data that is referenced in event handlers
in the curves_new_dialog function. Be on the look out for this
kind of stuff in other dialogs.
Tue Apr 28 00:16:31 1998 Tim Janik <timj@gtk.org>
* app/channels_dialog.c (channels_dialog_create): adjust the scrolled
......
......@@ -437,12 +437,16 @@ curves_new_dialog ()
GtkWidget *channel_hbox;
GtkWidget *menu;
GtkWidget *table;
int i;
int i, j;
cd = g_malloc (sizeof (CurvesDialog));
cd->preview = TRUE;
cd->curve_type = SMOOTH;
cd->pixmap = NULL;
cd->channel = HISTOGRAM_VALUE;
for (i = 0; i < 5; i++)
for (j = 0; j < 256; j++)
cd->curve[i][j] = j;
for (i = 0; i < 5; i++)
channel_items [i].user_data = (gpointer) cd;
......
......@@ -437,12 +437,16 @@ curves_new_dialog ()
GtkWidget *channel_hbox;
GtkWidget *menu;
GtkWidget *table;
int i;
int i, j;
cd = g_malloc (sizeof (CurvesDialog));
cd->preview = TRUE;
cd->curve_type = SMOOTH;
cd->pixmap = NULL;
cd->channel = HISTOGRAM_VALUE;
for (i = 0; i < 5; i++)
for (j = 0; j < 256; j++)
cd->curve[i][j] = j;
for (i = 0; i < 5; i++)
channel_items [i].user_data = (gpointer) cd;
......
......@@ -437,12 +437,16 @@ curves_new_dialog ()
GtkWidget *channel_hbox;
GtkWidget *menu;
GtkWidget *table;
int i;
int i, j;
cd = g_malloc (sizeof (CurvesDialog));
cd->preview = TRUE;
cd->curve_type = SMOOTH;
cd->pixmap = NULL;
cd->channel = HISTOGRAM_VALUE;
for (i = 0; i < 5; i++)
for (j = 0; j < 256; j++)
cd->curve[i][j] = j;
for (i = 0; i < 5; i++)
channel_items [i].user_data = (gpointer) cd;
......
......@@ -437,12 +437,16 @@ curves_new_dialog ()
GtkWidget *channel_hbox;
GtkWidget *menu;
GtkWidget *table;
int i;
int i, j;
cd = g_malloc (sizeof (CurvesDialog));
cd->preview = TRUE;
cd->curve_type = SMOOTH;
cd->pixmap = NULL;
cd->channel = HISTOGRAM_VALUE;
for (i = 0; i < 5; i++)
for (j = 0; j < 256; j++)
cd->curve[i][j] = j;
for (i = 0; i < 5; i++)
channel_items [i].user_data = (gpointer) cd;
......
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