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

« back to all changes in this revision

Viewing changes to src/views/view.c

  • Committer: Package Import Robot
  • Author(s): David Bremner
  • Date: 2011-11-13 10:46:00 UTC
  • mfrom: (8.1.1 sid)
  • Revision ID: package-import@ubuntu.com-20111113104600-56c59agrs615gjim
New upstream version

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
#include "control/control.h"
26
26
#include "develop/develop.h"
27
27
#include "views/view.h"
 
28
#include "gui/accelerators.h"
28
29
#include "gui/gtk.h"
29
30
#include <stdlib.h>
30
31
#include <stdio.h>
142
143
  if(!g_module_symbol(view->module, "configure",       (gpointer)&(view->configure)))       view->configure = NULL;
143
144
  if(!g_module_symbol(view->module, "scrolled",        (gpointer)&(view->scrolled)))        view->scrolled = NULL;
144
145
  if(!g_module_symbol(view->module, "border_scrolled", (gpointer)&(view->border_scrolled))) view->border_scrolled = NULL;
 
146
  if(!g_module_symbol(view->module, "init_key_accels", (gpointer)&(view->init_key_accels))) view->init_key_accels = NULL;
 
147
  if(!g_module_symbol(view->module, "connect_key_accels", (gpointer)&(view->connect_key_accels))) view->connect_key_accels = NULL;
 
148
 
 
149
  view->accel_closures = NULL;
145
150
 
146
151
  if(view->init) view->init(view);
 
152
  if(view->init_key_accels) view->init_key_accels(view);
147
153
 
148
154
  /* success */
149
155
  retval = 0;
193
199
  if(!error)
194
200
  {
195
201
    if(vm->current_view >= 0 && v->leave) v->leave(v);
 
202
    if(vm->current_view >= 0)
 
203
    {
 
204
      dt_accel_disconnect_list(v->accel_closures);
 
205
      v->accel_closures = NULL;
 
206
    }
196
207
    vm->current_view = newv;
197
208
    if(newv >= 0 && nv->enter) nv->enter(nv);
 
209
    if(newv >= 0 && nv->connect_key_accels)
 
210
      nv->connect_key_accels(nv);
198
211
  }
199
212
  return error;
200
213
}
513
526
    cairo_set_source_rgb(cr, outlinecol, outlinecol, outlinecol);
514
527
    cairo_stroke(cr);
515
528
 
516
 
#if defined(__MACH__) || defined(__APPLE__) // dreggn
517
 
#else
518
529
    if(img)
519
530
    {
520
531
      const char *ext = img->filename + strlen(img->filename);
527
538
      cairo_move_to (cr, .01*width, .24*height);
528
539
      cairo_show_text (cr, ext);
529
540
    }
530
 
#endif
531
541
  }
532
542
 
533
543
#if 1
883
893
  vm->film_strip_data = data;
884
894
  vm->film_strip_on = 1;
885
895
  if(vm->film_strip.enter) vm->film_strip.enter(&vm->film_strip);
 
896
  if(vm->film_strip.connect_key_accels)
 
897
    vm->film_strip.connect_key_accels(&vm->film_strip);
886
898
  const int tb = darktable.control->tabborder;
887
899
  const int wd = darktable.control->width  - 2*tb;
888
900
  const int ht = darktable.control->height - 2*tb;
895
907
void dt_view_film_strip_close(dt_view_manager_t *vm)
896
908
{
897
909
  if(vm->film_strip.leave) vm->film_strip.leave(&vm->film_strip);
 
910
  dt_accel_disconnect_list(vm->film_strip.accel_closures);
 
911
  vm->film_strip.accel_closures = NULL;
898
912
 
899
913
  dt_conf_set_float("plugins/filmstrip/size", vm->film_strip_size);
900
914