r2110 - in trunk/src/target/OM-2007/applications/openmoko-today: . src

thomas at sita.openmoko.org thomas at sita.openmoko.org
Thu May 31 16:25:32 CEST 2007


Author: thomas
Date: 2007-05-31 16:25:31 +0200 (Thu, 31 May 2007)
New Revision: 2110

Modified:
   trunk/src/target/OM-2007/applications/openmoko-today/ChangeLog
   trunk/src/target/OM-2007/applications/openmoko-today/src/today-main.c
Log:
* src/today-main.c: (today_update_date), (today_infoline_new),
(today_launcher_button_new): Run appropriate program when an infoline is
clicked


Modified: trunk/src/target/OM-2007/applications/openmoko-today/ChangeLog
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-today/ChangeLog	2007-05-31 13:44:17 UTC (rev 2109)
+++ trunk/src/target/OM-2007/applications/openmoko-today/ChangeLog	2007-05-31 14:25:31 UTC (rev 2110)
@@ -1,5 +1,11 @@
 2007-05-31  Thomas Wood  <thomas at openedhand.com>
 
+	* src/today-main.c: (today_update_date), (today_infoline_new),
+	(today_launcher_button_new): Run appropriate program when an infoline is
+	clicked
+
+2007-05-31  Thomas Wood  <thomas at openedhand.com>
+
 	* configure.ac:
 	* src/today-main.c: (today_infoline_new): Add startup-notification support
 

Modified: trunk/src/target/OM-2007/applications/openmoko-today/src/today-main.c
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-today/src/today-main.c	2007-05-31 13:44:17 UTC (rev 2109)
+++ trunk/src/target/OM-2007/applications/openmoko-today/src/today-main.c	2007-05-31 14:25:31 UTC (rev 2110)
@@ -42,6 +42,11 @@
 
 #define FREE_ERROR g_error_free (error) ; error = NULL ;
 
+
+/*** functions ***/
+static void today_launcher_clicked_cb (GtkWidget *widget, gchar *command);
+
+
 /*** configuration options ***/
 /* default to false, although this might want to be reversed in the future */
 static gboolean enable_desktop = FALSE;
@@ -82,6 +87,12 @@
 
 /* information lines */
 
+static void
+today_infoline_clicked_cb (GtkWidget *widget, GdkEventButton *button, gchar *data)
+{
+  today_launcher_clicked_cb (widget, data);
+}
+
 /**
  * today_infoline_new:
  * @stock_id: name of the stock icon to use
@@ -103,6 +114,10 @@
   gtk_event_box_set_visible_window (GTK_EVENT_BOX (eventbox), FALSE);
   gtk_container_set_border_width (GTK_CONTAINER (eventbox), 6);
 
+  gtk_widget_add_events (eventbox, GDK_BUTTON_PRESS_MASK);
+
+  g_signal_connect (G_OBJECT (eventbox), "button-press-event", (GCallback) today_infoline_clicked_cb, exec);
+
   hbox = gtk_hbox_new (FALSE, 0);
   gtk_container_add (GTK_CONTAINER (eventbox), hbox);
 
@@ -136,7 +151,7 @@
  * callback for luncher buttons
  */
 
-void
+static void
 today_launcher_clicked_cb (GtkWidget *widget, gchar *command)
 {
   /* The following code is a modified version of code from launcher-util.c in
@@ -215,7 +230,7 @@
  * Return value: The widget to use as the events area
  *
  */
-GtkWidget *
+static GtkWidget *
 today_setup_events_area (const gchar *stock_id)
 {
   GtkWidget        *events_area;





More information about the commitlog mailing list