add src/vvod.py - first approximation
authorAlexandr Popov <popov2al@gmail.com>
Sat, 28 Mar 2009 20:57:08 +0000 (23:57 +0300)
committerAlexandr Popov <popov2al@gmail.com>
Sat, 28 Mar 2009 20:57:08 +0000 (23:57 +0300)
src/vvod.py [new file with mode: 0644]

diff --git a/src/vvod.py b/src/vvod.py
new file mode 100644 (file)
index 0000000..8995427
--- /dev/null
@@ -0,0 +1,39 @@
+#!/usr/bin/env python
+# -*-coding: utf-8 -*-
+# vim: sw=4 ts=4 expandtab ai
+
+import gtk
+
+class Gtk_Inp_Control(object):
+    def __init__(self):
+
+
+class Gtk_Inp_Abstraction(object):
+    pass
+
+
+class Gtk_Inp_Presentation(object):
+    def __init__(self, start_path, count):
+        self.input_vdox = gtk.VBox(False, 0)
+        
+        # Строка ввода каталога
+        self.srch_p_entr = gtk.Entry()
+        self.srch_p_entr.set_text(start_path)
+        
+        label1 = gtk.Label('Files quantity')
+        # Окошко ввода количества файлов, мин значение=1 макс=65536 по умолчанию 10
+        adj = gtk.Adjustment(count, 1, 65536, 1, 5, 0)
+        self.file_cnt = gtk.SpinButton(adj, 0, 0)
+
+        hdox = gtk.HBox(False, 0)
+        hbox.pack_start(label1, False, False, 5)
+        hbox.pack_start(self.file_cnt, False, False, 0)
+
+        self.input_vdox.pack_start(self.srch_p_entr, False, False, 0)
+        self.input_vbox.pack_start(hbox, False, False, 0)
+
+    def get_gui(self):
+        return self.input_vdox
+        
+    def get_data(self):
+        return self.srch_p_entr.get_text(), int( self.file_cnt.get_value() )