diff options
author | Felipe Heidrich <fheidric> | 2003-08-06 20:36:27 +0000 |
---|---|---|
committer | Felipe Heidrich <fheidric> | 2003-08-06 20:36:27 +0000 |
commit | 2c6e6ca4cab8548f4b0d5f585341f75171aa5206 (patch) | |
tree | 8b9595e389915fbf2bdee7c147365241cd8dee39 | |
parent | e5af7ee723dbfcb73d7dd092315b7611cf318447 (diff) | |
download | eclipse.platform.swt-2c6e6ca4cab8548f4b0d5f585341f75171aa5206.tar.gz eclipse.platform.swt-2c6e6ca4cab8548f4b0d5f585341f75171aa5206.tar.xz eclipse.platform.swt-2c6e6ca4cab8548f4b0d5f585341f75171aa5206.zip |
40102
4 files changed, 22 insertions, 26 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java index df5af26108..13fad364d6 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java @@ -260,14 +260,14 @@ public class OS { public static final byte[] preedit_changed = signal("preedit_changed"); public static final byte[] realize = signal("realize"); public static final byte[] row_activated = signal("row_activated"); - public static final byte[] row_collapsed = signal("row_collapsed"); - public static final byte[] row_expanded = signal("row_expanded"); public static final byte[] select = signal("select"); public static final byte[] select_child = signal("select_child"); public static final byte[] show = signal("show"); public static final byte[] show_help = signal("show_help"); public static final byte[] size_allocate = signal("size_allocate"); public static final byte[] switch_page = signal("switch_page"); + public static final byte[] test_collapse_row = signal("test_collapse_row"); + public static final byte[] test_expand_row = signal("test_expand_row"); public static final byte[] toggled = signal("toggled"); public static final byte[] unmap_event = signal("unmap_event"); public static final byte[] unrealize = signal("unrealize"); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java index 7dfbd45f85..7dae0c9ddd 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java @@ -641,7 +641,7 @@ int gtk_row_activated (int tree, int path, int column) { return 0; } -int gtk_row_collapsed (int tree, int iter, int path) { +int gtk_test_collapse_row (int tree, int iter, int path) { int [] index = new int [1]; OS.gtk_tree_model_get (modelHandle, iter, ID_COLUMN, index, -1); Event event = new Event (); @@ -650,16 +650,12 @@ int gtk_row_collapsed (int tree, int iter, int path) { return 0; } -int gtk_row_expanded (int tree, int iter, int path) { +int gtk_test_expand_row (int tree, int iter, int path) { int [] index = new int [1]; OS.gtk_tree_model_get (modelHandle, iter, ID_COLUMN, index, -1); Event event = new Event (); event.item = items [index [0]]; sendEvent (SWT.Expand, event); - int selection = OS.gtk_tree_view_get_selection (handle); - OS.g_signal_handlers_block_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); - OS.gtk_tree_view_expand_row (handle, path, false); - OS.g_signal_handlers_unblock_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); return 0; } @@ -715,8 +711,8 @@ void hookEvents () { int selection = OS.gtk_tree_view_get_selection(handle); OS.g_signal_connect_after (selection, OS.changed, display.windowProc2, CHANGED); OS.g_signal_connect (handle, OS.row_activated, display.windowProc4, ROW_ACTIVATED); - OS.g_signal_connect (handle, OS.row_expanded, display.windowProc4, ROW_EXPANDED); - OS.g_signal_connect (handle, OS.row_collapsed, display.windowProc4, ROW_COLLAPSED); + OS.g_signal_connect (handle, OS.test_expand_row, display.windowProc4, TEST_EXPAND_ROW); + OS.g_signal_connect (handle, OS.test_collapse_row, display.windowProc4, TEST_COLLAPSE_ROW); if (checkRenderer != 0) { OS.g_signal_connect (checkRenderer, OS.toggled, display.windowProc3, TOGGLED); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java index e995192cd6..09d7103a41 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java @@ -486,14 +486,14 @@ public void setExpanded (boolean expanded) { checkWidget(); int path = OS.gtk_tree_model_get_path (parent.modelHandle, handle); if (expanded) { - OS.g_signal_handlers_block_matched (parent.handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, ROW_EXPANDED); + OS.g_signal_handlers_block_matched (parent.handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, TEST_EXPAND_ROW); OS.gtk_tree_view_expand_row (parent.handle, path, false); - OS.g_signal_handlers_unblock_matched (parent.handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, ROW_EXPANDED); + OS.g_signal_handlers_unblock_matched (parent.handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, TEST_EXPAND_ROW); } else { - OS.g_signal_handlers_block_matched (parent.handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, ROW_COLLAPSED); + OS.g_signal_handlers_block_matched (parent.handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, TEST_COLLAPSE_ROW); OS.gtk_widget_realize (parent.handle); OS.gtk_tree_view_collapse_row (parent.handle, path); - OS.g_signal_handlers_unblock_matched (parent.handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, ROW_COLLAPSED); + OS.g_signal_handlers_unblock_matched (parent.handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, TEST_COLLAPSE_ROW); } OS.gtk_tree_path_free (path); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java index d85e349f12..23ec7899b2 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java @@ -105,14 +105,14 @@ public abstract class Widget { static final int PREEDIT_CHANGED = 26; static final int REALIZE = 40; static final int ROW_ACTIVATED = 27; - static final int ROW_COLLAPSED = 28; - static final int ROW_EXPANDED = 29; static final int SELECT = 30; static final int SELECT_CHILD = 31; static final int SHOW = 32; static final int SHOW_HELP = 33; static final int SIZE_ALLOCATE = 34; static final int SWITCH_PAGE = 35; + static final int TEST_COLLAPSE_ROW = 28; + static final int TEST_EXPAND_ROW = 29; static final int TOGGLED = 36; static final int UNMAP_EVENT = 37; static final int UNREALIZE = 38; @@ -616,14 +616,6 @@ int gtk_row_activated (int tree, int path, int column) { return 0; } -int gtk_row_collapsed (int tree, int iter, int path) { - return 0; -} - -int gtk_row_expanded (int tree, int iter, int path) { - return 0; -} - int gtk_select (int item) { return 0; } @@ -648,6 +640,14 @@ int gtk_switch_page (int widget, int page, int page_num) { return 0; } +int gtk_test_collapse_row (int tree, int iter, int path) { + return 0; +} + +int gtk_test_expand_row (int tree, int iter, int path) { + return 0; +} + int gtk_timer () { return 0; } @@ -1217,9 +1217,9 @@ int windowProc (int handle, int arg0, int arg1, int user_data) { case DELETE_RANGE: return gtk_delete_range (handle, arg0, arg1); case DELETE_TEXT: return gtk_delete_text (handle, arg0, arg1); case ROW_ACTIVATED: return gtk_row_activated (handle, arg0, arg1); - case ROW_COLLAPSED: return gtk_row_collapsed (handle, arg0, arg1); - case ROW_EXPANDED: return gtk_row_expanded(handle, arg0, arg1); case SWITCH_PAGE: return gtk_switch_page (handle, arg0, arg1); + case TEST_COLLAPSE_ROW: return gtk_test_collapse_row (handle, arg0, arg1); + case TEST_EXPAND_ROW: return gtk_test_expand_row(handle, arg0, arg1); default: return 0; } } |