aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcorvid <corvid@lavabit.com>2012-11-25 01:54:16 +0000
committercorvid <corvid@lavabit.com>2012-11-25 01:54:16 +0000
commit975fc68c4d5bd9ce6ca2e536f4c8a3c6d59962b9 (patch)
tree5e1893c5946abc0d71265b60bbeab78b7a3a392e
parentfae8ba37e74976b59ab41932d3b2c2165c688d91 (diff)
dw entry resource, mentions of maxLength should be size
-rw-r--r--dw/fltkplatform.cc4
-rw-r--r--dw/fltkplatform.hh3
-rw-r--r--dw/fltkui.cc6
-rw-r--r--dw/fltkui.hh4
-rw-r--r--dw/ui.hh4
5 files changed, 10 insertions, 11 deletions
diff --git a/dw/fltkplatform.cc b/dw/fltkplatform.cc
index d8e95a6e..7dd87a18 100644
--- a/dw/fltkplatform.cc
+++ b/dw/fltkplatform.cc
@@ -419,11 +419,11 @@ FltkPlatform::FltkResourceFactory::createOptionMenuResource ()
}
core::ui::EntryResource *
-FltkPlatform::FltkResourceFactory::createEntryResource (int maxLength,
+FltkPlatform::FltkResourceFactory::createEntryResource (int size,
bool password,
const char *label)
{
- return new ui::FltkEntryResource (platform, maxLength, password, label);
+ return new ui::FltkEntryResource (platform, size, password, label);
}
core::ui::MultiLineTextResource *
diff --git a/dw/fltkplatform.hh b/dw/fltkplatform.hh
index 7b4272eb..64605b68 100644
--- a/dw/fltkplatform.hh
+++ b/dw/fltkplatform.hh
@@ -109,8 +109,7 @@ private:
createListResource (core::ui::ListResource::SelectionMode selectionMode,
int rows);
core::ui::OptionMenuResource *createOptionMenuResource ();
- core::ui::EntryResource *createEntryResource (int maxLength,
- bool password,
+ core::ui::EntryResource *createEntryResource (int size, bool password,
const char *label);
core::ui::MultiLineTextResource *createMultiLineTextResource (int cols,
int rows);
diff --git a/dw/fltkui.cc b/dw/fltkui.cc
index d2fae962..e8416bb3 100644
--- a/dw/fltkui.cc
+++ b/dw/fltkui.cc
@@ -536,11 +536,11 @@ Fl_Widget *FltkComplexButtonResource::createNewWidget (core::Allocation
// ----------------------------------------------------------------------
-FltkEntryResource::FltkEntryResource (FltkPlatform *platform, int maxLength,
+FltkEntryResource::FltkEntryResource (FltkPlatform *platform, int size,
bool password, const char *label):
FltkSpecificResource <dw::core::ui::EntryResource> (platform)
{
- this->maxLength = maxLength;
+ this->size = size;
this->password = password;
this->label = label ? strdup(label) : NULL;
this->label_w = 0;
@@ -615,7 +615,7 @@ void FltkEntryResource::sizeRequest (core::Requisition *requisition)
// 1.3.0 (STR #2688).
requisition->width =
(int)fl_width ("n")
- * (maxLength == UNLIMITED_MAX_LENGTH ? 10 : maxLength)
+ * (size == UNLIMITED_SIZE ? 10 : size)
+ label_w + (2 * RELIEF_X_THICKNESS);
requisition->ascent = font->ascent + RELIEF_Y_THICKNESS;
requisition->descent = font->descent + RELIEF_Y_THICKNESS;
diff --git a/dw/fltkui.hh b/dw/fltkui.hh
index a65d4930..976e5395 100644
--- a/dw/fltkui.hh
+++ b/dw/fltkui.hh
@@ -282,7 +282,7 @@ class FltkEntryResource:
public FltkSpecificResource <dw::core::ui::EntryResource>
{
private:
- int maxLength;
+ int size;
bool password;
const char *initText;
char *label;
@@ -297,7 +297,7 @@ protected:
void setWidgetStyle (Fl_Widget *widget, core::style::Style *style);
public:
- FltkEntryResource (FltkPlatform *platform, int maxLength, bool password,
+ FltkEntryResource (FltkPlatform *platform, int size, bool password,
const char *label);
~FltkEntryResource ();
diff --git a/dw/ui.hh b/dw/ui.hh
index f5cc17b9..41ab272b 100644
--- a/dw/ui.hh
+++ b/dw/ui.hh
@@ -481,7 +481,7 @@ public:
class EntryResource: public TextResource
{
public:
- enum { UNLIMITED_MAX_LENGTH = -1 };
+ enum { UNLIMITED_SIZE = -1 };
};
class MultiLineTextResource: public TextResource
@@ -541,7 +541,7 @@ public:
virtual ListResource *createListResource (ListResource::SelectionMode
selectionMode, int rows) = 0;
virtual OptionMenuResource *createOptionMenuResource () = 0;
- virtual EntryResource *createEntryResource (int maxLength, bool password,
+ virtual EntryResource *createEntryResource (int size, bool password,
const char *label) = 0;
virtual MultiLineTextResource *createMultiLineTextResource (int cols,
int rows) = 0;