Changeset 2462 for trunk/applications/openmoko-dialer/src/moko-history.c
- Timestamp:
- 07/04/07 18:35:23 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/applications/openmoko-dialer/src/moko-history.c
r2461 r2462 68 68 enum 69 69 { 70 DIAL_NUMBER, 71 72 LAST_SIGNAL 73 }; 74 75 static guint history_signals[LAST_SIGNAL] = {0, }; 76 77 enum 78 { 70 79 PROP_JOURNAL=1 71 80 }; … … 81 90 }; 82 91 92 83 93 static void 84 94 on_dial_clicked (GtkWidget *button, MokoHistory *history) 85 95 { 86 g_print ("dial clicked\n"); 96 MokoHistoryPrivate *priv; 97 GtkTreeSelection *selection; 98 GtkTreeView *treeview; 99 GtkTreeIter iter; 100 GtkTreeModel *model; 101 gchar *number; 102 103 g_return_if_fail (MOKO_IS_HISTORY (history)); 104 priv = history->priv; 105 106 treeview = GTK_TREE_VIEW (priv->treeview); 107 selection = gtk_tree_view_get_selection (treeview); 108 model = gtk_tree_view_get_model (treeview); 109 110 if (!gtk_tree_selection_get_selected (selection, &model, &iter)) 111 return; 112 113 gtk_tree_model_get (model, &iter, NUMBER_COLUMN, &number, -1); 114 115 g_signal_emit (G_OBJECT (history), history_signals[DIAL_NUMBER], 0, number); 116 117 g_free (number); 87 118 } 88 119 … … 391 422 "A MokoJournal Object", 392 423 G_PARAM_CONSTRUCT|G_PARAM_READWRITE)); 424 history_signals[DIAL_NUMBER] = 425 g_signal_new ("dial_number", 426 G_TYPE_FROM_CLASS (obj_class), 427 G_SIGNAL_RUN_LAST, 428 G_STRUCT_OFFSET (MokoHistoryClass, dial_number), 429 NULL, NULL, 430 g_cclosure_marshal_VOID__STRING, 431 G_TYPE_NONE, 432 1, G_TYPE_STRING); 393 433 394 434 g_type_class_add_private (obj_class, sizeof (MokoHistoryPrivate));
Note: See TracChangeset
for help on using the changeset viewer.
