diff --git a/livesupport/modules/widgets/src/Notebook.cxx b/livesupport/modules/widgets/src/Notebook.cxx index fd07f8e09..57da583d6 100644 --- a/livesupport/modules/widgets/src/Notebook.cxx +++ b/livesupport/modules/widgets/src/Notebook.cxx @@ -21,8 +21,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Author : $Author: maroy $ - Version : $Revision: 1.2 $ + Author : $Author: fgerlits $ + Version : $Revision: 1.3 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/widgets/src/Notebook.cxx,v $ ------------------------------------------------------------------------------*/ @@ -64,8 +64,8 @@ Notebook :: Notebook(void) throw () tabBox = Gtk::manage(new Gtk::HBox()); pageHolder = Gtk::manage(new Gtk::Alignment()); - layout->attach(*tabBox, 0, 1, 0, 1); - layout->attach(*pageHolder, 0, 1, 1, 2); + layout->attach(*tabBox, 0, 1, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 5, 5); + layout->attach(*pageHolder, 0, 1, 1, 2, Gtk::SHRINK, Gtk::SHRINK, 5, 5); add(*layout); diff --git a/livesupport/products/gLiveSupport/etc/Makefile.in b/livesupport/products/gLiveSupport/etc/Makefile.in index c65b029df..d4dd2ef53 100644 --- a/livesupport/products/gLiveSupport/etc/Makefile.in +++ b/livesupport/products/gLiveSupport/etc/Makefile.in @@ -21,7 +21,7 @@ # # # Author : $Author: fgerlits $ -# Version : $Revision: 1.29 $ +# Version : $Revision: 1.30 $ # Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/etc/Makefile.in,v $ # # @configure_input@ @@ -268,6 +268,9 @@ start: ${SCHEDULER_EXE} stop: ${SCHEDULER_EXE} ${MAKE} -C ${SCHEDULER_DIR} stop +status: ${SCHEDULER_EXE} + ${MAKE} -C ${SCHEDULER_DIR} status + uninstall: ${SCHEDULER_EXE} -${MAKE} -C ${SCHEDULER_DIR} uninstall -${MAKE} -C ${STORAGE_SERVER_DIR} db_clean diff --git a/livesupport/products/gLiveSupport/src/SearchWindow.cxx b/livesupport/products/gLiveSupport/src/SearchWindow.cxx index b8d91cc2e..a31b8a907 100644 --- a/livesupport/products/gLiveSupport/src/SearchWindow.cxx +++ b/livesupport/products/gLiveSupport/src/SearchWindow.cxx @@ -22,7 +22,7 @@ Author : $Author: fgerlits $ - Version : $Revision: 1.1 $ + Version : $Revision: 1.2 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/SearchWindow.cxx,v $ ------------------------------------------------------------------------------*/ @@ -37,6 +37,11 @@ #include #include "LiveSupport/Widgets/WidgetFactory.h" +#include "LiveSupport/Widgets/Notebook.h" +#include "LiveSupport/Widgets/Button.h" +#include "LiveSupport/Widgets/ComboBoxText.h" +#include "LiveSupport/Widgets/EntryBin.h" +#include "LiveSupport/Widgets/ZebraTreeView.h" #include "SearchWindow.h" @@ -69,10 +74,23 @@ SearchWindow :: SearchWindow (Ptr::Ref gLiveSupport, LocalizedObject(bundle) { this->gLiveSupport = gLiveSupport; + treeModel = Gtk::ListStore::create(modelColumns); + + Gtk::VBox * searchView = Gtk::manage(new Gtk::VBox); + Gtk::VBox * advancedSearchView = constructAdvancedSearchView(); + Gtk::VBox * browseView = Gtk::manage(new Gtk::VBox); + + Notebook * views = Gtk::manage(new Notebook); + views->appendPage(*searchView, *getResourceUstring("searchTab")); + views->appendPage(*advancedSearchView, *getResourceUstring( + "advancedSearchTab")); + views->appendPage(*browseView, *getResourceUstring("browseTab")); + + add(*views); // show set_name("searchWindow"); - set_default_size(300, 300); +// set_default_size(300, 300); set_modal(false); property_window_position().set_value(Gtk::WIN_POS_NONE); @@ -88,3 +106,61 @@ SearchWindow :: ~SearchWindow (void) throw () { } + +/*------------------------------------------------------------------------------ + * Construct the advanced search view. + *----------------------------------------------------------------------------*/ +Gtk::VBox* +SearchWindow :: constructAdvancedSearchView(void) throw () +{ + Ptr::Ref wf = WidgetFactory::getInstance(); + + // the three main components of the window + Gtk::Box * searchOptionsBox = Gtk::manage(new Gtk::HBox); + Gtk::Box * searchButtonBox = Gtk::manage(new Gtk::HButtonBox( + Gtk::BUTTONBOX_END )); + ZebraTreeView * searchResults = Gtk::manage(wf->createTreeView(treeModel)); + + // make a new box, and pack the main components into it + Gtk::VBox * view = Gtk::manage(new Gtk::VBox); + view->pack_start(*searchOptionsBox, Gtk::PACK_SHRINK, 5); + view->pack_start(*searchButtonBox, Gtk::PACK_SHRINK, 5); + view->pack_start(*searchResults, Gtk::PACK_SHRINK, 5); + + // set up the search options box + Gtk::Label * searchByLabel = Gtk::manage(new Gtk::Label( + *getResourceUstring("searchByTextLabel") )); + ComboBoxText * metadataType = Gtk::manage(wf->createComboBoxText()); + metadataType->append_text("Title"); + metadataType->append_text("Creator"); + metadataType->append_text("Length"); + metadataType->set_active_text("Title"); + ComboBoxText * operatorType = Gtk::manage(wf->createComboBoxText()); + operatorType->append_text("contains"); + operatorType->append_text("equals"); + operatorType->append_text(">="); + operatorType->append_text("<"); + operatorType->set_active_text("contains"); + EntryBin * entryBin = Gtk::manage(wf->createEntryBin()); + searchOptionsBox->pack_start(*searchByLabel, Gtk::PACK_SHRINK, 5); + searchOptionsBox->pack_start(*metadataType, Gtk::PACK_EXPAND_WIDGET, 5); + searchOptionsBox->pack_start(*operatorType, Gtk::PACK_EXPAND_WIDGET, 5); + searchOptionsBox->pack_start(*entryBin, Gtk::PACK_EXPAND_WIDGET, 5); + + // set up the search button box + Button * searchButton = Gtk::manage(wf->createButton( + *getResourceUstring("searchButtonLabel") )); + searchButtonBox->pack_start(*searchButton, Gtk::PACK_SHRINK, 5); + + return view; +} + + + + + + + + + + diff --git a/livesupport/products/gLiveSupport/src/SearchWindow.h b/livesupport/products/gLiveSupport/src/SearchWindow.h index b80c39b07..4fbab92ab 100644 --- a/livesupport/products/gLiveSupport/src/SearchWindow.h +++ b/livesupport/products/gLiveSupport/src/SearchWindow.h @@ -22,7 +22,7 @@ Author : $Author: fgerlits $ - Version : $Revision: 1.1 $ + Version : $Revision: 1.2 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/SearchWindow.h,v $ ------------------------------------------------------------------------------*/ @@ -72,12 +72,21 @@ using namespace LiveSupport::Widgets; * The Search/Browse window. * * @author $Author: fgerlits $ - * @version $Revision: 1.1 $ + * @version $Revision: 1.2 $ */ class SearchWindow : public WhiteWindow, public LocalizedObject { private: + /** + * Construct the advanced search view. + * + * @return a pointer to the new box (already Gtk::manage()'ed) + */ + Gtk::VBox* + constructAdvancedSearchView(void) throw (); + + protected: /** @@ -85,7 +94,7 @@ class SearchWindow : public WhiteWindow, public LocalizedObject * Lists one clip per row. * * @author $Author: fgerlits $ - * @version $Revision: 1.1 $ + * @version $Revision: 1.2 $ */ class ModelColumns : public ZebraTreeModelColumnRecord { @@ -129,36 +138,21 @@ class SearchWindow : public WhiteWindow, public LocalizedObject }; - /** - * The GLiveSupport object, holding the state of the application. - */ - Ptr::Ref gLiveSupport; - /** * The column model. */ - ModelColumns modelColumns; - - /** - * The main container in the window. - */ - Gtk::VBox vBox; - - /** - * A scrolled window, so that the list can be scrolled. - */ - Gtk::ScrolledWindow scrolledWindow; - - /** - * The tree view. - */ - ZebraTreeView * treeView; + ModelColumns modelColumns; /** * The tree model, as a GTK reference. */ Glib::RefPtr treeModel; + /** + * The GLiveSupport object, holding the state of the application. + */ + Ptr::Ref gLiveSupport; + public: /** diff --git a/livesupport/products/gLiveSupport/var/hu.txt b/livesupport/products/gLiveSupport/var/hu.txt index b2266ba9c..a0437df5a 100644 --- a/livesupport/products/gLiveSupport/var/hu.txt +++ b/livesupport/products/gLiveSupport/var/hu.txt @@ -132,6 +132,13 @@ hu:table searchWindow:table { windowTitle:string { "LiveSupport Keresés Ablak" } + + searchTab:string { "Keresés" } + advancedSearchTab:string { "Összetett keresés" } + browseTab:string { "Nézelődés" } + + searchByTextLabel:string { "Keresési feltétel:" } + searchButtonLabel:string { "Keress!" } } } diff --git a/livesupport/products/gLiveSupport/var/root.txt b/livesupport/products/gLiveSupport/var/root.txt index 657e51773..e1d74c8c0 100644 --- a/livesupport/products/gLiveSupport/var/root.txt +++ b/livesupport/products/gLiveSupport/var/root.txt @@ -134,6 +134,13 @@ root:table searchWindow:table { windowTitle:string { "LiveSupport Search/Browse Window" } + + searchTab:string { "Search" } + advancedSearchTab:string { "Advanced Search" } + browseTab:string { "Browse" } + + searchByTextLabel:string { "Search by" } + searchButtonLabel:string { "Search" } } }