cheese r900 - in trunk: . data src
- From: dgsiegel svn gnome org
- To: svn-commits-list gnome org
- Subject: cheese r900 - in trunk: . data src
- Date: Tue, 12 Aug 2008 14:11:34 +0000 (UTC)
Author: dgsiegel
Date: Tue Aug 12 14:11:34 2008
New Revision: 900
URL: http://svn.gnome.org/viewvc/cheese?rev=900&view=rev
Log:
improve the fullscreen mode, fixes bug #547405, courtesy of Felix Kaser
Modified:
trunk/ChangeLog
trunk/data/cheese.glade
trunk/data/cheese.ui
trunk/src/cheese-countdown.c
trunk/src/cheese-countdown.h
trunk/src/cheese-window.c
Modified: trunk/data/cheese.glade
==============================================================================
--- trunk/data/cheese.glade (original)
+++ trunk/data/cheese.glade Tue Aug 12 14:11:34 2008
@@ -3,7 +3,6 @@
<!--*- mode: xml -*-->
<glade-interface>
<widget class="GtkWindow" id="cheese_window">
- <property name="visible">False</property>
<property name="title" translatable="yes">Cheese</property>
<property name="default_width">640</property>
<property name="default_height">670</property>
@@ -365,11 +364,9 @@
</packing>
</child>
<child>
- <widget class="GtkScrolledWindow" id="thumb_scrollwindow">
+ <widget class="GtkAlignment" id="thumb_scrollwindow">
<property name="visible">True</property>
- <property name="can_focus">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="vscrollbar_policy">GTK_POLICY_NEVER</property>
<child>
<placeholder/>
</child>
@@ -388,4 +385,294 @@
</widget>
</child>
</widget>
+ <widget class="GtkWindow" id="fullscreen_popup">
+ <property name="type">GTK_WINDOW_POPUP</property>
+ <child>
+ <widget class="GtkNotebook" id="fullscreen_notebook_bar">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="show_tabs">False</property>
+ <property name="show_border">False</property>
+ <child>
+ <widget class="GtkHBox" id="hbox7">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="homogeneous">True</property>
+ <child>
+ <widget class="GtkAlignment" id="alignment6">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="xalign">0</property>
+ <child>
+ <widget class="GtkHBox" id="hbox8">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <child>
+ <widget class="GtkToggleButton" id="button_photo_fullscreen">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="tooltip" translatable="yes">Switch to Photo Mode</property>
+ <property name="relief">GTK_RELIEF_NONE</property>
+ <property name="response_id">0</property>
+ <child>
+ <widget class="GtkAlignment" id="alignment7">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <child>
+ <widget class="GtkHBox" id="hbox9">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="homogeneous">True</property>
+ <child>
+ <widget class="GtkImage" id="image1">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="icon_size">2</property>
+ <property name="icon_name">camera-photo</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkToggleButton" id="button_video_fullscreen">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="tooltip" translatable="yes">Switch to Video Mode</property>
+ <property name="relief">GTK_RELIEF_NONE</property>
+ <property name="response_id">0</property>
+ <child>
+ <widget class="GtkAlignment" id="alignment8">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <child>
+ <widget class="GtkHBox" id="hbox10">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="homogeneous">True</property>
+ <child>
+ <widget class="GtkImage" id="image3">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="icon_size">2</property>
+ <property name="icon_name">camera-video</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkToggleButton" id="button_effects_fullscreen">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="tooltip" translatable="yes">Switch to the Effects Selector</property>
+ <property name="relief">GTK_RELIEF_NONE</property>
+ <property name="response_id">0</property>
+ <child>
+ <widget class="GtkAlignment" id="alignment10">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <child>
+ <widget class="GtkHBox" id="hbox12">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="spacing">2</property>
+ <child>
+ <widget class="GtkImage" id="image6">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="icon_size">3</property>
+ <property name="icon_name">browse-webcam-effects</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkVBox" id="vbox1">
+ <property name="visible">True</property>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkButton" id="take_picture_fullscreen">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="response_id">0</property>
+ <child>
+ <widget class="GtkAlignment" id="alignment9">
+ <property name="visible">True</property>
+ <property name="xscale">0</property>
+ <property name="yscale">0</property>
+ <child>
+ <widget class="GtkHBox" id="hbox11">
+ <property name="visible">True</property>
+ <property name="spacing">2</property>
+ <child>
+ <widget class="GtkImage" id="image_take_photo_fullscreen">
+ <property name="visible">True</property>
+ <property name="stock">gtk-media-record</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label_take_photo_fullscreen">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_Take a Photo</property>
+ <property name="use_markup">True</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">take_picture</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">16</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkVBox" id="vbox2">
+ <property name="visible">True</property>
+ </widget>
+ <packing>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox13">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkButton" id="button_exit_fullscreen">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="xalign">1</property>
+ <property name="response_id">0</property>
+ <child>
+ <widget class="GtkAlignment" id="alignment11">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <child>
+ <widget class="GtkHBox" id="hbox14">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="spacing">2</property>
+ <child>
+ <widget class="GtkImage" id="image7">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="stock">gtk-leave-fullscreen</property>
+ <property name="icon_size">3</property>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label_exit_fullscreen">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="label" translatable="yes">_Leave Fullscreen</property>
+ <property name="use_markup">True</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">button_effects</property>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="pack_type">GTK_PACK_END</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">5</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <placeholder/>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkAlignment" id="countdown_frame_fullscreen">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <child>
+ <placeholder/>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
</glade-interface>
Modified: trunk/data/cheese.ui
==============================================================================
--- trunk/data/cheese.ui (original)
+++ trunk/data/cheese.ui Tue Aug 12 14:11:34 2008
@@ -353,4 +353,280 @@
</object>
</child>
</object>
+ <object class="GtkWindow" id="fullscreen_popup">
+ <property name="type">GTK_WINDOW_POPUP</property>
+ <child>
+ <object class="GtkNotebook" id="fullscreen_notebook_bar">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="show_tabs">False</property>
+ <property name="show_border">False</property>
+ <child>
+ <object class="GtkHBox" id="hbox7">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="homogeneous">True</property>
+ <child>
+ <object class="GtkAlignment" id="alignment6">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="xalign">0</property>
+ <child>
+ <object class="GtkHBox" id="hbox8">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <child>
+ <object class="GtkToggleButton" id="button_photo_fullscreen">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="tooltip-text" translatable="yes">Switch to Photo Mode</property>
+ <property name="relief">GTK_RELIEF_NONE</property>
+ <child>
+ <object class="GtkAlignment" id="alignment7">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <child>
+ <object class="GtkHBox" id="hbox9">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="homogeneous">True</property>
+ <child>
+ <object class="GtkImage" id="image1">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="icon_size">2</property>
+ <property name="icon_name">camera-photo</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToggleButton" id="button_video_fullscreen">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="tooltip-text" translatable="yes">Switch to Video Mode</property>
+ <property name="relief">GTK_RELIEF_NONE</property>
+ <child>
+ <object class="GtkAlignment" id="alignment8">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <child>
+ <object class="GtkHBox" id="hbox10">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="homogeneous">True</property>
+ <child>
+ <object class="GtkImage" id="image3">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="icon_size">2</property>
+ <property name="icon_name">camera-video</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToggleButton" id="button_effects_fullscreen">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="tooltip-text" translatable="yes">Switch to the Effects Selector</property>
+ <property name="relief">GTK_RELIEF_NONE</property>
+ <child>
+ <object class="GtkAlignment" id="alignment10">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <child>
+ <object class="GtkHBox" id="hbox12">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="spacing">2</property>
+ <child>
+ <object class="GtkImage" id="image6">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="icon_size">3</property>
+ <property name="icon_name">browse-webcam-effects</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox1">
+ <property name="visible">True</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="take_picture_fullscreen">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <child>
+ <object class="GtkAlignment" id="alignment9">
+ <property name="visible">True</property>
+ <property name="xscale">0</property>
+ <property name="yscale">0</property>
+ <child>
+ <object class="GtkHBox" id="hbox11">
+ <property name="visible">True</property>
+ <property name="spacing">2</property>
+ <child>
+ <object class="GtkImage" id="image_take_photo_fullscreen">
+ <property name="visible">True</property>
+ <property name="stock">gtk-media-record</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label_take_photo_fullscreen">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_Take a Photo</property>
+ <property name="use_markup">True</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">take_picture</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="padding">16</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox2">
+ <property name="visible">True</property>
+ </object>
+ <packing>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox13">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkButton" id="button_exit_fullscreen">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="xalign">1</property>
+ <child>
+ <object class="GtkAlignment" id="alignment11">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <child>
+ <object class="GtkHBox" id="hbox14">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="spacing">2</property>
+ <child>
+ <object class="GtkImage" id="image7">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="stock">gtk-leave-fullscreen</property>
+ <property name="icon_size">3</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label_exit_fullscreen">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="label" translatable="yes">_Leave Fullscreen</property>
+ <property name="use_markup">True</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">button_effects</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="pack_type">GTK_PACK_END</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">5</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <child type="tab">
+ <placeholder/>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="countdown_frame_fullscreen">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ </child>
+ <child type="tab">
+ <placeholder/>
+ </child>
+ </object>
+ </child>
+ </object>
</interface>
Modified: trunk/src/cheese-countdown.c
==============================================================================
--- trunk/src/cheese-countdown.c (original)
+++ trunk/src/cheese-countdown.c Tue Aug 12 14:11:34 2008
@@ -54,7 +54,7 @@
typedef struct
{
- gint iState;
+ int iState;
cairo_surface_t* pSurface;
cheese_countdown_cb_t picture_callback;
cheese_countdown_cb_t hide_callback;
@@ -262,10 +262,10 @@
b->a = alpha;
}
-static gint
+static int
do_text (cairo_t* pContext,
gchar* pcText,
- gint iFontSize,
+ int iFontSize,
gchar* pcFontFamily,
PangoWeight fontWeight,
PangoStyle fontStyle)
@@ -274,7 +274,7 @@
PangoLayout* pLayout = NULL;
GString* pTextString = NULL;
PangoRectangle logicalRect;
- gint iAdvanceWidth;
+ int iAdvanceWidth;
/* setup a new pango-layout based on the source-context */
pLayout = pango_cairo_create_layout (pContext);
@@ -345,8 +345,8 @@
gdouble fWidth = (gdouble) widget->allocation.width;
gdouble fHeight = (gdouble) widget->allocation.height;
/* 3 * 26 are the three numbers, 30 is the width of camera-icon.svg */
- gint iOffsetX = (widget->allocation.width - 3 * 26 - 30) / 2;
- gint iOffsetY = (widget->allocation.height - 30) / 2;
+ int iOffsetX = (widget->allocation.width - 3 * 26 - 30) / 2;
+ int iOffsetY = (widget->allocation.height - 30) / 2;
gdouble fAlpha1;
gdouble fAlpha2;
gdouble fAlpha3;
@@ -632,6 +632,13 @@
priv->iState = STATE_OFF;
}
+int
+cheese_countdown_get_state (CheeseCountdown *countdown)
+{
+ CheeseCountdownPrivate* priv = CHEESE_COUNTDOWN_GET_PRIVATE (countdown);
+ return priv->iState;
+}
+
static void
cheese_countdown_finalize (GObject *object)
{
Modified: trunk/src/cheese-countdown.h
==============================================================================
--- trunk/src/cheese-countdown.h (original)
+++ trunk/src/cheese-countdown.h Tue Aug 12 14:11:34 2008
@@ -47,6 +47,7 @@
void cheese_countdown_start (CheeseCountdown *countdown, cheese_countdown_cb_t picture_cb, cheese_countdown_cb_t hide_cb, gpointer data);
void cheese_countdown_cancel (CheeseCountdown *countdown);
+int cheese_countdown_get_state (CheeseCountdown *countdown);
G_END_DECLS
Modified: trunk/src/cheese-window.c
==============================================================================
--- trunk/src/cheese-window.c (original)
+++ trunk/src/cheese-window.c Tue Aug 12 14:11:34 2008
@@ -4,6 +4,7 @@
* Copyright (C) 2008 Patryk Zawadzki <patrys pld-linux org>
* Copyright (C) 2008 Ryan Zeigler <zeiglerr gmail com>
* Copyright (C) 2008 Filippo Argiolas <filippo argiolas gmail com>
+ * Copyright (C) 2008 Felix Kaser <f kaser gmx net>
*
* Licensed under the GNU General Public License Version 2
*
@@ -55,6 +56,9 @@
#include "cheese-prefs-dialog.h"
#define SHUTTER_SOUNDS 5
+#define FULLSCREEN_POPUP_HEIGHT 40
+#define FULLSCREEN_TIMEOUT 5*1000
+#define FULLSCREEN_EFFECTS_TIMEOUT 15
typedef enum
{
@@ -92,8 +96,11 @@
CheeseFileUtil *fileutil;
GtkWidget *window;
+ GtkWidget *fullscreen_popup;
+
GtkWidget *notebook;
GtkWidget *notebook_bar;
+ GtkWidget *fullscreen_bar;
GtkWidget *main_vbox;
GtkWidget *video_vbox;
@@ -103,19 +110,30 @@
GtkWidget *throbber_frame;
GtkWidget *throbber;
GtkWidget *countdown_frame;
+ GtkWidget *countdown_frame_fullscreen;
GtkWidget *countdown;
+ GtkWidget *countdown_fullscreen;
GtkWidget *message_area_frame;
GtkWidget *message_area;
GtkWidget *button_effects;
GtkWidget *button_photo;
GtkWidget *button_video;
+ GtkWidget *button_effects_fullscreen;
+ GtkWidget *button_photo_fullscreen;
+ GtkWidget *button_video_fullscreen;
+ GtkWidget *button_exit_fullscreen;
GtkWidget *image_take_photo;
+ GtkWidget *image_take_photo_fullscreen;
GtkWidget *label_effects;
+ GtkWidget *label_effects_fullscreen;
GtkWidget *label_photo;
+ GtkWidget *label_photo_fullscreen;
GtkWidget *label_take_photo;
+ GtkWidget *label_take_photo_fullscreen;
GtkWidget *label_video;
+ GtkWidget *label_video_fullscreen;
GtkWidget *thumb_scrollwindow;
GtkWidget *thumb_nav;
@@ -124,6 +142,7 @@
GtkWidget *screen;
GtkWidget *take_picture;
+ GtkWidget *take_picture_fullscreen;
#ifdef HILDON
GtkWidget *main_hbox;
@@ -146,11 +165,12 @@
GtkActionGroup *actions_fullscreen;
GtkUIManager *ui_manager;
+
+ GSource *fullscreen_timeout_source;
int audio_play_counter;
} CheeseWindow;
-
/* Make url in about dialog clickable */
static void
cheese_about_dialog_handle_url (GtkAboutDialog *dialog, const char *url, gpointer data)
@@ -220,8 +240,81 @@
}
static void
-cheese_window_make_fullscreen (GtkWidget *widget, CheeseWindow *cheese_window)
+cheese_window_fullscreen_clear_timeout (CheeseWindow *cheese_window)
+{
+ if (cheese_window->fullscreen_timeout_source != NULL)
+ {
+ g_source_unref (cheese_window->fullscreen_timeout_source);
+ g_source_destroy (cheese_window->fullscreen_timeout_source);
+ }
+
+ cheese_window->fullscreen_timeout_source = NULL;
+}
+
+static gboolean
+cheese_window_fullscreen_timeout_cb (gpointer data)
{
+ CheeseWindow *cheese_window = data;
+ gtk_widget_hide_all (cheese_window->fullscreen_popup);
+
+ cheese_window_fullscreen_clear_timeout (cheese_window);
+
+ return FALSE;
+}
+
+static void
+cheese_window_fullscreen_set_timeout (CheeseWindow *cheese_window)
+{
+ GSource *source;
+
+ cheese_window_fullscreen_clear_timeout (cheese_window);
+
+ //make a difference between effects page and video preview
+ if (gtk_notebook_get_current_page (GTK_NOTEBOOK (cheese_window->notebook)) == 0)
+ source = g_timeout_source_new (FULLSCREEN_TIMEOUT);
+ else
+ source = g_timeout_source_new (FULLSCREEN_EFFECTS_TIMEOUT);
+
+ g_source_set_callback (source, cheese_window_fullscreen_timeout_cb, cheese_window, NULL);
+ g_source_attach (source, NULL);
+
+ cheese_window->fullscreen_timeout_source = source;
+}
+
+static void
+cheese_window_fullscreen_show_bar (CheeseWindow *cheese_window)
+{
+ gtk_widget_show_all (cheese_window->fullscreen_popup);
+ //show me the notebook with the buttons if the countdown was not triggered
+ if (cheese_countdown_get_state (CHEESE_COUNTDOWN (cheese_window->countdown_fullscreen)) == 0)
+ gtk_notebook_set_current_page (GTK_NOTEBOOK (cheese_window->fullscreen_bar), 0);
+}
+
+static gboolean
+cheese_window_fullscreen_motion_notify_cb (GtkWidget *widget,
+ GdkEventMotion *event,
+ CheeseWindow *cheese_window)
+{
+ if (cheese_window->isFullscreen)
+ {
+ int height;
+ int width;
+
+ gtk_window_get_size (GTK_WINDOW (cheese_window->window), &width, &height);
+ if (event->y > height-5)
+ {
+ cheese_window_fullscreen_show_bar (cheese_window);
+ }
+
+ cheese_window_fullscreen_set_timeout (cheese_window);
+ }
+ return FALSE;
+}
+
+static void
+cheese_window_toggle_fullscreen (GtkWidget *widget, CheeseWindow *cheese_window)
+{
+ GdkColor bg_color = {0,0,0,0};
GtkWidget *menubar;
menubar = gtk_ui_manager_get_widget (cheese_window->ui_manager, "/MainMenu");
@@ -230,15 +323,54 @@
gtk_widget_hide (cheese_window->thumb_view);
gtk_widget_hide (cheese_window->thumb_scrollwindow);
gtk_widget_hide (menubar);
+ gtk_widget_hide (cheese_window->notebook_bar);
+ gtk_widget_modify_bg (cheese_window->window, GTK_STATE_NORMAL, &bg_color);
+
+ gtk_widget_add_events (cheese_window->window, GDK_POINTER_MOTION_MASK);
+ gtk_widget_add_events (cheese_window->screen, GDK_POINTER_MOTION_MASK);
+ g_signal_connect (cheese_window->window, "motion-notify-event",
+ G_CALLBACK (cheese_window_fullscreen_motion_notify_cb),
+ cheese_window);
+ g_signal_connect (cheese_window->screen, "motion-notify-event",
+ G_CALLBACK (cheese_window_fullscreen_motion_notify_cb),
+ cheese_window);
+
gtk_window_fullscreen (GTK_WINDOW (cheese_window->window));
+ cheese_window->isFullscreen = TRUE;
}
else
{
gtk_widget_show_all (cheese_window->window);
- gtk_window_unfullscreen ( GTK_WINDOW (cheese_window->window));
+ gtk_widget_hide_all (cheese_window->fullscreen_popup);
+ gtk_widget_modify_bg (cheese_window->window, GTK_STATE_NORMAL, NULL);
+
+ g_signal_handlers_disconnect_by_func (cheese_window->window,
+ (gpointer) cheese_window_fullscreen_motion_notify_cb, cheese_window);
+ g_signal_handlers_disconnect_by_func (cheese_window->screen,
+ (gpointer) cheese_window_fullscreen_motion_notify_cb, cheese_window);
+
+ gtk_window_unfullscreen (GTK_WINDOW (cheese_window->window));
+ cheese_window->isFullscreen = FALSE;
+
+ cheese_window_fullscreen_clear_timeout (cheese_window);
}
- cheese_window->isFullscreen = !cheese_window->isFullscreen;
+}
+
+static void
+cheese_window_exit_fullscreen_button_clicked_cb (GtkWidget *button, CheeseWindow *cheese_window)
+{
+ GtkAction *action = gtk_ui_manager_get_action (cheese_window->ui_manager, "/MainMenu/Cheese/Fullscreen");
+ gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), FALSE);
+}
+
+static gboolean
+cheese_window_fullscreen_leave_notify_cb (GtkWidget *widget,
+ GdkEventCrossing *event,
+ CheeseWindow *cheese_window)
+{
+ cheese_window_fullscreen_clear_timeout (cheese_window);
+ return FALSE;
}
static void
@@ -248,11 +380,7 @@
g_free (cheese_window->photo_filename);
cheese_window->photo_filename = NULL;
gtk_widget_set_sensitive (cheese_window->take_picture, TRUE);
-
-
- //experimental fullscreen
- //cheese_window->isFullscreen = !cheese_window->isFullscreen;
- //cheese_window_make_fullscreen (cheese_window, cheese_window->isFullscreen);
+ gtk_widget_set_sensitive (cheese_window->take_picture_fullscreen, TRUE);
}
static void
@@ -263,6 +391,7 @@
cheese_window->video_filename = NULL;
gtk_action_group_set_sensitive (cheese_window->actions_effects, TRUE);
gtk_widget_set_sensitive (cheese_window->take_picture, TRUE);
+ gtk_widget_set_sensitive (cheese_window->take_picture_fullscreen, TRUE);
}
@@ -415,11 +544,15 @@
gint response;
gchar *primary, *secondary;
- if (batch == FALSE) {
- if (list_length > 1) {
+ if (batch == FALSE)
+ {
+ if (list_length > 1)
+ {
primary = g_strdup_printf (_("Are you sure you want to permanently delete the %'d selected items?"),
list_length);
- } else {
+ }
+ else
+ {
primary = g_strdup_printf (_("Are you sure you want to permanently delete \"%s\"?"),
g_file_get_basename (files->data));
}
@@ -469,7 +602,8 @@
for (l = files; l != NULL; l = l->next)
{
- if (!g_file_test (g_file_get_path (l->data), G_FILE_TEST_EXISTS)) {
+ if (!g_file_test (g_file_get_path (l->data), G_FILE_TEST_EXISTS))
+ {
g_object_unref (l->data);
break;
}
@@ -506,7 +640,7 @@
return;
case GTK_RESPONSE_ACCEPT:
/* create a single file list for cmd_delete */
- d = g_list_append (d, g_object_ref(l->data));
+ d = g_list_append (d, g_object_ref (l->data));
cheese_window_cmd_delete_file (cheese_window, d, TRUE);
g_list_free (d);
break;
@@ -520,7 +654,9 @@
/* cancel the whole delete operation */
return;
}
- } else {
+ }
+ else
+ {
cheese_thumb_view_remove_item (CHEESE_THUMB_VIEW (cheese_window->thumb_view), l->data);
}
g_object_unref (l->data);
@@ -860,9 +996,12 @@
cheese_window_selection_changed_cb (GtkIconView *iconview,
CheeseWindow *cheese_window)
{
- if (cheese_thumb_view_get_n_selected (CHEESE_THUMB_VIEW (cheese_window->thumb_view)) > 0) {
+ if (cheese_thumb_view_get_n_selected (CHEESE_THUMB_VIEW (cheese_window->thumb_view)) > 0)
+ {
gtk_action_group_set_sensitive (cheese_window->actions_file, TRUE);
- } else {
+ }
+ else
+ {
gtk_action_group_set_sensitive (cheese_window->actions_file, FALSE);
}
}
@@ -881,7 +1020,8 @@
if (event->type == GDK_BUTTON_PRESS && event->button == 1)
{
- if (cheese_thumb_view_get_n_selected (CHEESE_THUMB_VIEW (cheese_window->thumb_view)) > 1) {
+ if (cheese_thumb_view_get_n_selected (CHEESE_THUMB_VIEW (cheese_window->thumb_view)) > 1)
+ {
gtk_icon_view_unselect_all (GTK_ICON_VIEW (cheese_window->thumb_view));
gtk_icon_view_select_path (GTK_ICON_VIEW (cheese_window->thumb_view), path);
gtk_icon_view_set_cursor (GTK_ICON_VIEW (cheese_window->thumb_view), path, NULL, FALSE);
@@ -903,7 +1043,8 @@
}
if (!gtk_icon_view_path_is_selected (GTK_ICON_VIEW (cheese_window->thumb_view), path) ||
- cheese_thumb_view_get_n_selected (CHEESE_THUMB_VIEW (cheese_window->thumb_view)) <= 1) {
+ cheese_thumb_view_get_n_selected (CHEESE_THUMB_VIEW (cheese_window->thumb_view)) <= 1)
+ {
gtk_icon_view_unselect_all (GTK_ICON_VIEW (cheese_window->thumb_view));
gtk_icon_view_select_path (GTK_ICON_VIEW (cheese_window->thumb_view), path);
gtk_icon_view_set_cursor (GTK_ICON_VIEW (cheese_window->thumb_view), path, NULL, FALSE);
@@ -914,9 +1055,11 @@
gboolean list_has_videos = FALSE;
files = cheese_thumb_view_get_selected_images_list (CHEESE_THUMB_VIEW (cheese_window->thumb_view));
- for (l = files; l != NULL; l = l->next) {
+ for (l = files; l != NULL; l = l->next)
+ {
file = g_file_get_path (l->data);
- if (g_str_has_suffix (file, VIDEO_NAME_SUFFIX)) {
+ if (g_str_has_suffix (file, VIDEO_NAME_SUFFIX))
+ {
list_has_videos = TRUE;
}
g_free (file);
@@ -959,7 +1102,9 @@
{
gtk_notebook_set_current_page (GTK_NOTEBOOK (cheese_window->notebook), 0);
gtk_label_set_text_with_mnemonic (GTK_LABEL (cheese_window->label_effects), _("_Effects"));
+ gtk_label_set_text_with_mnemonic (GTK_LABEL (cheese_window->label_effects_fullscreen), _("_Effects"));
gtk_widget_set_sensitive (cheese_window->take_picture, TRUE);
+ gtk_widget_set_sensitive (cheese_window->take_picture_fullscreen, TRUE);
if (cheese_window->webcam_mode == WEBCAM_MODE_PHOTO)
{
gtk_action_group_set_sensitive (cheese_window->actions_photo, TRUE);
@@ -979,6 +1124,7 @@
{
gtk_notebook_set_current_page (GTK_NOTEBOOK (cheese_window->notebook), 1);
gtk_widget_set_sensitive (GTK_WIDGET (cheese_window->take_picture), FALSE);
+ gtk_widget_set_sensitive (GTK_WIDGET (cheese_window->take_picture_fullscreen), FALSE);
gtk_action_group_set_sensitive (cheese_window->actions_photo, FALSE);
gtk_action_group_set_sensitive (cheese_window->actions_video, FALSE);
}
@@ -989,6 +1135,7 @@
{
CheeseWindow *cheese_window = (CheeseWindow *) data;
gtk_notebook_set_current_page (GTK_NOTEBOOK (cheese_window->notebook_bar), 0);
+ gtk_notebook_set_current_page (GTK_NOTEBOOK (cheese_window->fullscreen_bar), 0);
}
void
@@ -1048,26 +1195,42 @@
gtk_widget_set_sensitive (cheese_window->take_picture, FALSE);
gchar * str = g_strconcat ("<b>", _("_Start Recording"), "</b>", NULL);
gtk_label_set_text_with_mnemonic (GTK_LABEL (cheese_window->label_take_photo), str);
+ gtk_label_set_text_with_mnemonic (GTK_LABEL (cheese_window->label_take_photo_fullscreen), str);
g_free (str);
gtk_label_set_use_markup (GTK_LABEL (cheese_window->label_take_photo), TRUE);
gtk_image_set_from_stock (GTK_IMAGE (cheese_window->image_take_photo), GTK_STOCK_MEDIA_RECORD, GTK_ICON_SIZE_BUTTON);
+ gtk_label_set_use_markup (GTK_LABEL (cheese_window->label_take_photo_fullscreen), TRUE);
+ gtk_image_set_from_stock (GTK_IMAGE (cheese_window->image_take_photo_fullscreen), GTK_STOCK_MEDIA_RECORD, GTK_ICON_SIZE_BUTTON);
cheese_window->recording = FALSE;
}
}
static gboolean
-cheese_window_cancel_cb (CheeseWindow *cheese_window,
+cheese_window_escape_key_cb (CheeseWindow *cheese_window,
GtkAccelGroup *accel_group,
guint keyval, GdkModifierType modifier)
{
+ if (cheese_window->isFullscreen)
+ {
+ if (cheese_countdown_get_state (CHEESE_COUNTDOWN (cheese_window->countdown_fullscreen)) == 0)
+ {
+ GtkAction *action = gtk_ui_manager_get_action (cheese_window->ui_manager, "/MainMenu/Cheese/Fullscreen");
+ gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), FALSE);
+ return TRUE;
+ }
+ }
+
cheese_countdown_cancel ((CheeseCountdown *) cheese_window->countdown);
+ cheese_countdown_cancel ((CheeseCountdown *) cheese_window->countdown_fullscreen);
if (cheese_window->webcam_mode == WEBCAM_MODE_PHOTO)
{
gtk_notebook_set_current_page (GTK_NOTEBOOK (cheese_window->notebook_bar), 0);
+ gtk_notebook_set_current_page (GTK_NOTEBOOK (cheese_window->fullscreen_bar), 0);
gtk_widget_set_sensitive (cheese_window->take_picture, TRUE);
+ gtk_widget_set_sensitive (cheese_window->take_picture_fullscreen, TRUE);
}
else
{
@@ -1081,18 +1244,32 @@
{
char *str;
-
if (cheese_window->webcam_mode == WEBCAM_MODE_PHOTO)
{
gboolean countdown;
g_object_get (cheese_window->gconf, "gconf_prop_countdown", &countdown, NULL);
if (countdown)
{
- cheese_countdown_start ((CheeseCountdown *) cheese_window->countdown,
- cheese_window_countdown_picture_cb,
- cheese_window_countdown_hide_cb,
- (gpointer) cheese_window);
- gtk_notebook_set_current_page (GTK_NOTEBOOK (cheese_window->notebook_bar), 1);
+ if (cheese_window->isFullscreen)
+ {
+ cheese_countdown_start ((CheeseCountdown *) cheese_window->countdown_fullscreen,
+ cheese_window_countdown_picture_cb,
+ cheese_window_countdown_hide_cb,
+ (gpointer) cheese_window);
+ gtk_notebook_set_current_page (GTK_NOTEBOOK (cheese_window->fullscreen_bar), 1);
+ //show bar, start timeout
+ //ATTENTION: if the countdown is longer than FULLSCREEN_TIMEOUT, the bar will disapear before the countdown ends
+ cheese_window_fullscreen_show_bar (cheese_window);
+ cheese_window_fullscreen_set_timeout (cheese_window);
+ }
+ else
+ {
+ cheese_countdown_start ((CheeseCountdown *) cheese_window->countdown,
+ cheese_window_countdown_picture_cb,
+ cheese_window_countdown_hide_cb,
+ (gpointer) cheese_window);
+ gtk_notebook_set_current_page (GTK_NOTEBOOK (cheese_window->notebook_bar), 1);
+ }
}
else
{
@@ -1100,6 +1277,7 @@
}
gtk_widget_set_sensitive (cheese_window->take_picture, FALSE);
+ gtk_widget_set_sensitive (cheese_window->take_picture_fullscreen, FALSE);
// FIXME: set menu inactive
}
else if (cheese_window->webcam_mode == WEBCAM_MODE_VIDEO)
@@ -1110,9 +1288,12 @@
gtk_action_group_set_sensitive (cheese_window->actions_toggle, FALSE);
str = g_strconcat ("<b>", _("_Stop Recording"), "</b>", NULL);
gtk_label_set_text_with_mnemonic (GTK_LABEL (cheese_window->label_take_photo), str);
+ gtk_label_set_text_with_mnemonic (GTK_LABEL (cheese_window->label_take_photo_fullscreen), str);
g_free (str);
gtk_label_set_use_markup (GTK_LABEL (cheese_window->label_take_photo), TRUE);
gtk_image_set_from_stock (GTK_IMAGE (cheese_window->image_take_photo), GTK_STOCK_MEDIA_STOP, GTK_ICON_SIZE_BUTTON);
+ gtk_label_set_use_markup (GTK_LABEL (cheese_window->label_take_photo_fullscreen), TRUE);
+ gtk_image_set_from_stock (GTK_IMAGE (cheese_window->image_take_photo_fullscreen), GTK_STOCK_MEDIA_STOP, GTK_ICON_SIZE_BUTTON);
cheese_window->video_filename = cheese_fileutil_get_new_media_filename (cheese_window->fileutil, WEBCAM_MODE_VIDEO);
cheese_webcam_start_video_recording (cheese_window->webcam, cheese_window->video_filename);
@@ -1160,7 +1341,7 @@
};
static const GtkToggleActionEntry action_entries_fullscreen[] = {
- {"Fullscreen", GTK_STOCK_FULLSCREEN , NULL, "F11", NULL, G_CALLBACK (cheese_window_make_fullscreen), FALSE},
+ {"Fullscreen", GTK_STOCK_FULLSCREEN, NULL, "F11", NULL, G_CALLBACK (cheese_window_toggle_fullscreen), FALSE},
};
static const GtkRadioActionEntry action_entries_toggle[] = {
@@ -1213,6 +1394,8 @@
str = g_strconcat ("<b>", _("_Take a Photo"), "</b>", NULL);
gtk_label_set_text_with_mnemonic (GTK_LABEL (cheese_window->label_take_photo), g_strdup (str));
gtk_label_set_use_markup (GTK_LABEL (cheese_window->label_take_photo), TRUE);
+ gtk_label_set_text_with_mnemonic (GTK_LABEL (cheese_window->label_take_photo_fullscreen), g_strdup (str));
+ gtk_label_set_use_markup (GTK_LABEL (cheese_window->label_take_photo_fullscreen), TRUE);
gtk_action_group_set_sensitive (cheese_window->actions_photo, TRUE);
gtk_action_group_set_sensitive (cheese_window->actions_video, FALSE);
}
@@ -1223,10 +1406,12 @@
str = g_strconcat ("<b>", _("_Start recording"), "</b>", NULL);
gtk_label_set_text_with_mnemonic (GTK_LABEL (cheese_window->label_take_photo), g_strdup (str));
gtk_label_set_use_markup (GTK_LABEL (cheese_window->label_take_photo), TRUE);
+ gtk_label_set_text_with_mnemonic (GTK_LABEL (cheese_window->label_take_photo_fullscreen), g_strdup (str));
+ gtk_label_set_use_markup (GTK_LABEL (cheese_window->label_take_photo_fullscreen), TRUE);
gtk_action_group_set_sensitive (cheese_window->actions_photo, FALSE);
gtk_action_group_set_sensitive (cheese_window->actions_video, TRUE);
}
- g_free (str);
+ g_free (str);
}
GtkActionGroup*
@@ -1308,7 +1493,8 @@
GtkWidget *menuitem;
#else
GtkWidget *menubar;
-#endif
+#endif
+
cheese_window->message_area = NULL;
@@ -1341,7 +1527,35 @@
cheese_window->countdown_frame = GTK_WIDGET (gtk_builder_get_object (builder, "countdown_frame"));
cheese_window->effect_frame = GTK_WIDGET (gtk_builder_get_object (builder, "effect_frame"));
cheese_window->message_area_frame = GTK_WIDGET (gtk_builder_get_object (builder, "message_area_frame"));
-
+
+ cheese_window->fullscreen_popup = GTK_WIDGET (gtk_builder_get_object (builder, "fullscreen_popup"));
+ cheese_window->fullscreen_bar = GTK_WIDGET (gtk_builder_get_object (builder, "fullscreen_notebook_bar"));
+ cheese_window->button_effects_fullscreen = GTK_WIDGET (gtk_builder_get_object (builder, "button_effects_fullscreen"));
+ cheese_window->button_photo_fullscreen = GTK_WIDGET (gtk_builder_get_object (builder, "button_photo_fullscreen"));
+ cheese_window->button_video_fullscreen = GTK_WIDGET (gtk_builder_get_object (builder, "button_video_fullscreen"));
+ cheese_window->take_picture_fullscreen = GTK_WIDGET (gtk_builder_get_object (builder, "take_picture_fullscreen"));
+ cheese_window->label_take_photo_fullscreen = GTK_WIDGET (gtk_builder_get_object (builder, "label_take_photo_fullscreen"));
+ cheese_window->image_take_photo_fullscreen = GTK_WIDGET (gtk_builder_get_object (builder, "image_take_photo_fullscreen"));
+ cheese_window->label_effects_fullscreen = GTK_WIDGET (gtk_builder_get_object (builder, "label_effects_fullscreen"));
+ cheese_window->label_photo_fullscreen = GTK_WIDGET (gtk_builder_get_object (builder, "label_photo_fullscreen"));
+ cheese_window->label_video_fullscreen = GTK_WIDGET (gtk_builder_get_object (builder, "label_video_fullscreen"));
+ cheese_window->countdown_frame_fullscreen = GTK_WIDGET (gtk_builder_get_object (builder, "countdown_frame_fullscreen"));
+ cheese_window->button_exit_fullscreen = GTK_WIDGET (gtk_builder_get_object (builder, "button_exit_fullscreen"));
+
+ //configure the popup position and size
+ GdkScreen *screen = gtk_window_get_screen (GTK_WINDOW (cheese_window->fullscreen_popup));
+ gtk_window_set_default_size (GTK_WINDOW (cheese_window->fullscreen_popup), gdk_screen_get_width (screen), FULLSCREEN_POPUP_HEIGHT);
+ gtk_window_move (GTK_WINDOW (cheese_window->fullscreen_popup), 0, gdk_screen_get_height (screen) - FULLSCREEN_POPUP_HEIGHT);
+
+ g_signal_connect (cheese_window->fullscreen_popup,
+ "enter-notify-event",
+ G_CALLBACK (cheese_window_fullscreen_leave_notify_cb),
+ cheese_window);
+
+ g_signal_connect (cheese_window->button_exit_fullscreen, "clicked",
+ G_CALLBACK (cheese_window_exit_fullscreen_button_clicked_cb),
+ cheese_window);
+
#ifdef HILDON
/* Reparent widgets in case we use hildon. This saves us maintaining two
GtkBuilder ui files
@@ -1366,9 +1580,12 @@
char *str = g_strconcat ("<b>", _("_Take a photo"), "</b>", NULL);
gtk_label_set_text_with_mnemonic (GTK_LABEL (cheese_window->label_take_photo), str);
+ gtk_label_set_text_with_mnemonic (GTK_LABEL (cheese_window->label_take_photo_fullscreen), str);
g_free (str);
gtk_label_set_use_markup (GTK_LABEL (cheese_window->label_take_photo), TRUE);
gtk_widget_set_sensitive (GTK_WIDGET (cheese_window->take_picture), FALSE);
+ gtk_label_set_use_markup (GTK_LABEL (cheese_window->label_take_photo_fullscreen), TRUE);
+ gtk_widget_set_sensitive (GTK_WIDGET (cheese_window->take_picture_fullscreen), FALSE);
cheese_window->thumb_view = cheese_thumb_view_new ();
cheese_window->thumb_nav = eog_thumb_nav_new (cheese_window->thumb_view, TRUE);
@@ -1388,6 +1605,9 @@
cheese_window->countdown = cheese_countdown_new ();
gtk_container_add (GTK_CONTAINER (cheese_window->countdown_frame), cheese_window->countdown);
gtk_widget_show (cheese_window->countdown);
+
+ cheese_window->countdown_fullscreen = cheese_countdown_new ();
+ gtk_container_add (GTK_CONTAINER (cheese_window->countdown_frame_fullscreen), cheese_window->countdown_fullscreen);
gtk_widget_add_events (cheese_window->screen, GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK);
@@ -1405,10 +1625,12 @@
"ActionsEffects",
action_entries_effects,
G_N_ELEMENTS (action_entries_effects));
+
cheese_window->actions_fullscreen = cheese_window_toggle_action_group_new (cheese_window,
"ActionsFullscreen",
action_entries_fullscreen,
G_N_ELEMENTS (action_entries_fullscreen));
+
cheese_window->actions_preferences = cheese_window_action_group_new (cheese_window,
"ActionsPreferences",
action_entries_preferences,
@@ -1505,7 +1727,7 @@
cheese_window);
gtk_menu_append (menu, menuitem);
- menuitem = gtk_menu_item_new_with_label(_("About"));
+ menuitem = gtk_menu_item_new_with_label (_("About"));
g_signal_connect (menuitem,"activate",
GTK_SIGNAL_FUNC (cheese_window_cmd_about),
cheese_window);
@@ -1524,17 +1746,22 @@
gtk_ui_manager_get_accel_group (cheese_window->ui_manager));
gtk_accel_group_connect (gtk_ui_manager_get_accel_group (cheese_window->ui_manager),
GDK_Escape, 0, 0,
- g_cclosure_new_swap (G_CALLBACK (cheese_window_cancel_cb),
+ g_cclosure_new_swap (G_CALLBACK (cheese_window_escape_key_cb),
cheese_window, NULL));
gtk_action_group_set_sensitive (cheese_window->actions_file, FALSE);
action = gtk_ui_manager_get_action (cheese_window->ui_manager, "/MainMenu/Edit/Effects");
gtk_action_connect_proxy (GTK_ACTION (action), GTK_WIDGET (cheese_window->button_effects));
+ gtk_action_connect_proxy (GTK_ACTION (action), GTK_WIDGET (cheese_window->button_effects_fullscreen));
+
action = gtk_ui_manager_get_action (cheese_window->ui_manager, "/MainMenu/Cheese/Photo");
gtk_action_connect_proxy (GTK_ACTION (action), GTK_WIDGET (cheese_window->button_photo));
+ gtk_action_connect_proxy (GTK_ACTION (action), GTK_WIDGET (cheese_window->button_photo_fullscreen));
+
action = gtk_ui_manager_get_action (cheese_window->ui_manager, "/MainMenu/Cheese/Video");
gtk_action_connect_proxy (GTK_ACTION (action), GTK_WIDGET (cheese_window->button_video));
+ gtk_action_connect_proxy (GTK_ACTION (action), GTK_WIDGET (cheese_window->button_video_fullscreen));
/* Default handlers for closing the application */
@@ -1545,6 +1772,8 @@
g_signal_connect (cheese_window->take_picture, "clicked",
G_CALLBACK (cheese_window_action_button_clicked_cb), cheese_window);
+ g_signal_connect (cheese_window->take_picture_fullscreen, "clicked",
+ G_CALLBACK (cheese_window_action_button_clicked_cb), cheese_window);
g_signal_connect (cheese_window->thumb_view, "selection_changed",
G_CALLBACK (cheese_window_selection_changed_cb), cheese_window);
g_signal_connect (cheese_window->thumb_view, "button_press_event",
@@ -1628,6 +1857,7 @@
cheese_window_set_message_area (cheese_window, message_area);
}
gtk_widget_set_sensitive (GTK_WIDGET (cheese_window->take_picture), TRUE);
+ gtk_widget_set_sensitive (GTK_WIDGET (cheese_window->take_picture_fullscreen), TRUE);
gtk_action_group_set_sensitive (cheese_window->actions_effects, TRUE);
gdk_threads_leave ();
}
@@ -1644,10 +1874,12 @@
cheese_window->audio_play_counter = 0;
cheese_window->fileutil = cheese_fileutil_new ();
cheese_window->isFullscreen = FALSE;
+
+ cheese_window->fullscreen_timeout_source = NULL;
cheese_window_create_window (cheese_window);
gtk_action_group_set_sensitive (cheese_window->actions_effects, FALSE);
-
+
gtk_widget_show_all (cheese_window->window);
ephy_spinner_start (EPHY_SPINNER (cheese_window->throbber));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]