2
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
4
* This is a plug-in for GIMP.
6
* Colormap-Rotation plug-in. Exchanges two color ranges.
8
* Copyright (C) 1999 Sven Anders (anderss@fmi.uni-passau.de)
9
* Based on code from Pavel Grinfeld (pavel@ml.com)
12
* This program is free software; you can redistribute it and/or modify
13
* it under the terms of the GNU General Public License as published by
14
* the Free Software Foundation; either version 2 of the License, or
15
* (at your option) any later version.
17
* This program is distributed in the hope that it will be useful,
18
* but WITHOUT ANY WARRANTY; without even the implied warranty of
19
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
* GNU General Public License for more details.
22
* You should have received a copy of the GNU General Public License
23
* along with this program; if not, write to the Free Software
24
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27
/*---------------------------------------------------------------------------
30
* Version 2.0, 04 April 1999.
31
* Nearly complete rewrite, made plug-in stable.
32
* (Works with GIMP 1.1 and GTK+ 1.2)
34
* Version 1.0, 27 March 1997.
35
* Initial (unstable) release by Pavel Grinfeld
37
*---------------------------------------------------------------------------*/
41
#include <libgimp/gimp.h>
42
#include <libgimp/gimpui.h>
47
#include "rcm_callback.h"
48
#include "rcm_dialog.h"
49
#include "rcm_stock.h"
51
#include "images/rcm-stock-pixbufs.h"
53
#include "libgimp/stdplugins-intl.h"
58
#define INITIAL_ALPHA 0
59
#define INITIAL_BETA G_PI_2
60
#define INITIAL_GRAY_SAT 0.0
61
#define INITIAL_GRAY_RSAT 0.0
62
#define INITIAL_GRAY_HUE 0.0
64
#define RANGE_ADJUST_MASK GDK_EXPOSURE_MASK | \
65
GDK_ENTER_NOTIFY_MASK | \
66
GDK_BUTTON_PRESS_MASK | \
67
GDK_BUTTON_RELEASE_MASK | \
68
GDK_BUTTON1_MOTION_MASK | \
69
GDK_POINTER_MOTION_HINT_MASK
72
/* Previews: create one preview */
75
rcm_create_one_preview (GtkWidget **preview,
80
GtkWidget *align = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
83
frame = gtk_frame_new (NULL);
84
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
85
gtk_container_add (GTK_CONTAINER (align), frame);
86
gtk_widget_show (frame);
88
*preview = gimp_preview_area_new ();
90
gtk_widget_set_size_request (*preview, width, height);
91
gtk_container_add (GTK_CONTAINER (frame), *preview);
92
gtk_widget_show (*preview);
94
g_object_set_data (G_OBJECT (*preview), "mode", GINT_TO_POINTER (mode));
103
rcm_create_previews (void)
113
top_vbox = gtk_vbox_new (FALSE, 12);
115
vbox = gtk_vbox_new (FALSE, 6);
116
gtk_box_pack_start (GTK_BOX (top_vbox), vbox, TRUE, TRUE, 0);
117
gtk_widget_show (vbox);
119
label = gtk_label_new (_("Original"));
120
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
121
gtk_widget_show (label);
123
frame = rcm_create_one_preview (&Current.Bna->before, ORIGINAL,
124
Current.reduced->width,
125
Current.reduced->height);
126
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
127
gtk_widget_show (frame);
129
g_signal_connect_after (Current.Bna->before, "size-allocate",
130
G_CALLBACK (rcm_render_preview),
133
vbox = gtk_vbox_new (FALSE, 6);
134
gtk_box_pack_start (GTK_BOX (top_vbox), vbox, TRUE, TRUE, 0);
135
gtk_widget_show (vbox);
137
label = gtk_label_new (_("Rotated"));
138
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
139
gtk_widget_show (label);
141
frame = rcm_create_one_preview (&Current.Bna->after, CURRENT,
142
Current.reduced->width,
143
Current.reduced->height);
144
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
145
gtk_widget_show (frame);
147
g_signal_connect_after (Current.Bna->after, "size-allocate",
148
G_CALLBACK (rcm_render_preview),
151
vbox = gtk_vbox_new (FALSE, 6);
152
gtk_box_pack_start (GTK_BOX (top_vbox), vbox, FALSE, FALSE, 0);
153
gtk_widget_show (vbox);
155
button = gtk_check_button_new_with_label (_("Continuous update"));
156
gtk_box_pack_start(GTK_BOX (vbox), button, FALSE, FALSE, 0);
157
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), Current.RealTime);
158
gtk_widget_show (button);
160
g_signal_connect (button, "clicked",
161
G_CALLBACK (rcm_preview_as_you_drag),
162
&(Current.RealTime));
164
hbox = gtk_hbox_new (FALSE, 6);
165
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
166
gtk_widget_show (hbox);
168
label = gtk_label_new (_("Area:"));
169
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
170
gtk_widget_show (label);
172
combo = gimp_int_combo_box_new (_("Entire Layer"), ENTIRE_IMAGE,
173
_("Selection"), SELECTION,
174
_("Context"), SELECTION_IN_CONTEXT,
176
gimp_int_combo_box_set_active (GIMP_INT_COMBO_BOX (combo), Current.Slctn);
178
gtk_box_pack_start (GTK_BOX (hbox), combo, TRUE, TRUE, 0);
179
gtk_widget_show (combo);
181
g_signal_connect (combo, "changed",
182
G_CALLBACK (rcm_combo_callback),
185
gtk_widget_show (top_vbox);
191
/* Main: One circles with values and buttons */
194
rcm_create_one_circle (gint height,
195
gchar *label_content)
197
GtkWidget *frame, *button_table, *legend_table;
198
GtkWidget *label, *button, *entry;
202
st = g_new (RcmCircle, 1);
204
st->action_flag = VIRGIN;
205
st->angle = g_new (RcmAngle, 1);
206
st->angle->alpha = INITIAL_ALPHA;
207
st->angle->beta = INITIAL_BETA;
208
st->angle->cw_ccw = 1;
210
/** Main: Circle: create (main) frame **/
211
st->frame = gimp_frame_new (label_content);
212
gtk_widget_show (st->frame);
214
/** Main: Circle: create frame & preview **/
217
frame = gtk_frame_new (NULL);
218
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
219
gtk_widget_show (frame);
222
st->preview = gimp_preview_area_new ();
223
gtk_widget_set_size_request (st->preview, height, height);
224
gtk_container_add (GTK_CONTAINER (frame), st->preview);
225
gtk_widget_show (st->preview);
228
gtk_widget_set_events (st->preview, RANGE_ADJUST_MASK);
230
g_signal_connect_after (st->preview, "expose-event",
231
G_CALLBACK (rcm_expose_event),
234
g_signal_connect (st->preview, "button-press-event",
235
G_CALLBACK (rcm_button_press_event),
238
g_signal_connect (st->preview, "button-release-event",
239
G_CALLBACK (rcm_release_event),
242
g_signal_connect (st->preview, "motion-notify-event",
243
G_CALLBACK (rcm_motion_notify_event),
246
/** Main: Circle: create table for buttons **/
247
button_table = gtk_table_new (3, 1, FALSE);
248
gtk_widget_show (button_table);
250
/** Main: Circle: Buttons **/
252
button = gtk_button_new_from_stock (st->angle->cw_ccw > 0 ?
253
STOCK_COLORMAP_SWITCH_CLOCKWISE :
254
STOCK_COLORMAP_SWITCH_COUNTERCLOCKWISE);
255
g_signal_connect (button, "clicked",
256
G_CALLBACK (rcm_cw_ccw),
258
gtk_widget_show (button);
259
gtk_table_attach (GTK_TABLE (button_table), button,
261
GTK_EXPAND | GTK_FILL, GTK_FILL, 4, 2);
263
st->cw_ccw_pixmap = NULL;
264
st->cw_ccw_button = button;
265
st->cw_ccw_box = NULL;
266
st->cw_ccw_label = NULL;
268
button = gtk_button_new_from_stock (STOCK_COLORMAP_CHANGE_ORDER);
269
g_signal_connect (button, "clicked",
270
G_CALLBACK (rcm_a_to_b),
272
gtk_widget_show (button);
273
gtk_table_attach (GTK_TABLE (button_table), button,
275
GTK_EXPAND | GTK_FILL, GTK_FILL, 4, 2);
277
st->a_b_pixmap = NULL;
279
st->a_b_button = button;
281
button = gtk_button_new_from_stock (STOCK_COLORMAP_SELECT_ALL);
282
g_signal_connect (button, "clicked",
283
G_CALLBACK (rcm_360_degrees),
285
gtk_widget_show (button);
286
gtk_table_attach (GTK_TABLE (button_table), button,
288
GTK_EXPAND | GTK_FILL, GTK_FILL, 4, 2);
290
st->f360_pixmap = NULL;
292
st->f360_button = button;
294
/** Main: Circle: Legend **/
295
legend_table = gtk_table_new (1, 6, FALSE);
296
gtk_widget_show (legend_table);
299
label = gtk_label_new (_("From:"));
300
gtk_widget_show (label);
301
gtk_table_attach (GTK_TABLE (legend_table), label, 0, 1, 0, 1,
302
0, GTK_EXPAND, 5, 5);
304
st->angle->alpha = INITIAL_ALPHA;
305
adj = (GtkAdjustment *) gtk_adjustment_new(st->angle->alpha, 0.0, 2.0, 0.0001, 0.001, 0.0);
306
st->alpha_entry = entry = gtk_spin_button_new(adj, 0.01, 4);
307
gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(entry), TRUE);
308
gtk_table_attach(GTK_TABLE(legend_table), entry, 1,2, 0,1,
309
GTK_EXPAND|GTK_FILL, GTK_EXPAND, 2, 4);
310
gtk_widget_show(entry);
312
g_signal_connect (entry, "changed",
313
G_CALLBACK (rcm_set_alpha),
317
st->alpha_units_label = gtk_label_new (rcm_units_string (Current.Units));
318
gtk_widget_show (st->alpha_units_label);
320
gtk_table_attach (GTK_TABLE (legend_table),
321
st->alpha_units_label, 2, 3, 0, 1,
322
0, GTK_EXPAND, 4, 4);
325
label = gtk_label_new (_("To:"));
326
gtk_widget_show (label);
327
gtk_table_attach (GTK_TABLE (legend_table), label, 3,4, 0,1,
328
0, GTK_EXPAND, 4, 4);
330
st->angle->beta = INITIAL_BETA;
331
adj = (GtkAdjustment *) gtk_adjustment_new (st->angle->beta,
332
0.0, 2.0, 0.0001, 0.001, 0.0);
333
st->beta_entry = entry = gtk_spin_button_new (adj, 0.01, 4);
334
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (entry), TRUE);
335
gtk_table_attach (GTK_TABLE (legend_table), entry, 4,5, 0,1,
336
GTK_EXPAND|GTK_FILL, GTK_EXPAND, 2, 4);
337
gtk_widget_show (entry);
339
g_signal_connect (entry, "changed",
340
G_CALLBACK (rcm_set_beta),
344
st->beta_units_label = gtk_label_new (rcm_units_string (Current.Units));
345
gtk_widget_show (st->beta_units_label);
347
gtk_table_attach (GTK_TABLE (legend_table), st->beta_units_label, 5,6, 0,1,
348
0, GTK_EXPAND, 4, 4);
350
/* Main: Circle: create table for Preview / Buttons / Legend */
351
st->table= gtk_table_new (2, 2, FALSE);
352
gtk_widget_show (st->table);
354
gtk_table_attach (GTK_TABLE (st->table), frame, 0, 1, 0, 1,
355
0, GTK_EXPAND, 4, 0);
357
gtk_table_attach (GTK_TABLE (st->table), button_table, 1, 2, 0, 1,
358
0, GTK_EXPAND, 2, 0);
360
gtk_table_attach (GTK_TABLE (st->table), legend_table, 0, 2, 1, 2,
361
GTK_EXPAND | GTK_FILL, GTK_EXPAND, 0, 2);
363
/* add table to (main) frame */
364
gtk_container_add (GTK_CONTAINER (st->frame), st->table);
373
rcm_create_main (void)
377
Current.From = rcm_create_one_circle (SUM, _("From:"));
378
Current.To = rcm_create_one_circle (SUM, _("To:"));
380
vbox = gtk_vbox_new (FALSE, 12);
381
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
382
gtk_widget_show (vbox);
384
gtk_box_pack_start (GTK_BOX (vbox), Current.From->frame,
386
gtk_box_pack_start (GTK_BOX (vbox), Current.To->frame,
396
rcm_create_gray (void)
398
GtkWidget *top_vbox, *vbox;
399
GtkWidget *frame, *preview;
402
GtkWidget *radio_box;
406
GSList *group = NULL;
410
Current.Gray = st = g_new (RcmGray, 1);
413
st->action_flag = VIRGIN;
415
top_vbox = gtk_vbox_new (FALSE, 12);
416
gtk_container_set_border_width (GTK_CONTAINER (top_vbox), 12);
417
gtk_widget_show (top_vbox);
419
frame = gimp_frame_new (_("Gray"));
420
gtk_box_pack_start (GTK_BOX (top_vbox), frame, FALSE, FALSE, 0);
421
gtk_widget_show (frame);
423
vbox = gtk_vbox_new (FALSE, 6);
424
gtk_container_add (GTK_CONTAINER (frame), vbox);
425
gtk_widget_show (vbox);
427
hbox = gtk_hbox_new (FALSE, 0);
428
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
429
gtk_widget_show (hbox);
431
frame = gtk_frame_new (NULL);
432
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
433
gtk_box_pack_start (GTK_BOX (hbox), frame, FALSE, FALSE, 0);
434
gtk_widget_show (frame);
436
st->preview = preview = gimp_preview_area_new ();
437
gtk_widget_set_size_request (preview, GRAY_SUM, GRAY_SUM);
438
gtk_container_add (GTK_CONTAINER (frame), preview);
439
gtk_widget_show (preview);
441
gtk_widget_add_events (preview, RANGE_ADJUST_MASK);
443
g_signal_connect_after (preview, "expose-event",
444
G_CALLBACK (rcm_gray_expose_event),
447
g_signal_connect (preview, "button-press-event",
448
G_CALLBACK (rcm_gray_button_press_event),
451
g_signal_connect (preview, "button-release-event",
452
G_CALLBACK (rcm_gray_release_event),
455
g_signal_connect (preview, "motion-notify-event",
456
G_CALLBACK (rcm_gray_motion_notify_event),
459
/* Gray: Circle: Legend */
460
table = gtk_table_new (2, 3, FALSE);
461
gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
462
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
463
gtk_table_set_row_spacings (GTK_TABLE (table), 6);
464
gtk_widget_show (table);
466
/* Gray: Circle: Spinbutton 1 */
467
label = gtk_label_new(_("Hue:"));
468
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
469
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1,
470
GTK_FILL, GTK_FILL, 0, 0);
471
gtk_widget_show (label);
473
st->hue = INITIAL_GRAY_HUE;
474
adj = (GtkAdjustment *) gtk_adjustment_new (st->hue,
475
0.0, 2.0, 0.0001, 0.001, 0.0);
476
st->hue_entry = entry = gtk_spin_button_new (adj, 0.01, 4);
477
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON(entry), TRUE);
478
gtk_table_attach (GTK_TABLE (table), entry, 1, 2, 0, 1,
479
GTK_FILL, GTK_FILL, 0, 0);
480
gtk_widget_show (entry);
482
g_signal_connect (entry, "changed",
483
G_CALLBACK (rcm_set_hue),
486
/* Gray: Circle: units label */
487
st->hue_units_label = gtk_label_new (rcm_units_string (Current.Units));
488
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
489
gtk_table_attach (GTK_TABLE (table), st->hue_units_label, 2, 3, 0, 1,
490
GTK_FILL, GTK_FILL, 0, 0);
491
gtk_widget_show (st->hue_units_label);
493
/* Gray: Circle: Spinbutton 2 */
494
label = gtk_label_new (_("Saturation:"));
495
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5);
496
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2,
497
GTK_FILL, GTK_FILL, 0, 0);
498
gtk_widget_show (label);
500
st->satur = INITIAL_GRAY_SAT;
501
adj = (GtkAdjustment *) gtk_adjustment_new (st->satur,
502
0.0, 1.0, 0.0001, 0.001, 0.0);
503
st->satur_entry = entry = gtk_spin_button_new (adj, 0.01, 4);
504
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (entry), TRUE);
505
gtk_table_attach (GTK_TABLE (table), entry, 1, 2, 1, 2,
506
GTK_FILL, GTK_FILL, 0, 2);
507
gtk_widget_show (entry);
509
g_signal_connect (entry, "changed",
510
G_CALLBACK (rcm_set_satur),
513
/** Gray: Operation-Mode **/
514
frame = gimp_frame_new (_("Gray Mode"));
515
gtk_box_pack_start (GTK_BOX (top_vbox), frame, FALSE, FALSE, 0);
516
gtk_widget_show (frame);
518
radio_box = gtk_vbox_new (FALSE, 6);
519
gtk_container_add (GTK_CONTAINER (frame), radio_box);
520
gtk_widget_show (radio_box);
522
/* Gray: Operation-Mode: two radio buttons */
523
button = gtk_radio_button_new_with_label(group, _("Treat as this"));
524
group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (button));
525
gtk_box_pack_start (GTK_BOX (radio_box), button, FALSE, FALSE, 0);
526
gtk_widget_show (button);
528
if (Current.Gray_to_from == GRAY_FROM)
529
gtk_button_clicked (GTK_BUTTON (button));
531
g_signal_connect (button, "clicked",
532
G_CALLBACK (rcm_switch_to_gray_from),
533
&(Current.Gray_to_from));
535
button = gtk_radio_button_new_with_label (group, _("Change to this"));
536
group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (button));
537
gtk_box_pack_start (GTK_BOX (radio_box), button, FALSE, FALSE, 0);
538
gtk_widget_show (button);
540
if (Current.Gray_to_from == GRAY_TO)
541
gtk_button_clicked (GTK_BUTTON (button));
543
g_signal_connect (button, "clicked",
544
G_CALLBACK (rcm_switch_to_gray_to),
545
&(Current.Gray_to_from));
547
/** Gray: What is gray? **/
548
frame = gimp_frame_new (_("Gray Threshold"));
549
gtk_box_pack_start (GTK_BOX (top_vbox), frame, FALSE, FALSE, 0);
550
gtk_widget_show (frame);
552
hbox = gtk_hbox_new (FALSE, 6);
553
gtk_container_add (GTK_CONTAINER (frame), hbox);
554
gtk_widget_show (hbox);
556
label = gtk_label_new (_("Saturation:"));
557
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
558
gtk_widget_show (label);
560
st->gray_sat = INITIAL_GRAY_RSAT;
561
adj = (GtkAdjustment *) gtk_adjustment_new (st->gray_sat,
562
0.0, 1.0, 0.0001, 0.001, 0.0);
564
entry = gtk_spin_button_new (adj, 0.01, 4);
565
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (entry), TRUE);
566
gtk_box_pack_start (GTK_BOX (hbox), entry, FALSE, FALSE, 0);
567
gtk_widget_show (entry);
569
g_signal_connect (entry, "changed",
570
G_CALLBACK (rcm_set_gray_sat),
580
rcm_create_units (void)
585
GSList *group = NULL;
587
/** Misc: Used unit selection **/
588
frame = gimp_frame_new (_("Units"));
589
gtk_container_set_border_width (GTK_CONTAINER (frame), 12);
590
gtk_widget_show (frame);
592
vbox = gtk_vbox_new (FALSE, 6);
593
gtk_container_add (GTK_CONTAINER (frame), vbox);
594
gtk_widget_show (vbox);
596
/* Misc: Used unit selection: 3 radio buttons */
597
button = gtk_radio_button_new_with_label (group, _("Radians"));
598
group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (button));
599
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
600
gtk_widget_show (button);
602
if (Current.Units == RADIANS)
603
gtk_button_clicked (GTK_BUTTON (button));
605
g_signal_connect (button, "clicked",
606
G_CALLBACK (rcm_switch_to_radians),
609
button = gtk_radio_button_new_with_label (group, _("Radians/Pi"));
610
group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (button));
611
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
612
gtk_widget_show (button);
614
if (Current.Units == RADIANS_OVER_PI)
615
gtk_button_clicked (GTK_BUTTON (button));
617
g_signal_connect (button, "clicked",
618
G_CALLBACK (rcm_switch_to_radians_over_PI),
621
button = gtk_radio_button_new_with_label (group, _("Degrees"));
622
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
623
gtk_widget_show (button);
625
if (Current.Units == DEGREES)
626
gtk_button_clicked (GTK_BUTTON (button));
628
g_signal_connect (button, "clicked",
629
G_CALLBACK (rcm_switch_to_degrees),
636
/* create and call main dialog */
647
Current.Bna = g_new (RcmBna, 1);
649
gimp_ui_init (PLUG_IN_BINARY, TRUE);
652
dialog = gimp_dialog_new (_("Rotate Colors"), PLUG_IN_BINARY,
654
gimp_standard_help_func, PLUG_IN_PROC,
656
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
657
GTK_STOCK_OK, GTK_RESPONSE_OK,
661
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
666
gimp_window_set_transient (GTK_WINDOW (dialog));
668
Current.Bna->dlg = dialog;
670
/* Create sub-dialogs */
671
Current.reduced = rcm_reduce_image (Current.drawable, Current.mask,
672
MAX_PREVIEW_SIZE, Current.Slctn);
674
Current.Bna->bna_frame = previews = rcm_create_previews ();
677
hbox = gtk_hbox_new (FALSE, 12);
678
gtk_container_set_border_width (GTK_CONTAINER (hbox), 12);
679
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hbox,
681
gtk_widget_show (hbox);
683
gtk_box_pack_start (GTK_BOX (hbox), previews, TRUE, TRUE, 0);
686
notebook = gtk_notebook_new ();
687
gtk_notebook_set_tab_pos (GTK_NOTEBOOK (notebook), GTK_POS_TOP);
688
gtk_box_pack_start (GTK_BOX (hbox), notebook, TRUE, TRUE, 0);
689
gtk_widget_show (notebook);
691
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), rcm_create_main (),
692
gtk_label_new (_("Main Options")));
694
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), rcm_create_gray (),
695
gtk_label_new (_("Gray Options")));
697
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), rcm_create_units (),
698
gtk_label_new (_("Units")));
700
gtk_widget_show (dialog);
702
rcm_render_circle (Current.From->preview, SUM, MARGIN);
703
rcm_render_circle (Current.To->preview, SUM, MARGIN);
704
rcm_render_circle (Current.Gray->preview, GRAY_SUM, GRAY_MARGIN);
706
run = (gimp_dialog_run (GIMP_DIALOG (dialog)) == GTK_RESPONSE_OK);
708
gtk_widget_destroy (dialog);