Mercurial > projects > dwt-linux
comparison dwt/widgets/Tree.d @ 211:00180515eb65
Update to SWT 3.3.2
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Wed, 19 Mar 2008 21:36:28 +0100 |
parents | 08789b28bdf3 |
children | 8e159d7052e0 |
comparison
equal
deleted
inserted
replaced
210:e3472c527a14 | 211:00180515eb65 |
---|---|
2308 * is set and there are items in the list, OS.gtk_tree_store_clear() | 2308 * is set and there are items in the list, OS.gtk_tree_store_clear() |
2309 * segment faults. The fix is to create a new empty model instead. | 2309 * segment faults. The fix is to create a new empty model instead. |
2310 */ | 2310 */ |
2311 auto selection = OS.gtk_tree_view_get_selection (handle); | 2311 auto selection = OS.gtk_tree_view_get_selection (handle); |
2312 OS.g_signal_handlers_block_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, null, null, udCHANGED); | 2312 OS.g_signal_handlers_block_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, null, null, udCHANGED); |
2313 /* | |
2314 * Bug in GTK. In version 2.8, when gtk_tree_view_set_model() is called, GTK | |
2315 * does not remove the timer used to show animation when expanding a node. This | |
2316 * can cause two possible crashes. The first one happens when the timer expires and | |
2317 * it accesses the expanding node which has been already destroyed. The second one | |
2318 * happens if a new item is created and destroyed before the timer expires. The fix | |
2319 * is to remove the timer by disposing the first item in the tree. | |
2320 */ | |
2321 if (OS.GTK_VERSION < OS.buildVERSION(2, 10, 0)) { | |
2322 if (OS.gtk_tree_model_iter_n_children (modelHandle, null) !is 0) { | |
2323 GtkTreeIter iter; | |
2324 OS.gtk_tree_model_iter_nth_child (modelHandle, &iter, null, 0); | |
2325 OS.gtk_tree_store_remove (modelHandle, &iter); | |
2326 } | |
2327 } | |
2313 // TODO verify if true for tree store | 2328 // TODO verify if true for tree store |
2314 //OS.gtk_tree_store_clear (modelHandle); | 2329 //OS.gtk_tree_store_clear (modelHandle); |
2315 auto oldModel = modelHandle; | 2330 auto oldModel = modelHandle; |
2316 uint[] types = getColumnTypes (Math.max (1,columnCount)); | 2331 uint[] types = getColumnTypes (Math.max (1,columnCount)); |
2317 auto newModel = OS.gtk_tree_store_newv (types.length, types.ptr); | 2332 auto newModel = OS.gtk_tree_store_newv (types.length, types.ptr); |