[kde-edu]: Fwd: kdeedu/keduca/keducabuilder
Henrique Pinto
henrique.pinto at kdemail.net
Mon Sep 27 23:58:01 CEST 2004
Hi!
I forgot to forward this commit message to the list...
Actions from keducabuilderui.rc weren't showing in KEducaBuilder, and that
rendered the app almost useless, as one could not add, edit or remove
questions from a test. This commit fixed it by passing the name of the file
to setupGUI. I would like to backport this is there's no objection.
The reason why it wasn't working wasn't the usage of setupGUI, as I suspected.
Actually, when KEduca and KEducaBuilder were separated into different
binaries, the instance name of KEducaBuilder wasn't changed, and still is
"keduca". createGUI(), called by setupGUI(), try to guess the name of the rc
file for the app by looking for <instancename>ui.rc, in this case, it was
looking for keducaui.rc, which is the wrong file. The instance name for
KEducaBuilder can be easily changed, but that would break other things
(namely, all things in the kdeedu/keduca/resources/ dir). I'll think of a
clean way of doing this.
PS: KEduca currently uses colors to indicate whether an answer was correct or
not. As some people cannot distinguish between red and green (the colors
used), I think the current images must be substituted. Is it OK if I ask on
kde-look.org if someone can draw better ones?
Thank you!
---------- Mensagem reenviada ----------
Subject: kdeedu/keduca/keducabuilder
Date: Sáb 25 Set 2004 14:15
From: Henrique Pinto <stampede at coltec.ufmg.br>
To: kde-cvs at kde.org
CVS commit by pinto:
Show actions from keducabuilderui.rc. The fact that these action weren't
shown made KEducaBuilder (almost) useless.
M +6 -7 keducabuilder.cpp 1.14
--- kdeedu/keduca/keducabuilder/keducabuilder.cpp #1.13:1.14
@@ -102,4 +102,5 @@ void KEducaBuilder::init()
this->setCentralWidget( mainView );
+ setupGUI( ToolBar | Keys | StatusBar | Save | Create,
"keducabuilderui.rc" ); }
@@ -117,11 +118,9 @@ void KEducaBuilder::initMenuBar()
KStdAction::quit(this, SLOT( close() ), actionCollection());
- (void)new KAction(i18n("Add..."), "addquestion", 0, this, SLOT(
slotAdd() ), actionCollection(), "question_add"); - (void)new
KAction(i18n("Edit..."), "editquestion", 0, this, SLOT( slotEdit() ),
actionCollection(), "question_edit"); - (void)new KAction(i18n("Remove"),
"delquestion", 0, this, SLOT( slotRemove() ), actionCollection(),
"question_remove"); - (void)new KAction(i18n("Up"), "up", 0, this, SLOT(
slotUp() ), actionCollection(), "question_up"); - (void)new
KAction(i18n("Down"), "down", 0, this, SLOT( slotDown() ),
actionCollection(), "question_down"); -
- setupGUI( );
+ (void)new KAction(i18n("&Add..."), "addquestion", 0, this, SLOT(
slotAdd() ), actionCollection(), "question_add"); + (void)new
KAction(i18n("&Edit..."), "editquestion", 0, this, SLOT( slotEdit() ),
actionCollection(), "question_edit"); + (void)new
KAction(i18n("&Remove"), "delquestion", 0, this, SLOT( slotRemove() ),
actionCollection(), "question_remove"); + (void)new KAction(i18n("&Up"),
"up", 0, this, SLOT( slotUp() ), actionCollection(), "question_up"); +
(void)new KAction(i18n("&Down"), "down", 0, this, SLOT( slotDown() ),
actionCollection(), "question_down"); }
-------------------------------------------------------
--
Henrique Pinto
henrique.pinto at kdemail.net
More information about the kde-edu
mailing list