fix: Debug PluginsView loading and add to UI exports
- Added debug output to diagnose why PluginsView isn't loading - Added PluginsView and WidgetsView to core/ui/__init__.py exports - Removed plugin_manager check that was causing fallback - Will show console output to diagnose the issue
This commit is contained in:
parent
cfdf21ea6d
commit
bd23fc5c65
|
|
@ -1002,12 +1002,24 @@ class PerfectMainWindow(QMainWindow):
|
||||||
|
|
||||||
def _create_plugins_view(self) -> QWidget:
|
def _create_plugins_view(self) -> QWidget:
|
||||||
"""Create the Plugins view."""
|
"""Create the Plugins view."""
|
||||||
|
# Debug info
|
||||||
|
print(f"[PerfectUX] Creating plugins view...")
|
||||||
|
print(f"[PerfectUX] PLUGINS_VIEW_AVAILABLE: {PLUGINS_VIEW_AVAILABLE}")
|
||||||
|
print(f"[PerfectUX] plugin_manager: {self.plugin_manager}")
|
||||||
|
|
||||||
# Try to use the actual PluginsView if available
|
# Try to use the actual PluginsView if available
|
||||||
if PLUGINS_VIEW_AVAILABLE and self.plugin_manager:
|
if PLUGINS_VIEW_AVAILABLE:
|
||||||
try:
|
try:
|
||||||
return PluginsView(self)
|
print("[PerfectUX] Creating PluginsView...")
|
||||||
|
view = PluginsView(self)
|
||||||
|
print("[PerfectUX] PluginsView created successfully!")
|
||||||
|
return view
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
import traceback
|
||||||
print(f"[PerfectUX] Failed to create PluginsView: {e}")
|
print(f"[PerfectUX] Failed to create PluginsView: {e}")
|
||||||
|
traceback.print_exc()
|
||||||
|
else:
|
||||||
|
print("[PerfectUX] PluginsView not available, using fallback")
|
||||||
|
|
||||||
# Fallback to placeholder
|
# Fallback to placeholder
|
||||||
container = QWidget()
|
container = QWidget()
|
||||||
|
|
|
||||||
|
|
@ -7,5 +7,7 @@ Built-in UI views that are part of the framework.
|
||||||
from .settings_view import SettingsView
|
from .settings_view import SettingsView
|
||||||
from .dashboard_view import DashboardView
|
from .dashboard_view import DashboardView
|
||||||
from .search_view import UniversalSearchView
|
from .search_view import UniversalSearchView
|
||||||
|
from .plugins_view import PluginsView
|
||||||
|
from .widgets_view import WidgetsView
|
||||||
|
|
||||||
__all__ = ['SettingsView', 'DashboardView', 'UniversalSearchView']
|
__all__ = ['SettingsView', 'DashboardView', 'UniversalSearchView', 'PluginsView', 'WidgetsView']
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue