summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Cruz <rpmcruz@alunos.dcc.fc.up.pt>2010-12-17 23:55:46 +0000
committerMichael Meeks <michael.meeks@novell.com>2011-07-21 11:34:01 +0100
commitd264b1d207a34a846e14703e2be8a323f5230e08 (patch)
tree0927199ed1179dd9db780cef9322d943f3043be1
parent9b4d5d0af208850348e4251c894fc357060ab13d (diff)
Fixed Notebook
-rw-r--r--sw/source/ui/dialog/wordcountdialog.cxx36
1 files changed, 15 insertions, 21 deletions
diff --git a/sw/source/ui/dialog/wordcountdialog.cxx b/sw/source/ui/dialog/wordcountdialog.cxx
index 5cceb2c315..daacb6ec93 100644
--- a/sw/source/ui/dialog/wordcountdialog.cxx
+++ b/sw/source/ui/dialog/wordcountdialog.cxx
@@ -116,10 +116,10 @@ SwWordCountDialog::SwWordCountDialog (Window* parent) :
aDocCharacterExcludingSpacesFT->SetText (String::CreateFromAscii ("Characters excluding spaces:"));
aDocCharacterExcludingSpacesFI = new FixedInfo (this);
-#if 1
// create layout
Notebook *notebook = new Notebook (this);
+ Table *table = new Table (2);
for (int page = 0; page < 2; page++) {
VBox *labels_box = new VBox (false, 6);
VBox *counts_box = new VBox (false, 6);
@@ -128,16 +128,6 @@ SwWordCountDialog::SwWordCountDialog (Window* parent) :
switch (page) {
case 0:
str = String::CreateFromAscii ("Whole Document");
- labels_box->Pack (aCurrentWordFT, false, true);
- labels_box->Pack (aCurrentCharacterFT, false, true);
- labels_box->Pack (aCurrentCharacterExcludingSpacesFT, false, true);
-
- counts_box->Pack (aCurrentWordFI, false, true);
- counts_box->Pack (aCurrentCharacterFI, false, true);
- counts_box->Pack (aCurrentCharacterExcludingSpacesFI, false, true);
- break;
- case 1:
- str = String::CreateFromAscii ("Selected Text");
labels_box->Pack (aDocWordFT, false, true);
labels_box->Pack (aDocCharacterFT, false, true);
labels_box->Pack (aDocCharacterExcludingSpacesFT, false, true);
@@ -146,6 +136,16 @@ SwWordCountDialog::SwWordCountDialog (Window* parent) :
counts_box->Pack (aDocCharacterFI, false, true);
counts_box->Pack (aDocCharacterExcludingSpacesFI, false, true);
break;
+ case 1:
+ str = String::CreateFromAscii ("Selected Text");
+ labels_box->Pack (aCurrentWordFT, false, true);
+ labels_box->Pack (aCurrentCharacterFT, false, true);
+ labels_box->Pack (aCurrentCharacterExcludingSpacesFT, false, true);
+
+ counts_box->Pack (aCurrentWordFI, false, true);
+ counts_box->Pack (aCurrentCharacterFI, false, true);
+ counts_box->Pack (aCurrentCharacterExcludingSpacesFI, false, true);
+ break;
}
Box *cols = new HBox (false, 6);
@@ -156,29 +156,23 @@ SwWordCountDialog::SwWordCountDialog (Window* parent) :
notebook->AddPage (str, cols);
}
- PushButton *button = new PushButton (this);
- button->SetText (String::CreateFromAscii ("Hello !"));
- notebook->AddPage (String::CreateFromAscii ("Test Tab"), button);
-
Box *buttons_box = new HBox (true, 6);
aHelp = new HelpButton (this);
aOK = new OKButton (this);
+
buttons_box->Pack (aHelp, false, true);
- buttons_box->Pack (aOK, true, true);
+ buttons_box->Pack (aOK, false, true);
Box *vbox = new VBox (false, 12);
vbox->SetBorderWidth (6);
vbox->Pack (notebook, notebook, true, true);
vbox->Pack (buttons_box, false, true);
-fprintf (stderr, "wc: set title\n");
+//Layout::ShowAll (buttons_box);
+
SetText (String::CreateFromAscii ("Word Count"));
-fprintf (stderr, "wc: add child\n");
AddChild (vbox);
-fprintf (stderr, "wc: show all\n");
Layout::ShowAll (this);
-fprintf (stderr, "wc: done\n");
-#endif
// FreeResource();
}