~ubuntu-branches/ubuntu/saucy/darktable/saucy

« back to all changes in this revision

Viewing changes to src/iop/borders.c

  • Committer: Bazaar Package Importer
  • Author(s): David Bremner
  • Date: 2011-08-02 21:32:31 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20110802213231-r9v63trgyk1e822j
Tags: 0.9.1-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
76
76
  return IOP_TAG_DISTORT;
77
77
}
78
78
 
 
79
void init_key_accels()
 
80
{
 
81
  dtgtk_slider_init_accel(darktable.control->accels_darkroom,"<Darktable>/darkroom/plugins/borders/border size");
 
82
  dtgtk_button_init_accel(darktable.control->accels_darkroom,"<Darktable>/darkroom/plugins/borders/swap the aspect ratio");
 
83
  dtgtk_button_init_accel(darktable.control->accels_darkroom,"<Darktable>/darkroom/plugins/borders/pick gui color from image");
 
84
}
79
85
// 1st pass: how large would the output be, given this input roi?
80
86
// this is always called with the full buffer before processing.
81
87
void
355
361
  gtk_table_set_col_spacings(GTK_TABLE(self->widget), DT_GUI_IOP_MODULE_CONTROL_SPACING);
356
362
 
357
363
  g->size = DTGTK_SLIDER(dtgtk_slider_new_with_range(DARKTABLE_SLIDER_BAR, 0.0, 50.0, 1.0, p->size*100.0, 2));
 
364
  dtgtk_slider_set_accel(g->size,darktable.control->accels_darkroom,"<Darktable>/darkroom/plugins/borders/border size");
358
365
  dtgtk_slider_set_label(g->size, _("border size"));
359
366
  dtgtk_slider_set_unit(g->size, "%");
360
367
  g_signal_connect (G_OBJECT (g->size), "value-changed", G_CALLBACK (size_callback), self);
373
380
  gtk_combo_box_append_text(GTK_COMBO_BOX(g->aspect), _("square"));
374
381
  gtk_combo_box_append_text(GTK_COMBO_BOX(g->aspect), _("DIN"));
375
382
  gtk_combo_box_append_text(GTK_COMBO_BOX(g->aspect), _("16:9"));
376
 
  // dt_gui_key_accel_register(GDK_CONTROL_MASK, GDK_x, key_accel_callback, (void *)self);
377
383
 
378
384
  g_signal_connect (G_OBJECT (g->aspect), "changed", G_CALLBACK (aspect_changed), self);
379
385
  g_object_set(G_OBJECT(g->aspect), "tooltip-text", _("set the aspect ratio (w:h)\npress ctrl-x to swap sides"), (char *)NULL);
382
388
  GtkWidget *button = dtgtk_button_new(dtgtk_cairo_paint_aspectflip, CPF_STYLE_FLAT);
383
389
  // TODO: what about this?
384
390
  //g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (aspect_flip), self);
385
 
  g_object_set(G_OBJECT(button), "tooltip-text", _("swap the aspect ratio (ctrl-x)"), (char *)NULL);
 
391
  g_object_set(G_OBJECT(button), "tooltip-text", _("swap the aspect ratio"), (char *)NULL);
386
392
  gtk_table_attach(GTK_TABLE(self->widget), button, 2, 3, 1, 2, GTK_EXPAND, 0, 0, 0);
 
393
  dtgtk_button_set_accel(DTGTK_BUTTON(button),darktable.control->accels_darkroom,"<Darktable>/darkroom/plugins/borders/swap the aspect ratio");
387
394
 
388
395
  g->colorpick = DTGTK_BUTTON(dtgtk_button_new(dtgtk_cairo_paint_color, CPF_IGNORE_FG_STATE));
 
396
  dtgtk_button_set_accel(g->colorpick,darktable.control->accels_darkroom,"<Darktable>/darkroom/plugins/borders/pick gui color from image");
389
397
  gtk_widget_set_size_request(GTK_WIDGET(g->colorpick), 24, 24);
390
398
  label = dtgtk_reset_label_new (_("frame color"), self, &p->color, 3*sizeof(float));
391
399
  g_signal_connect (G_OBJECT (g->colorpick), "clicked", G_CALLBACK (colorpick_callback), self);