473,568 Members | 3,087 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PyGTK, libglade, and signal_autoconn ect

I was having a real hard time trying to accomplish something. I
couldn't find a way to automatically connect the "close" button
(clicked signal) of a GUI app I was working on, to the gtk.main_quit()
function. I had entered this handler directly with the GLADE-3
designer (I DON'T WANT TO USE A DICTIONARY, because I think that,
using GLADE, I should be able to shortcut that procedure) but in my
class the

self.wtree.sign al_autoconnect( self)

wasn't working. Of course, I thought, it's looking for gtk.main_quit()
which is obviously somewhere else. So, the only solution I could think
of was to add:

self.wtree.sign al_autoconnect( gtk) --- having already imported gtk,

This automagically worked.

What I would like to know is if this is legitimate, and the right way
to go. It is basically a solution I cooked up instinctively, which
happened to work, but perhaps I am unaware of some other more
"orthodox" way of doing it.

Thank you.

Jan 4 '08 #1
0 955

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Vams | last post by:
Hi everyone, I got a little problem that I hope someone can help me out w/ or atleast point me in the right direction. Situation: - I have a python program that continuously runs and does some tasks automatically on a daily basis. - Now, I want to create a gtk frontend that displays its status and provides an exit button so I don't need...
by: Will Ware | last post by:
In July there was a thread about problems on Red Hat 9 with PyGTK not playing nice with Glade. I was tinkering with this a little bit tonight, starting with the code I found in this article: http://www.linuxjournal.com/article.php?sid=6586 Based on what was written, I tried this and had no joy: ###################################### import...
by: zinc | last post by:
Hi Pythoneers, Im interested in trying some gui programming with the GTK2 toolkit. I found this brief article,(http://www.linuxjournal.com/article.php?sid=6586), that speaks about utilising 'Glade' to help build these gui. I downloaded the pyGTK tarball from http://www.daa.com.au/~james/software/pygtk/ i do the usual ./configure, make,...
by: j_mckitrick | last post by:
Hi all. Here is a tiny container for one of each combo box, along with the glade file. Just 2 widgets, so hopefully not too large. How the heck do I get the selection from the ComboBox, as opposed to the ComboEntryBox? I'm pulling my hair out over this one! jonathon
by: Egbert Bouwman | last post by:
As a newby to PyGTK I already have produced some gui's I like, but I have difficulties in finding out what method or other instrument I need for doing various things. I have not yet found the tutorial or otherwise that explains concepts like setting (relative) sizes, setting or manipulating focus, setting colors, etc. Also when I think I...
by: Viktor | last post by:
Did anybody managed to "pack", a program that uses pygtk with pyexe? The best result I got was: Pango-ERROR **: file shape.c: line 75 (pango_shape): assertion faled: (glyphs->num_glyphs > 0) aborting... I'm using python2.4, pygtk-2.6.1-1.win32-py2.4, gtk-win32-2.6.4-rc1. Thanks in advance.
by: Thomas Bartkus | last post by:
I am experimenting (flailing around?) with glade and python. Both under MS Windows and Linux. I understand why I want to "import gtk" It gives me access to the critical gui program loop gtk.main() and main_quit() I am also very grateful for import gtk.glade This lets me open my xml format glade file
by: Tom Grove | last post by:
I can't seem to get a function to continue after I call another gtk window class. Basically I need to grab a date from a calendar in one windows and insert that value into an entry box on the calling window. Calling Window: import winCal def getDate(self, widget): cimsCal.winCal.dateSelected = "DATE"
by: Michael Palmer | last post by:
On Sep 16, 12:30 pm, binaryjesus <coolman.gu...@gmail.comwrote: I haven't tried it myself, but I came across a blog post the other day that describes a way of building windows installers for pyGTK applications at http://unpythonic.blogspot.com/2007/07/pygtk-py2exe-and-inno-setup-for-single.html
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.