[glade--]Bug fix for spinbutton adjustments
- From: Mark Jones <mark jones106 verizon net>
- To: glademm-list gnome org
- Subject: [glade--]Bug fix for spinbutton adjustments
- Date: 13 Dec 2002 00:43:20 -0500
The glade-2/gtkmm2 adjustments for spin buttons were not being written
out (it was writing the default inside the glademm code). I fixed
that. :) Hopefully in a backwards compatible way.
fixes to spinbutton.cc and adjustment.cc (diff -u):
--- bugfixes/spinbutton.cc 2002-12-12 23:50:13.000000000 -0500
+++ glade--/src/writers/spinbutton.cc 2002-12-12 23:51:42.000000000
-0500
@@ -48,19 +48,12 @@
}
adjustment=createWidgetTag("GtkAdjustment", name);
Widget w2(adjustment);
- if( !GTKMM2 )
- {
- COPY_TAG("value");
- COPY_TAG("lower");
- COPY_TAG("upper");
- COPY_TAG("step");
- COPY_TAG("page");
- COPY_TAG("page_size");
- }
- else
- {
- COPY_TAG("adjustment");
- }
+ COPY_TAG("value");
+ COPY_TAG("lower");
+ COPY_TAG("upper");
+ COPY_TAG("step");
+ COPY_TAG("page");
+ COPY_TAG("page_size");
w2.setProperty(CXX_IS_MANAGED);
return w2;
}
--- bugfixes/adjustment.cc 2002-12-12 23:50:21.000000000 -0500
+++ glade--/src/writers/adjustment.cc 2002-12-12 23:51:42.000000000
-0500
@@ -19,7 +19,6 @@
*/
#include "adjustment.hh"
-#include "stringtok.h"
static Gtk_Adjustment Gtk_Adjustment;
//static Gtk_Adjustment hGtk_Adjustment('h');
@@ -38,31 +37,17 @@
}
void Gtk_Adjustment::ConstructionArgs(const Widget &w, CxxFile &f)
const
-{
- if ( !GTKMM2 )
- {
- float value(w.getFloatProperty("value",0));
- float lower(w.getFloatProperty("lower",0));
- float upper(w.getFloatProperty("upper",100));
- float step(w.getFloatProperty("step",1));
- float page(w.getFloatProperty("page",10));
- float page_size(w.getFloatProperty("page_size",10));
-
- f.FunctionArg() << value;
- f.FunctionArg() << lower;
- f.FunctionArg() << upper;
- f.FunctionArg() << step;
- f.FunctionArg() << page;
- f.FunctionArg() << page_size;
- }
- else
- {
- int count = 0;
- std::list<std::string> list;
- stringtok (list, w.getProperty("adjustment"));
- for (std::list<std::string>::iterator i = list.begin(); i !=
list.end(); ++i)
- {
- f.FunctionArg() << (*i);
- }
- }
+{ float value(w.getFloatProperty("value",0));
+ float lower(w.getFloatProperty("lower",0));
+ float upper(w.getFloatProperty("upper",100));
+ float step(w.getFloatProperty("step",1));
+ float page(w.getFloatProperty("page",10));
+ float page_size(w.getFloatProperty("page_size",10));
+
+ f.FunctionArg() << value;
+ f.FunctionArg() << lower;
+ f.FunctionArg() << upper;
+ f.FunctionArg() << step;
+ f.FunctionArg() << page;
+ f.FunctionArg() << page_size;
}
Mark
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]