[pygtk] Modal File Dialog

2000-02-24 Thread Moshe Zadka

It's probably extremely easy, but I'm having problems figuring
out how to display a file dialog so when it's active, the rest of
the application doesn't respond.

Do I need a seperate event loop, or something like that?

Thanks in advance.

--
Moshe Zadka [EMAIL PROTECTED]. 
INTERNET: Learn what you know.
Share what you don't.

To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]



[pygtk] Problems with modal dialog and async IO

2000-02-24 Thread Dag Brattli

Hi,

I'm implementing a network protocol in Python, and I'm using PyGNOME as the
GUI. Since the protocol is async (one thread), I'm attaching the socket
descriptors to the GDK's input_add() which works just fine. The problem
appears when the client needs to be authenticated and I show a modal dialog
like this:

d = GnomeRequestDialog(1, 'Password', '', 10, self.passwd_input,
   self.win)
d.run_and_close()

When it returns, the protocol and everything just hangs. Looks like GTK's
event-loop is not running anymore or something. Anybody experienced
something similar? Any hints would be appreciated!

-- Dag

-- 
   / Dag Brattli   | The Linux-IrDA Project   /
  // University of Tromsoe, Norway | Infrared communication for Linux//
 /// http://www.cs.uit.no/~dagb| http://www.cs.uit.no/linux-irda/   ///
To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]



[pygtk] I am pissed off

2000-02-24 Thread Hassan Aurag


 Hi,

I am not sure if I am dumb or it's a bug and then if it is with 
pygnome bindings.

What is wrong with the following:
BEGIN CODE
file_menu = [
UIINFO_MENU_NEW_ITEM(label="Numerical Python Session", tip="Start 
a New Numerical Python Session", cb=start_new_numpy),
UIINFO_MENU_NEW_ITEM(label="Yacas Session", tip="Start a New Yacas 
Session", cb=start_new_yacas),
UIINFO_MENU_NEW_ITEM(label="Other Session", tip="Start Unsupported 
Session", cb=start_new_other),
UIINFO_SEPARATOR,
UIINFO_MENU_PREFERENCES_ITEM(cb=do_pref),
UIINFO_SEPARATOR,
UIINFO_MENU_EXIT_ITEM(cb=mymainquit)
]


help_menu = [
UIINFO_HELP("GMatH"),
UIINFO_MENU_ABOUT_ITEM(cb=about),
UIINFO_SEPARATOR,
UIINFO_ITEM_STOCK("GMatH Online", tip="GMatH Related Web 
Sites",cb=connect_gmath, stock=STOCK_MENU_HOME),
]



menus = [
UIINFO_SUBTREE('Sessions', file_menu),
UIINFO_SUBTREE('Help', help_menu)
]
gmath = GnomeMDI(appname="GMatH", title="GMatH")
gmath.set_menubar_template(menus)
CHILD = GnomeMDIGenericChild("Welcome to GMatH")
CHILD.set_view_creator(mycreate_view)
gmath.add_child(CHILD)
gmath.add_view(CHILD)

##END OF CODE

Now when I try to use any of the menu stuff it segfaults without 
explanation.

Thanks in advance

PS: I am pissed because I have been trying to use with no success MDI 
for a while.




To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]