modify src/core.py - first approximation
authorAlexandr Popov <popov2al@gmail.com>
Sat, 28 Mar 2009 20:55:28 +0000 (23:55 +0300)
committerAlexandr Popov <popov2al@gmail.com>
Sat, 28 Mar 2009 20:55:28 +0000 (23:55 +0300)
src/core.py

index 9f963a4..96ee2b3 100644 (file)
@@ -2,6 +2,40 @@
 # -*-coding: utf-8 -*-
 # vim: sw=4 ts=4 expandtab ai
 
+import gtk
+import gobject
+
+class Core_Control(object):
+    def __init__(self):
+        from config.py import Config_Control
+        config = Config_Control()
+        
+        from searchfile import Search_File_Control
+        search = Search_File_Control()
+        
+        elem_list = []
+        elem_list.append(vvod.get_ui())
+        elem_list.append(output.get_ui())
+        elem_list.append(search.get_ui())
+        core_present = Core_Presentation(575, 345, elem_list)
+        main = Core_Abstraction(config, core_present, 
+
+                
+class Core_Abstraction(object):
+    def __init__(self, config, ui, vvod, search, output):
+        self.config = config
+        self.ui = ui
+        self.vvod = vvod
+        self.search = search
+        self.output = output
+        self.ui.run()
+
+    def start_search(self):
+        data = self.vvod.get_data()
+        query = self.search.run(self.config, data)
+        self.output.show(query)
+
+        
 class Core_Presentation(gtk.Window):
         """Main window class."""
 ### Window initialization ##################################################
@@ -19,37 +53,7 @@ class Core_Presentation(gtk.Window):
 
         self.add(main_vbox)
 
-    def run(self):
+    def show_mw(self):
         self.show_all()
         gtk.main()
-      
-
-class Core_Abstraction(object):
-    def __init__(self, config, ui, vvod, search, output):
-        self.config = config
-        self.ui = ui
-        self.vvod = vvod
-        self.search = search
-        self.output = output
-        self.ui.run()
-
-    def start_search(self):
-        data = self.vvod.get_data()
-        query = self.search.run(self.config, data)
-        self.output.show()
 
-class Core_Control(object):
-    def __init__(self):
-        from config.py import Config_Control
-        config = Config_Control()
-        
-        from searchfile import Search_File_Control
-        search = Search_File_Control()
-        
-        
-        elem_list = []
-        elem_list.append(vvod.get_ui())
-        elem_list.append(output.get_ui())
-        elem_list.append(search.get_ui())
-        core_present = Core_Presentation(575, 345,
-        main = Core_Abstraction(config, core_present,