Send commitlog mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.openmoko.org/mailman/listinfo/commitlog
or, via email, send a message with subject or body 'help' to
        [EMAIL PROTECTED]

You can reach the person managing the list at
        [EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of commitlog digest..."
Today's Topics:

   1. r2898 -
      trunk/src/target/OM-2007.2/applications/openmoko-today2
      ([EMAIL PROTECTED])
   2. r2899 - trunk/src/target/OM-2007.2/daemons/neod/src
      ([EMAIL PROTECTED])
   3. r2900 -
      trunk/src/target/OM-2007.2/panel-plugins/openmoko-panel-gps/src
      ([EMAIL PROTECTED])
   4. r2901 - trunk/src/target/OM-2007.2/daemons/neod/src
      ([EMAIL PROTECTED])
--- Begin Message ---
Author: chris
Date: 2007-09-03 13:02:53 +0200 (Mon, 03 Sep 2007)
New Revision: 2898

Modified:
   trunk/src/target/OM-2007.2/applications/openmoko-today2/ChangeLog
Log:
Add a line-break to the ChangeLog (was over 80 columns)


Modified: trunk/src/target/OM-2007.2/applications/openmoko-today2/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-today2/ChangeLog   
2007-09-02 21:15:59 UTC (rev 2897)
+++ trunk/src/target/OM-2007.2/applications/openmoko-today2/ChangeLog   
2007-09-03 11:02:53 UTC (rev 2898)
@@ -5,8 +5,8 @@
 
 2007-08-31  Thomas Wood  <[EMAIL PROTECTED]>
 
-       * src/today-pim-journal.c: (today_pim_journal_box_new): Fix some 
compiler
-       warnings
+       * src/today-pim-journal.c: (today_pim_journal_box_new):
+       Fix some compiler warnings
 
 2007-08-23  Thomas Wood  <[EMAIL PROTECTED]>
 




--- End Message ---
--- Begin Message ---
Author: mickey
Date: 2007-09-03 21:40:40 +0200 (Mon, 03 Sep 2007)
New Revision: 2899

Modified:
   trunk/src/target/OM-2007.2/daemons/neod/src/buttonactions.c
   trunk/src/target/OM-2007.2/daemons/neod/src/buttonactions.h
Log:
neod: UI change
* aux button on hold now opens up a popup menu -- same as power button on hold
* aux button contains non-power related menu items, power button menu power 
related items


Modified: trunk/src/target/OM-2007.2/daemons/neod/src/buttonactions.c
===================================================================
--- trunk/src/target/OM-2007.2/daemons/neod/src/buttonactions.c 2007-09-03 
11:02:53 UTC (rev 2898)
+++ trunk/src/target/OM-2007.2/daemons/neod/src/buttonactions.c 2007-09-03 
19:40:40 UTC (rev 2899)
@@ -172,7 +172,6 @@
 
 gboolean neod_buttonactions_install_watcher()
 {
-
     int i = 0;
     for ( ; i < 10; ++i )
     {
@@ -373,9 +372,7 @@
     }
     else
     {
-        // make dialer interface show up
-        // NOTE: temporary hack, will use dbus interface once main menu has it 
:)
-        system( "openmoko-dialer &" );
+        neod_buttonactions_show_aux_menu();
     }
     return FALSE;
 }
@@ -474,6 +471,89 @@
     power_menu = 0;
 }
 
+void neod_buttonactions_show_aux_menu()
+{
+    // show popup menu requesting for actions
+    if ( !aux_menu )
+    {
+        aux_menu = gtk_menu_new();
+
+        GtkWidget* orientation = gtk_menu_item_new_with_label( "Swap 
Orientation" );
+        g_signal_connect( G_OBJECT(orientation), "activate", 
G_CALLBACK(neod_buttonactions_popup_selected_orientation), NULL );
+        gtk_menu_shell_append( GTK_MENU_SHELL(aux_menu), orientation );
+
+        GtkWidget* scap = gtk_menu_item_new_with_label( "Screenshot" );
+        g_signal_connect( G_OBJECT(scap), "activate", 
G_CALLBACK(neod_buttonactions_popup_selected_screenshot), NULL );
+        gtk_menu_shell_append( GTK_MENU_SHELL(aux_menu), scap );
+
+        gtk_widget_show_all( GTK_WIDGET(aux_menu) );
+    }
+    gtk_menu_popup( GTK_MENU(aux_menu), NULL, NULL, 
neod_buttonactions_popup_positioning_cb, 0, 0, GDK_CURRENT_TIME );
+}
+
+void neod_buttonactions_show_power_menu()
+{
+    // show popup menu requesting for actions
+    if ( !power_menu )
+    {
+        power_menu = gtk_menu_new();
+
+        GtkWidget* bluetooth = gtk_check_menu_item_new_with_label( "Bluetooth 
Power" );
+        gtk_widget_set_state( bluetooth, GTK_STATE_INSENSITIVE );
+        gtk_menu_shell_append( GTK_MENU_SHELL(power_menu), bluetooth );
+
+        GtkWidget* gps = gtk_check_menu_item_new_with_label( "GPS Power" );
+        gtk_widget_set_state( gps, GTK_STATE_INSENSITIVE );
+        gtk_menu_shell_append( GTK_MENU_SHELL(power_menu), gps );
+
+        GtkWidget* gsm = gtk_check_menu_item_new_with_label( "GSM Power" );
+        gtk_widget_set_state( gsm, GTK_STATE_INSENSITIVE );
+        gtk_menu_shell_append( GTK_MENU_SHELL(power_menu), gsm );
+
+        gtk_menu_shell_append( GTK_MENU_SHELL(power_menu), 
gtk_separator_menu_item_new() );
+
+        // add profiles
+        // TODO build profile list dynamically from database
+        GtkWidget* profile = 0;
+        profile = gtk_check_menu_item_new_with_label( "Profile: Full PM" );
+        gtk_check_menu_item_set_draw_as_radio( GTK_CHECK_MENU_ITEM(profile), 
TRUE );
+        gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM(profile), pm_value 
== FULL );
+        g_signal_connect( G_OBJECT(profile), "activate", 
G_CALLBACK(neod_buttonactions_popup_selected_fullPM), NULL );
+        gtk_menu_shell_append( GTK_MENU_SHELL(power_menu), profile );
+        profile = gtk_check_menu_item_new_with_label( "Profile: Dim Only" );
+        gtk_check_menu_item_set_draw_as_radio( GTK_CHECK_MENU_ITEM(profile), 
TRUE );
+        gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM(profile), pm_value 
== DIM_ONLY );
+        g_signal_connect( G_OBJECT(profile), "activate", 
G_CALLBACK(neod_buttonactions_popup_selected_dimOnly), NULL );
+        gtk_menu_shell_append( GTK_MENU_SHELL(power_menu), profile );
+        profile = gtk_check_menu_item_new_with_label( "Profile: No PM" );
+        gtk_check_menu_item_set_draw_as_radio( GTK_CHECK_MENU_ITEM(profile), 
TRUE );
+        gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM(profile), pm_value 
== NONE );
+        g_signal_connect( G_OBJECT(profile), "activate", 
G_CALLBACK(neod_buttonactions_popup_selected_noPM), NULL );
+        gtk_menu_shell_append( GTK_MENU_SHELL(power_menu), profile );
+
+        gtk_menu_shell_append( GTK_MENU_SHELL(power_menu), 
gtk_separator_menu_item_new() );
+
+        GtkWidget* lock = gtk_menu_item_new_with_label( "Lock Phone" );
+        g_signal_connect( G_OBJECT(lock), "activate", 
G_CALLBACK(neod_buttonactions_popup_selected_lock), NULL );
+        gtk_menu_shell_append( GTK_MENU_SHELL(power_menu), lock );
+            //GtkWidget* flightmode = gtk_menu_item_new_with_label( "Flight 
Mode" );
+            //gtk_menu_shell_append( GTK_MENU_SHELL(power_menu), flightmode );
+            //GtkWidget* profilelist = gtk_menu_item_new_with_label( "<Profile 
List>" );
+            //gtk_menu_shell_append( GTK_MENU_SHELL(power_menu), profilelist );
+            //GtkWidget* restartUI = gtk_menu_item_new_with_label( "Restart 
UI" );
+            //g_signal_connect( G_OBJECT(restartUI), "activate", 
G_CALLBACK(neod_buttonactions_popup_selected_restartUI), NULL );
+            //gtk_menu_shell_append( GTK_MENU_SHELL(power_menu), restartUI );
+        GtkWidget* reboot = gtk_menu_item_new_with_label( "Reboot Phone" );
+        g_signal_connect( G_OBJECT(reboot), "activate", 
G_CALLBACK(neod_buttonactions_popup_selected_reboot), NULL );
+        gtk_menu_shell_append( GTK_MENU_SHELL(power_menu), reboot );
+        GtkWidget* poweroff = gtk_menu_item_new_with_label( "Power Off" );
+        g_signal_connect( G_OBJECT(poweroff), "activate", 
G_CALLBACK(neod_buttonactions_popup_selected_poweroff), NULL );
+        gtk_menu_shell_append( GTK_MENU_SHELL(power_menu), poweroff );
+        gtk_widget_show_all( GTK_WIDGET(power_menu) );
+    }
+    gtk_menu_popup( GTK_MENU(power_menu), NULL, NULL, 
neod_buttonactions_popup_positioning_cb, 0, 0, GDK_CURRENT_TIME );
+}
+
 gboolean neod_buttonactions_power_timeout( guint timeout )
 {
     g_debug( "power pressed for %d", timeout );
@@ -520,60 +600,7 @@
     }
     else
     {
-        // show popup menu requesting for actions
-        if ( !power_menu )
-        {
-            power_menu = gtk_menu_new();
-
-            GtkWidget* orientation = gtk_menu_item_new_with_label( "Swap 
Orientation" );
-            g_signal_connect( G_OBJECT(orientation), "activate", 
G_CALLBACK(neod_buttonactions_popup_selected_orientation), NULL );
-            gtk_menu_shell_append( GTK_MENU_SHELL(power_menu), orientation );
-
-            GtkWidget* scap = gtk_menu_item_new_with_label( "Screenshot" );
-            g_signal_connect( G_OBJECT(scap), "activate", 
G_CALLBACK(neod_buttonactions_popup_selected_screenshot), NULL );
-            gtk_menu_shell_append( GTK_MENU_SHELL(power_menu), scap );
-            gtk_menu_shell_append( GTK_MENU_SHELL(power_menu), 
gtk_separator_menu_item_new() );
-
-            // add profiles
-            // TODO build profile list dynamically from database
-            GtkWidget* profile = 0;
-            profile = gtk_check_menu_item_new_with_label( "Profile: Full PM" );
-            gtk_check_menu_item_set_draw_as_radio( 
GTK_CHECK_MENU_ITEM(profile), TRUE );
-            gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM(profile), 
pm_value == FULL );
-            g_signal_connect( G_OBJECT(profile), "activate", 
G_CALLBACK(neod_buttonactions_popup_selected_fullPM), NULL );
-            gtk_menu_shell_append( GTK_MENU_SHELL(power_menu), profile );
-            profile = gtk_check_menu_item_new_with_label( "Profile: Dim Only" 
);
-            gtk_check_menu_item_set_draw_as_radio( 
GTK_CHECK_MENU_ITEM(profile), TRUE );
-            gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM(profile), 
pm_value == DIM_ONLY );
-            g_signal_connect( G_OBJECT(profile), "activate", 
G_CALLBACK(neod_buttonactions_popup_selected_dimOnly), NULL );
-            gtk_menu_shell_append( GTK_MENU_SHELL(power_menu), profile );
-            profile = gtk_check_menu_item_new_with_label( "Profile: No PM" );
-            gtk_check_menu_item_set_draw_as_radio( 
GTK_CHECK_MENU_ITEM(profile), TRUE );
-            gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM(profile), 
pm_value == NONE );
-            g_signal_connect( G_OBJECT(profile), "activate", 
G_CALLBACK(neod_buttonactions_popup_selected_noPM), NULL );
-            gtk_menu_shell_append( GTK_MENU_SHELL(power_menu), profile );
-
-            gtk_menu_shell_append( GTK_MENU_SHELL(power_menu), 
gtk_separator_menu_item_new() );
-
-            GtkWidget* lock = gtk_menu_item_new_with_label( "Lock Phone" );
-            g_signal_connect( G_OBJECT(lock), "activate", 
G_CALLBACK(neod_buttonactions_popup_selected_lock), NULL );
-            gtk_menu_shell_append( GTK_MENU_SHELL(power_menu), lock );
-            //GtkWidget* flightmode = gtk_menu_item_new_with_label( "Flight 
Mode" );
-            //gtk_menu_shell_append( GTK_MENU_SHELL(power_menu), flightmode );
-            //GtkWidget* profilelist = gtk_menu_item_new_with_label( "<Profile 
List>" );
-            //gtk_menu_shell_append( GTK_MENU_SHELL(power_menu), profilelist );
-            //GtkWidget* restartUI = gtk_menu_item_new_with_label( "Restart 
UI" );
-            //g_signal_connect( G_OBJECT(restartUI), "activate", 
G_CALLBACK(neod_buttonactions_popup_selected_restartUI), NULL );
-            //gtk_menu_shell_append( GTK_MENU_SHELL(power_menu), restartUI );
-            GtkWidget* reboot = gtk_menu_item_new_with_label( "Reboot Phone" );
-            g_signal_connect( G_OBJECT(reboot), "activate", 
G_CALLBACK(neod_buttonactions_popup_selected_reboot), NULL );
-            gtk_menu_shell_append( GTK_MENU_SHELL(power_menu), reboot );
-            GtkWidget* poweroff = gtk_menu_item_new_with_label( "Power Off" );
-            g_signal_connect( G_OBJECT(poweroff), "activate", 
G_CALLBACK(neod_buttonactions_popup_selected_poweroff), NULL );
-            gtk_menu_shell_append( GTK_MENU_SHELL(power_menu), poweroff );
-            gtk_widget_show_all( GTK_WIDGET(power_menu) );
-        }
-        gtk_menu_popup( GTK_MENU(power_menu), NULL, NULL, 
neod_buttonactions_popup_positioning_cb, 0, 0, GDK_CURRENT_TIME );
+        neod_buttonactions_show_power_menu();
     }
     return FALSE;
 }

Modified: trunk/src/target/OM-2007.2/daemons/neod/src/buttonactions.h
===================================================================
--- trunk/src/target/OM-2007.2/daemons/neod/src/buttonactions.h 2007-09-03 
11:02:53 UTC (rev 2898)
+++ trunk/src/target/OM-2007.2/daemons/neod/src/buttonactions.h 2007-09-03 
19:40:40 UTC (rev 2899)
@@ -28,6 +28,9 @@
 gboolean neod_buttonactions_aux_timeout( guint timeout );
 gboolean neod_buttonactions_power_timeout( guint timeout );
 
+void neod_buttonactions_show_aux_menu();
+void neod_buttonactions_show_power_menu();
+
 void neod_buttonactions_powersave_reset();
 
 gboolean neod_buttonactions_powersave_timeout1( guint timeout );




--- End Message ---
--- Begin Message ---
Author: mickey
Date: 2007-09-04 08:20:38 +0200 (Tue, 04 Sep 2007)
New Revision: 2900

Modified:
   
trunk/src/target/OM-2007.2/panel-plugins/openmoko-panel-gps/src/openmoko-panel-gps.c
Log:
openmoko-panel-gps: not a container


Modified: 
trunk/src/target/OM-2007.2/panel-plugins/openmoko-panel-gps/src/openmoko-panel-gps.c
===================================================================
--- 
trunk/src/target/OM-2007.2/panel-plugins/openmoko-panel-gps/src/openmoko-panel-gps.c
        2007-09-03 19:40:40 UTC (rev 2899)
+++ 
trunk/src/target/OM-2007.2/panel-plugins/openmoko-panel-gps/src/openmoko-panel-gps.c
        2007-09-04 06:20:38 UTC (rev 2900)
@@ -40,7 +40,7 @@
 
     applet = g_slice_new (GpsApplet);
 
-    moko_panel_applet_set_icon( GTK_CONTAINER(mokoapplet), PKGDATADIR 
"/GPS.png" );
+    moko_panel_applet_set_icon( mokoapplet, PKGDATADIR "/GPS.png" );
     gtk_widget_show_all( GTK_WIDGET(mokoapplet) );
     return GTK_WIDGET(mokoapplet);
 };




--- End Message ---
--- Begin Message ---
Author: mickey
Date: 2007-09-04 11:33:29 +0200 (Tue, 04 Sep 2007)
New Revision: 2901

Modified:
   trunk/src/target/OM-2007.2/daemons/neod/src/buttonactions.c
Log:
neod: add aux menu entry for toggling fullscreen mode


Modified: trunk/src/target/OM-2007.2/daemons/neod/src/buttonactions.c
===================================================================
--- trunk/src/target/OM-2007.2/daemons/neod/src/buttonactions.c 2007-09-04 
06:20:38 UTC (rev 2900)
+++ trunk/src/target/OM-2007.2/daemons/neod/src/buttonactions.c 2007-09-04 
09:33:29 UTC (rev 2901)
@@ -399,9 +399,49 @@
         g_assert( FALSE ); // fail here if called for unknown menu
 }
 
+void neod_buttonactions_popup_selected_fullscreen( GtkMenuItem* menu, gpointer 
user_data )
+{
+    static is_fullscreen = 0;
+
+    gtk_widget_hide( aux_menu );
+    Window xwindow = get_window_property( gdk_x11_get_default_root_xwindow(), 
gdk_x11_get_xatom_by_name("_NET_ACTIVE_WINDOW") );
+    const char* title = get_text_property( xwindow, 
gdk_x11_get_xatom_by_name("_NET_WM_NAME") );
+    g_debug( "active Window = %d ('%s')", (int) xwindow, title );
+
+    if ( strcmp( "Today", title ) == 0 )
+    {
+        g_debug( "sorry, i'm not going to fullscreen the today window" );
+        return;
+    }
+
+    Display* display = XOpenDisplay( NULL );
+
+    XEvent xev;
+    xev.xclient.type = ClientMessage;
+    xev.xclient.serial = 0;
+    xev.xclient.send_event = True;
+    xev.xclient.display = display;
+    xev.xclient.window = xwindow;
+    xev.xclient.message_type = gdk_x11_get_xatom_by_name( "_NET_WM_STATE" );
+    xev.xclient.format = 32;
+    xev.xclient.data.l[0] = 1 - is_fullscreen; // ADD = 1, REMOVE = 0
+
+    xev.xclient.data.l[1] = 
gdk_x11_get_xatom_by_name("_NET_WM_STATE_FULLSCREEN");
+    xev.xclient.data.l[2] = 0;
+    xev.xclient.data.l[3] = 0;
+    xev.xclient.data.l[4] = 0;
+
+    //TODO: add timeout checking for response
+    XSendEvent (display, gdk_x11_get_default_root_xwindow (), False,
+                SubstructureRedirectMask | SubstructureNotifyMask, &xev);
+    XCloseDisplay( display );
+
+    is_fullscreen = 1 - is_fullscreen;
+}
+
 void neod_buttonactions_popup_selected_orientation( GtkMenuItem* menu, 
gpointer user_data )
 {
-    gtk_widget_hide( power_menu );
+    gtk_widget_hide( aux_menu );
     if ( orientation )
         g_spawn_command_line_async( "xrandr -o 1", NULL );
     else
@@ -411,7 +451,7 @@
 
 void neod_buttonactions_popup_selected_screenshot( GtkMenuItem* menu, gpointer 
user_data )
 {
-    gtk_widget_hide( power_menu );
+    gtk_widget_hide( aux_menu );
     g_spawn_command_line_async( "gpe-scap", NULL );
 }
 
@@ -478,6 +518,10 @@
     {
         aux_menu = gtk_menu_new();
 
+        GtkWidget* fullscreen = gtk_menu_item_new_with_label( "Toggle 
Fullscreen" );
+        g_signal_connect( G_OBJECT(fullscreen), "activate", 
G_CALLBACK(neod_buttonactions_popup_selected_fullscreen), NULL );
+        gtk_menu_shell_append( GTK_MENU_SHELL(aux_menu), fullscreen );
+
         GtkWidget* orientation = gtk_menu_item_new_with_label( "Swap 
Orientation" );
         g_signal_connect( G_OBJECT(orientation), "activate", 
G_CALLBACK(neod_buttonactions_popup_selected_orientation), NULL );
         gtk_menu_shell_append( GTK_MENU_SHELL(aux_menu), orientation );




--- End Message ---
_______________________________________________
commitlog mailing list
[email protected]
http://lists.openmoko.org/mailman/listinfo/commitlog

Reply via email to