provisional solution to #2044

This commit is contained in:
fgerlits 2006-11-29 21:38:41 +00:00
parent 96f4e38e38
commit f7bdf20b6e
4 changed files with 43 additions and 1 deletions

View File

@ -355,6 +355,19 @@ class ComboBoxText : public Gtk::ComboBoxText
*/
sigc::signal<void>
signalSelectionChanged(void) throw ();
/**
* Enable or disable the widget.
*
* @param sensitive if true, the widget is enabled (default);
* if false, the widget is disabled.
*/
virtual void
set_sensitive(bool sensitive = true) throw ()
{
label->set_sensitive(sensitive);
Gtk::ComboBoxText::set_sensitive(sensitive);
}
};

View File

@ -132,10 +132,24 @@ class BrowseEntry : public Gtk::HBox,
* @return the signalSelectionChanged() of the last browse item
*/
sigc::signal<void>
signalSelectionChanged(void) throw ()
signalSelectionChanged(void) throw ()
{
return browseItemThree->signalSelectionChanged();
}
/**
* Enable or disable the widget.
*
* @param sensitive if true, the widget is enabled (default);
* if false, the widget is disabled.
*/
void
setSensitive(bool sensitive = true) throw ()
{
browseItemOne->setSensitive(sensitive);
browseItemTwo->setSensitive(sensitive);
browseItemThree->setSensitive(sensitive);
}
};

View File

@ -251,6 +251,19 @@ class BrowseItem : public Gtk::VBox,
{
return signalSelectionChangedObject;
}
/**
* Enable or disable the widget.
*
* @param sensitive if true, the widget is enabled (default);
* if false, the widget is disabled.
*/
void
setSensitive(bool sensitive = true) throw ()
{
metadataEntry->set_sensitive(sensitive);
metadataValues->set_sensitive(sensitive);
}
};

View File

@ -1093,8 +1093,10 @@ void
SearchWindow :: onSearchWhereChanged(void) throw ()
{
if (searchIsLocal()) {
browseEntry->setSensitive(true);
searchResultsTreeView->set_model(localSearchResults);
} else {
browseEntry->setSensitive(false);
searchResultsTreeView->set_model(remoteSearchResults);
}