~ubuntu-branches/ubuntu/jaunty/gimp/jaunty-security

« back to all changes in this revision

Viewing changes to plug-ins/rcm/rcm_dialog.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2007-05-02 16:33:03 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20070502163303-bvzhjzbpw8qglc4y
Tags: 2.3.16-1ubuntu1
* Resynchronized with Debian, remaining Ubuntu changes:
  - debian/rules: i18n magic.
* debian/control.in:
  - Maintainer: Ubuntu Core Developers <ubuntu-devel@lists.ubuntu.com>
* debian/patches/02_help-message.patch,
  debian/patches/03_gimp.desktop.in.in.patch,
  debian/patches/10_dont_show_wizard.patch: updated.
* debian/patches/04_composite-signedness.patch,
  debian/patches/05_add-letter-spacing.patch: dropped, used upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
 
39
39
#include "config.h"
40
40
 
41
 
#include <stdio.h>
42
 
#include <stdlib.h>
43
 
 
44
41
#include <libgimp/gimp.h>
45
42
#include <libgimp/gimpui.h>
46
43
 
230
227
  /* set signals */
231
228
  gtk_widget_set_events (st->preview, RANGE_ADJUST_MASK);
232
229
 
233
 
  g_signal_connect_after (st->preview, "expose_event",
 
230
  g_signal_connect_after (st->preview, "expose-event",
234
231
                          G_CALLBACK (rcm_expose_event),
235
232
                          st);
236
233
 
237
 
  g_signal_connect (st->preview, "button_press_event",
 
234
  g_signal_connect (st->preview, "button-press-event",
238
235
                    G_CALLBACK (rcm_button_press_event),
239
236
                    st);
240
237
 
241
 
  g_signal_connect (st->preview, "button_release_event",
 
238
  g_signal_connect (st->preview, "button-release-event",
242
239
                    G_CALLBACK (rcm_release_event),
243
240
                    st);
244
241
 
245
 
  g_signal_connect (st->preview, "motion_notify_event",
 
242
  g_signal_connect (st->preview, "motion-notify-event",
246
243
                    G_CALLBACK (rcm_motion_notify_event),
247
244
                    st);
248
245
 
299
296
  gtk_widget_show (legend_table);
300
297
 
301
298
  /* spinbutton 1 */
302
 
  label = gtk_label_new (_("From"));
 
299
  label = gtk_label_new (_("From:"));
303
300
  gtk_widget_show (label);
304
301
  gtk_table_attach (GTK_TABLE (legend_table), label, 0, 1, 0, 1,
305
302
                    0, GTK_EXPAND, 5, 5);
325
322
                    0, GTK_EXPAND, 4, 4);
326
323
 
327
324
  /* spinbutton 2 */
328
 
  label = gtk_label_new (_("To"));
 
325
  label = gtk_label_new (_("To:"));
329
326
  gtk_widget_show (label);
330
327
  gtk_table_attach (GTK_TABLE (legend_table), label, 3,4, 0,1,
331
328
                    0, GTK_EXPAND, 4, 4);
377
374
{
378
375
  GtkWidget *vbox;
379
376
 
380
 
  Current.From = rcm_create_one_circle (SUM, _("From"));
381
 
  Current.To   = rcm_create_one_circle (SUM, _("To"));
 
377
  Current.From = rcm_create_one_circle (SUM, _("From:"));
 
378
  Current.To   = rcm_create_one_circle (SUM, _("To:"));
382
379
 
383
380
  vbox = gtk_vbox_new (FALSE, 12);
384
381
  gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
443
440
 
444
441
  gtk_widget_add_events (preview, RANGE_ADJUST_MASK);
445
442
 
446
 
  g_signal_connect_after (preview, "expose_event",
 
443
  g_signal_connect_after (preview, "expose-event",
447
444
                          G_CALLBACK (rcm_gray_expose_event),
448
445
                          st);
449
446
 
450
 
  g_signal_connect (preview, "button_press_event",
 
447
  g_signal_connect (preview, "button-press-event",
451
448
                    G_CALLBACK (rcm_gray_button_press_event),
452
449
                    st);
453
450
 
454
 
  g_signal_connect (preview, "button_release_event",
 
451
  g_signal_connect (preview, "button-release-event",
455
452
                    G_CALLBACK (rcm_gray_release_event),
456
453
                    st);
457
454
 
458
 
  g_signal_connect (preview, "motion_notify_event",
 
455
  g_signal_connect (preview, "motion-notify-event",
459
456
                    G_CALLBACK (rcm_gray_motion_notify_event),
460
457
                    st);
461
458
 
556
553
  gtk_container_add (GTK_CONTAINER (frame), hbox);
557
554
  gtk_widget_show (hbox);
558
555
 
559
 
  label = gtk_label_new (_("Saturation"));
 
556
  label = gtk_label_new (_("Saturation:"));
560
557
  gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
561
558
  gtk_widget_show (label);
562
559
 
565
562
                                              0.0, 1.0, 0.0001, 0.001, 0.0);
566
563
 
567
564
  entry = gtk_spin_button_new (adj, 0.01, 4);
 
565
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (entry), TRUE);
568
566
  gtk_box_pack_start (GTK_BOX (hbox), entry, FALSE, FALSE, 0);
569
567
  gtk_widget_show (entry);
570
568
 
640
638
gboolean
641
639
rcm_dialog (void)
642
640
{
643
 
  GtkWidget *dlg, *hbox, *notebook;
 
641
  GtkWidget *dialog;
 
642
  GtkWidget *hbox;
 
643
  GtkWidget *notebook;
644
644
  GtkWidget *previews;
645
645
  gboolean   run;
646
646
 
647
647
  Current.Bna = g_new (RcmBna, 1);
648
648
 
649
 
  /* init GTK and install colormap */
650
 
  gimp_ui_init ("rcm", TRUE);
651
 
 
652
 
  /* init stock icons */
 
649
  gimp_ui_init (PLUG_IN_BINARY, TRUE);
653
650
  rcm_stock_init ();
654
651
 
655
 
  /* Create dialog */
656
 
  dlg = gimp_dialog_new (_("Colormap Rotation"), "rcm",
657
 
                         NULL, 0,
658
 
                         gimp_standard_help_func, "plug-in-rotate-colormap",
659
 
 
660
 
                         GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
661
 
                         GTK_STOCK_OK,     GTK_RESPONSE_OK,
662
 
 
663
 
                         NULL);
664
 
 
665
 
  Current.Bna->dlg = dlg;
 
652
  dialog = gimp_dialog_new (_("Rotate Colors"), PLUG_IN_BINARY,
 
653
                            NULL, 0,
 
654
                            gimp_standard_help_func, PLUG_IN_PROC,
 
655
 
 
656
                            GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
 
657
                            GTK_STOCK_OK,     GTK_RESPONSE_OK,
 
658
 
 
659
                            NULL);
 
660
 
 
661
  gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
 
662
                                           GTK_RESPONSE_OK,
 
663
                                           GTK_RESPONSE_CANCEL,
 
664
                                           -1);
 
665
 
 
666
  gimp_window_set_transient (GTK_WINDOW (dialog));
 
667
 
 
668
  Current.Bna->dlg = dialog;
666
669
 
667
670
  /* Create sub-dialogs */
668
671
  Current.reduced = rcm_reduce_image (Current.drawable, Current.mask,
673
676
  /* H-Box */
674
677
  hbox = gtk_hbox_new (FALSE, 12);
675
678
  gtk_container_set_border_width (GTK_CONTAINER (hbox), 12);
676
 
  gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox), hbox, TRUE, TRUE, 0);
 
679
  gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hbox,
 
680
                      TRUE, TRUE, 0);
677
681
  gtk_widget_show (hbox);
678
682
 
679
683
  gtk_box_pack_start (GTK_BOX (hbox), previews, TRUE, TRUE, 0);
693
697
  gtk_notebook_append_page (GTK_NOTEBOOK (notebook), rcm_create_units (),
694
698
                            gtk_label_new (_("Units")));
695
699
 
696
 
  gtk_widget_show (dlg);
 
700
  gtk_widget_show (dialog);
697
701
 
698
702
  rcm_render_circle (Current.From->preview, SUM, MARGIN);
699
703
  rcm_render_circle (Current.To->preview, SUM, MARGIN);
700
704
  rcm_render_circle (Current.Gray->preview, GRAY_SUM, GRAY_MARGIN);
701
705
 
702
 
  run = (gimp_dialog_run (GIMP_DIALOG (dlg)) == GTK_RESPONSE_OK);
 
706
  run = (gimp_dialog_run (GIMP_DIALOG (dialog)) == GTK_RESPONSE_OK);
703
707
 
704
 
  gtk_widget_destroy (dlg);
 
708
  gtk_widget_destroy (dialog);
705
709
 
706
710
  return run;
707
711
}