Beispiel #1
0
int try_enter(dt_view_t *self)
{
  /* verify that camera supports tethering and is available */
  if(dt_camctl_can_enter_tether_mode(darktable.camctl, NULL)) return 0;

  dt_control_log(_("no camera with tethering support available for use..."));
  return 1;
}
Beispiel #2
0
int try_enter(dt_view_t *self)
{
  /* verify that camera supports tethering and is available */
  if (dt_camctl_can_enter_tether_mode(darktable.camctl,NULL) )
  {
    dt_conf_set_int( "plugins/capture/mode", DT_CAPTURE_MODE_TETHERED);
    return 0;
  }

  dt_control_log(_("no camera with tethering support available for use..."));

  return 1;
}
Beispiel #3
0
static gboolean _gui_switch_view_key_accel_callback(GtkAccelGroup *accel_group,
                                                GObject *acceleratable,
                                                guint keyval,
                                                GdkModifierType modifier,
                                                gpointer p)
{
  int view=(long int)p;
  dt_ctl_gui_mode_t mode=DT_MODE_NONE;
  /* do some setup before switch view*/
  switch (view)
  {
#ifdef HAVE_GPHOTO2
    case DT_GUI_VIEW_SWITCH_TO_TETHERING:
      // switching to capture view using "plugins/capture/current_filmroll" as session...
      // and last used camera
      if (dt_camctl_can_enter_tether_mode(darktable.camctl,NULL) )
      {
        dt_conf_set_int( "plugins/capture/mode", DT_CAPTURE_MODE_TETHERED);
        mode = DT_CAPTURE;
      }
      break;
#endif

    case DT_GUI_VIEW_SWITCH_TO_DARKROOM:
      mode = DT_DEVELOP;
      break;

    case DT_GUI_VIEW_SWITCH_TO_LIBRARY:
      mode = DT_LIBRARY;
      break;

  }

  /* try switch to mode */
  dt_ctl_switch_mode_to (mode);
  return TRUE;
}