diff --git a/app/dialogs/image-new-dialog.c b/app/dialogs/image-new-dialog.c index a47b8b7e7b..9066856ef6 100644 --- a/app/dialogs/image-new-dialog.c +++ b/app/dialogs/image-new-dialog.c @@ -98,6 +98,7 @@ file_new_ok_callback (GtkWidget *widget, switch (vals->fill_type) { case BACKGROUND_FILL: + case FOREGROUND_FILL: case WHITE_FILL: type = (vals->type == RGB) ? RGB_GIMAGE : GRAY_GIMAGE; break; @@ -741,6 +742,19 @@ file_new_cmd_callback (GtkWidget *widget, gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (button), TRUE); gtk_widget_show (button); + button = gtk_radio_button_new_with_label (group, "Foreground"); + group = gtk_radio_button_group (GTK_RADIO_BUTTON (button)); + gtk_box_pack_start (GTK_BOX (radio_box), button, TRUE, TRUE, 0); + gtk_object_set_user_data (GTK_OBJECT (button), (gpointer) FOREGROUND_FILL); + gtk_signal_connect (GTK_OBJECT (button), "toggled", + (GtkSignalFunc) file_new_toggle_callback, + &vals->fill_type); + if (vals->fill_type == FOREGROUND_FILL) + gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (button), TRUE); + gtk_widget_show (button); + + + gtk_widget_show (vals->dlg); } diff --git a/app/file_new_dialog.c b/app/file_new_dialog.c index a47b8b7e7b..9066856ef6 100644 --- a/app/file_new_dialog.c +++ b/app/file_new_dialog.c @@ -98,6 +98,7 @@ file_new_ok_callback (GtkWidget *widget, switch (vals->fill_type) { case BACKGROUND_FILL: + case FOREGROUND_FILL: case WHITE_FILL: type = (vals->type == RGB) ? RGB_GIMAGE : GRAY_GIMAGE; break; @@ -741,6 +742,19 @@ file_new_cmd_callback (GtkWidget *widget, gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (button), TRUE); gtk_widget_show (button); + button = gtk_radio_button_new_with_label (group, "Foreground"); + group = gtk_radio_button_group (GTK_RADIO_BUTTON (button)); + gtk_box_pack_start (GTK_BOX (radio_box), button, TRUE, TRUE, 0); + gtk_object_set_user_data (GTK_OBJECT (button), (gpointer) FOREGROUND_FILL); + gtk_signal_connect (GTK_OBJECT (button), "toggled", + (GtkSignalFunc) file_new_toggle_callback, + &vals->fill_type); + if (vals->fill_type == FOREGROUND_FILL) + gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (button), TRUE); + gtk_widget_show (button); + + + gtk_widget_show (vals->dlg); } diff --git a/app/gui/file-new-dialog.c b/app/gui/file-new-dialog.c index a47b8b7e7b..9066856ef6 100644 --- a/app/gui/file-new-dialog.c +++ b/app/gui/file-new-dialog.c @@ -98,6 +98,7 @@ file_new_ok_callback (GtkWidget *widget, switch (vals->fill_type) { case BACKGROUND_FILL: + case FOREGROUND_FILL: case WHITE_FILL: type = (vals->type == RGB) ? RGB_GIMAGE : GRAY_GIMAGE; break; @@ -741,6 +742,19 @@ file_new_cmd_callback (GtkWidget *widget, gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (button), TRUE); gtk_widget_show (button); + button = gtk_radio_button_new_with_label (group, "Foreground"); + group = gtk_radio_button_group (GTK_RADIO_BUTTON (button)); + gtk_box_pack_start (GTK_BOX (radio_box), button, TRUE, TRUE, 0); + gtk_object_set_user_data (GTK_OBJECT (button), (gpointer) FOREGROUND_FILL); + gtk_signal_connect (GTK_OBJECT (button), "toggled", + (GtkSignalFunc) file_new_toggle_callback, + &vals->fill_type); + if (vals->fill_type == FOREGROUND_FILL) + gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (button), TRUE); + gtk_widget_show (button); + + + gtk_widget_show (vals->dlg); }