Re: [pygtk] Splitting things up

2010-06-28 Thread Neil Dugan
Elver Loho wrote: > Hi! > > I'm a PyGTK newbie. > > I built a small (less than 1k lines) PyGTK-based application back in > 2006 that used SQLObject and was basically a simple GUI for editing > things in a MySQL database table. It was a mixed experience for me. On > the one hand designing a GUI wi

Re: [pygtk] gtk.ComboBoxEntry and "changed" event on keystrokes.

2010-03-30 Thread Neil Dugan
Osmo Maatta wrote: Hello, I have a small application that has a search-field (gtk.ComboBoxEntry) and a button to start a search job. The application will start a new search if user: 1) Selects an item from the gtk.ComboBoxEntry's drop-down list. This is handled by gtk.ComboBoxEntry's "cha

Re: [pygtk] Tool button with menu items and icons.

2010-03-27 Thread Neil Dugan
Osmo Maatta wrote: > Hello, > > My app has a tool-button with menu. I want to populate this menu with > menu-items that have both a label and icon. The menu items appear but > the images (icons) are not shown. > > See this picture (tool button with menu + three menu-items shown) > http://bildr.

Re: [pygtk] Help with box layout

2010-03-15 Thread Neil Dugan
Nikolaus Rath wrote: >>> | -vbox.pack_start(self.make_shot_box(), False) >>> | + vbox.pack_start(self.make_shot_box(), False, False) >>> >>> Isn't the third parameter to pack_start ignored anyway if the second one >>> is False? >> No! the prototype is : >> def pack_start(child, exp

Re: [pygtk] Help with box layout

2010-03-14 Thread Neil Dugan
Nikolaus Rath wrote: > Neil Dugan writes: >> Nikolaus Rath wrote: >>> Hello, >>> >>> For some reason I'm just not able to figure out how use the packing >>> parameters in the right way to get the layout that I want. >>> >>> Ca

Re: [pygtk] Help with box layout

2010-03-12 Thread Neil Dugan
Nikolaus Rath wrote: > Hello, > > For some reason I'm just not able to figure out how use the packing > parameters in the right way to get the layout that I want. > > Can someone help me out? What I want is this: > > - In the first row, the label and spin button should be centered and > ri

Re: [pygtk] [ANNOUNCE] PyPoppler 0.12.0

2009-09-27 Thread Neil Dugan
Gian Mario Tagliaretti wrote: > I am pleased to announce version 0.12.0 of the Python bindings for Poppler. > > It is available at: > http://launchpad.net/poppler-python/trunk/development/+download/pypoppler-0.12.0.tar.gz > md5: 78e9655067b8da2c8ad2565b2620e2f9 > > PyPoppler 0.12.0 (Sep 26 20

Re: [pygtk] Larger Font Size?

2009-08-14 Thread Neil Dugan
Art Hunkins wrote: > I'd like to make a general > declaration to set font size to 14 in my script. > > On another list I was given a suggestion that gave rise to the following: > > Would it be sufficient to: > declare: > from sugar.graphics import style > > and early in my __init__ method specif

[pygtk] gtk.ToggleButton not working.

2009-07-17 Thread Neil Dugan
With pygtk version 2.12.9 this works "button = gtk.ToggleButton('test',False)" but on pygtk version 2.16.1 it no longer works :) I get the error message RuntimeError: more argument specifiers than keyword list entries (remaining format:'):GtkToggleButton.__init__') what do I need to do for it to

Re: [pygtk] GTK_IS_WIDGET on subclass of a widget fails

2009-05-22 Thread Neil Dugan
Christian Becke wrote: > Jeffrey Finkelstein schrieb: >> I'm new to Gtk. I tried to create a subclass of an HBox and add it to a >> window, but I get a GtkWarning telling me that the assertion >> `GTK_IS_WIDGET()' fails on the instance of my subclass. >> >> For example: >> >> ===code=== >> >> fro

Re: [pygtk] Combobox with thousands of rows

2009-03-25 Thread Neil Dugan
Rob Brown-Bayliss wrote: > Hi. > > I need a way to let users pick one of approx 8000 names from a list and > had thought to use a combobox but it is far too slow taking several > seconds to pop up, and scrolling is unusable. > > Does any one have an idea or solution that does not take up too mu

Re: [pygtk] Calendar popup under an entry

2009-03-22 Thread Neil Dugan
Timo wrote: Hello, I would like to have a gtk.Calendar to popup under a gtk.Entry as soon as the user clicks on the entry. So I use the focus-in-event to capture when the user clicks in the entry. But I can't seem to find a way to popup a calendar. Timo

Re: [pygtk] quoting text for markup

2009-03-22 Thread Neil Dugan
Darren Hart wrote: > On Thu, Mar 19, 2009 at 12:59 AM, Walter Leibbrandt > wrote: >> Hi >> >> Darren Hart wrote: >>> When adding text with an & character to a cellrenderertext I get some >>> rendering glitches (and the actual text doesn't get rendered at all). >>> Is there a standard mechanism for

Re: [pygtk] Scrolling to the previous position in a TreeView

2009-01-29 Thread Neil Dugan
Lionel Dricot wrote: > Hello, > > I'm displaying a treeview in my application and I update the content by > creating a new treestore and then, once the treestore is create, I replace > the old one with set_model. > > Unfortunatly, the scroll position is not preserved and, at each refresh, the > s

Re: [pygtk] Multi gtk.EventBox and gtk.Image cause artefacts

2009-01-27 Thread Neil Dugan
MATTHIEU CADET wrote: According to my problem with gtkEventBox, i've only one solution i think there is a way to force refresh all windows and widgets ? maybe my problem is a display bug or maybe i have too much gtkEventBox with gtkImage . Please if someone have any solution for me. I fo

Re: [pygtk] Multi gtk.EventBox and gtk.Image cause artefacts

2009-01-23 Thread Neil Dugan
MATTHIEU CADET wrote: > I've found a solution to remove those artefacts, but the solution is to > don't use gtk.EventBox and just use gtk.Image... > > But for the moment its not very good for me because i need to keep > the image as "clickable" so i can get informations of wich image is > click

Re: [pygtk] [Glade-devel] how to add window as a page to a notebook

2009-01-21 Thread Neil Dugan
Tristan Van Berkom wrote: > On Sat, Jan 10, 2009 at 1:54 AM, anusha k wrote: >> hi, >> >> I am using glade and pygtk to develop an accounting software.In that we have >> two glade files .first glade file contain the main window and the note book >> and the second glade contains the another window

Re: [pygtk] scrolledwindows and treeview

2008-12-28 Thread Neil Dugan
francesco wrote: > Hi, i have a treeview inside a scrolledwindows > when i append a new row scrolledwindows daesn't scroll until bottom but > stay up, > if i scrolled by hand until bottom and so append a new row it scroll a > bit and cover the last row inserted. > HOw can i make scrolledwindows t

Re: [pygtk] hide on delete_event()

2008-12-08 Thread Neil Dugan
Peyman wrote: > Hello > > I am new to this mailing list. Originally I was posting to the glade > mailing list > > My question is a simple one, I want my window to hide when I close it > (by clicking 'x'). I have browsed the web and the answer appears to be > > def on_window_delete_event(widg

Re: [pygtk] Totals in TreeView

2008-10-02 Thread Neil Dugan
Alessandro Dentella wrote: > Hi list, > > I try wit a different subject... sometime that makes the difference! > > I guess I'm not the only one that tried adding a different look for a row. > In internet there's plenty of solutions via a model column and some via > set_cell_data_f

Re: [pygtk] Log window

2008-09-23 Thread Neil Dugan
Frédéric wrote: > > Le 17/9/2008, "Frédéric" <[EMAIL PROTECTED]> a écrit: > >> My app heavily uses the logging module to log a lot of things. As this >> app mainly runs on a Nokia Internet Tablet, I don't want to log in a >> file. I would prefer to log in a special object, and be able to >> show/

Re: [pygtk] How to add items to an empty ComboBox / ComboBoxEntry (created with glade) ?

2008-09-21 Thread Neil Dugan
Mats Taraldsvik wrote: > Dear list, > > I'm creating an application with pyGTK and Glade. In this I want to > populate a combobox(2) depending on the selected item in another > combobox(1). > > Usually, I add None as an item of the comboboxes in glade, because > nothing happens when I try to add

Re: [pygtk] CellRendererButton, or how to pack a Button inside a TreeView

2008-09-21 Thread Neil Dugan
Walter Leibbrandt wrote: Hi, I took the liberty of doing a quick search and found this: http://propython.googlecode.com/svn/gui/chaveiro/eagle.py (class _CellRendererButton). I don't know if/how it works, but that should get you started. :) Regards, Walter Federico wrote: Hi all, Is ther

Re: [pygtk] ScrolledWindow & TextView Problem.

2008-09-14 Thread Neil Dugan
Dominic Salemno wrote: > Greetings, > > Here resides my issue! I have a ScrolledWindow being utilized inside my > application. Contained inside of the ScrolledWindow is a TextView widget. > Last, but certainly not least, is a TextBuffer associated with the TextView > widget. Simple... correct? I t

Re: [pygtk] Widget packing problem

2008-08-09 Thread Neil Dugan
Boris Filipov wrote: > Hello, this is my first post to this list and I hope i don't offend anyone. > I'm writing an application which consists of the following: > Window -> > VBox -> > HBox -> > Button1 > Button2 > Table -> > 16 Rows and 16 co

Re: [pygtk] installing on UBUNTU Hardy Heron

2008-07-18 Thread Neil Dugan
randy wrote: > I'm trying to install PyGtk on UBUNTU Hardy Heron for development, can't > make it work. > > I'm trying to run the demo called base.py: > > #!/usr/bin/env python > # example base.py > > import sys > sys.path.append("/usr/share/python-support/python-gobject") > > > > import pygt

Re: [pygtk] installing on UBUNTU Hardy Heron

2008-07-17 Thread Neil Dugan
randy wrote: > I'm trying to install PyGtk on UBUNTU Hardy Heron for development, can't > make it work. > > I'm trying to run the demo called base.py: > > #!/usr/bin/env python > # example base.py > > import sys > sys.path.append("/usr/share/python-support/python-gobject") > > > > import pygt

Re: [pygtk] Formatting floats in treeview

2008-07-09 Thread Neil Dugan
Jeremy S wrote: If you put a float in a treeview, you get a really long decimal, which is almost always not desired. So, after playing around with it for a while, I came up with this code to truncate floats at 1 decimal place: column.set_cell_data_func(renderer, lambd

Re: [pygtk] TreeView - Making whole row colored

2008-07-09 Thread Neil Dugan
Stephen George wrote: Hi, I am trying to get a treeview (with liststore model) to display rows in different colors based on content in the list. From what I've read in GTK+ 2.0 Tree View Tutorial - Tim-Philipp Muller ( c code based) "The most suitable approach for most cases is that you a

Re: [pygtk] accelerator for an image button.

2008-07-09 Thread Neil Dugan
Gian Mario Tagliaretti wrote: 2007/11/3, Neil Dugan <[EMAIL PROTECTED]>: Hi Neil, I am trying to make an python/gtk+ app. One problem I am having is attaching an accelerator to a image button. This is the code I am using to create the buttons. --- cut --- def index_contro

[pygtk] Geting a window/dialog to appear on a different screen.

2008-06-03 Thread Neil Dugan
Hi, I have a LTSP set-up here. I would like to put a window or dialog on the client screens, but I can't seem to get this to happen I am getting weird errors from gtk.main(). See attachment for the code. The errors I am getting are /media/tmp/testgui:43: GtkWarning: gdk_screen_get_display:

Re: [pygtk] Blocking main loop during execution of external program

2008-05-22 Thread Neil Dugan
Vláďa wrote: Hi, I'd like to ask you for help with solving my problem. First I'll try to describe what I'm doing: I have a PyGTK application which needs to run an external command. I use subprocess.Popen to do it. Then I run a gtk.Dialog (saying "Please wait") and wait until the process is

Re: [pygtk] Contant height of GtkProgressBar

2008-05-10 Thread Neil Dugan
Mitko Haralanov wrote: In my application (GUI designed using Glade2), I have a progress bar that is used by multiple parts of the app. Some of the parts display text in the progress bar and others done. The problem that I am having is that the height of the progress bar changes when there is tex

Re: [pygtk] Label a different font sizes

2008-04-18 Thread Neil Dugan
Vláďa wrote: Thank you for your reply. I know I have to use "set_use_markup(True)". All of the Pango markup attributes work for me except of font size. At the top of the page you are referring there is an example: Blue text So I think my code is correct. The problem is, that the first value

Re: [pygtk] Automatic actions and gtk.FileChooserButton

2008-04-18 Thread Neil Dugan
Marcus Vinicius Eiffle Duarte wrote: Hi, folks! Sorry if this question seems silly, but I am rather new to python and a total newbie regarding Gtk programming, I googled a lot for a solution to my problem and couldn't find something that worked for me. I created a GUI using Glade, which contain

Re: [pygtk] NEWBIE QUESTION: Simple spinbutton example?

2008-03-22 Thread Neil Dugan
Darren Enns wrote: Hello all! I am slowly learning the Python language, and now I am moving into developing GUI apps using PyGTK. I am bumbling/stumbling around with 'spinbutton'. I know how to make the spinbutton appear, but I don't know how to *properly* return the final value for a spinb

Re: [pygtk] Dialog Lifecycle?

2008-03-22 Thread Neil Dugan
Darren Hart wrote: On 3/19/08, Neil Dugan <[EMAIL PROTECTED]> wrote: Darren Hart wrote: I'm trying to add a dialog bound to a menu item. I created the UI in glade. I use the glade.XML.get_widget() to get the dialog, and then show() it from the menuitem action handler. The

Re: [pygtk] Dialog Lifecycle?

2008-03-19 Thread Neil Dugan
Darren Hart wrote: I'm trying to add a dialog bound to a menu item. I created the UI in glade. I use the glade.XML.get_widget() to get the dialog, and then show() it from the menuitem action handler. Then I hide it when the dialog response handler receives RESPONSE_OK. If I CLOSE the dialog h

[pygtk] possible bug in gtk.glade

2008-02-20 Thread Neil Dugan
Hi, I have found a bug but I don't know where it is. I generated a simple glade file with a 'Gnome date' widget in it (just as test). I told glade I didn't want the time widgets displayed, but when I get gtk.glade to generate the window the time widgets are there. glade 3.4.0 python 2.5.1

Re: [pygtk] Toolbar layout button to right

2008-02-19 Thread Neil Dugan
Edward Stow wrote: Hi, I'm having trouble packing a toolbar. I require a toolbar with 3 buttons packed to the left and one that is always on the right. As illustrated below. [Button1__Button2__Button3__Button4] Packing the three to the left is ok. This is the

Re: [pygtk] Yet another threads problem

2008-02-18 Thread Neil Dugan
Mystilleef wrote: Calling Dialog's run method in a thread will crash your app. I learned the hard way (weeks of debugging). I use Windows instead of Dialogs now. Manage showing and hiding the window yourself. Cheers On Feb 18, 2008 7:26 AM, Steve McClure <[EMAIL PROTECTED]> wrote: I use this

[pygtk] python printing and GFax

2008-02-13 Thread Neil Dugan
Hi, When I create a print dialog with gtk.PrintOperation() the GFax virtual fax printer isn't showing up. It is installed and the print requester from gedit does show the GFax printer. Is this a mistake with my set-up ? Or is it a bug with gtk.PrintOperation() or GFax ? Regards Neil. __

Re: [pygtk] exiting app

2008-02-10 Thread Neil Dugan
Martin Bilek wrote: hi all, i make an window and connect to function. win = gtk.Window() win.connect("destroy", exitApp) gtk.main() def exitApp(*args)) dlg = gtk.MessageDialog(type=gtk.MESSAGE_WARNING, buttons=gtk.BUTTONS_OK) dlg.set_markup("Please use Exit from Filemenu instead

Re: [pygtk] Re: Guide of PyGTK and Threads

2008-02-10 Thread Neil Dugan
John Stowers wrote: On Sun, 2008-02-03 at 22:44 -0200, Matí­as Alejandro Torres wrote: I have updated my pygtk threaded demo [0] to include progress reporting and non-blocking cancellation. Check out the linked blog post [2] for a good base upon which to build your own threaded pygtk apps. Joh

Re: [pygtk] Trouble getting a ListStore with dynamic column number.

2008-01-31 Thread Neil Dugan
Stephen George wrote: Neil Dugan wrote: Hi, I am trying to create a dialog with a gtk.TreeView() with a gtk.ListStore() model. I don't know until run time how many columns will be needed. I have managed to create the TreeView but I haven't worked out how to populate it.

[pygtk] Trouble getting a ListStore with dynamic column number.

2008-01-31 Thread Neil Dugan
Hi, I am trying to create a dialog with a gtk.TreeView() with a gtk.ListStore() model. I don't know until run time how many columns will be needed. I have managed to create the TreeView but I haven't worked out how to populate it. Any help appreciated. Regards Neil. import gtk import gobj

Re: [pygtk] Focus issue with change of notebook page

2007-12-20 Thread Neil Dugan
Tony Nelson wrote: At 3:49 PM +1100 12/20/07, Neil Dugan wrote: ... Haven't tried this exactly, but have you tried putting the grab_focus() call after a small timeout delay ? gobject.timeout_add(500,widget.grab_focus) How long should the timeout be to not have it ever be too short?

Re: [pygtk] Focus issue with change of notebook page

2007-12-19 Thread Neil Dugan
Gary Jaffe wrote: Hi all -- I have several pygtk apps that each run in its own page of a notebook. The user can load up and run the apps as he/she wishes. I would like to have the widget that has the focus for each page to still have the focus when the user clicks another notebook tab and then

Re: [pygtk] context menus for ListViews

2007-12-05 Thread Neil Dugan
Caleb Marcus wrote: How can I create context menus for ListView elements? The PyGTK Tutorial doesn't go into this, and I can't follow the GtkTreeView tutorial as it's not in Python. This is the code I use to put a context sensitive menu on a listview -- self.listview = listview = gtk.

Re: [pygtk] Treeview and sqlite

2007-11-17 Thread Neil Dugan
Marcel Stoop wrote: Hey all, First of all I new to python and reading a lot of documentation, but somehow I can't seem to find good information regarding the question below. I'm trying to develop a python/pygtk application which need to store the data from the treeview in a sqlite db. Anybody he

Re: [pygtk] gtk.TextView changing size.

2007-11-08 Thread Neil Dugan
minimum size isn't already set. On 07/11/2007, Neil Dugan <[EMAIL PROTECTED]> wrote: Hi, When you type in the one of the textview widgets in the app. below the size of the textview changes. I would like to stop this. -- cut - #!/usr/bin/env pyt

[pygtk] gtk.TextView changing size.

2007-11-06 Thread Neil Dugan
Hi, When you type in the one of the textview widgets in the app. below the size of the textview changes. I would like to stop this. -- cut - #!/usr/bin/env python import gtk class window(): def __init__(self): window = gtk.Window(gtk

[pygtk] accelerator for an image button.

2007-11-02 Thread Neil Dugan
Hi I am new to this list. I am trying to make an python/gtk+ app. One problem I am having is attaching an accelerator to a image button. This is the code I am using to create the buttons. --- cut --- def index_control(self): hbox = gtk.HBox() for stock i