[pygtk] Pay on Performance! Search engine positioning.
You pay only after results are shown to you. How about that!? We can list your website in all major Search Engines and achieve Top 10 positions. GUARANTEED! If people cannot find your business in the first 30 matches of a search, then submitting was a waste of time, money and hope. Search engine positioning is the most cost effective way of promoting your Website. We key on the following 20 major search engines: Yahoo-AltaVista-WebCrawler-Lycos-Excite-iwon-Looksmart- AskJeeves-AOL Search-Netscape-HotBot-MSN-Infoseek-Snap- Google-Northern Light-Open Directory-Findwhat-Dogpile- Goto-Canada-Fast Serch Let us start launching your pages to the top of the search results today! Top 10 positions. GUARANTEED! Pay on Performance. You pay only after we show you the results. You choose how many search engines you want and we take your website to the TOP. As simple as that!!! For more information email us at: [EMAIL PROTECTED] with this subject: Send me more information Or call: Evelyn Navar 1-718-583-1771 Monday through Friday between 11am to 7pm Eastern Time - Under Bill s.1618 TITLE III passed by the 105th U.S. Congress this letter cannot be considered "spam" as long as we include: 1) contact information (see above); and, 2) the way to be removed from future mailings (see below). To be removed from this list, please mail to: [EMAIL PROTECTED] with 'remove' in subject line and you will be removed from our list. ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk
[pygtk] gettext and glade
Hi. Is there a way to use gettext with libglade (glade) without fetching every "object" that needs to be translated? If I do as in the code below there will be a lot of labels and stuff to fetch, (but I'm probably just lazy) one could hope for a more "magic" way to do it... (I have figured out how to get gettext to work) - _ = gettext.gettext gettext.bindtextdomain("test","/usr/share/locale") gettext.textdomain("test") widgets = libglade.GladeXML('test.glade') mainwindow = widgets.get_widget('main_window') mainwindow.connect('delete_event',mainquit) label_hello = widgets.get_widget('label_hello') label_hello_string = _("Hello") label_hello.set_text(label_hello_string) --- Thanks Mattias Nilsson [EMAIL PROTECTED] I ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk
Re: [pygtk] PyGtk drag n drop and reparenting
On Tue, 18 Jul 2000 09:29:47 +0200, MOULET Xavier FTRD/DMR/ISS <[EMAIL PROTECTED]> wrote: > Hello everybody. As I told in my last email, I spennt another night on this > and could not find what was causing any trouble. The following program > should let me drag a node over another, and then the dragged node becomes a > child of the other one. drag_data_set were methods of my node object, which > led to many segfaults. Now, I placed them away but I still have problems. > > I pass a string to look up at which node is passed, as you can only pass > strings in a drag data I think. My problem is, the dragged data disappears, > the other ones remain as they were and a gtk warning appears. What do I > wrong ? can someone cast some light on me ? > > -- Beginning of the "program" > > > # Sample gnome-python prog > > # Imports > from gtk import * > import GDK > import GTK > > > def drag_data_get (widget,context,data,info,time,user) : > data.set(data.target,123,user) > > def drag_data_rec (widget,context,x,y,data,info,time,user) : > if user == data.data : > # drags over myself : do nothing > widget.drag_finish(context,FALSE,FALSE,time) > else : > noeud = app.nodes[data.data] # Look up the dragged > (incoming) node > noeud.gtknode.drag_finish(context,TRUE,TRUE,time) > > me = app.nodes[user] # who has it been dragged to ? (whoami > ?) > > # if no tree, create one > if me.subtree==None : > me.subtree = GtkTree() > me.subtree.show() > noeud.gtknode.set_subtree(me.subtree) > > noeud.gtknode.reparent(me.subtree) > noeud.gtknode.show() I think you might have the source and destination mixed up. try -> # if no tree, create one if me.subtree == None: me.subtree = GtkTree () me.subtree.show () #noeud.gtknode.set_subtree(me.subtree) widget.set_subtree (me.subtree) # widget is where you are # dragging to #noeud.gtknode.reparent(me.subtree) #noeud.gtknode.show() # remember to remove the item you drag, that caused the # gtk warning. # noeud.gtknode is the item you are dragging, and 'tree' is # the original tree you created in App.__init__() global tree tree.remove_item (noeud.gtknode) me.subtree.append (noeud.gtknode) there's also some changes to class App -> > # my main node class. > class UI_Node : > >def __init__ (self, label="Unknown") : > self.label = label > > self.subtree = None > > self.gtknode = GtkTreeItem(self.label) > self.gtknode.show() > > # Drag interface > target = [('GLOOPNODE',0,-1)] > > self.gtknode.drag_source_set(GDK.BUTTON1_MASK,target,GDK.ACTION_COPY) > > self.gtknode.connect("drag_data_get",drag_data_get,self.label) > > # Drop interface > > self.gtknode.connect("drag_data_received",drag_data_rec,self.label) > > self.gtknode.drag_dest_set(GTK.DEST_DEFAULT_ALL,target,GDK.ACTION_COPY) > > class App : > def __init__(self): > self.window = GtkWindow(); > self.window.connect("destroy",mainquit) > global tree > self.tree = GtkTree() tree = self.tree > self.window.add(self.tree) > self.window.show_all() > > self.nodes = {} # Nodes : a dictonnary, keys are names of > nodes, then node is given > > > def append(self,node) : > self.nodes[node.label] = node > self.tree.append(node.gtknode) > > def main (self) : > self.append(UI_Node("foo1")) > self.append(UI_Node("foo2")) > self.append(UI_Node("foo3")) > self.append(UI_Node("foo4")) > > > if __name__ == '__main__' : > global app > app = App() > app.main() > > mainloop() > > # dragging a node to another makes : > # Gtk-CRITICAL **: file gtkwidget.c: line 2933 > (gtk_widget_reparent_container_child): assertion `client_data != NULL' > failed. > # and the dragged widget disappears. > > ___ > pygtk mailing list [EMAIL PROTECTED] > http://www.daa.com.au/mailman/listinfo/pygtk >
Re: [pygtk] PyGTK and urllib
On Tue, 18 Jul 2000, Martijn Faassen wrote: > James Henstridge wrote: > > On Mon, 17 Jul 2000, Martijn Faassen wrote: > [snip] > > Unless I am mistaken, urllib is a syncronous interface, so it will not > > return until it has completed the transfer. This means your application > > will not process any events (mouse clicks, expose events, etc) until the > > transfer completes, which is what is causing your problems. > > It's not just my application, it's *X* that isn't responsive. > Window manager, Gnome desktop, everything. That's symptom number 1. > Symptom number 2 is that urlopen() takes a lot *longer* than when run > outside the Gnome app. It would've made sense if my application wasn't > responding; in fact that happens with the first call to urlopen() that > I do. But the other call really blocks most of X. What do you call urlopen in response to? If you call it from a signal handler when a pointer grab is in effect, that would prevent you sending input to other windows. I am not sure about the slowness issue though. > > Regards, > > Martijn > James -- Email: [EMAIL PROTECTED] WWW: http://www.daa.com.au/~james/ ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk
Re: [pygtk] PyGTK and urllib
James Henstridge wrote: > On Mon, 17 Jul 2000, Martijn Faassen wrote: [snip] > Unless I am mistaken, urllib is a syncronous interface, so it will not > return until it has completed the transfer. This means your application > will not process any events (mouse clicks, expose events, etc) until the > transfer completes, which is what is causing your problems. It's not just my application, it's *X* that isn't responsive. Window manager, Gnome desktop, everything. That's symptom number 1. Symptom number 2 is that urlopen() takes a lot *longer* than when run outside the Gnome app. It would've made sense if my application wasn't responding; in fact that happens with the first call to urlopen() that I do. But the other call really blocks most of X. > You should either use an asyncronous transfer (using the > input_add() function to set up a handler for when information comes in on > the socket), or look at using threads. I already tried to solve this with threads; I'm a new thread programmer, but still it doesn't seem to make any difference whatsover; X still hangs solid, whether I run urlopen() inside a thread or outside it. I'll whip up some demo code that tries to demonstrate this effect soon. Regards, Martijn ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk
[pygtk] PyGtk drag n drop and reparenting
Hello everybody. As I told in my last email, I spennt another night on this and could not find what was causing any trouble. The following program should let me drag a node over another, and then the dragged node becomes a child of the other one. drag_data_set were methods of my node object, which led to many segfaults. Now, I placed them away but I still have problems. I pass a string to look up at which node is passed, as you can only pass strings in a drag data I think. My problem is, the dragged data disappears, the other ones remain as they were and a gtk warning appears. What do I wrong ? can someone cast some light on me ? -- Beginning of the "program" # Sample gnome-python prog # Imports from gtk import * import GDK import GTK def drag_data_get (widget,context,data,info,time,user) : data.set(data.target,123,user) def drag_data_rec (widget,context,x,y,data,info,time,user) : if user == data.data : # drags over myself : do nothing widget.drag_finish(context,FALSE,FALSE,time) else : noeud = app.nodes[data.data] # Look up the dragged (incoming) node noeud.gtknode.drag_finish(context,TRUE,TRUE,time) me = app.nodes[user] # who has it been dragged to ? (whoami ?) # if no tree, create one if me.subtree==None : me.subtree = GtkTree() me.subtree.show() noeud.gtknode.set_subtree(me.subtree) noeud.gtknode.reparent(me.subtree) noeud.gtknode.show() # my main node class. class UI_Node : def __init__ (self, label="Unknown") : self.label = label self.subtree = None self.gtknode = GtkTreeItem(self.label) self.gtknode.show() # Drag interface target = [('GLOOPNODE',0,-1)] self.gtknode.drag_source_set(GDK.BUTTON1_MASK,target,GDK.ACTION_COPY) self.gtknode.connect("drag_data_get",drag_data_get,self.label) # Drop interface self.gtknode.connect("drag_data_received",drag_data_rec,self.label) self.gtknode.drag_dest_set(GTK.DEST_DEFAULT_ALL,target,GDK.ACTION_COPY) class App : def __init__(self): self.window = GtkWindow(); self.window.connect("destroy",mainquit) self.tree = GtkTree() self.window.add(self.tree) self.window.show_all() self.nodes = {} # Nodes : a dictonnary, keys are names of nodes, then node is given def append(self,node) : self.nodes[node.label] = node self.tree.append(node.gtknode) def main (self) : self.append(UI_Node("foo1")) self.append(UI_Node("foo2")) self.append(UI_Node("foo3")) self.append(UI_Node("foo4")) if __name__ == '__main__' : global app app = App() app.main() mainloop() # dragging a node to another makes : # Gtk-CRITICAL **: file gtkwidget.c: line 2933 (gtk_widget_reparent_container_child): assertion `client_data != NULL' failed. # and the dragged widget disappears. ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk