Re: [pygtk] prepare-Changelog for pygtk
Well, i'm answering myself, because maybe this is useful to somebody. I've got a prepare-changelog for python using Moap [1]. Just get moap from svn [2] and apply a patch [3]. And the just run: $ moap changelog prepare Hope this helps... -- adolfo [1] https://thomas.apestaart.org/moap/trac [2] svn co http://thomas.apestaart.org/moap/svn/trunk moap [3] http://infinicode.org/code/other/moap.diff El dom, 01-06-2008 a las 13:09 +0200, Adolfo González Blázquez escribió: Hello, Does anybody know a prepare-changelog script (like the one on svn.gnome.org/svn/releng/trunk/tools/prepare-ChangeLog.pl) but for parsing pygtk (or plain python) files? It's kinda tiring to write the changelogs by hand when our C brothers can build their changelogs using a script, doesn't it? Thanks in advance! -- adolfo ___ 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/ signature.asc Description: Esta parte del mensaje está firmada digitalmente ___ 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] prepare-Changelog for pygtk
Hello, Does anybody know a prepare-changelog script (like the one on svn.gnome.org/svn/releng/trunk/tools/prepare-ChangeLog.pl) but for parsing pygtk (or plain python) files? It's kinda tiring to write the changelogs by hand when our C brothers can build their changelogs using a script, doesn't it? Thanks in advance! -- adolfo signature.asc Description: Esta parte del mensaje está firmada digitalmente ___ 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] Yet another threads problem
El sáb, 16-02-2008 a las 14:19 +1300, John Stowers escribió: On Fri, 2008-02-15 at 14:05 +0100, Adolfo González Blázquez wrote: Hello, I'm writing a little app that needs 2 windows, a main window, and another for entering data. I'm writing it using Glade, so both windows are defined in one glade file. The second one, emulates a entry dialog, and is modal. My problem is that i want the second window displayed when i click in a button in the main window, and then, when i press Close in the second window, get the text and do some things, and update the main window status bar. I dont quite understand you here, it doesnt sound like a threads issue, more a design issue. When I want to return stuff from a dialog I typically create my own dialog subclass [1] which returns a tuple of the dialog specific information from the (overridden run method). For example (excuse broken pseudocode) class MyDialog(gtk.Dialog) def __init__(self, setting1, setting2, setting3) #call super #save old settings self.oldsetting1 = setting1 ...etc #construct dialog self.widget1 = gtk.Entry() self.widget1.set_text(setting1) ...etc def run(self): if gtk.Dialog.run(self) == gtk.RESPONSE_OK: setting1 = self.widget1.get_text() setting2 = self.widget2.get_text() setting3 = self.widget3.get_text() return setting1, setting2, setting3 else: return self.oldsetting1, self.oldsettin2, self.oldsetting3 then run it with dialog = MyDialog(a,b,c) a,b,c = dialog.run() dialog.distroy() Well, I've subclassed gtk.Dialog as you point, and I'm still having the same issue. I run the dialog, enter the data and click OK. Then it was supposed to hide the dialog, and update the statusbar while things are happening, but in fact the gui freezes till the end. The related code is here: http://pastebin.com/mb2ea398 And a screencast of what is happening in here: http://www.infinicode.org/code/out.ogg Any idea? Regards, John [1] http://davyd.livejournal.com/237414.html Here's a screencast of what i'm doing: http://www.infinicode.org/code/out.ogg What it was supposed to do is: - Open the add window - Enter the text and click close - The add window closes - In the main window status bar appears Conectando... - The status bar changes to Conectado! - A error dialog appers Relevant code here: http://pastebin.com/f6bf4e71b Thanks in advance for any help -- adolfo ___ 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/ signature.asc Description: Esta parte del mensaje está firmada digitalmente ___ 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] Yet another threads problem
Hello, I'm writing a little app that needs 2 windows, a main window, and another for entering data. I'm writing it using Glade, so both windows are defined in one glade file. The second one, emulates a entry dialog, and is modal. My problem is that i want the second window displayed when i click in a button in the main window, and then, when i press Close in the second window, get the text and do some things, and update the main window status bar. Here's a screencast of what i'm doing: http://www.infinicode.org/code/out.ogg What it was supposed to do is: - Open the add window - Enter the text and click close - The add window closes - In the main window status bar appears Conectando... - The status bar changes to Conectado! - A error dialog appers Relevant code here: http://pastebin.com/f6bf4e71b Thanks in advance for any help -- adolfo signature.asc Description: Esta parte del mensaje está firmada digitalmente ___ 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] Updating tooltip on gtk.StatusIcon
Hello, I'm writing a little app that uses gtk.StatusIcon, and I would like to know if is there any way to update the tooltip text while the pointer is hold over the icon. The behaviour I mean is something like Rhythmbox does while playing a song. The tooltip text gets updated when I move the mouse pointer over the icon, but when it stills, no text updating . The related code is quite simple: def __init__(self): self.image = 'icon.png' self.mls = MlStats() self.icon = gtk.StatusIcon() self.icon.set_from_file(self.image) self.icon.set_visible(True) self.icon.connect('activate', self.on_icon_activate) self.menu = self.create_menu() self.timeout = 1000 gobject.timeout_add(self.timeout, self.update) def update(self): stats = self.mls.get_stats() self.icon.set_tooltip(stats) return True Thanks in advance for any help! -- adolfo signature.asc Description: Esta parte del mensaje está firmada digitalmente ___ 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] Updating tooltip on gtk.StatusIcon
El mié, 17-10-2007 a las 19:59 +0200, François Ingelrest escribió: I may be wrong but I think that Rhythmbox uses a custom window to do this, it does not use the tooltip itself (try to compare the look of that window and the one of real tooltip). Yes, the use libsexy to draw the tooltip. Another question would be how to add a custom tooltip to a gtk.StatusIcon On 10/17/07, Adolfo González Blázquez [EMAIL PROTECTED] wrote: Hello, I'm writing a little app that uses gtk.StatusIcon, and I would like to know if is there any way to update the tooltip text while the pointer is hold over the icon. The behaviour I mean is something like Rhythmbox does while playing a song. The tooltip text gets updated when I move the mouse pointer over the icon, but when it stills, no text updating . The related code is quite simple: def __init__(self): self.image = 'icon.png' self.mls = MlStats() self.icon = gtk.StatusIcon() self.icon.set_from_file(self.image) self.icon.set_visible(True) self.icon.connect('activate', self.on_icon_activate) self.menu = self.create_menu() self.timeout = 1000 gobject.timeout_add(self.timeout, self.update) def update(self): stats = self.mls.get_stats() self.icon.set_tooltip(stats) return True Thanks in advance for any help! -- adolfo ___ 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/ signature.asc Description: Esta parte del mensaje está firmada digitalmente ___ 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] Updating tooltip on gtk.StatusIcon
It this maybe a bug (or feature)? Because with one applet that i wrote, with the previous version of pygtk (2.10) the tooltip gets updated. Now (with 2.12) it doesn't update. This was how it worked on 2.10: http://computertemp.berlios.de/screenshots/screenshot_action.gif El mié, 17-10-2007 a las 19:40 +0200, Adolfo González Blázquez escribió: Hello, I'm writing a little app that uses gtk.StatusIcon, and I would like to know if is there any way to update the tooltip text while the pointer is hold over the icon. The behaviour I mean is something like Rhythmbox does while playing a song. The tooltip text gets updated when I move the mouse pointer over the icon, but when it stills, no text updating . The related code is quite simple: def __init__(self): self.image = 'icon.png' self.mls = MlStats() self.icon = gtk.StatusIcon() self.icon.set_from_file(self.image) self.icon.set_visible(True) self.icon.connect('activate', self.on_icon_activate) self.menu = self.create_menu() self.timeout = 1000 gobject.timeout_add(self.timeout, self.update) def update(self): stats = self.mls.get_stats() self.icon.set_tooltip(stats) return True Thanks in advance for any help! -- adolfo ___ 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/ signature.asc Description: Esta parte del mensaje está firmada digitalmente ___ 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] Calendar Widget
You should take a look at PyGtk reference and focus on gtk.Calendar http://www.pygtk.org/pygtk2reference/index.html -- adolfo El lun, 08-10-2007 a las 22:02 +0200, Samuel Abels escribió: Hi, I am looking for a calendar widget similar to the one used in Evolution or Google Mail, for pygtk. Does such a thing exist, or can anyone point me to a (GPL compatible) application from which such a widget could be stolen? -Samuel ___ 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/ signature.asc Description: Esta parte del mensaje está firmada digitalmente ___ 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] Python / PytGTK GNOME Panel applet tutorial
I maintain a python applet called Computer Temperature Monitor. You can download it and take a look on how it works. http://computertemp.berlios.de/ Hope it helps.. -- adolfo El sáb, 22-09-2007 a las 21:41 -0700, Brian Munroe escribió: I am trying to learn the basics of writing GNOME panel applets with Python / PyGTK using Arturo's and Lorenzo's tutorial: http://www.pygtk.org/articles/applets_arturogf/ Even though this tutorial is from 2004, may I safely assume that everything is current, with the exception that gnome.applet is now gnomeapplet? Also, it seems that documentation for writing panel applets is a little sketchy (or maybe my google skills suck) - regardless, if anyone has additional documentation I should read or tips on getting started I'd really appreciate it. I'm assuming that the PyGTK mailing list is the appropriate place for these questions, if not, my apologies in advance. thanks -- brian ___ 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/ signature.asc Description: Esta parte del mensaje está firmada digitalmente ___ 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] About evolution-python
Hello, I am trying to write a little program using the evolution-data-server python bindings [1], provided by the Conduit project. What I'm trying to do is to get all contacts from an addresbook, and display their Name, Email and Birth date, quite simple. My problem is that the 'birth-date' property returns and EContactDate (struct {year, month, day}) but I don't know how to access that data. When i try date.year i get: AttributeError: 'gobject.GBoxed' object has no attribute 'year' Any idea on how to deal with this? Thanks in advance! -- adolfo - The code is: #! /usr/bin/env python # -*- coding: utf8 -*- from evolution import ebook as eb book = eb.open_addressbook('default') contacts = book.get_all_contacts() for c in contacts: name = c.get_property('full-name') email = c.get_property('email-1') date = c.get_property('birth-date') print name + ' ' + email +'' if date != None: print date.year, date.month, date.day - [1] http://www.conduit-project.org/wiki/evolution-python signature.asc Description: Esta parte del mensaje está firmada digitalmente ___ 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] (no subject)
Hi! I've wrote a simple directory tree widget (and maybe not very gtk standard widget) which is used in a little app called pyRenamer. You can check the widget here: http://www.infinicode.org/code/pyrenamer/src/treefilebrowser.py En example on how to use it: http://www.infinicode.org/code/pyrenamer/src/treefilebrowser_example.py And pyrenamer, application using it: http://www.infinicode.org/code/pyrenamer/ Hope it's useful... -- adolfo El mar, 13-03-2007 a las 19:51 +0100, [EMAIL PROTECTED] escribió: Hello all! Unfortunately, there is not a high level widget to construct a directory tree. I think the only solution is to use a gtk.TreeStore, but what trick to make tree columns dinamically? I agree examples or tutorial's link. Thanks! -- Leggi GRATIS le tue mail con il telefonino i-mode™ di Wind http://i-mode.wind.it ___ 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/ signature.asc Description: Esta parte del mensaje está firmada digitalmente ___ 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] Tree-like Filebrowser widget
Hello, I have written a treelike file browser widget, similar to the one used in nautilus sidebar. It's the first time i write something like a gnome widget, so i'm sure it's not compliant to pygtk guidelines. So maybe somebody can take a look at the code, and suggest better ways to implement it. And yes, the code sucks ;) The code is in here: http://www.infinicode.org/code/pyrenamer/src/treefilebrowser.py And a very simple example here: http://www.infinicode.org/code/pyrenamer/src/treefilebrowser_example.py I've written this to use it in a little application called pyRenamer, which is a mass file renamer, in the vain of GPRename. You can see it here: http://www.infinicode.org/code/pyrenamer/ Comments on pyRenamer are also welcome! Cheers! -- adolfo signature.asc Description: Esta parte del mensaje está firmada digitalmente ___ 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] Using a CheckButton on an applet Menu
Hello, I sent an email [1] to this list about this problem in april, but got no responses. I'm thinking now of trying to implement this in my applet, so that's why i'm asking again. The problem is that i have an applet [2], using the gnomeapplet pygtk module. I build the applet context menu using the gnomeapplet.setup_menu_from_file function, passing it a .xml file like this: Root popups popup name=button3 menuitem name=Alarm verb=Alarm _label=_Enable alarm pixtype=stock pixname=gtk-apply/ separator/ menuitem name=Prefs verb=Prefs _label=_Preferences pixtype=stock pixname=gtk-properties/ menuitem name=About verb=About _label=_About pixtype=stock pixname=gnome-stock-about/ menuitem name=Prueba verb=Prueba _label=Prueba type=toggle/ /popup /popups /Root And i catch the signals from the menu options using this: self.verbs = [(Alarm, self.menu_alarm_toggled), (Prefs, self.prefs.preferences_show), (About, self.about_info), (Prueba, self.prueba)] self.applet.setup_menu_from_file (glob.resources_dir, computertemp_menu.xml, computertemp, self.verbs) Ths signals for the normal menu items (About, Prefs, Alarm) work ok, but i can't catch the signal for the toggle menu item. Has anybody idea of how to catch this signal?? Thank you very much! -- adolfo [1] http://www.daa.com.au/pipermail/pygtk/2006-April/012117.html [2] http://computertemp.berlios.de/ signature.asc Description: Esta parte del mensaje está firmada digitalmente ___ 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] Using a CheckButton on an applet Menu
I'm sorry to ask this but... could you please explain me a little bit more what to do? I don't know exactly what you mean with that 'ui-event' thing... Thank you very much Gustavo. -- adolfo El mié, 11-10-2006 a las 13:31 +0100, Gustavo J. A. M. Carneiro escribió: On Qua, 2006-10-11 at 14:07 +0200, Adolfo González Blázquez wrote: Hello, I sent an email [1] to this list about this problem in april, but got no responses. I'm thinking now of trying to implement this in my applet, so that's why i'm asking again. The problem is that i have an applet [2], using the gnomeapplet pygtk module. I build the applet context menu using the gnomeapplet.setup_menu_from_file function, passing it a .xml file like this: Root popups popup name=button3 menuitem name=Alarm verb=Alarm _label=_Enable alarm pixtype=stock pixname=gtk-apply/ separator/ menuitem name=Prefs verb=Prefs _label=_Preferences pixtype=stock pixname=gtk-properties/ menuitem name=About verb=About _label=_About pixtype=stock pixname=gnome-stock-about/ menuitem name=Prueba verb=Prueba _label=Prueba type=toggle/ /popup /popups /Root And i catch the signals from the menu options using this: self.verbs = [(Alarm, self.menu_alarm_toggled), (Prefs, self.prefs.preferences_show), (About, self.about_info), (Prueba, self.prueba)] self.applet.setup_menu_from_file (glob.resources_dir, computertemp_menu.xml, computertemp, self.verbs) Ths signals for the normal menu items (About, Prefs, Alarm) work ok, but i can't catch the signal for the toggle menu item. Has anybody idea of how to catch this signal?? You need to connect to the 'ui-event' signal of the UIComponent. Regards, signature.asc Description: Esta parte del mensaje está firmada digitalmente ___ 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] Wait until a thread is ended
Hello, I would like to know if someone can point me a solution to make a function run as a separate thread, and wait until it is ended, without blocking the gui. In my application, i'm getting a long file listing using glob(), and i want this function to run as a thread, so the user can stop it using a button in the gui (right now, the gui freezes till glob is ended), and then run another function to fill the treeview (this now works without blocking the gui, using generators). . Any idea will be really appreaciated. Thanks in advance! -- adolfo signature.asc Description: Esta parte del mensaje está firmada digitalmente ___ 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] Updating a progressbar inside a recursive function
Hello, I'm writing a little app to mass rename files. The gui has two parts, on left a tree-like file browser for selecting the dir you want files to rename. On right, theres a treeview that shows the files that are inside the selected directory. What i want to do is update a progressbar while populating the treeview with the files. The problem comes when the add files recursively option is enabled. The app calls a recursive method to add everyfile inside that dir and its subdirs. This function uses to take a while to end, so the gui freezes till everyfile is read. I've tried using the tips on http://www.async.com.br/faq/pygtk/index.py?req=showfile=faq23.020.htp but they don't work for me: - The while gtk.events_pending(): gtk.main_iteration() stuff seems to work, but when reading a dir, and changing to another, it should stop reading the first dir, clean the treeview, and read the new. But it reads the new, and still keeps adding files from the old dir. - I did not suceed trying the generator stuff, 'cause i dont know how to apply the example to a recursive function. I've tried threads also, but totally unsuccesful (new to threads...) So if anyone can point me anyway to solve this, or a good example, i will really appreciate it. The two functions related to this problem are pasted below: The complete .py file can be found here: http://www.infinicode.org/code/renamer.py Thank you very much in advance! -- adolfo --- def dir_selected(self, obj, dir): self.rename_button.set_sensitive(False) self.file_selected_model.clear() self.current_dir = dir self.populate_selected_files(dir) self.selected_files.columns_autosize() self.statusbar.push(self.statusbar_context, dir) def populate_selected_files(self, dir): pattern = self.file_pattern.get_text() # Add files from the current directory list = renamerfilefuncs.get_file_listing(dir, pattern) for elem in list: iter = self.file_selected_model.insert_before(None, None) self.file_selected_model.set_value(iter, 0, elem[0]) self.file_selected_model.set_value(iter, 1, elem[1]) self.progressbar.pulse() #while gtk.events_pending(): gtk.main_iteration() self.progressbar.set_fraction(0) # If the Recursive option is enabled, look into subdirectories for files if self.add_recursive.get_active(): dirlist = renamerfilefuncs.get_dir_listing(dir) for dir in dirlist: self.populate_selected_files(dir[1]) --- signature.asc Description: Esta parte del mensaje está firmada digitalmente ___ 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] Toggle menu item and toggle button syncronized
Hello, I'm trying to syncronize a toggle menu item, and a toggle button, so when one of them is activated, the other one gets activated as well. The problem comes when cliking the menu item, i try to activate the button, and this catch the 'clicked' signal, so it tries to activate the menu, and that si a kind of infinite loop. Maybe i'm not explaining myself clearly... The code is like this: def on_menu_play_clicked(self, widget): self.playing = not self.playing self.button_play.set_activated(self.playing) self.play() def on_button_play_clicked(self, widget): self.playing = not self.playing self.play() Which changes should i made to the code? Maybe this is a stupid question, but now i can't find myself the answer... Thank you very much in advance! -- adolfo signature.asc Description: Esta parte del mensaje está firmada digitalmente ___ 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] Volumen button like Totem's using pygtk
Hello, I'm writing a little audio player using pygtk, and i would like to know if someone knows any project that had implemented the bacon-volume widget from Totem and Rhythmbox in pygtk. Thank you very much -- adolfo signature.asc Description: Esta parte del mensaje está firmada digitalmente ___ 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] Using a CheckButton on an applet Menu
Ok, so adding the CheckButton to he menu was really easy... just needed to add type=toggle to the .xml menu definitions. Something like this: menuitem name=Alarm verb=Alarm _label=_Enable alarm? type=toggle/ Now, what I need is a way to get the events thrown by this menu entry, 'cause adding the callback to verbs list doesn't seem to work. In C, people use something like: component = panel_applet_get_popup_component (PANEL_APPLET (applet)); bonobo_ui_component_set_prop (component, /commands/Mute, state, mute ? 1 : 0, NULL); get_popup_component seems to exist on python-desktop, but i can't find any documentation about this... If anyone could explain or help a bit with this, i will really appreciate it. Thanks! -- adolfo El vie, 07-04-2006 a las 03:23 +0200, Adolfo González Blázquez escribió: Hello, I'm writing a gnome applet using pygtk, and I need to add a CheckButton to the applet menu (something like the play item on rhythmbox tray icon context menu). To create the applet menu, i use the method 'setup_menu' [1], which comes in the 'applet' module from python-desktop. What I need is a way to change the menu item from check activated to deactivated when clicking on it. The menu creating code is: --- self.verbs = [(Alarm, self.menu_alarm_toggled), (Log, self.menu_log_toggled), (Prefs, self.prefs.preferences_show), (About, self.about_info)] self.applet.setup_menu_from_file (glob.resources_dir, laptoptemp_menu.xml, laptoptemp, self.verbs) --- The .xml file for the menu is: --- Root popups popup name=button3 menuitem name=Alarm verb=Alarm _label=_Enable alarm? pixtype=stock pixname=/ menuitem name=Log verb=Log _label=_Enable logging? pixtype=stock pixname=/ separator/ menuitem name=Prefs verb=Prefs _label=_Preferences pixtype=stock pixname=gtk-properties/ menuitem name=About verb=About _label=_About pixtype=stock pixname=gnome-stock-about/ /popup /popups /Root --- Thanks in advance for any help! -- adolfo [1] http://developer.gnome.org/doc/API/2.0/panel-applet/panelapplet.html#PANEL-APPLET-SETUP-MENU ___ 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/ signature.asc Description: Esta parte del mensaje está firmada digitalmente ___ 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] Using a CheckButton on an applet Menu
Hello, I'm writing a gnome applet using pygtk, and I need to add a CheckButton to the applet menu (something like the play item on rhythmbox tray icon context menu). To create the applet menu, i use the method 'setup_menu' [1], which comes in the 'applet' module from python-desktop. What I need is a way to change the menu item from check activated to deactivated when clicking on it. The menu creating code is: --- self.verbs = [(Alarm, self.menu_alarm_toggled), (Log, self.menu_log_toggled), (Prefs, self.prefs.preferences_show), (About, self.about_info)] self.applet.setup_menu_from_file (glob.resources_dir, laptoptemp_menu.xml, laptoptemp, self.verbs) --- The .xml file for the menu is: --- Root popups popup name=button3 menuitem name=Alarm verb=Alarm _label=_Enable alarm? pixtype=stock pixname=/ menuitem name=Log verb=Log _label=_Enable logging? pixtype=stock pixname=/ separator/ menuitem name=Prefs verb=Prefs _label=_Preferences pixtype=stock pixname=gtk-properties/ menuitem name=About verb=About _label=_About pixtype=stock pixname=gnome-stock-about/ /popup /popups /Root --- Thanks in advance for any help! -- adolfo [1] http://developer.gnome.org/doc/API/2.0/panel-applet/panelapplet.html#PANEL-APPLET-SETUP-MENU signature.asc Description: Esta parte del mensaje está firmada digitalmente ___ 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] Handling applet preferences with python+gconf
Hello, I've written a GNOME applet using pygtk. Right now the applet preferences are stored using a text file, but i want to make the applet preferences aware of multiple instances of itself. So i think the best way is porting the preferences to GConf. I've seen that libpanel-applet2 has some funcs for handling multi instances of the same applet preferences (/usr/include/panel-2.0/panel-applet-gconf.h in ubuntu), but i don't know if there's something similar for python. Anyway, what i need is someone explaining me a good way to do this, or just pointing me an example of something like this. Any help will be really appreciated! Thanks in advance, -- adolfo gonzalez signature.asc Description: Esta parte del mensaje está firmada digitalmente ___ 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/