totem r5775 - in trunk: . data src



Author: hadess
Date: Wed Oct 22 17:40:39 2008
New Revision: 5775
URL: http://svn.gnome.org/viewvc/totem?rev=5775&view=rev

Log:
2008-10-22  Bastien Nocera  <hadess hadess net>

	* data/totem.ui:
	* src/totem-sidebar.c (totem_sidebar_is_focused):
	* src/totem-sidebar.h:
	* src/totem.c (window_key_press_event_cb): Remove accelerators for the
	window resize menu items, they were causing problems with the latest
	GTK+ whenever the sidebar was used (Closes: #557447)



Modified:
   trunk/ChangeLog
   trunk/data/totem.ui
   trunk/src/totem-sidebar.c
   trunk/src/totem-sidebar.h
   trunk/src/totem.c

Modified: trunk/data/totem.ui
==============================================================================
--- trunk/data/totem.ui	(original)
+++ trunk/data/totem.ui	Wed Oct 22 17:40:39 2008
@@ -124,7 +124,6 @@
                <property name="tooltip" translatable="yes">Resize to half the original video size</property>
                <signal name="activate" handler="zoom_1_2_action_callback"/>
             </object>
-            <accelerator key="0"/>
          </child>
          <child>
             <object class="GtkAction" id="zoom-1-1">
@@ -132,7 +131,6 @@
                <property name="tooltip" translatable="yes">Resize to the original video size</property>
                <signal name="activate" handler="zoom_1_1_action_callback"/>
             </object>
-            <accelerator key="1"/>
          </child>
          <child>
             <object class="GtkAction" id="zoom-2-1">
@@ -140,7 +138,6 @@
                <property name="tooltip" translatable="yes">Resize to double the original video size</property>
                <signal name="activate" handler="zoom_2_1_action_callback"/>
             </object>
-            <accelerator key="2"/>
          </child>
          <child>
             <object class="GtkAction" id="aspect-ratio-menu">

Modified: trunk/src/totem-sidebar.c
==============================================================================
--- trunk/src/totem-sidebar.c	(original)
+++ trunk/src/totem-sidebar.c	Wed Oct 22 17:40:39 2008
@@ -95,6 +95,20 @@
 	return totem->sidebar_shown;
 }
 
+gboolean
+totem_sidebar_is_focused (Totem *totem)
+{
+	GtkWidget *focused;
+
+	focused = gtk_window_get_focus (GTK_WINDOW (totem->win));
+	if (focused != NULL && gtk_widget_is_ancestor
+			(focused, GTK_WIDGET (totem->sidebar)) != FALSE) {
+		return TRUE;
+	}
+
+	return FALSE;
+}
+
 void
 totem_sidebar_setup (Totem *totem, gboolean visible, const char *page_id)
 {

Modified: trunk/src/totem-sidebar.h
==============================================================================
--- trunk/src/totem-sidebar.h	(original)
+++ trunk/src/totem-sidebar.h	Wed Oct 22 17:40:39 2008
@@ -30,6 +30,7 @@
 void totem_sidebar_toggle (Totem *totem, gboolean state);
 void totem_sidebar_set_visibility (Totem *totem, gboolean visible);
 gboolean totem_sidebar_is_visible (Totem *totem);
+gboolean totem_sidebar_is_focused (Totem *totem);
 char *totem_sidebar_get_current_page (Totem *totem);
 void totem_sidebar_set_current_page (Totem *totem,
 				     const char *name,

Modified: trunk/src/totem.c
==============================================================================
--- trunk/src/totem.c	(original)
+++ trunk/src/totem.c	Wed Oct 22 17:40:39 2008
@@ -2888,13 +2888,8 @@
 int
 window_key_press_event_cb (GtkWidget *win, GdkEventKey *event, Totem *totem)
 {
-	GtkWidget *focused;
-
-	focused = gtk_window_get_focus (GTK_WINDOW (totem->win));
-	if (focused != NULL && gtk_widget_is_ancestor
-			(focused, GTK_WIDGET (totem->sidebar)) != FALSE) {
+	if (totem_sidebar_is_focused (totem) != FALSE)
 		return FALSE;
-	}
 
 	/* Special case Eject, Open, Open URI and
 	 * seeking keyboard shortcuts */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]