Author: matt
Date: 2011-07-27 17:07:41 -0700 (Wed, 27 Jul 2011)
New Revision: 8873
Log:
Applied changes from 8865 to 8868. I am too tired now to do the changes from 
the test files at this point, or fix up the copyrights as in rev 8867.


Modified:
   branches/branch-3.0/fltk3/Table.h
   branches/branch-3.0/src/Fl_Menu.cxx
   branches/branch-3.0/src/print_panel.cxx

Modified: branches/branch-3.0/fltk3/Table.h
===================================================================
--- branches/branch-3.0/fltk3/Table.h   2011-07-27 23:59:42 UTC (rev 8872)
+++ branches/branch-3.0/fltk3/Table.h   2011-07-28 00:07:41 UTC (rev 8873)
@@ -861,9 +861,14 @@
     }
     void add(fltk3::Widget& w) {
       table->add(w);
+      if ( table->children() > 2 ) {
+        table->show();
+      } else {
+        table->hide();
+      } 
     }
     void add(fltk3::Widget* w) {
-      table->add(w);
+      add(*w);
     }
     void insert(fltk3::Widget& w, int n) {
       table->insert(w,n);

Modified: branches/branch-3.0/src/Fl_Menu.cxx
===================================================================
--- branches/branch-3.0/src/Fl_Menu.cxx 2011-07-27 23:59:42 UTC (rev 8872)
+++ branches/branch-3.0/src/Fl_Menu.cxx 2011-07-28 00:07:41 UTC (rev 8873)
@@ -81,7 +81,7 @@
   if (!m->visible()) n++;
   while (n) {
     m = next_visible_or_not(m);
-    if (m->visible()) n--;
+    if (m->visible() || !m->text) n--;
   }
   return m;
 }

Modified: branches/branch-3.0/src/print_panel.cxx
===================================================================
--- branches/branch-3.0/src/print_panel.cxx     2011-07-27 23:59:42 UTC (rev 
8872)
+++ branches/branch-3.0/src/print_panel.cxx     2011-07-28 00:07:41 UTC (rev 
8873)
@@ -583,11 +583,11 @@
   char name[1024];
   int val;
 
-  snprintf(name, sizeof(name), "%s/page_size", printer);
+  snprintf(name, sizeof(name), "%s/page_size", printer == NULL ? "" : printer);
   print_prefs.get(name, val, 1);
   print_page_size->value(val);
 
-  snprintf(name, sizeof(name), "%s/output_mode", printer);
+  snprintf(name, sizeof(name), "%s/output_mode", printer == NULL ? "" : 
printer);
   print_prefs.get(name, val, 0);
   print_output_mode[val]->setonly();
 }

_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit

Reply via email to