Re: [pygtk] application custom stock icons not working in ubuntu unity top panel menu
Hi I am sorry, I misunderstood you. I got the same as you so I turned off the Unity menu and my app menu now works perfectly. Regards Paul Malherbe On 28/11/11 17:03, Giuseppe Penone wrote: Hi, I already have gnome-tweak-tools installed with "Menus Have Icons" to ON. In fact I can see default stock icons in menus, I cannot see the icons I added to stock, and only in ubuntu unity top panel. Cheers. On Mon, Nov 28, 2011 at 07:12, Paul Malherbe p...@tartan.co.za wrote: Hi I found that i had to install gnome-tweak-tool and then enable the icons and then enable menu icons under themes. Regards Paul Malherbe +27 (0) 21 6711866 +27 (0) 82 9005260 On 28/11/11 01:58, Giuseppe Penone wrote: Hi, I recently noticed that in ubuntu unity the top menu of my apps does not show the (custom) icons I added to the gtk stock, but only the basic stock icons. This happens only since the top menu is displayed in the unity top panel and not in the application window. In place of the correct icons I see "gtk-missing-image". On my apps toolbars and other menus those icons are displayed properly, the problem is only with the top menu. This happens either with pygtk2 (e.g. http://www.giuspen.com/cherrytree/) and gobject introspection (e.g. http://www.giuspen.com/nautilus-pyextensions/). I use gtk ui manager after integrating the stock icons this way: factory = gtk.IconFactory() pixbuf = gtk.gdk.pixbuf_new_from_file(filepath) iconset = gtk.IconSet(pixbuf) factory.add(stock_name, iconset) factory.add_default() If anybody solved this problem please help. Cheers, Giuseppe. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/ -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/ -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/
Re: [pygtk] application custom stock icons not working in ubuntu unity top panel menu
Hi I don't force the users to disable the Unity menu, I only disable in the specific pygtk app. by setting os.environ['UBUNTU_MENUPROXY'] = '0' Regards Paul Malherbe On 29/11/11 14:35, Giuseppe Penone wrote: Hi, I would not force users to remove unity appmenu, I would rather search for a solution. Thanks anyway. Cheers, Giuseppe. On Tue, Nov 29, 2011 at 09:47, Paul Malherbe p...@tartan.co.za wrote: Hi I am sorry, I misunderstood you. I got the same as you so I turned off the Unity menu and my app menu now works perfectly. Regards Paul Malherbe On 28/11/11 17:03, Giuseppe Penone wrote: Hi, I already have gnome-tweak-tools installed with "Menus Have Icons" to ON. In fact I can see default stock icons in menus, I cannot see the icons I added to stock, and only in ubuntu unity top panel. Cheers. On Mon, Nov 28, 2011 at 07:12, Paul Malherbe p...@tartan.co.za wrote: Hi I found that i had to install gnome-tweak-tool and then enable the icons and then enable menu icons under themes. Regards Paul Malherbe +27 (0) 21 6711866 +27 (0) 82 9005260 On 28/11/11 01:58, Giuseppe Penone wrote: Hi, I recently noticed that in ubuntu unity the top menu of my apps does not show the (custom) icons I added to the gtk stock, but only the basic stock icons. This happens only since the top menu is displayed in the unity top panel and not in the application window. In place of the correct icons I see "gtk-missing-image". On my apps toolbars and other menus those icons are displayed properly, the problem is only with the top menu. This happens either with pygtk2 (e.g. http://www.giuspen.com/cherrytree/) and gobject introspection (e.g. http://www.giuspen.com/nautilus-pyextensions/). I use gtk ui manager after integrating the stock icons this way: factory = gtk.IconFactory() pixbuf = gtk.gdk.pixbuf_new_from_file(filepath) iconset = gtk.IconSet(pixbuf) factory.add(stock_name, iconset) factory.add_default() If anybody solved this problem please help. Cheers, Giuseppe. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/ -- This message has been
Re: [pygtk] application custom stock icons not working in ubuntu unity top panel menu
Hi I found that i had to install gnome-tweak-tool and then enable the icons and then enable menu icons under themes. Regards Paul Malherbe +27 (0) 21 6711866 +27 (0) 82 9005260 On 28/11/11 01:58, Giuseppe Penone wrote: Hi, I recently noticed that in ubuntu unity the top menu of my apps does not show the (custom) icons I added to the gtk stock, but only the basic stock icons. This happens only since the top menu is displayed in the unity top panel and not in the application window. In place of the correct icons I see "gtk-missing-image". On my apps toolbars and other menus those icons are displayed properly, the problem is only with the top menu. This happens either with pygtk2 (e.g. http://www.giuspen.com/cherrytree/) and gobject introspection (e.g. http://www.giuspen.com/nautilus-pyextensions/). I use gtk ui manager after integrating the stock icons this way: factory = gtk.IconFactory() pixbuf = gtk.gdk.pixbuf_new_from_file(filepath) iconset = gtk.IconSet(pixbuf) factory.add(stock_name, iconset) factory.add_default() If anybody solved this problem please help. Cheers, Giuseppe. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/ -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/
Re: [pygtk] py2exe only support python2.5
Hi I am using py2exe with python 2.7 without any problems. Regards Paul Malherbe On 26/07/11 04:17, dan zheng wrote: I google a lot to solve my py2exe's exe program coming from pygtk,my python version is 2.6,but someone say py2exe can only work in python2.5,so does anyone have such suffer? -- This message has been scanned for viruses and dangerous content by *MailScanner* http://www.mailscanner.info/, and is believed to be clean. ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/ -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/
Re: [pygtk] PyGTK on Windows Vista
Hi You might have to run the all-in-one installer as the administrator. Regards _*Paul Malherbe*_ +27 (0) 21 6711866 +27 (0) 82 9005260 On 24/05/11 12:37, Vic Watson wrote: Hi All. Firstly, I should introduce myself – I’m Vic, and I’m a software contractor. And I’m currently on-site at an important customer :-) I’ve built an app in Python/Gtk, and it’s all rather wonderful (I’m a bit of a Gtk fan, but comparatively new to Python). Now for the difficulty: I’ve deployed the app on numerous WinXP machines, and all is well. But one of my users is trying to install onto a Vista machine, and he’s having trouble with the all-in-one PyGtk installer. On running it, he gets an error something like “TARGETDIR property is not set”. We’re using Python 2.7, with the pygtk-all-in-one-2.22.6.win32-py2.7.msi installer (but we’ve also tried the 2.24 version with the same results). We’ve tried ignoring TARGETDIR, setting it in the environment, setting it on the command line, running the msi file from a file browser, running it from the command line with msiexec, … Has anyone seen this? I had a quick look through the archives, but didn’t see anything. Not really being a Windows user, I don’t even know where to start digging… Thanks! Vic. -- This message has been scanned for viruses and dangerous content by *MailScanner* http://www.mailscanner.info/, and is believed to be clean. ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/ -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/
Re: [pygtk] Help with box layout
On 13/03/10 21:25, Nikolaus Rath wrote: Neil Dugan py...@butterflystitches.com.au 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. Can someone help me out? What I want is this: - In the first row, the label and spin button should be centered and right next to each other (no space in between). - In the second row, all buttons should have the same size with 10px spacing between them. The set of buttons should again be centered. - In the third line, the one button should be just as large as the 4 buttons in the previous line (and also centered). - The text area should fill the rest of the window Here is the code that I am using right now: I don't know if this is the most effect way of doing what you want. fixed a couple of minor other problems the lambda for the 'delete_event' need arguments and the Control.blub() function need some as well. That already looks almost perfect, thank you so much! (The only problem left is that the buttons grow when the window is resized and that the last button is not as wide as the buttons in the next-to-last line all together). But could you comment on a couple of your changes? I'd very much like to understand what I was doing wrong, so that next time I don't have to ask but can create the layout myself... , | $ diff -u -w box.py box_new.py | --- box.py 2010-03-13 14:06:12.020104562 -0500 | +++ blub.py 2010-03-13 10:36:00.940105089 -0500 | @@ -10,70 +10,69 @@ | | def __init__(self): | self.window = gtk.Window(gtk.WINDOW_TOPLEVEL) | -self.window.connect("delete_event", lambda: False) | + self.window.connect("delete_event", lambda x,y: False) | self.window.connect("destroy", gtk.main_quit) | self.window.set_border_width(10) | self.window.set_title('Dispatch Control') | | vbox = gtk.VBox(False, 10) | -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? | vbox.pack_start(self.make_button_box(), False) | vbox.pack_start(self.make_textarea(), True, True) | -vbox.show() | self.window.add(vbox) | -self.window.show() | + self.window.show_all() | I guess the removal of the .show() calls in favor of the window.show_all() call does not have an effect on the layout, right? | def make_shot_box(self): | -box = gtk.HBox(True, 10) | + box = gtk.HBox(False, 10) This seems to get rid of the spacing between the label and spin button -- but why? | | + box.pack_start(gtk.Label(''), True, True, 0) What is this for? | label = gtk.Label("Create shot:") | label.set_justify(gtk.JUSTIFY_RIGHT) | label.show() | box.pack_start(label, False, False, 0) | | cur_shot = 42 | -self.shotno = gtk.Adjustment(value=cur_shot+1, lower=1, upper=cur_shot+1, | + self.shotno = gtk.Adjustment(value=cur_shot+1, lower=1, | + upper=cur_shot+1, | step_incr=1) | button = gtk.SpinButton(adjustment=self.shotno, digits=0) | button.set_numeric(True) | -button.show() | box.pack_start(button, False, False, 0) | + box.pack_start(gtk.Label(''), True, True, 0) Again, why the empty label? Thanks! -Nikolaus #box.pack_start(gtk.Label(''), True, True) button = gtk.Button("Full Cycle") button.connect('clicked', self.blub, 5) box.pack_start(button, True, True) #box.pack_start(gtk.Label(''), True, True) Should give you what you want :-) -- Regards Paul Malherbe +27 (0) 21 6711866 +27 (0) 82 9005260 -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/
Re: [pygtk] Viewing elaborated report pages on pygtk
Hi I am currently using reportlab to produce .pdf reports. I am then viewing the report using a pdf viewer such as 'Foxit Reader' which I find excellent for this purpose because: 1) The same viewer is available on both platforms 2) The footprint is small 3) You can send the report directly to a printer without having to view it. Regards Paul Malherbe +27 (0) 21 6711866 +27 (0) 82 9005260 John Stowers wrote: On Fri, 2009-02-13 at 19:21 -0200, Jose de Paula Eufrasio Junior wrote: So I am working on a simple risk management app [0] using pygtk and the fantastic kiwi framework. I got to a point where I MUST show some data in a report fashion, and I will surely need many more of those. What path should I take? Understand that I need to make that app run on linux and windows, so all stuff must be portable or pure python: - Create PDFs using geraldo [1] - Create the reports using HTML/CSS and pisa [2] to generate PDFs Both options work ok to CREATE the PDFs, te problem is how to show it inside a window/view using pyGTK. I tried to research poppler to show PDFs but apparently it does not have ports to Win32. The same thing with WebKit [3] (that I could use to show the HTML reports), no apparent download avaiable for webkit-gtk on Win32. I like the HTML approach. All good reporting frameworks that I have seen support HTML output. On linux I would also suggest using webkit to show this html If you want to show html on windows, you could create python bindings to GtkIEEmbed [1] (which is a Gtk widget for embedding internet explorer) John [1] http://live.gnome.org/GtkIEEmbed So, I am open to suggestions. How to show that stuff on pygty? I tought about converting the PDF to something that I can put on a PixBuff, but apparently PIL can't do that. I am lost :P [0] http://github.com/coredump/crisk/tree/master [1] http://geraldo.sourceforge.net/ [2] http://pypi.python.org/pypi/pisa/ [3] http://code.google.com/p/pywebkitgtk/ -- José de Paula Eufrásio Júnior (coredump) MCSO, GRC Professional http://core.eti.br -- José de Paula Eufrásio Júnior (coredump) MCSO, GRC Professional http://core.eti.br ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/ ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/ ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/
Re: [pygtk] hide on delete_event()
Hi The following code seems work OK. import gtk import time def on_window_delete_event(widget, data): print "hide", widget widget.hide() while gtk.events_pending(): gtk.main_iteration() time.sleep(10) print "show", widget widget.show() return True win = gtk.Dialog() win.connect("delete_event", on_window_delete_event) win.set_size_request(300,200) win.show_all() gtk.main() Regards Paul Malherbe +27 (0) 21 6711866 +27 (0) 82 9005260 Peyman wrote: Hey Neil I tried your method, but it didn't work. I suspected it wouldn't seeing as how it's essntially the same thing I was doing. I wonder what could be causing my problem Thanks anyways Peyman Askari On 9 Dec 2008, at 03:34, Neil Dugan wrote: 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(widget,data,wtree): print "If you can read this, then everything should work fine" widget.hide() return gtk.TRUE But when I do this very exact thing it still gets destroyed. And later when I call the drawingArea widget (inside the window) it claims there is no such widget. Anyone else run into this problem? Thank You Peyman Askari I use this, to hide my dialog class MyDialog : ---cut--- def __init__(self) self.window = gtk.Dialog(..) self.window.connect('delete_event', self.hide) ---cut--- def hide(self, dialog=None, event=None) : self.window.hide() return True # stop any event handling here ---cut--- def show(self, callback = None): self.window.show() ---cut--- Regards Neil ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/ ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/
Re: [pygtk] Notebook
Hi What exactly do you mean by 'disable all other pages' ? Do you mean disable the tags or the pages. Regards Paul Malherbe +27 (0) 21 6711866 +27 (0) 82 9005260 Frdric wrote: Le 29/11/2008, "Frdric" [EMAIL PROTECTED] a crit: I open a config dialog from another dialog. This config dialog mainly contains a notebook with several pages. When opening the config dialog, I select one page, and I would like to disable all other pages. Is it possible? No idea? -- Frdric ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/ ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/
Re: [pygtk] Notebook
Hi The only way I managed to do this was by placing Buttons in the tags. Attached is a simple example. Hope this helps. Regards Paul Malherbe +27 (0) 21 6711866 +27 (0) 82 9005260 Frdric wrote: Le 3/12/2008, "Paul Malherbe" [EMAIL PROTECTED] a crit: What exactly do you mean by 'disable all other pages' ? Do you mean disable the tags or the pages. I don't want the user to switch to other pages of the notebook. -- Frdric import gtk class NoteBook: def __init__(self, tags): self.tags = tags self.mstFrame = gtk.VBox() # Create a new notebook and disable tags self.nb = gtk.Notebook() self.nb.set_tab_pos(gtk.POS_TOP) self.nb.unset_flags(gtk.CAN_FOCUS) self.nb.connect(button-press-event, lambda wid, ret=True: ret) self.mstFrame.pack_start(self.nb, False, False, 0) #=== # Append pages to the notebook #=== for num, tag in enumerate(self.tags): # Create buton for notebook tag but = gtk.Button(tag) but.connect(clicked, self.chgPage, num) # Create alignment alw = gtk.Alignment(0.5, 0.5, 0, 0) alw.set_padding(0, 0, 5, 5) # Create vbox vbx = gtk.VBox(False, 0) vbx.set_size_request(300, 200) alw.add(vbx) # Add alignment and vbox to notebook self.nb.append_page(alw, tab_label=but) # rename widgets for future access exec self.nb.Tag%s = but % num exec self.nb.Page%s = vbx % (num + 1) def chgPage(self, *args): wid, num = args if num != self.nb.get_current_page(): wid.emit_stop_by_name(clicked) self.nb.set_current_page(num) for x in range(len(self.tags)): self.disableTag(x) def disableTag(self, num): exec self.nb.Tag%s.set_sensitive(False) % num def enableTag(self, num): exec self.nb.Tag%s.set_sensitive(True) % num if __name__ == __main__: win = gtk.Window() nb = NoteBook((One, Two, Three)) win.add(nb.mstFrame) win.show_all() gtk.main() ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/
Re: [pygtk] gtk.Table + Scrolledwindow with permanent headers?
Hi Attached is a grid class I wrote which may help you. Regards Paul Laszlo Nagy wrote: I have a gtk.Table inside a scrolled window. I have many rows and columns in the Table. Each cell in the table contains a widget (typically a button, but not necessarily.) Some of the cells on the edges of the table are headers. They should always be visible even when the user scrolls in the middle of the Table. How can I achieve that? If this cannot be done with gtk.Table, can you please suggest another widget that can do the job for me? (If the cells cannot hold Widgets but can receive events then it may be a good solution...) Number of cells can be anything from 10 to 10 000. Thanks, Laszlo ___ 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/ import gtk import pango class ScrollGrid: A scrolled grid widget def __init__(self, **args): defaults = { scrn: None, # A VBox width: 600, height: 400, heads: [],# General Headings cols: None, # Column Headings rows: None, # Number of rows form: [], # Format of data fields as follows: # Code - As per the Format class # Size - Total size . Decimals # Event - True or False data: [], # Main table data event: None, # A function to execute butt: [], # Additional buttons pbar: None} # Progressbar object for nam in args.keys(): defaults[nam] = args[nam] for nam in defaults.keys(): exec self.%s = defaults[nam] % nam self.doVariables() self.doProcess() def doVariables(self): if type(self.butt) == tuple: self.butt = list(self.butt) self.butt.append((gtk-close, self.closeProcess)) def doProcess(self): # main headings colr = self.scrn.get_style().copy().bg[gtk.STATE_ACTIVE] for head in self.heads: ebox = gtk.EventBox() ebox.modify_bg(gtk.STATE_NORMAL, colr) self.scrn.pack_start(ebox, False, False, 0) labl = gtk.Label() ebox.add(labl) if head: labl.set_markup(b%s/b % head.replace(, amp;)) # create a heading scrolled window self.hwin = gtk.ScrolledWindow() self.hwin.set_size_request(self.width, -1) self.hwin.set_policy(gtk.POLICY_NEVER, gtk.POLICY_ALWAYS) self.hadj = self.hwin.get_hadjustment() self.scrn.pack_start(self.hwin, True, True, 0) # create an eventbox ebox = gtk.EventBox() ebox.modify_bg(gtk.STATE_NORMAL, colr) self.hwin.add_with_viewport(ebox) # create a table for the column headings headtab = gtk.Table(rows=len(self.cols), columns=len(self.form), homogeneous=False) ebox.add(headtab) # column headings for y, col in enumerate(self.cols): for x, c in enumerate(col): fmt = %s-%ss % (%, int(self.form[x][1])) head = gtk.Label() head.set_markup(fmt % c.replace(, amp;)) headtab.attach(head, x, x+1, y, y+1, 0, 0, 0, 0) exec self.hlabl_%s_%s = head % (y, x) # create a body scrolled window self.bwin = gtk.ScrolledWindow() self.bwin.set_size_request(self.width, self.height) self.bwin.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_ALWAYS) self.badj = self.bwin.get_hadjustment() self.badj.connect(notify::value, self.doHAdjustment) self.scrn.pack_start(self.bwin, True, True, 0) # create a table for the body details bodytab = gtk.Table(rows=self.rows, columns=len(self.cols[0]), homogeneous=False) self.bwin.add_with_viewport(bodytab) # populate the table # column data col1 = gtk.gdk.color_parse(white) col2 = self.scrn.get_style().copy().bg[gtk.STATE_NORMAL] colr = col2 for y, dat in enumerate(self.data): if self.pbar: self.pbar.displayProgress() if colr == col2: colr = col1 else: colr = col2 for x, d in enumerate(dat): ebox = gtk.EventBox() ebox.modify_bg(gtk.STATE_NORMAL, colr) val = Format(d, self.form[x][0], self.form[x][1]) if val.err: val = Format(d, NA, self.form[x][1]) labl = gtk.Label(val.disp)
[pygtk] Spreadsheet display type
Hi I am trying to write a spreadsheet type display using Tables and ScrolledWindows. What I want is to be able to have headings and data separately so that when I scroll the sheet vertically, the headings do not scroll, and when I scroll horizontally the headings move with the data. Is this possible and if so some help would be appreciated. Regards Paul Malherbe ___ 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] Colors in calendar
Hi You could play around with these widget methods e.g. font = pango.FontDescription("Sans 12") calendar.modify_font(font) base = gtk.gdk.color_parse("red") calendar.modify_base(gtk.STATE_NORMAL, base) Regards Paul Malherbe +27 (0) 21 6711866 +27 (0) 82 9005260 Kosa wrote: nobody? Please help. Kosa - Un mundo mejor es posible - Kosa escribi: I forgot to mention I found the set_marked_date_color method but "'gtk.Calendar' object has no attribute 'set_marked_date_color'" Cheers Kosa - Un mundo mejor es posible - Kosa escribi: Hello list, I'm really loving python and pygtk, but I asure you I ask just thi things I can't find the way to do after several days. This is my question this time: is there any way I can set colors to the gtk.Calendar() widget? I mean, background color, marked day color (besides the default bold mark), perhaps change the "selected-day" color. Thanks in advance. Kosa - Un mundo mejor es posible - ___ 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 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/ -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. ___ 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 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] Re: LCD-style display widget
John Stowers wrote: On Tue, 2008-06-17 at 11:06 +0200, Frédéric Mantegazza wrote: On mardi 17 juin 2008, John Stowers wrote: bzr branch http://johnstowers.co.nz/bzr/pygtk-lcd-widget/ Many thanks, but I can't get the package: bzr waits forever, after creating the pygtk-lcd-widget/ dir and .bzr/ sub-dir... Are you sure? I just did a fresh checkout on another pc and it worked fine With this command?: $ bzr branch http://johnstowers.co.nz/bzr/pygtk-lcd-widget/ (I'm not familiar with bazar...). As I said, some files are first downloaded (I can see a progressbar going to 100%), then, it does nothing, and does not return... Weird, maybe a bzr bug. What does the output with bzr branch http://johnstowers.co.nz/bzr/pygtk-lcd-widget/ --verbose say? Can anyone else test this. You can zoom in and out with scroll wheel (and change brightness with ctrl+scroll). Double click to change text. I attached the files also. ___ 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/ Hi I had to upgrade bzr to version .92 or later after which it worked OK. Regards, Paul ___ 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] fullscreen trouble on windows
I have the same problem. Under linux it works perfectly but under Wimdows XP and Windows 98 SE full screen leaves a gap at the top between the top of the screen and window. Regards, Paul Cubells wrote: En/na khiraly ha escrit: I have written a simple demonstration code[1], but didnt tried out on windows xp (Im at home right now). I will do tomorrow, and will confirm if the demonstration code is right or not. [1]: available at: http://pastebin.ca/977654 It works for me. Ubuntu 7.10 Resolution: 1280x800 Best regards! ___ 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 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] Notebook
Hi Please, Can anyone tell me how to disable a Notebook tab. Thanks, Paul ___ 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] Win32 Buttons
Mark Doukidis wrote: Hi Paul, Off the top of my head, I think it could be related to the theme. GTK install defaults to a MS-Windows theme that does not display stock icons in buttons. Yep. Just tried your example. I changed the theme to Metal and the stock icon appeared. Mark Doukidis On 3/29/07, Paul Malherbe [EMAIL PROTECTED] wrote: Hi Everyone I am having problems displaying buttons in win32. The code runs perfectly under linux and displays the Icon and Text in the button. Under windows however only the text displays. Text: win = gtk.Window() but = gtk.Button(stock=gtk-quit) win.add(but) win.show_all() gtk.main() I am using: python 2.4 Gtk+ Runtime Environment 2.6.10-rc1 pygtk-2.6.3 Is this a known problem or is there something else I need to do in windows? Thanks for any help! Paul Malherbe ___ 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/ Hi Mark Thanks for your help, that sorted it out. Paul ___ 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] Win32 Buttons
Hi Everyone I am having problems displaying buttons in win32. The code runs perfectly under linux and displays the Icon and Text in the button. Under windows however only the text displays. Text: win = gtk.Window() but = gtk.Button(stock=gtk-quit) win.add(but) win.show_all() gtk.main() I am using: python 2.4 Gtk+ Runtime Environment 2.6.10-rc1 pygtk-2.6.3 Is this a known problem or is there something else I need to do in windows? Thanks for any help! Paul Malherbe ___ 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] Tooltip on a TreeViewColumn Heading
Hi All I am trying to put a tooltip on a column heading of a Treeview. Is this possible and if so could someone point me in the right direction. Thanks, Paul ___ 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] Implementing command history with a gtk.Entry
N. French wrote: I have a class that packs a gtk.Entry with a gtk.TextView to make an interactive console. Works great but I would like to add a command history; when the user presses up or down I want to go modify the entry's text to whatever I have stored in the history. My problem is: how do I catch the up/down arrow keypresses? I was looking at the gtk.Entry move-cursor signal but it wasn't clear how I would distinguish an up or down arrow from left or right, or if this even catches cursor movement other than left and right. Any input is appreciated. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ 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/ Hi Here is a class I wrote which might help! Regards #!/usr/bin/python try: import pygtk pygtk.require(2.0) import gtk, os, popen2, sys, time except: sys.exit() class RunPrg: def __init__(self, cmd): if cmd: self.runCmd(cmd) else: self.runProcess() def runProcess(self): win = gtk.Window() win.connect(destroy, self.destroy) win.connect(delete_event, self.destroy) win.connect(key_press_event, self.keyPress) hor = gtk.HBox(False, 0) lab = gtk.Label(Command) self.ent = gtk.Entry() self.aut = gtk.EntryCompletion() self.lst = gtk.ListStore(str) self.aut.set_model(self.lst) self.ent.set_completion(self.aut) self.aut.set_text_column(0) self.openFile() self.ent.connect(activate, self.getCmd, self.ent) self.aut.connect(match-selected, self.getCmd, self.ent) if self.last: self.ent.set_text(self.last) chk = gtk.CheckButton(Xterm) chk.connect(toggled, self.getCmd, self.ent) hor.pack_start(lab, False, False, 5) hor.pack_start(self.ent, False, False, 5) hor.pack_start(chk, False, False, 5) win.add(hor) win.show_all() win.set_position(gtk.WIN_POS_CENTER_ALWAYS) gtk.main() def keyPress(self, widget, data): while gtk.events_pending(): gtk.main_iteration() keyname = gtk.gdk.keyval_name(data.keyval) if keyname == Escape: self.destroy() elif keyname not in (Up, Down): return elif not self.data: return if keyname == Up: if self.pos == len(self.data): pass else: self.pos += 1 elif self.pos: self.pos -= 1 if self.pos == len(self.data): self.ent.set_text(self.last) else: self.ent.set_text(self.data[self.pos]) self.ent.grab_focus() def openFile(self): self.lst.clear() self.data = [] self.last = None home = os.environ.get(HOME) if not os.path.isfile(%s/.runprgrc % home): self.file = open(%s/.runprgrc % home, w) else: self.file = open(%s/.runprgrc % home, r+) old = self.file.readlines() for line in old: self.last = line.replace(\n, ) if not self.data.count(self.last): self.data.append(self.last) self.lst.append([self.last]) self.pos = len(self.data) def destroy(self, *args): gtk.main_quit() sys.exit() def getCmd(self, *args): gtk.main_quit() while gtk.events_pending(): gtk.main_iteration() if type(args[0]) == gtk.CheckButton: xtm = args[0].get_active() cmd = args[1].get_text() elif type(args[0]) == gtk.EntryCompletion: xtm = False cmd = args[1][args[2]][0] else: xtm = False cmd = args[1].get_text() # Check if valid command and on path prg = cmd.split()[0] if os.path.exists(prg): yes = True else: yes = False path = os.environ[PATH].split(:) for p in path: if os.path.exists(os.path.join(p, prg)): yes = True # Execute if valid if yes: if xtm: err = self.runCmd(exec xterm -e '%s|less' % cmd) else: err = self.runCmd(%s % cmd) if not err: self.file.write(%s\n % cmd) # Exit self.file.close() sys.exit() def runCmd(self, cmd): try: fl1 = popen2.Popen3(cmd, True) except: return error if __name__ == __main__: if len(sys.argv) 1: inn = sys.argv[1:] cmd = inn[0] for c in inn[1:]: cmd = %s %s % (cmd, c) else: cmd = None RunPrg(cmd) ___ 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] faq 23.34 How can I use gtk.binding_entry_add
Gustavo J. A. M. Carneiro wrote: Sex, 2006-06-23 às 09:25 +0200, Paul Malherbe escreveu: Hi all Please could someone help me with this problem. Why does the following script, as per the faq, work under linux but not under windows. -- import sys import pygtk if sys.platform != win32: pygtk.require(2.0) import gtk, gobject class MyWindow(gtk.Window): __gsignals__ = dict(\ mywindo=(gobject.SIGNAL_RUN_LAST|gobject.SIGNAL_ACTION,None,(str,))) put here: gobject.type_register(MyWindow) Regards, Thanks, that works great! Paul ___ 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] faq 23.34 How can I use gtk.binding_entry_add
Hi all Please could someone help me with this problem. Why does the following script, as per the faq, work under linux but not under windows. -- import sys import pygtk if sys.platform != win32: pygtk.require(2.0) import gtk, gobject class MyWindow(gtk.Window): __gsignals__ = dict(\ mywindo=(gobject.SIGNAL_RUN_LAST|gobject.SIGNAL_ACTION,None,(str,))) gtk.binding_entry_add_signal(\ MyWindow, gtk.keysyms.Escape, 0, 'mywindo', str, 'Escape') def exit(*args): sys.exit() win = MyWindow() win.connect(mywindo, exit) win.show_all() gtk.main() -- Under windows I get the following: Traceback (most recent call last): File test.py, line 17, in ? win.connect(mywindo, exit) TypeError: unknown signal name I am using gtk+ 2.6.10 and pygtk-2.6.3 on windows 98 but have also tried it with xp. Thanks for any help. Paul Malherbe ___ 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] Question about gtk.Entry
[EMAIL PROTECTED] wrote: On 4/24/06, *Tony Nelson* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: I just use entry.modify_fg( gtk.STATE_NORMAL, gtk.gdk.Color(0x, 0, 0) ). Also, modify_base does the background. Hi, Thank you for your answer Tony, these two functions may prove usefull indeed ! But unfortunately it works neither with my real application nor with the example I put in my previous mail :-( I have tried to modify the first argument of 'modify_fg' (the state of the widget) but it didn't work any better. # File modified_example.py import gtk import pango def entry_changed_callback(entry): entry.modify_fg(gtk.STATE_NORMAL, gtk.gdk.Color(0x, 0, 0)) window=gtk.Window() entry = gtk.Entry() entry.connect('changed', entry_changed_callback) window.add(entry) window.show_all() gtk.main() # End of file Any idea of what's going wrong ? -- Remi ___ 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/ Hi change 'modify_fg' to 'modify_base' as suggested by Tony Your example works ok with me. As sonn as you start entering text the colour changes. Cheers ___ 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.main()
Hello I am currently using the following and I am sure it is not the correct way but it seems working. a = A-class() gtk.main() b = B-class() # Started within the A class gtk.main() gtk.main_quit()# end the B class c = C-class() # Started within the A class gtk.main() gtk.main_quit()# end the C class d = D-class()# Started within the A class gtk.main_quit()# end the D class gtk.main_quit()# end the A class Is there a better way to achieve this? Thanks Paul ___ 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] calling a program from a program
nephish wrote: Hey there, i have a program that calls another program to execute on a button click. Its another pygtk app. And i am using the os.system('python /home/my/myprogram.py') to bring it up. It comes up ok, but when i close its window, the program that called it up is locked up. Um, what could i do about 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/ Hi Instead of using os.system(), try: os.spawnv(os.P_WAIT, ...) to execute the child process and wait for it to end or os.spawnv(os.P_NOWAIT, ...) to executr the child process and continue without waiying for it to end. Regards Paul ___ 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] TextView
Eric Jardim wrote: On 7/4/05, *Paul Malherbe* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: What I would like to do, when this occurs, is display a TextView widget directly under the Entry widget and display each character entered so that with the formatting facilities of the TextView the operator would be able to view all the text. Once the text has been accepted, the TextView would be deleted. Sounds easy. Lay out your widgets on a VBox, with the Entry above the TextView. Set the textview's visibility to false. Connect signal to the Entry, so you can detect when it's text length is greater than 150 chars. When it happens, copy the text to the textviews buffer and set the visibility to true. And it will apear magicaly under the Entry. But this approach might not be intuitive for the user. You should try something like a button aside of the Entry which turns it into a TextView, or pops up a TextView dialog, or something like that. Anyway, does this trick help? [Eric Jardim] Hello Eric Yes, thank you, this does help where I can use a vertical box. In some instances, however, I have a table with many rows and columns and it is here that I have the width constraints e.g. capturing transactions where I have the date, reference number, details, amount, discount etc and the details field can be 150 characters long. In this case I would like to create a TextView and place it under the details field as and when required i.e. when the data entered exceeds the widget width. Can you think of any way I could achieve this. Thanks, Paul ___ 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] TextView
Hi list I am writing a system in pygtk and have the following requirement. Because of size constraints I sometimes enter data into an Entry widget where the widget's width is e.g. 20 characters wide but the maximum entry width is 150 characters. What I would like to do, when this occurs, is display a TextView widget directly under the Entry widget and display each character entered so that with the formatting facilities of the TextView the operator would be able to view all the text. Once the text has been accepted, the TextView would be deleted. The basic concept is simple enough to achieve however I do not know how to position the TextView widget in the correct place i.e. directly under the entry widget. Is there any way of doing that e.g. like the autocompletion entry works. Thanks, any help would be appreciated. Paul Malherbe ___ 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] Modal Windows
Paul Malherbe wrote: Hello Please can anyone help me? In the following test script I am creating windows which are transient and modal. If I destroy the last window and try to grab_focus on a widget on the next window it does not happen. I am obviously missing something! Some help would be appreciated. import pygtk pygtk.require(2.0) import gtk class Test: def __init__(self): # Window One w1 = MkWin() w1.win.show_all() top = w1.win.get_toplevel() # Window Two with entry w2 = MkWin(trans=top) self.e2 = gtk.Entry() w2.win.add(self.e2) self.e2.set_flags(gtk.CAN_FOCUS) w2.win.show_all() # Window Three with entry self.w3 = MkWin(trans=top) e3 = gtk.Entry() self.w3.win.add(e3) e3.connect(activate, self.doTest) e3.set_flags(gtk.CAN_FOCUS) # Focus on entry e3.grab_focus() self.w3.win.show_all() gtk.main() def doTest(self, wid): self.w3.win.destroy() # Focus on entry ??? self.e2.grab_focus() class MkWin: def __init__(self, trans=None): self.win = gtk.Window(type=gtk.WINDOW_TOPLEVEL) self.win.connect('destroy', self.doDestroy) self.win.connect('delete_event', self.doDestroy) if trans: self.win.set_transient_for(trans) self.win.set_decorated(False) self.win.set_modal(True) def doDestroy(self, wid=None, data=None): wid.destroy() if __name__ == __main__: tt = Test() ___ 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/ I am replying to my own posting hoping someone is able to help. Regards, Paul ___ 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] Modal Windows
Hello Please can anyone help me? In the following test script I am creating windows which are transient and modal. If I destroy the last window and try to grab_focus on a widget on the next window it does not happen. I am obviously missing something! Some help would be appreciated. import pygtk pygtk.require(2.0) import gtk class Test: def __init__(self): # Window One w1 = MkWin() w1.win.show_all() top = w1.win.get_toplevel() # Window Two with entry w2 = MkWin(trans=top) self.e2 = gtk.Entry() w2.win.add(self.e2) self.e2.set_flags(gtk.CAN_FOCUS) w2.win.show_all() # Window Three with entry self.w3 = MkWin(trans=top) e3 = gtk.Entry() self.w3.win.add(e3) e3.connect(activate, self.doTest) e3.set_flags(gtk.CAN_FOCUS) # Focus on entry e3.grab_focus() self.w3.win.show_all() gtk.main() def doTest(self, wid): self.w3.win.destroy() # Focus on entry ??? self.e2.grab_focus() class MkWin: def __init__(self, trans=None): self.win = gtk.Window(type=gtk.WINDOW_TOPLEVEL) self.win.connect('destroy', self.doDestroy) self.win.connect('delete_event', self.doDestroy) if trans: self.win.set_transient_for(trans) self.win.set_decorated(False) self.win.set_modal(True) def doDestroy(self, wid=None, data=None): wid.destroy() if __name__ == __main__: tt = Test() ___ 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.Notebook
On Mon, 21 Mar 2005 23:01:55 +0200 (SAST), Paul Malherbe [EMAIL PROTECTED] wrote: I am writing a program using gtk.Notebook with about five pages. The question therefore is how can I selectively disallow access to these pages. hm, someone some weeks ago wanted to disable (deactivate) tabs. I think he got a reply saying that this is not the best Design ever. If you cannot avoid that design, then make add/remove the pages instead of disallowing access to these pages which I think you be to deactivated them so they are not clickabe -- Nikos Kouremenos | Jabber ID: [EMAIL PROTECTED] | http://members.hellug.gr/nkour The problem I have is that responses on one page of the notebook can determine which of the other pages should be accessed. Also I need the data to be entered in a logical sequence therefore I would like to disable access to the next page until the current page has been completed. Thanks, Paul ___ 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.Notebook
On Tue, Mar 22, 2005 at 06:47:39PM +0200, Paul Malherbe wrote: The problem I have is that responses on one page of the notebook can determine which of the other pages should be accessed. Also I need the data to be entered in a logical sequence therefore I would like to disable access to the next page until the current page has been completed. Sounds like a wizard, not like a notebook. There's a reason widgets are designed the way they are wink Take care, -- Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 3361 2331 It is a financial program. The basics are as follows: Page 1 The operator enters the details of e.g. a payment i.e. date, reference number amount, description etc. Page 2 The operator allocates the amount to one or more nominal ledger accounts. Based on the type of account allocated to e.g. Accounts Receivable control the operator would have to allocate it to an individual customer's account i.e. Page 3 or if the account was an Accounts Payable control to the individual supplier's account i.e.Page 4. Pages 3 and 4 differ as to the type and content of information therefore 2 different pages. Thanks, Paul ___ 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.Notebook
Hi I need some help, please. I am writing a program using gtk.Notebook with about five pages. Depending on various conditions certain pages of the Notebook should not be available at certain times. The question therefore is how can I selectively disallow access to these pages. Thanks Paul ___ 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] Focus Cycling
Hello I posted a similar query earlier but I think I phrased it badly. What I am wanting to do is to disable the focus cycling facility of the TAB key. I do realise that I can use the unset_flags option to disable focus on a widget but this also disables explicit focus on that widget. I would like to manually control the focus facility and therefore need to turn the TAB cycling facility off. Is this possible?? Thanks Paul ___ 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] Tab Key
Hi people I would please like to know if it is possible to globally disable the Tab key or any other key for that matter. Thanks Paul [EMAIL PROTECTED] ___ 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] Notebook
Hi I wonder if anyone could assist me in the following. I need to selectively disable tags on a notebook i.e. the operator must not be able to select certain pages by clicking or otherwise selecting the tags. I have tried putting buttons on the tags and making then inactive however a border around the button remains active and I cannot deactivate it. Thanks, Paul ___ 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] Notebook
On Mon, Jan 03, 2005 at 03:12:52PM +0200, Paul Malherbe wrote: I wonder if anyone could assist me in the following. I need to selectively disable tags on a notebook i.e. the operator must not be able to select certain pages by clicking or otherwise selecting the tags. When something is really difficult to do, it may be the case that it shouldn't be done at all. Without knowing about your problem domain, I'd suggest: a) removing pages, instead of hiding them b) reorganizing your UI [more throughly] to not require this In all truth, notebooks with inactive tabs are *not* a common UI idiom, and therefore, probably a bad idea. I can't remember the last time I saw one. Take care, -- Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 3361 2331 ___ 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/ Hi, Thanks for responding. I am migrating a system from Tkinter to PyGTK and this is one of the features of the present system. Available pages are dependant on the operator's permissions. Paul ___ 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] ProgressBar
Hi I would appreciate some help on the following problem I am experiencing. I am migrating a suite from Tkinter to PyGtk and cannot update a Progressbar within a loop e.g. import pygtk pygtk.require('2.0') import gtk class ProgressBar: def __init__(self, scrn, max): align = gtk.Alignment(0.5, 0.5, 1, 0) align.show() scrn.add(align) self.progBar = gtk.ProgressBar() self.progBar.set_size_request(100, 20) self.progBar.set_orientation(0) # left to right self.progBar.set_fraction(0) self.progBar.show() align.add(self.progBar) self.max = max def increment(self, done): frac = float((done * 100.0) / self.max) self.progBar.set_text(%s (%s%s) % \ (Updating Files, str(frac), %)) self.progBar.set_fraction(frac/100.0) if __name__ == __main__: def start(wd): pb = ProgressBar(box, 1000) for x in range(1000): ok = pb.increment(x) win = gtk.Window() win.show() box = gtk.VBox(gtk.FALSE, 0) box.show() win.add(box) but = gtk.Button(start) but.connect(clicked, start) box.add(but) but.show() gtk.main() Any help would be appreciated. Thanks Paul ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/