From 840e1349eadb1aeff254dc9ede62025782cafe08 Mon Sep 17 00:00:00 2001 From: Alexandr Popov Date: Sat, 28 Mar 2009 23:57:08 +0300 Subject: [PATCH] add src/vvod.py - first approximation --- src/vvod.py | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 src/vvod.py diff --git a/src/vvod.py b/src/vvod.py new file mode 100644 index 0000000..8995427 --- /dev/null +++ b/src/vvod.py @@ -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() ) -- 1.7.9.5