146 GdkDragContext *context, |
146 GdkDragContext *context, |
147 guint time, |
147 guint time, |
148 gpointer udata) |
148 gpointer udata) |
149 { |
149 { |
150 printf("drag end\n"); |
150 printf("drag end\n"); |
151 |
|
152 } |
|
153 |
|
154 static gboolean drag_failed( |
|
155 GtkWidget *widget, |
|
156 GdkDragContext *context, |
|
157 GtkDragResult result, |
|
158 gpointer udata) |
|
159 { |
|
160 printf("drag failed: %d\n", result); |
|
161 |
151 |
162 } |
152 } |
163 |
153 |
164 static GtkTargetEntry targetentries[] = |
154 static GtkTargetEntry targetentries[] = |
165 { |
155 { |
214 UiListModel *listmodel = ui_list_model_new(obj, var, model); |
204 UiListModel *listmodel = ui_list_model_new(obj, var, model); |
215 gtk_tree_view_set_model(GTK_TREE_VIEW(view), GTK_TREE_MODEL(listmodel)); |
205 gtk_tree_view_set_model(GTK_TREE_VIEW(view), GTK_TREE_MODEL(listmodel)); |
216 |
206 |
217 //g_signal_connect(view, "drag-begin", G_CALLBACK(drag_begin), NULL); |
207 //g_signal_connect(view, "drag-begin", G_CALLBACK(drag_begin), NULL); |
218 //g_signal_connect(view, "drag-end", G_CALLBACK(drag_end), NULL); |
208 //g_signal_connect(view, "drag-end", G_CALLBACK(drag_end), NULL); |
219 //g_signal_connect(view, "drag-failed", G_CALLBACK(drag_failed), NULL); |
|
220 |
209 |
221 // add TreeView as observer to the UiList to update the TreeView if the |
210 // add TreeView as observer to the UiList to update the TreeView if the |
222 // data changes |
211 // data changes |
223 UiListView *tableview = malloc(sizeof(UiListView)); |
212 UiListView *tableview = malloc(sizeof(UiListView)); |
224 tableview->obj = obj; |
213 tableview->obj = obj; |