diff options
author | Carsten Reckord | 2015-02-11 20:56:42 +0000 |
---|---|---|
committer | Carsten Reckord | 2015-02-11 20:56:42 +0000 |
commit | 120a80f332b7710b2739c00d08b2fdfa285e29f1 (patch) | |
tree | d895779e8828170f968bde9a9170eb78f6d4c42e | |
parent | a8d38e87b014d6a541d07778d9772130fcd6ebcd (diff) | |
download | org.eclipse.epp.mpc-120a80f332b7710b2739c00d08b2fdfa285e29f1.tar.gz org.eclipse.epp.mpc-120a80f332b7710b2739c00d08b2fdfa285e29f1.tar.xz org.eclipse.epp.mpc-120a80f332b7710b2739c00d08b2fdfa285e29f1.zip |
458846: [GTK] MPC content tabs broken in latest Linux/GTK build
- reparent shared viewer on tab change, suggested fix from bug 458844
Bug: 458846
Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=458846
-rw-r--r-- | org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/wizards/MarketplacePage.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/wizards/MarketplacePage.java b/org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/wizards/MarketplacePage.java index 5844bd35..8568938e 100644 --- a/org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/wizards/MarketplacePage.java +++ b/org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/wizards/MarketplacePage.java @@ -148,6 +148,8 @@ public class MarketplacePage extends CatalogPage { popularTabItem = createCatalogTab(-1, WIDGET_ID_TAB_POPULAR, currentBranding.getPopularTabName()); installedTabItem = createCatalogTab(-1, WIDGET_ID_TAB_INSTALLED, Messages.MarketplacePage_installed); updateNewsTab(); + + searchTabItem.setControl(tabContent); tabFolder.setSelection(searchTabItem); tabFolder.addSelectionListener(new SelectionListener() { @@ -272,8 +274,13 @@ public class MarketplacePage extends CatalogPage { final TabItem tabItem = getTabItem(contentType); TabItem currentTabItem = getSelectedTabItem(); if (currentTabItem != tabItem) { + if (currentTabItem.getControl() == tabContent) { + currentTabItem.setControl(null); + } tabFolder.setSelection(tabItem); } + tabItem.setControl(null); + tabItem.setControl(tabContent); getViewer().setContentType(contentType); } @@ -304,8 +311,7 @@ public class MarketplacePage extends CatalogPage { } private TabItem createCatalogTab(int index, String widgetId, String label) { - Control tabControl = tabContent; - return createTab(index, widgetId, label, tabControl); + return createTab(index, widgetId, label, null); } private TabItem createTab(int index, String widgetId, String label, Control tabControl) { |