[pygtk] Undo/redo for gtk.TextBuffer

2010-03-27 Thread Alexander Kuleshov
Hi to all. As is well known in gtk / pygtk is no native support in the widget functionality gtk.TextBuffer Undo / Redo for the text. Collecting the different techniques, tips, sketches code and using your code appeared project pygtk_undo which currently provides support for a simple undo / redo

[pygtk] Undo/redo for gtk.TextView

2010-03-08 Thread Alexander Kuleshov
Hello, Where can i find example undo/redo functional for gtk.Textview but without GtkSourceView? Thank you ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/

[pygtk] Find and Find next in gtk.TextView

2010-03-03 Thread Alexander Kuleshov
Hi to all. I have a gtk.Textview and i must make find text and find next in this textivew. I made find: My code: start_iter = textbuffer.get_start_iter() match_start = textbuffer.get_start_iter() match_end = textbuffer.get_end_iter() found = start_iter.forward_search(search_str,0,

[pygtk] Get textview from scrolledwindow

2010-03-02 Thread Alexander Kuleshov
Hi to all. I have one gtk.ScrolledWindow and gtk.textView in it. How can i get this textview? Thank you. ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/

[pygtk] Instance of class in function

2010-02-28 Thread Alexander Kuleshov
Hi to all. I have a class - inherited from gtk.Window, it opisyvayuyutsya properties window, the location of elements on the window, etc. I also have a function unrelated to zhtomu lezhaschuyuyu class in another file foo1. How can I invoke a method show_all my class in the body of this function

[pygtk] Printing from gtk.TextView

2010-02-26 Thread Alexander Kuleshov
Hello to all. Where can i find simple example - gtk.TextView printing? Thank you. ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/

[pygtk] get label from notebook tab

2010-02-20 Thread Alexander Kuleshov
Hi to all. I have a gtk.Notebook and i want get text of label from current gtk.noteBook tab. I make that: text = self.get_tab_label(self.get_nth_page(self.get_current_page())) But on tab i have hbox and label with close button in hbox. if i print text i see None because it return HBox. How can

[pygtk] close button in notebook

2010-02-18 Thread Alexander Kuleshov
Hi to all. I have one notebook with some tabs in my form and in this tabs i have label-button for closing tab. I have code for this: def new_tab(self,label): self.scrolled_window = gtk.ScrolledWindow() self.add(self.scrolled_window)

[pygtk] gtk.accelerator_parse

2010-02-16 Thread Alexander Kuleshov
Hi to all. I have menu on my form and gtktextview: I create imageitemmenu: self.file_new = gtk.ImageMenuItem(gtk.STOCK_NEW, agr) key,mod = gtk.accelerator_parse(N) self.file_new.add_accelerator(activate, agr, key, mod, gtk.ACCEL_VISIBLE) But when i press n in textview at

[pygtk] TextView on noteBook

2010-02-15 Thread Alexander Kuleshov
Hi to all. I have one notebook one my form and gtk.TextView on each notebook's tab. I add tab with textview so: def new_tab(self): self.editor = Editor() scrolled_window = gtk.ScrolledWindow() self.add(scrolled_window) scrolled_window. add_with_viewport(self.editor)

[pygtk] set current tab in pygtk

2010-02-13 Thread Alexander Kuleshov
Hi to all. I have a notebook and i have textview on notebook's tab. And i have 2 question: 1)How can i set current last tab in notebook: I have: self.tab_panel.set_current_page(pages_num + 1) where in page_num number of notebok tabs, but it's not work. 2)Howcan i get access to gtk.Textview in

[pygtk] scroll in textview and problem with tab

2010-02-11 Thread Alexander Kuleshov
Hi guys. I have following problem. I have code that adds a new tab in NoteBook with gtk.TextView and button and label to close tabs on the tab itself. The problem is that I'm trying to add this to gtk.TextView scroll to scroll the text with scrolled widow, but when you add the tab appears but