r3532 - in trunk/src/target/OM-2007.2/daemons/neod: data src

mickey at sita.openmoko.org mickey at sita.openmoko.org
Thu Nov 29 18:29:39 CET 2007


Author: mickey
Date: 2007-11-29 18:29:33 +0100 (Thu, 29 Nov 2007)
New Revision: 3532

Modified:
   trunk/src/target/OM-2007.2/daemons/neod/data/drag.png
   trunk/src/target/OM-2007.2/daemons/neod/data/mid.png
   trunk/src/target/OM-2007.2/daemons/neod/data/north.png
   trunk/src/target/OM-2007.2/daemons/neod/data/south.png
   trunk/src/target/OM-2007.2/daemons/neod/src/buttonactions.c
   trunk/src/target/OM-2007.2/daemons/neod/src/buttonactions.h
Log:
neod:
 * ensure correct rotation before showing the unlock window (closes #1033)
 * change theme


Modified: trunk/src/target/OM-2007.2/daemons/neod/data/drag.png
===================================================================
(Binary files differ)

Modified: trunk/src/target/OM-2007.2/daemons/neod/data/mid.png
===================================================================
(Binary files differ)

Modified: trunk/src/target/OM-2007.2/daemons/neod/data/north.png
===================================================================
(Binary files differ)

Modified: trunk/src/target/OM-2007.2/daemons/neod/data/south.png
===================================================================
(Binary files differ)

Modified: trunk/src/target/OM-2007.2/daemons/neod/src/buttonactions.c
===================================================================
--- trunk/src/target/OM-2007.2/daemons/neod/src/buttonactions.c	2007-11-29 12:46:28 UTC (rev 3531)
+++ trunk/src/target/OM-2007.2/daemons/neod/src/buttonactions.c	2007-11-29 17:29:33 UTC (rev 3532)
@@ -97,6 +97,7 @@
 
 GConfClient* gconfc = 0;
 
+
 enum PeripheralUnit
 {
     GSM = 0,
@@ -112,7 +113,8 @@
 };
 
 int pm_value = 0;
-gboolean orientation = TRUE;
+gboolean orientation = FALSE;
+gboolean lock_display_last_orientation = FALSE;
 
 typedef enum _PowerState
 {
@@ -528,11 +530,15 @@
 void neod_buttonactions_popup_selected_orientation( GtkWidget* button, gpointer user_data )
 {
     gtk_widget_hide( aux_menu );
-    if ( orientation )
+	neod_buttonactions_set_orientation(!orientation);
+}
+
+void neod_buttonactions_set_orientation(gboolean new_o) {
+    if(new_o)
         g_spawn_command_line_async( "xrandr -o 1", NULL );
     else
         g_spawn_command_line_async( "xrandr -o 0", NULL );
-    orientation = !orientation;
+    orientation = new_o;
 }
 
 void neod_buttonactions_popup_selected_screenshot( GtkWidget* button, gpointer user_data )
@@ -1157,6 +1163,7 @@
 											 guint time,
 					                         gpointer userdata) {
 	gtk_widget_hide(lock_display);
+	neod_buttonactions_set_orientation(lock_display_last_orientation);
 }
 
 /**
@@ -1204,7 +1211,6 @@
  * on the display.
  */
 void neod_buttonactions_lock_display() {
-
     // remember last active window before showing display lock 
     last_active_window = get_window_property( 
 		gdk_x11_get_default_root_xwindow(), 
@@ -1266,8 +1272,10 @@
 			gdk_pixbuf_get_width(drag_gdk) / 2,
 			gdk_pixbuf_get_height(drag_gdk) / 2);
     }
+
+	lock_display_last_orientation = orientation;
+	neod_buttonactions_set_orientation(FALSE);
 	gtk_widget_show_all(lock_display);
 
     g_debug("display locked");
 }
-

Modified: trunk/src/target/OM-2007.2/daemons/neod/src/buttonactions.h
===================================================================
--- trunk/src/target/OM-2007.2/daemons/neod/src/buttonactions.h	2007-11-29 12:46:28 UTC (rev 3531)
+++ trunk/src/target/OM-2007.2/daemons/neod/src/buttonactions.h	2007-11-29 17:29:33 UTC (rev 3532)
@@ -39,6 +39,7 @@
 
 void neod_buttonactions_sound_init();
 void neod_buttonactions_set_display( int brightness );
+void neod_buttonactions_set_oriantation(gboolean new_o);
 void neod_buttonactions_sound_play( const gchar* samplename );
 
 gboolean neod_buttonactions_initial_update();





More information about the commitlog mailing list