[glade--]bug fixes: for tables x/y padding; entry max length

Mark Jones <[email protected]>
Newsgroups gmane.comp.gnome.glademm
Message-ID <[email protected]>
2 fixes, both tested with gtkmm2:

Padding was not being written out from glade-2 files (gtkmm2)

--- src/writers/table.cc        2002-12-14 23:19:22.000000000 -0500
+++ /root/bugfixes/table.cc     2002-12-14 23:18:49.000000000 -0500
@@ -94,8 +94,20 @@
    std::string xoptions = getAttachOptions(ch, "x");
    std::string yoptions = getAttachOptions(ch, "y");
 
-   int xpad=ch.getIntProperty("xpad",0);
-   int ypad=ch.getIntProperty("ypad",0);
+   int xpad=0;
+   int ypad=0;
+
+   if ( !GTKMM2 )
+   {
+      xpad=ch.getIntProperty("xpad",0);
+      ypad=ch.getIntProperty("ypad",0);
+   }
+   else
+   {
+      xpad=ch.getIntProperty("x_padding",0);
+      ypad=ch.getIntProperty("y_padding",0);
+   }
+    
 
    if (xoptions=="GTK_FILL|GTK_EXPAND" 
        && yoptions=="GTK_FILL|GTK_EXPAND" && !xpad && !ypad)

Entry max length problem:
--- src/writers/entry.cc        2002-12-14 23:21:55.000000000 -0500
+++ /root/bugfixes/entry.cc     2002-12-14 22:55:56.000000000 -0500
@@ -39,6 +39,7 @@
    WriteIntProperty(w,f,instance, "position");
    WriteBoolProperty(w,f,instance, "text_visible", false,
"visibility");
    WriteBoolProperty(w,f,instance, "editable");
+   WriteIntProperty(w,f,instance, "max_length");
    // max length ... seems to be not in gtkmm
    WriteTranslatableProperty(w,f,instance, "text");
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.