[Gd-chatter] r11578 - trunk/fundev/sources/duim/gtk
andreas at gwydiondylan.org
andreas at gwydiondylan.org
Mon Dec 24 17:22:19 CET 2007
Author: andreas
Date: Mon Dec 24 17:22:18 2007
New Revision: 11578
Modified:
trunk/fundev/sources/duim/gtk/gtk-dialogs.dylan
trunk/fundev/sources/duim/gtk/gtk-display.dylan
trunk/fundev/sources/duim/gtk/gtk-fonts.dylan
trunk/fundev/sources/duim/gtk/gtk-framem.dylan
trunk/fundev/sources/duim/gtk/gtk-gadgets.dylan
trunk/fundev/sources/duim/gtk/gtk-top.dylan
Log:
job: fd
More locking, happier DUIM applications.
Modified: trunk/fundev/sources/duim/gtk/gtk-dialogs.dylan
==============================================================================
--- trunk/fundev/sources/duim/gtk/gtk-dialogs.dylan (original)
+++ trunk/fundev/sources/duim/gtk/gtk-dialogs.dylan Mon Dec 24 17:22:18 2007
@@ -29,7 +29,9 @@
define sealed method make-top-level-mirror
(sheet :: <top-level-sheet>, frame :: <dialog-frame>)
=> (mirror :: <top-level-mirror>)
- let widget = gtk-window-new($GTK-WINDOW-TOPLEVEL);
+ with-gdk-lock
+ let widget = gtk-window-new($GTK-WINDOW-TOPLEVEL);
+ end;
let owner = frame-owner(frame);
make(<dialog-mirror>,
widget: widget,
Modified: trunk/fundev/sources/duim/gtk/gtk-display.dylan
==============================================================================
--- trunk/fundev/sources/duim/gtk/gtk-display.dylan (original)
+++ trunk/fundev/sources/duim/gtk/gtk-display.dylan Mon Dec 24 17:22:18 2007
@@ -20,10 +20,12 @@
let mirror
= make(<display-mirror>,
sheet: _display);
- let mm-width = gdk-screen-width-mm();
- let mm-height = gdk-screen-height-mm();
- let pixel-width = gdk-screen-width();
- let pixel-height = gdk-screen-height();
+ with-gdk-lock
+ let mm-width = gdk-screen-width-mm();
+ let mm-height = gdk-screen-height-mm();
+ let pixel-width = gdk-screen-width();
+ let pixel-height = gdk-screen-height();
+ end;
display-pixel-width(_display) := pixel-width;
display-pixel-height(_display) := pixel-height;
display-mm-width(_display) := mm-width;
@@ -65,5 +67,7 @@
let widget = mirror-widget(child);
//--- This may not work after the sheet is mapped...
//---*** This causes the window to grow and grow...
- gtk-window-set-default-size(widget, width, height)
+ with-gdk-lock
+ gtk-window-set-default-size(widget, width, height)
+ end
end method size-mirror;
Modified: trunk/fundev/sources/duim/gtk/gtk-fonts.dylan
==============================================================================
--- trunk/fundev/sources/duim/gtk/gtk-fonts.dylan (original)
+++ trunk/fundev/sources/duim/gtk/gtk-fonts.dylan Mon Dec 24 17:22:18 2007
@@ -215,8 +215,10 @@
(font :: <gtk-font>, _port :: <gtk-port>)
=> (font :: <gtk-font>,
width :: <integer>, height :: <integer>, ascent :: <integer>, descent :: <integer>)
- let pango-context = gtk-get-pango-context-from-port(_port);
- gtk-font-metrics(font, pango-context);
+ with-gdk-lock
+ let pango-context = gtk-get-pango-context-from-port(_port);
+ gtk-font-metrics(font, pango-context);
+ end;
end method gtk-font-metrics;
Modified: trunk/fundev/sources/duim/gtk/gtk-framem.dylan
==============================================================================
--- trunk/fundev/sources/duim/gtk/gtk-framem.dylan (original)
+++ trunk/fundev/sources/duim/gtk/gtk-framem.dylan Mon Dec 24 17:22:18 2007
@@ -32,7 +32,9 @@
let widget = mirror-widget(mirror);
let title = frame-title(frame) | "";
with-c-string (c-string = title)
- gtk-window-set-title(widget, c-string)
+ with-gdk-lock
+ gtk-window-set-title(widget, c-string)
+ end
end
end
end method note-frame-title-changed;
Modified: trunk/fundev/sources/duim/gtk/gtk-gadgets.dylan
==============================================================================
--- trunk/fundev/sources/duim/gtk/gtk-gadgets.dylan (original)
+++ trunk/fundev/sources/duim/gtk/gtk-gadgets.dylan Mon Dec 24 17:22:18 2007
@@ -1926,7 +1926,9 @@
define method update-mirror-attributes
(gadget :: <gtk-combo-box>, mirror :: <gadget-mirror>) => ()
next-method();
- gtk-combo-box-entry-set-text-column(mirror.mirror-widget, 1);
+ with-gtk-lock
+ gtk-combo-box-entry-set-text-column(mirror.mirror-widget, 1);
+ end
end;
define method install-event-handlers
Modified: trunk/fundev/sources/duim/gtk/gtk-top.dylan
==============================================================================
--- trunk/fundev/sources/duim/gtk/gtk-top.dylan (original)
+++ trunk/fundev/sources/duim/gtk/gtk-top.dylan Mon Dec 24 17:22:18 2007
@@ -355,7 +355,9 @@
define sealed method make-top-level-mirror
(sheet :: <top-level-sheet>, frame :: <basic-frame>)
=> (mirror :: <top-level-mirror>)
- let widget = gtk-window-new($GTK-WINDOW-TOPLEVEL);
+ with-gdk-lock
+ let widget = gtk-window-new($GTK-WINDOW-TOPLEVEL);
+ end;
make(<top-level-mirror>,
widget: widget,
sheet: sheet)
More information about the chatter
mailing list