thread safety
[hildon] / hildon-widgets / hildon-app.c
index 3a7fd27..a35a332 100644 (file)
 
 /**
  * SECTION:hildon-app
- * @short_description: A base widget to present application
+ * @short_description: A base widget to present application. Deprecated, use #HildonProgram instead.
  * @see_also: #HildonAppView
  *
  * #HildonApp is the base for any hildon application.
  * It controls basic looks and functionality of an application, like a title.
+ *
+ * This widget is deprecated use #HildonProgram instead.
  */
 
 #include <gdk/gdk.h>
@@ -781,7 +783,9 @@ hildon_app_escape_timeout(gpointer app)
        HildonAppPrivate *priv;
        GdkEvent *event;
 
-  g_assert(GTK_WIDGET_REALIZED(app));
+       GDK_THREADS_ENTER ();
+
+       g_assert(GTK_WIDGET_REALIZED(app));
 
        priv = HILDON_APP_GET_PRIVATE(app);
 
@@ -794,6 +798,8 @@ hildon_app_escape_timeout(gpointer app)
 
        priv->escape_timeout = 0;
 
+       GDK_THREADS_LEAVE ();
+       
        return FALSE;   
 }
 
@@ -1469,7 +1475,7 @@ hildon_app_key_release (GtkWidget *widget, GdkEventKey *keyevent)
               fullscreen = hildon_appview_get_fullscreen(appview);
               g_signal_emit_by_name(G_OBJECT(appview),
                           "fullscreen_state_change",
-                          fullscreen);
+                          !fullscreen);
            }
        }
 
@@ -1511,10 +1517,12 @@ hildon_app_key_snooper (GtkWidget *widget, GdkEventKey *keyevent, HildonApp *app
            if ( keyevent->type == GDK_KEY_PRESS ) {
             /* Toggle menu on press, avoid key repeat */
                    if ( priv->lastmenuclick == 0 ){
-                           _hildon_appview_toggle_menu(appview,
-                                           gtk_get_current_event_time());
-                           
                            priv->lastmenuclick = 1;
+                           if (_hildon_appview_toggle_menu(appview,
+                                           gtk_get_current_event_time()))
+                {
+                    return TRUE;
+                }
                    }
            } else if ( keyevent->type == GDK_KEY_RELEASE ) {
             /* We got release, so next press is really a new press, 
@@ -2062,8 +2070,8 @@ void hildon_app_unregister_view(HildonApp *self, gpointer view_ptr)
 
 /**
  * hildon_app_unregister_view_with_id:
- * @self : a #HildonApp
- * @view_id : the ID of the view that should be unregistered
+ * @self: a #HildonApp
+ * @view_id: the ID of the view that should be unregistered
  * 
  * Unregisters a view with specified ID, if it exists.
  */