[Gd-chatter] r11405 - branches/opendylan-melange/gtk-duim

hannes at gwydiondylan.org hannes at gwydiondylan.org
Wed Jun 13 01:07:47 CEST 2007


Author: hannes
Date: Wed Jun 13 01:07:44 2007
New Revision: 11405

Modified:
   branches/opendylan-melange/gtk-duim/gtk-display.dylan
   branches/opendylan-melange/gtk-duim/gtk-events.dylan
   branches/opendylan-melange/gtk-duim/gtk-gadgets.dylan
   branches/opendylan-melange/gtk-duim/gtk-layout.dylan
   branches/opendylan-melange/gtk-duim/gtk-menus.dylan
   branches/opendylan-melange/gtk-duim/gtk-mirror.dylan
Log:
Job: fd
make seperators fixed-width/height
call gtk-widget-realize before asking for height and width


Modified: branches/opendylan-melange/gtk-duim/gtk-display.dylan
==============================================================================
--- branches/opendylan-melange/gtk-duim/gtk-display.dylan	(original)
+++ branches/opendylan-melange/gtk-duim/gtk-display.dylan	Wed Jun 13 01:07:44 2007
@@ -65,5 +65,5 @@
   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)
+  gtk-window-set-default-size(widget, width, height)
 end method size-mirror;

Modified: branches/opendylan-melange/gtk-duim/gtk-events.dylan
==============================================================================
--- branches/opendylan-melange/gtk-duim/gtk-events.dylan	(original)
+++ branches/opendylan-melange/gtk-duim/gtk-events.dylan	Wed Jun 13 01:07:44 2007
@@ -24,7 +24,7 @@
   //--- We should do something with the timeout
   ignore(timeout);
   with-gdk-lock
-    gtk-main();
+    gtk-main-iteration();
   end;
   #f;
 end method process-next-event;

Modified: branches/opendylan-melange/gtk-duim/gtk-gadgets.dylan
==============================================================================
--- branches/opendylan-melange/gtk-duim/gtk-gadgets.dylan	(original)
+++ branches/opendylan-melange/gtk-duim/gtk-gadgets.dylan	Wed Jun 13 01:07:44 2007
@@ -356,6 +356,24 @@
      <sealed-constructor-mixin>)
 end class <gtk-separator>;
 
+define method %gtk-fixed-width?
+    (gadget :: <gtk-separator>)
+ => (fixed? :: <boolean>)
+  select(gadget-orientation(gadget))
+    #"horizontal" => #f;
+    #"vertical"   => #t;
+  end;
+end method;
+
+define method %gtk-fixed-height?
+    (gadget :: <gtk-separator>)
+ => (fixed? :: <boolean>)
+  select(gadget-orientation(gadget))
+    #"horizontal" => #t;
+    #"vertical"   => #f;
+  end;
+end method;
+
 define sealed method class-for-make-pane
     (framem :: <gtk-frame-manager>, class == <separator>, #key)
  => (class :: <class>, options :: false-or(<sequence>))

Modified: branches/opendylan-melange/gtk-duim/gtk-layout.dylan
==============================================================================
--- branches/opendylan-melange/gtk-duim/gtk-layout.dylan	(original)
+++ branches/opendylan-melange/gtk-duim/gtk-layout.dylan	Wed Jun 13 01:07:44 2007
@@ -6,8 +6,7 @@
 License:      GNU Lesser General Public License
 Warranty:     Distributed WITHOUT WARRANTY OF ANY KIND
 
-
-/// Separators
+/*
 define sealed class <gtk-column-layout>
     (<gtk-gadget-mixin>,
      <column-layout>,
@@ -30,3 +29,4 @@
            sheet:  gadget)
   end
 end method make-gtk-mirror;
+*/

Modified: branches/opendylan-melange/gtk-duim/gtk-menus.dylan
==============================================================================
--- branches/opendylan-melange/gtk-duim/gtk-menus.dylan	(original)
+++ branches/opendylan-melange/gtk-duim/gtk-menus.dylan	Wed Jun 13 01:07:44 2007
@@ -58,7 +58,7 @@
       duim-debug-message("Creating submenu for menu bar");
       gtk-menu-item-set-submenu(widget, menu);
       gtk-menu-shell-append(mirror-widget(parent),
-                            widget)
+                            widget);
     end
   else
     next-method()
@@ -302,6 +302,19 @@
   keyword gtk-fixed-height?: = #t;
 end class <gtk-menu-bar>;
 
+define method %gtk-fixed-width?
+    (gadget :: <gtk-menu-bar>)
+ => (fixed? :: <boolean>)
+  #f;
+end method;
+
+define method %gtk-fixed-height?
+    (gadget :: <gtk-menu-bar>)
+ => (fixed? :: <boolean>)
+  #t;
+end method;
+
+
 define sealed method class-for-make-pane
     (framem :: <gtk-frame-manager>, class == <menu-bar>, #key)
  => (class :: <class>, options :: false-or(<sequence>))

Modified: branches/opendylan-melange/gtk-duim/gtk-mirror.dylan
==============================================================================
--- branches/opendylan-melange/gtk-duim/gtk-mirror.dylan	(original)
+++ branches/opendylan-melange/gtk-duim/gtk-mirror.dylan	Wed Jun 13 01:07:44 2007
@@ -62,6 +62,7 @@
  => (mirror :: <gtk-mirror>)
   let parent = sheet-device-parent(sheet);
   let mirror = make-gtk-mirror(sheet);
+  with-gdk-lock gtk-widget-realize(mirror.mirror-widget) end;
   install-event-handlers(sheet, mirror);
   update-mirror-attributes(sheet, mirror);
   set-mirror-parent(mirror, sheet-direct-mirror(parent));
@@ -475,7 +476,7 @@
     allocation.GdkRectangle-width  := width;
     allocation.GdkRectangle-height := height;
     with-gdk-lock
-//      gtk-widget-size-allocate(widget, allocation)
+      gtk-widget-size-allocate(widget, allocation)
     end
   end
   // ---*** debugging code
@@ -489,7 +490,7 @@
     (mirror :: <drawing-area-mirror>, width :: <integer>, height :: <integer>)
  => ()
 //  gtk-drawing-area-size(mirror-widget(mirror), width, height);
-  gtk-debug("set-mirror-size for %= to %=x%=", mirror-widget(mirror), width, height);
+  gtk-debug("set-mirror-size for %= to %=x%= (ignored)", mirror-widget(mirror), width, height);
   with-gdk-lock
 //    gtk-widget-set-size-request(mirror-widget(mirror), width, height);
   end
@@ -498,5 +499,8 @@
 define method set-mirror-size
     (mirror :: <top-level-mirror>, width :: <integer>, height :: <integer>)
  => ()
-// hack: ignore
+  gtk-debug("set-mirror-size for %= to %=x%= (top-level)", mirror-widget(mirror), width, height);
+  with-gdk-lock
+    gtk-window-set-default-size(mirror-widget(mirror), width, height);
+  end
 end method set-mirror-size;



More information about the chatter mailing list