From c26cc0eaf204d66b0047720e27e7a0e5b731afcf Mon Sep 17 00:00:00 2001
From: astaric <anze.staric@gmail.com>
Date: Mon, 20 May 2013 16:37:52 +0200
Subject: [PATCH 4/7] Remove addon support.

---
 Orange/canvas/application/canvasmain.py | 40 ---------------------------------
 1 file changed, 40 deletions(-)

diff --git a/Orange/canvas/application/canvasmain.py b/Orange/canvas/application/canvasmain.py
index 8ee3365..e3e6eab 100644
--- a/Orange/canvas/application/canvasmain.py
+++ b/Orange/canvas/application/canvasmain.py
@@ -10,8 +10,6 @@ from functools import partial
 
 import pkg_resources
 
-import Orange.utils.addons
-
 from PyQt4.QtGui import (
     QMainWindow, QWidget, QAction, QActionGroup, QMenu, QMenuBar, QDialog,
     QFileDialog, QMessageBox, QVBoxLayout, QSizePolicy, QColor, QKeySequence,
@@ -45,7 +43,6 @@ from .aboutdialog import AboutDialog
 from .schemeinfo import SchemeInfoDialog
 from .outputview import OutputView
 from .settings import UserSettingsDialog
-from .addons import AddOnManagerDialog
 
 from ..document.schemeedit import SchemeEditWidget
 
@@ -318,12 +315,6 @@ class CanvasMainWindow(QMainWindow):
                        [self.freeze_action,
                         self.dock_help_action]
 
-
-        def addOnRefreshCallback():
-            pass #TODO add new category
-
-        Orange.utils.addons.addon_refresh_callback.append(addOnRefreshCallback)
-
         # Tool bar in the collapsed dock state (has the same actions as
         # the tool bar in the CanvasToolDock
         actions_toolbar = QToolBar(orientation=Qt.Vertical)
@@ -523,13 +514,6 @@ class CanvasMainWindow(QMainWindow):
                     shortcut=QKeySequence.Preferences
                     )
 
-        self.canvas_addons_action = \
-            QAction(self.tr("&Add-ons..."), self,
-                    objectName="canvas-addons-action",
-                    toolTip=self.tr("Manage add-ons."),
-                    triggered=self.open_addons,
-                    )
-
         self.show_output_action = \
             QAction(self.tr("Show Output View"), self,
                     toolTip=self.tr("Show application output."),
@@ -658,7 +642,6 @@ class CanvasMainWindow(QMainWindow):
 #        self.options_menu.addAction("Attach Python Console")
         self.options_menu.addSeparator()
         self.options_menu.addAction(self.canvas_settings_action)
-        self.options_menu.addAction(self.canvas_addons_action)
 
         # Widget menu
         menu_bar.addMenu(self.widget_menu)
@@ -1502,29 +1485,6 @@ class CanvasMainWindow(QMainWindow):
         if status == 0:
             self.__update_from_settings()
 
-    def open_addons(self):
-
-        def getlr():
-            settings = QSettings()
-            settings.beginGroup("addons")
-            lastRefresh = settings.value("addons-last-refresh",
-                          defaultValue=0, type=int)
-            settings.endGroup()
-            return lastRefresh
-        
-        def setlr(v):
-            settings = QSettings()
-            settings.beginGroup("addons")
-            lastRefresh = settings.setValue("addons-last-refresh", int(v))
-            settings.endGroup()
-            
-        dlg = AddOnManagerDialog(self, self)
-        dlg.loadtimefn = getlr
-        dlg.savetimefn = setlr
-        dlg.show()
-        dlg.reloadQ()
-        status = dlg.exec_()
-
     def show_output_view(self):
         """Show a window with application output.
         """
-- 
1.8.4.3

