[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[circle] Patch for gtk 1 only systems.
From: |
Nathan Hurst |
Subject: |
[circle] Patch for gtk 1 only systems. |
Date: |
Sat, 2 Aug 2003 11:47:26 +1000 |
On Sat, 02 Aug 2003 03:41:05 +1000
address@hidden wrote:
> One question... Why can't it just say so?
Index: circlelib/circle.py
===================================================================
RCS file: /cvsroot/circle/circle/circlelib/circle.py,v
retrieving revision 1.289
diff -d -u -r1.289 circle.py
--- circlelib/circle.py 31 Jul 2003 20:22:08 -0000 1.289
+++ circlelib/circle.py 2 Aug 2003 01:45:30 -0000
@@ -161,6 +161,32 @@
if settings.gtk_loaded():
import gtk
+ # Not sure this is the best spot, but lets give it a go:
+ try:
+ # The aim is to try and display a dialog using gtk 1.2
+ # binding - if that works then we alert the user and quit
+
+ dial = gtk.GtkDialog ()
+ dial.set_title ("Wrong python-gtk series")
+ dial.set_border_width (5)
+ dial.set_position(gtk.WIN_POS_CENTER)
+
+ dial.connect ("delete_event", gtk.mainquit)
+
+ quit_button = gtk.GtkButton ("Quit")
+ quit_button.connect ("clicked", gtk.mainquit)
+ dial.action_area.pack_start (quit_button)
+ quit_button.show ()
+
+ quit_label = gtk.GtkLabel("This version of Circle needs the gtk 2.0
bindings,\n on debian python-gtk2, otherwise pygtk-1.99 or later. \nYou can
either install this software, or use a gtk 1 circle version (check the
website).")
+ dial.vbox.pack_start (quit_label)
+ quit_label.show ()
+
+ dial.show ()
+ gtk.mainloop()
+ sys.exit()
+ except:
+ pass
import widgets
--
njh
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [circle] Patch for gtk 1 only systems.,
Nathan Hurst <=