Re: [pygtk] buttons like the ones in Brasero 0.7.1
Hi juan: i think you mean the buttons that show the recent project created or opened. am i wrong? would be great to port them to pygtk! hope to see the answer. - Original Message From: juan sandrea <[EMAIL PROTECTED]> To: pygtk@daa.com.au Sent: Sunday, July 13, 2008 2:56:14 AM Subject: [pygtk] buttons like the ones in Brasero 0.7.1 Greetings, I'm pretty new new in developing pygtk's applications and currently I've been working in two educational games, the thing is that I want the buttons on my apps to look like the ones in Brasero (I want them to be transparent). How can I achieve this? Thanks. ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
[pygtk] Passing User Data from Signals in Glade
hi: i was trying to figure out how to pass user data from a signal in a entrybox from glade3 to a callback on python, but i can't find any information about it. does anyone knows the a way to do it? thanks for any help you can provide me! Andrea ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
[pygtk] gtk.Entry possible bug
Hi everyone: i'm developing a calculator that would be used on win-all. last friday i decided to make a clean installation for python, pygtk, etc.. so i can make a howto for the installation. i downloaded the must recent version of each program: python-2.5.2.msi pygtk-2.12.1-2.win32-py2.5.exe pycairo-1.4.12-1.win32-py2.5.exe pygobject-2.14.1-1.win32-py2.5.exe gtk-dev-2.12.9-win32-2.exe before making this clean reinstallation, my software was working good. but after the update i got a lot of problems, errors and warnings with a gtk.Entry def callback(self, widget, entry, type): if entry != None: raw_integer = eval(entry.get_text()) else: pass dict[type] = raw_integer print dict one of the several warning was: GtkWarning: gtk_entry_get_text: assertion `GTK_IS_ENTRY (entry)' so i tried new code suggested here: def callback(self, widget, entry, type): print 'widget is entry', widget is entry entry_text = entry.get_chars(0, -1) print "Entry contents: %s\n" % entry_text got a new warning: GtkWarning: gtk_editable_get_chars: assertion `GTK_IS_EDITABLE ( editable)' failed so i tried to reinstall the previous version of pygtk which is: pygtk-2.12.1-1.win32-py2.5.exe and the program worked again with using the first code. i was going to fill a bug on gnome's bugzilla but before doing it. can someone please reproduce (maybe on linux) this bug so i can have confirmation of it before reporting it? thanks! nrayever Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
[pygtk] Refreshing gtk.Entry
hi everyone: i got this problem that i don't know how to solve it. i'm doing a little calculator. It consists of 4 gtk.Entry to get the input and about 16 gtk.Entry to for displaying(outputs) the results. right know i'm testing using only 2 input entries and a clicking on a button to get the result on one output entry. making a just an addition as a test of it. - dict = {} class calc: def button_clicked(self, widget, data=None): if data == "open": file_sel = self.open_file() file_sel elif data == "save": file_sel = self.save_file() file_sel else: dict['mbh'] = dict['t1'] + dict['t2'] dict['mbh1'] = repr(dict['mbh']) print dict return QUOTE: the else part, is for the calculate button, when is clicked. def text_output(self, type): entry = gtk.Entry(5) entry.set_max_length(20) entry.set_width_chars(5) entry.set_editable(False) entry.set_text('') if dict == None: dict[type] = entry.set_data('value', '') else: entry.set_data('value', dict[type]) #value = self.value(type) #entry.set_text('%s' % value) entry.show() return entry def output_box(self, type): entry = self.text_output() box = gtk.HBox(False, 0) box.pack_start(entry, True, False, 0) box.show() return box - then all after this, there is the calculator layout which is made using more def's. and inside one of those def's is when i call the self.text_output. - def notebook1(self): #Calls for previous definitions buttons = self.buttons text_input = self.text_input text_output = self.text_output compensation = self.combo images = self.images() () dpmc3_1.attach(text_output('mbh1'), 1, 2, 1, 2) - the string 'mbh1' (according to my logic) is to identify the entry box that is going to contain the result. so i add it as a key to the dictionary and store the result there. and trying to using it as key to refresh the entry that should contain the result. so right now i know that the result is stored in the dictionary (and indeed it is) on the corresponding key, but how can i refresh the entry itself to display it?? should i need to change the text_output to the gtk.main loop? or any better suggestion? thanks guys Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
[pygtk] Refreshing gtk.Entry
hi everyone: i got this problem that i don't know how to solve it. i'm doing a little calculator. It consists of 4 gtk.Entry to get the input and about 16 gtk.Entry to for displaying(outputs) the results. right know i'm testing using only 2 input entries and a clicking on a button to get the result on one output entry. making a just an addition as a test of it. - dict = {} class calc: def button_clicked(self, widget, data=None): if data == "open": file_sel = self.open_file() file_sel elif data == "save": file_sel = self.save_file() file_sel else: dict['mbh'] = dict['t1'] + dict['t2'] dict['mbh1'] = repr(dict['mbh']) print dict return QUOTE: the else part, is for the calculate button, when is clicked. def text_output(self, type): entry = gtk.Entry(5) entry.set_max_length(20) entry.set_width_chars(5) entry.set_editable(False) entry.set_text('') if dict == None: dict[type] = entry.set_data('value', '') else: entry.set_data('value', dict[type]) #value = self.value(type) #entry.set_text('%s' % value) entry.show() return entry def output_box(self, type): entry = self.text_output() box = gtk.HBox(False, 0) box.pack_start(entry, True, False, 0) box.show() return box - then all after this, there is the calculator layout which is made using more def's. and inside one of those def's is when i call the self.text_output. - def notebook1(self): #Calls for previous definitions buttons = self.buttons text_input = self.text_input text_output = self.text_output compensation = self.combo images = self.images() () dpmc3_1.attach(text_output('mbh1'), 1, 2, 1, 2) - the string 'mbh1' (according to my logic) is to identify the entry box that is going to contain the result. so i add it as a key to the dictionary and store the result there. and trying to using it as key to refresh the entry that should contain the result. so right now i know that the result is stored in the dictionary (and indeed it is) on the corresponding key, but how can i refresh the entry itself to display it?? should i need to change the text_output to the gtk.main loop? or any better suggestion? thanks guys Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Re:Re: [pygtk] (FileChooserDialog) Save-Overwrite
i forgot to tell you that i'm running the program on winxp. does it matter?? - Original Message From: Mitko Haralanov <[EMAIL PROTECTED]> To: pygtk@daa.com.au Sent: Wednesday, May 7, 2008 5:56:50 PM Subject: Re: [pygtk] (FileChooserDialog) Save-Overwrite On Wed, 7 May 2008 15:42:36 -0700 (PDT) Andrea Caminiti <[EMAIL PROTECTED]> wrote: > even if i got the job done, after making some mods, i need to ask: what does > the uri (on the example) do or stands for? In this case, it's the filename. In your case, it shouldn't matter whether you are using get_uri() or get_filename(). > and another question: the overwrite windows appears behind the > filechooserdialog. > is there any way to set that window on top/in front of all windows?? Hmm... don't really know why that's happening. -- Mitko Haralanov == 9. SMIT makes it all so much easier.. --Top 100 things you don't want the sysadmin to say ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Re: [pygtk] (FileChooserDialog) Save-Overwrite
thanks that worked good. but i still have some doubts about it. trying to follow the example that is on filechooser reference i did this: def confirm_overwrite_callback(self, widget): same_name = False if same_name: if same_name: return gtk.FILE_CHOOSER_CONFIRMATION_ACCEPT_FILENAME else: return gtk.FILE_CHOOSER_CONFIRMATION_SELECT_AGAIN else: # fall back to the default dialog return gtk.FILE_CHOOSER_CONFIRMATION_CONFIRM return even if i got the job done, after making some mods, i need to ask: what does the uri (on the example) do or stands for? and another question: the overwrite windows appears behind the filechooserdialog. is there any way to set that window on top/in front of all windows?? - Original Message From: Mitko Haralanov <[EMAIL PROTECTED]> To: pygtk@daa.com.au Sent: Wednesday, May 7, 2008 4:47:02 PM Subject: Re: [pygtk] (FileChooserDialog) Save-Overwrite On Wed, 7 May 2008 12:09:34 -0700 (PDT) Andrea Caminiti <[EMAIL PROTECTED]> wrote: > when i try it, an select an existing file, no overwrite dialog was displayed. > when i check > the file the previous content was changed for the new one. any idea on what's > wrong? > any suggestions? Try connection the dialog's "confirm-overwrite" signal before you run the dialog. If you look at the pygtk documentation for gtk.FileChooser, you'll see an example of how to use the "confirm-overwrite" signal. -- Mitko Haralanov == "Who would have though hell would really exist? And that it would be in New Jersey?" -Leela "Actually..." - Fry ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
[pygtk] (FileChooserDialog) Save-Overwrite
hi: i'm having some troubles trying to figure out how to use the overwrite option. right now i have a save button that is connected the click button signal to def save_file. but feel that i'm doing somethingwrong with the overwrite function. this is the code i'm using. def save_file(self): global file dialog = gtk.FileChooserDialog("Save..", None, gtk.FILE_CHOOSER_ACTION_SAVE, (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, gtk.STOCK_SAVE, gtk.RESPONSE_OK)) dialog.set_default_response(gtk.RESPONSE_OK) filter = gtk.FileFilter() filter.set_name("All files") filter.add_pattern("*") dialog.add_filter(filter) dialog.show() response = dialog.run() if response == gtk.RESPONSE_OK: name = dialog.get_filename() if file == None and file != name: file = open(dialog.get_filename(), 'w') print file elif file != None and name == file: dialog.set_do_overwrite_confirmation(True) dialog.connect("confirm-overwrite", self.confirm_overwrite_callback) file = open(dialog.get_filename(), 'w') print file file.write("something") dialog.destroy() elif response == gtk.RESPONSE_CANCEL: pass dialog.destroy() return def confirm_overwrite_callback(self, widget): uri = gtk.FileChooserDialog.get_filename() if is_uri_read_only(uri): if user_wants_to_replace_read_only_file (uri): return gtk.FILE_CHOOSER_CONFIRMATION_ACCEPT_FILENAME else: return gtk.FILE_CHOOSER_CONFIRMATION_SELECT_AGAIN else: # fall back to the default dialog return gtk.FILE_CHOOSER_CONFIRMATION_CONFIRM return when i try it, an select an existing file, no overwrite dialog was displayed. when i check the file the previous content was changed for the new one. any idea on what's wrong? any suggestions? nrayever Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Re: [pygtk] gtk.Entry confusion
thanks for the answer seth. i think i found a work around. entry.connect("changed", self.callback, entry, type) i don't know if it's the best way to do it, but at least it does the job. so right now i'm printing the dictionary (in the shell) with the callback. and it seem to change dictionary's value on real time as typed. - Original Message From: Seth Mahoney <[EMAIL PROTECTED]> To: Andrea Caminiti <[EMAIL PROTECTED]> Cc: PyGtk Mail-List Sent: Tuesday, April 29, 2008 2:39:51 PM Subject: Re: [pygtk] gtk.Entry confusion Are you saying you have a bunch of entries, and need to read the text of all of them in response to an event? If so, you could use a set of entries and just iterate through them, like: for entries in entry_set: dict[key] = entries.get_text() Or you could try a dict of entries, iterate through the keys (which would be the entries) and store the text in the values, something like: for entries in entry_dict.keys(): entry_dict[entries] = entries.get_text() --Seth On Tue, Apr 29, 2008 at 12:03 PM, Andrea Caminiti <[EMAIL PROTECTED]> wrote: hi: i was trying to figure how to read text from the entry widget. but i need to read them all "at the same time" and store the value of each different entry in a dictionary. this action need to be performed or when the text is inserted or clicking on a button. any suggestions? i know that gtk.Entry has an "activate" signal, but it uses the "enter" as a signal. is there any way to modify the value of the signal to use? thanks for your help and support. andrea caminiti Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
[pygtk] gtk.Entry confusion
hi: i was trying to figure how to read text from the entry widget. but i need to read them all "at the same time" and store the value of each different entry in a dictionary. this action need to be performed or when the text is inserted or clicking on a button. any suggestions? i know that gtk.Entry has an "activate" signal, but it uses the "enter" as a signal. is there any way to modify the value of the signal to use? thanks for your help and support. andrea caminiti Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Re: [pygtk] CellRendererCombo Question
hi john: is there a way to do that wrapping but for rows in the combobox? becuase i have a combobox with 8 elements (image + label) and so the pop down list is very large. it would be great to do that. nrayever Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
[pygtk] MenuBar items
hi guys: i'm still doing my program and i would like to have a menu bar as every program has (file, edit, ., help). and a lot of doubts came to my mind. looking at pygtk tuttorials i found so good examples to follow using gtk.Menubar, gtk.Menu, etc... but seem that this methods are not suggested to be used any more. instead the suggestion is to use gtk.UIManager. so my question here is what should i use? should i use the old style menubar or the new one? what are the pros and cons with each one? and if i choose the ui manager, where i can find some help/tutorial/guide/reference to use it? thanks a lot for your help! nrayever Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Re: [pygtk] liststore (ComboBoxEntry) alignment (justify)
Thanks a lot, now it's ok, 0 warnings! - Original Message From: John Finlay <[EMAIL PROTECTED]> To: Andrea Caminiti <[EMAIL PROTECTED]> Cc: pygtk@daa.com.au Sent: Wednesday, April 23, 2008 1:27:23 PM Subject: Re: [pygtk] liststore (ComboBoxEntry) alignment (justify) Andrea Caminiti wrote: > - Original Message > From: Andrea Caminiti <[EMAIL PROTECTED]> > To: John Finlay <[EMAIL PROTECTED]> > Sent: Wednesday, April 23, 2008 9:16:24 AM > Subject: Re: [pygtk] liststore (ComboBoxEntry) alignment (justify) > > > > >> Andrea Caminiti wrote: >> >>> hi john: >>> >>> i was trying to use the code you just posted to to have a combobox with >>> images and it's labels (text), only, no text entry needed. but i got some >>> warnings. >>> >>> the code i used: >>> >>> def combo(self): >>>#lists = self.list >>> combobox = gtk.ComboBox() >>> list = gtk.ListStore(gtk.gdk.Pixbuf, str) >>> px = gtk.CellRendererPixbuf() >>> text = gtk.CellRendererText() >>> combobox.pack_start(px, True) >>> combobox.pack_start(text, True) >>> combobox.add_attribute(px, "pixbuf", 0) >>> combobox.add_attribute(text, "text", 1) >>> combobox.pack_end(text, True) >>> >>> >> you seem to be adding this twice. I think that's what the error message >> > is about. > > You are adding the cellrenderertext "text" to the combobox twice - once in the pack_start and once in the pack_end. You can only add it once. Remove the line containing pack_end. John Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Re: [pygtk] liststore (ComboBoxEntry) alignment (justify)
- Original Message From: Andrea Caminiti <[EMAIL PROTECTED]> To: John Finlay <[EMAIL PROTECTED]> Sent: Wednesday, April 23, 2008 9:16:24 AM Subject: Re: [pygtk] liststore (ComboBoxEntry) alignment (justify) >Andrea Caminiti wrote: >> hi john: >> >> i was trying to use the code you just posted to to have a combobox with >> images and it's labels (text), only, no text entry needed. but i got some >> warnings. >> >> the code i used: >> >> def combo(self): >>#lists = self.list >> combobox = gtk.ComboBox() >> list = gtk.ListStore(gtk.gdk.Pixbuf, str) >> px = gtk.CellRendererPixbuf() >> text = gtk.CellRendererText() >> combobox.pack_start(px, True) >> combobox.pack_start(text, True) >> combobox.add_attribute(px, "pixbuf", 0) >> combobox.add_attribute(text, "text", 1) >> combobox.pack_end(text, True) >> >you seem to be adding this twice. I think that's what the error message is about. ok, but what am i adding twice? because i need to append 8 elements (image with a label/tag/text) at the combobox. and yes, right now i'm doing that task 8 times. look: pics = gtk.gdk.pixbuf_new_from_file('c:\\images\\bumps\\NE_to_SW_LowerTrace.jpg')#dicts.images['b1']) list.append((pics, 'fking shit'))#dicts.names['b1']) pics = gtk.gdk.pixbuf_new_from_file('c:\\images\\bumps\\NE_to_SW_UpperTrace.jpg')#dicts.images['b1']) list.append((pics, 'fking shit'))#dicts.names['b1']) pics = gtk.gdk.pixbuf_new_from_file('c:\\images\\bumps\\NW_to_SE_LowerTrace.jpg')#dicts.images['b1']) list.append((pics, 'fking shit'))#dicts.names['b1']) pics = gtk.gdk.pixbuf_new_from_file('c:\\images\\bumps\\NW_to_SE_UpperTrace.jpg')#dicts.images['b1']) list.append((pics, 'fking shit'))#dicts.names['b1']) pics = gtk.gdk.pixbuf_new_from_file('c:\\images\\bumps\\SE_to_NW_LowerTrace.jpg')#dicts.images['b1']) list.append((pics, 'fking shit'))#dicts.names['b1']) pics = gtk.gdk.pixbuf_new_from_file('c:\\images\\bumps\\SE_to_NW_UpperTrace.jpg')#dicts.images['b1']) list.append((pics, 'fking shit'))#dicts.names['b1']) pics = gtk.gdk.pixbuf_new_from_file('c:\\images\\bumps\\SW_to_NE_LowerTrace.jpg')#dicts.images['b1']) list.append((pics, 'fking shit'))#dicts.names['b1']) pics = gtk.gdk.pixbuf_new_from_file('c:\\images\\bumps\\SW_to_NE_UpperTrace.jpg')#dicts.images['b1']) list.append((pics, 'fking shit'))#dicts.names['b1']) #combobox.set_use_arrows_always(True) #list combobox.set_model(list) #combobox.connect('changed', self.changed_cb) combobox.set_active(0) return combobox Sorry for the bad language. i was tired off trying to make it work my way and not the right way. >> #for n in range (8): >> #numb =+ 1 >> pics = >> gtk.gdk.pixbuf_new_from_file('c:\\images\\bumps\\NE_to_SW_LowerTrace.jpg')#dicts.images['b1']) >> list.append((pics, 'fucking shit'))#dicts.names['b1']) >> >> python warnings: >> >> dgc-gui.py:71: GtkWarning: gtk_cell_view_cell_layout_pack_end: assertion >> `!gtk_c >> ell_view_get_cell_info (cellview, renderer)' failed >> combobox.pack_end(text, True) >> dgc-gui.py:71: GtkWarning: gtk_tree_view_column_cell_layout_pack_end: >> assertion >> `! gtk_tree_view_column_get_cell_info (column, cell)' failed >> combobox.pack_end(text, True) >> dgc-gui.py:94: GtkWarning: gtk_cell_view_cell_layout_pack_end: assertion >> `!gtk_c >> ell_view_get_cell_info (cellview, renderer)' failed >> combobox.set_model(list) >> dgc-gui.py:278: GtkWarning: gtk_tree_view_column_cell_layout_pack_end: >> assertion >> `! gtk_tree_view_column_get_cell_info (column, cell)' failed >> window.show() >> >> and on the other hand. as you can see, i was trying to use a dictionary in a >> class to get the name and path for the images. but seem that doesn't work. >> is there any way to do it?? or i need to write down each path and label for >> each image... >> >What was the error message when you tried this, if any? yes that are the messages i got when tried it. nrayever Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Re: [pygtk] liststore (ComboBoxEntry) alignment (justify)
hi john: i was trying to use the code you just posted to to have a combobox with images and it's labels (text), only, no text entry needed. but i got some warnings. the code i used: def combo(self): #lists = self.list combobox = gtk.ComboBox() list = gtk.ListStore(gtk.gdk.Pixbuf, str) px = gtk.CellRendererPixbuf() text = gtk.CellRendererText() combobox.pack_start(px, True) combobox.pack_start(text, True) combobox.add_attribute(px, "pixbuf", 0) combobox.add_attribute(text, "text", 1) combobox.pack_end(text, True) #for n in range (8): #numb =+ 1 pics = gtk.gdk.pixbuf_new_from_file('c:\\images\\bumps\\NE_to_SW_LowerTrace.jpg')#dicts.images['b1']) list.append((pics, 'fucking shit'))#dicts.names['b1']) python warnings: dgc-gui.py:71: GtkWarning: gtk_cell_view_cell_layout_pack_end: assertion `!gtk_c ell_view_get_cell_info (cellview, renderer)' failed combobox.pack_end(text, True) dgc-gui.py:71: GtkWarning: gtk_tree_view_column_cell_layout_pack_end: assertion `! gtk_tree_view_column_get_cell_info (column, cell)' failed combobox.pack_end(text, True) dgc-gui.py:94: GtkWarning: gtk_cell_view_cell_layout_pack_end: assertion `!gtk_c ell_view_get_cell_info (cellview, renderer)' failed combobox.set_model(list) dgc-gui.py:278: GtkWarning: gtk_tree_view_column_cell_layout_pack_end: assertion `! gtk_tree_view_column_get_cell_info (column, cell)' failed window.show() and on the other hand. as you can see, i was trying to use a dictionary in a class to get the name and path for the images. but seem that doesn't work. is there any way to do it?? or i need to write down each path and label for each image... nrayever Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
[pygtk] another notebook question
hi guys: i'm new using pygtk. i have some troubles understanding the logic of pygtk. i'm doing a project where i need to have some tabs as firefox. seem that using notebook option would work.but the problem is that i don't understand how to enclose the content that i would like to display on a tab. i mean that how do i "link" some stuff(like labels, more text, tables, etc..) in tab1 and other stuff(tables, more text, text boxes) in tab2 and how not to mix them. any suggestions? thanks for your help. nrayever Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/