~ubuntu-branches/ubuntu/maverick/zapping/maverick

« back to all changes in this revision

Viewing changes to src/zmisc.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel T Chen
  • Date: 2005-11-08 11:07:34 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051108110734-ygvf6uljvgcjmca7
Tags: 0.9.6-1ubuntu1
* Resynchronise with Debian (Closes: #4022):
  - Fix desktop file to not use absolute path.

Show diffs side-by-side

added added

removed removed

Lines of Context:
475
475
 
476
476
    case DISPLAY_MODE_WINDOW | CAPTURE_MODE_TELETEXT:
477
477
      stop_teletext ();
478
 
      tv_set_capture_mode (zapping->info, CAPTURE_MODE_NONE); /* ugh */
 
478
      tveng_close_device (info);
479
479
      break;
480
480
 
481
481
    default:
506
506
{
507
507
  int return_value = 0;
508
508
  gint x, y, w, h;
509
 
  gchar * old_input = NULL;
510
 
  gchar * old_standard = NULL;
511
509
  display_mode old_dmode;
512
510
  capture_mode old_cmode;
513
511
  extern int disable_overlay;
539
537
        return 0; /* success */
540
538
      }
541
539
 
542
 
  /* save this input name for later retrieval */
543
 
  if (tv_cur_video_input (info))
544
 
    old_input = g_strdup (tv_cur_video_input (info)->label);
545
 
  if (tv_cur_video_standard (info))
546
 
    old_standard = g_strdup(tv_cur_video_standard (info)->label);
 
540
  /* On capture <-> overlay change, carry video and audio input,
 
541
     video standard over to the new device. FIXME also control values. */
 
542
  zconf_set_sources (info);
547
543
 
548
544
  {
549
545
    GdkWindow *window;
639
635
 
640
636
              goto failure;
641
637
            }
 
638
 
 
639
          zconf_get_sources (info, /* mute */ FALSE);
642
640
        }
643
641
 
 
642
      zapping->display_window = GTK_WIDGET (zapping->video);
644
643
      return_value = capture_start (info, GTK_WIDGET (zapping->video)) ?
645
644
        0 : -1;
646
645
      x11_screensaver_set (X11_SCREENSAVER_DISPLAY_ACTIVE
656
655
 
657
656
      if (start_overlay ())
658
657
        {
 
658
          zconf_get_sources (info, /* mute */ FALSE);
 
659
 
659
660
          x11_screensaver_set (X11_SCREENSAVER_DISPLAY_ACTIVE);
660
661
          z_video_blank_cursor (zapping->video, timeout);
661
662
        }
680
681
          goto failure;
681
682
        }
682
683
 
 
684
      zconf_get_sources (info, /* mute */ FALSE);
 
685
 
683
686
      tv_set_capture_mode (zapping->info, CAPTURE_MODE_TELETEXT); /* ugh */
684
687
 
685
688
      break;
697
700
 
698
701
      if (start_fullscreen (new_dmode, new_cmode))
699
702
        {
 
703
          zconf_get_sources (info, /* mute */ FALSE);
 
704
 
700
705
          if (CAPTURE_MODE_TELETEXT != new_cmode)
701
706
            {
702
707
              if (CAPTURE_MODE_OVERLAY == new_cmode)
723
728
      break;
724
729
    }
725
730
 
726
 
  /* Restore old input if we found it earlier */
727
 
  /*
728
 
  if (old_input != NULL)
729
 
    if (-1 == tveng_set_input_by_name(old_input, info))
730
 
      g_warning("couldn't restore old input");
731
 
  if (old_standard != NULL)
732
 
    if (-1 == tveng_set_standard_by_name(old_standard, info))
733
 
      g_warning("couldn't restore old standard");
734
 
  */
735
 
  if (old_input != NULL)
736
 
    tveng_set_input_by_name(old_input, info);
737
 
 
738
 
  if (old_standard != NULL)
739
 
    tveng_set_standard_by_name(old_standard, info);
740
 
 
741
 
  g_free (old_input);
742
 
  g_free (old_standard);
743
 
 
744
731
  if (old_cmode != new_cmode
745
732
      || old_dmode != new_dmode)
746
733
    {
776
763
  return return_value;
777
764
 
778
765
 failure:
779
 
  g_free (old_input);
780
 
  g_free (old_standard);
781
 
 
782
766
  x11_screensaver_set (X11_SCREENSAVER_ON);
783
767
 
784
768
  z_video_blank_cursor (zapping->video, 0);