aboutsummaryrefslogtreecommitdiffstats
path: root/modules/test.cpp
diff options
context:
space:
mode:
authorAngelo Naselli <anaselli@mageia.org>2012-11-06 20:15:01 +0000
committerAngelo Naselli <anaselli@mageia.org>2012-11-06 20:15:01 +0000
commit5a547e6b955ea5c655edb3b87b7ff7676ced36fe (patch)
tree6e3b659c3cc210c6553cdcc4952cb38c6ee1061e /modules/test.cpp
parent5a38703a90989bca6a3e2c858c3f9467895316f9 (diff)
downloadmanatools-5a547e6b955ea5c655edb3b87b7ff7676ced36fe.tar
manatools-5a547e6b955ea5c655edb3b87b7ff7676ced36fe.tar.gz
manatools-5a547e6b955ea5c655edb3b87b7ff7676ced36fe.tar.bz2
manatools-5a547e6b955ea5c655edb3b87b7ff7676ced36fe.tar.xz
manatools-5a547e6b955ea5c655edb3b87b7ff7676ced36fe.zip
change code alignment using
tabstop=4 shiftwidth=4 expandtab
Diffstat (limited to 'modules/test.cpp')
-rw-r--r--modules/test.cpp54
1 files changed, 24 insertions, 30 deletions
diff --git a/modules/test.cpp b/modules/test.cpp
index 6f3178ef..8c3aa647 100644
--- a/modules/test.cpp
+++ b/modules/test.cpp
@@ -1,3 +1,5 @@
+// vim: set et ts=4 sw=4:
+//
// Trivial libyui example.
//
// Compile with:
@@ -46,7 +48,7 @@ int main( int argc, char **argv )
std::vector<YPushButton*>buttons;
for (;;)
- {
+ {
YEvent* event = dialog->waitForEvent();
// Check for window close
if (event->eventType() == YEvent::CancelEvent)
@@ -56,7 +58,7 @@ int main( int argc, char **argv )
// Check for Exit button push
if(event->widget() == (YWidget*)exitButton ) {
- break;
+ break;
};
if(event->widget() == (YWidget*)addButton ) {
@@ -66,8 +68,7 @@ int main( int argc, char **argv )
vbox_rframe = YUI::widgetFactory()->createVBox( replacePoint );
bnum++;
buttons.clear();
- for (int i=0; i < bnum; ++i)
- {
+ for (int i=0; i < bnum; ++i) {
YPushButton* tmpB = YUI::widgetFactory()->createPushButton( vbox_rframe, "Delete Me" );
buttons.push_back(tmpB);
}
@@ -75,14 +76,12 @@ int main( int argc, char **argv )
dialog->recalcLayout();
dialog->doneMultipleChanges();
}
- else if (bnum == 6)
- {
+ else if (bnum == 6) {
dialog->startMultipleChanges();
replacePoint->deleteChildren();
vbox_rframe = YUI::widgetFactory()->createVBox( replacePoint );
buttons.clear();
- for (int i=0; i < bnum; ++i)
- {
+ for (int i=0; i < bnum; ++i) {
YPushButton* tmpB = YUI::widgetFactory()->createPushButton( vbox_rframe, "Delete Me" );
buttons.push_back(tmpB);
}
@@ -93,37 +92,32 @@ int main( int argc, char **argv )
}
}
if(event->widget() == (YWidget*)removeButton ) {
- if (bnum > 0)
- {
- dialog->startMultipleChanges();
- replacePoint->deleteChildren();
- vbox_rframe = YUI::widgetFactory()->createVBox( replacePoint );
- bnum--;
- buttons.clear();
- for (int i=0; i < bnum; ++i)
- {
- YPushButton* tmpB = YUI::widgetFactory()->createPushButton( vbox_rframe, "Delete Me" );
- buttons.push_back(tmpB);
- }
- replacePoint->showChild();
- dialog->recalcLayout();
- dialog->doneMultipleChanges();
+ if (bnum > 0) {
+ dialog->startMultipleChanges();
+ replacePoint->deleteChildren();
+ vbox_rframe = YUI::widgetFactory()->createVBox( replacePoint );
+ bnum--;
+ buttons.clear();
+ for (int i=0; i < bnum; ++i) {
+ YPushButton* tmpB = YUI::widgetFactory()->createPushButton( vbox_rframe, "Delete Me" );
+ buttons.push_back(tmpB);
+ }
+ replacePoint->showChild();
+ dialog->recalcLayout();
+ dialog->doneMultipleChanges();
}
}
-
- for(int i = 0; i < bnum; ++i)
- {
+ for(int i = 0; i < bnum; ++i) {
if (event->widget() == (YWidget*)buttons[i]) {
dialog->startMultipleChanges();
replacePoint->deleteChildren();
vbox_rframe = YUI::widgetFactory()->createVBox( replacePoint );
bnum--;
buttons.clear();
- for (int i=0; i < bnum; ++i)
- {
- YPushButton* tmpB = YUI::widgetFactory()->createPushButton( vbox_rframe, "Delete Me" );
- buttons.push_back(tmpB);
+ for (int i=0; i < bnum; ++i) {
+ YPushButton* tmpB = YUI::widgetFactory()->createPushButton( vbox_rframe, "Delete Me" );
+ buttons.push_back(tmpB);
}
replacePoint->showChild();
dialog->recalcLayout();