changed buttons in AdvancedSearchItem

note bug #1223, though: current "minus" image is in fact an X
This commit is contained in:
fgerlits 2005-07-01 10:20:02 +00:00
parent 42fc60fa70
commit ba8ed9f566
9 changed files with 51 additions and 22 deletions

View file

@ -22,7 +22,7 @@
Author : $Author: fgerlits $
Version : $Revision: 1.24 $
Version : $Revision: 1.25 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/widgets/include/LiveSupport/Widgets/WidgetFactory.h,v $
------------------------------------------------------------------------------*/
@ -92,7 +92,7 @@ class ZebraTreeView;
* </code></pre>
*
* @author $Author: fgerlits $
* @version $Revision: 1.24 $
* @version $Revision: 1.25 $
*/
class WidgetFactory :
virtual public Configurable
@ -106,7 +106,7 @@ class WidgetFactory :
/**
* The types of available image buttons.
*/
typedef enum { deleteButton, plusButton,
typedef enum { deleteButton, plusButton, minusButton,
smallPlayButton, smallPauseButton, smallStopButton,
hugePlayButton,
cuePlayButton, cueStopButton,

View file

@ -22,7 +22,7 @@
Author : $Author: fgerlits $
Version : $Revision: 1.28 $
Version : $Revision: 1.29 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/widgets/src/WidgetFactory.cxx,v $
------------------------------------------------------------------------------*/
@ -116,6 +116,16 @@ static const std::string plusButtonPassiveName = "imageButton/plus.png";
*/
static const std::string plusButtonRollName = "imageButton/plusRoll.png";
/**
* The name of the passive image for the minus button.
*/
static const std::string minusButtonPassiveName = "imageButton/minus.png";
/**
* The name of the rollover image for the minus button.
*/
static const std::string minusButtonRollName = "imageButton/minusRoll.png";
/**
* The name of the passive image for the small play button.
*/
@ -535,6 +545,11 @@ WidgetFactory :: createButton(ImageButtonType type) throw ()
rollImage = loadImage(plusButtonRollName);
break;
case minusButton:
passiveImage = loadImage(minusButtonPassiveName);
rollImage = loadImage(minusButtonRollName);
break;
case smallPlayButton:
passiveImage = loadImage(smallPlayButtonPassiveName);
rollImage = loadImage(smallPlayButtonRollName);

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

View file

@ -22,7 +22,7 @@
Author : $Author: fgerlits $
Version : $Revision: 1.3 $
Version : $Revision: 1.4 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/AdvancedSearchEntry.cxx,v $
------------------------------------------------------------------------------*/
@ -70,7 +70,7 @@ AdvancedSearchEntry :: AdvancedSearchEntry(
getBundle() ));
pack_start(*searchOptionsBox, Gtk::PACK_SHRINK, 5);
searchOptionsBox->signal_add_new().connect(sigc::mem_fun(*this,
searchOptionsBox->signalAddNew().connect(sigc::mem_fun(*this,
&AdvancedSearchEntry::onAddNewCondition ));
}
@ -87,8 +87,6 @@ AdvancedSearchEntry :: onAddNewCondition(void) throw ()
getBundle() ));
pack_start(*searchOptionsBox, Gtk::PACK_SHRINK, 5);
searchOptionsBox->signal_add_new().connect(sigc::mem_fun(*this,
&AdvancedSearchEntry::onAddNewCondition ));
searchOptionsBox->show_all_children();
searchOptionsBox->show();
}

View file

@ -22,7 +22,7 @@
Author : $Author: fgerlits $
Version : $Revision: 1.2 $
Version : $Revision: 1.3 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/AdvancedSearchItem.cxx,v $
------------------------------------------------------------------------------*/
@ -88,14 +88,16 @@ AdvancedSearchItem :: AdvancedSearchItem(
valueEntry = Gtk::manage(wf->createEntryBin());
pack_start(*valueEntry, Gtk::PACK_EXPAND_WIDGET, 5);
plusButton = Gtk::manage(wf->createButton(WidgetFactory::plusButton));
pack_start(*plusButton, Gtk::PACK_SHRINK, 5);
if (!isFirst) {
closeButton = Gtk::manage(wf->createButton(WidgetFactory::deleteButton));
if (isFirst) {
plusButton = Gtk::manage(wf->createButton(WidgetFactory::plusButton));
pack_start(*plusButton, Gtk::PACK_SHRINK, 5);
plusButton->signal_clicked().connect(sigc::mem_fun(*this,
&AdvancedSearchItem::onPlusButtonClicked ));
} else {
closeButton = Gtk::manage(wf->createButton(WidgetFactory::minusButton));
closeButton->signal_clicked().connect(sigc::mem_fun(*this,
&AdvancedSearchItem::destroy_ ));
pack_start(*closeButton, Gtk::PACK_SHRINK, 5);
&AdvancedSearchItem::destroy_ ));
pack_start(*closeButton, Gtk::PACK_SHRINK, 5);
}
}

View file

@ -22,7 +22,7 @@
Author : $Author: fgerlits $
Version : $Revision: 1.2 $
Version : $Revision: 1.3 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/AdvancedSearchItem.h,v $
------------------------------------------------------------------------------*/
@ -73,7 +73,7 @@ using namespace LiveSupport::Widgets;
* A single search input field.
*
* @author $Author: fgerlits $
* @version $Revision: 1.2 $
* @version $Revision: 1.3 $
*/
class AdvancedSearchItem : public Gtk::HBox,
public LocalizedObject
@ -112,6 +112,20 @@ class AdvancedSearchItem : public Gtk::HBox,
*/
ImageButton * closeButton;
/**
* A signal object emitted when the plus button is pressed.
*/
sigc::signal<void> signalAddNewObject;
/**
* Event handler for the Plus button getting clicked.
*/
void
onPlusButtonClicked() throw ()
{
signalAddNew().emit();
}
public:
@ -158,12 +172,12 @@ class AdvancedSearchItem : public Gtk::HBox,
/**
* The signal proxy for pressing the add new condition button.
*
* @return the signal_activate() proxy of the Plus button.
* @return a signal emitted when the Plus button is clicked.
*/
Glib::SignalProxy0<void>
signal_add_new(void) throw ()
sigc::signal<void>
signalAddNew(void) throw ()
{
return plusButton->signal_clicked();
return signalAddNewObject;
}
};

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB