Changeset 1277
- Timestamp:
- 03/08/07 17:14:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/target/OM-2007/applications/openmoko-today/src/today-main.c
r1275 r1277 181 181 } 182 182 183 /* information lines */ 184 185 /** 186 * today_infoline_new: 187 * @stock_id: name of the stock icon to use 188 * @message: string containing the message 189 * 190 * Utility function to create new info lines 191 * 192 * Return value: The parent widget of the new widgets 193 */ 194 183 195 static GtkWidget * 184 196 today_infoline_new (gchar * stock_id, gchar * message) … … 203 215 } 204 216 217 218 /* launcher buttons */ 219 220 /** 221 * callback for luncher buttons 222 */ 223 static void 224 today_launcher_clicked_cb (GtkWidget *button, gchar *command) 225 { 226 GError *error; 227 228 g_spawn_command_line_async (command, &error); 229 230 if (error) 231 { 232 LOG_ERROR; 233 g_error_free (error); 234 } 235 236 /* TODO: should we hide or quit after launching an application? */ 237 } 238 239 /** 240 * today_launcher_button_new: 241 * @icon: stock name to use as the icon in the button 242 * @exec: command to execute when the button is clicked 243 * 244 * Utility function to create new launcher buttons 245 * 246 * Return value: The parent widget of the new widgets 247 */ 205 248 static GtkWidget * 206 249 today_launcher_button_new (gchar * icon, gchar * exec) … … 212 255 213 256 gtk_widget_set_name (button, "today-launcher-button"); 257 258 g_signal_connect (G_OBJECT (button), 259 "clicked", 260 G_CALLBACK (today_launcher_clicked_cb), 261 exec); 214 262 215 263 return button; … … 325 373 326 374 gtk_container_add (GTK_CONTAINER (button_box), 327 today_launcher_button_new (GTK_STOCK_EXECUTE, " "));375 today_launcher_button_new (GTK_STOCK_EXECUTE, "contacts")); 328 376 gtk_container_add (GTK_CONTAINER (button_box), 329 377 today_launcher_button_new (GTK_STOCK_EXECUTE, ""));
Note: See TracChangeset
for help on using the changeset viewer.
