From 45e55e8571e6400176e3dca67849145c164d235e Mon Sep 17 00:00:00 2001 From: fgerlits Date: Fri, 29 Apr 2005 16:22:54 +0000 Subject: [PATCH] some cosmetic changes to Search/Browse and Scratchpad --- .../products/gLiveSupport/src/BrowseItem.cxx | 11 +++++++--- .../gLiveSupport/src/ScratchpadWindow.cxx | 3 +-- .../gLiveSupport/src/SearchWindow.cxx | 21 +++++++++---------- .../products/gLiveSupport/src/SearchWindow.h | 10 ++++----- 4 files changed, 24 insertions(+), 21 deletions(-) diff --git a/livesupport/products/gLiveSupport/src/BrowseItem.cxx b/livesupport/products/gLiveSupport/src/BrowseItem.cxx index 33b2ed22d..8c9ee29be 100644 --- a/livesupport/products/gLiveSupport/src/BrowseItem.cxx +++ b/livesupport/products/gLiveSupport/src/BrowseItem.cxx @@ -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/BrowseItem.cxx,v $ ------------------------------------------------------------------------------*/ @@ -98,12 +98,17 @@ BrowseItem :: BrowseItem( treeModel = Gtk::ListStore::create(modelColumns); metadataValues = Gtk::manage(wf->createTreeView(treeModel)); - metadataValues->appendColumn("", modelColumns.column); + metadataValues->appendColumn("", modelColumns.column, 200); + metadataValues->set_size_request(230,150); metadataValues->set_headers_visible(false); metadataValues->signal_cursor_changed().connect(sigc::mem_fun(*this, &BrowseItem::emitSignalSelectionChanged )); - pack_start(*metadataValues, Gtk::PACK_SHRINK, 5); + Gtk::ScrolledWindow * scrolledWindow = Gtk::manage(new Gtk::ScrolledWindow); + scrolledWindow->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC); + scrolledWindow->add(*metadataValues); + pack_start(*scrolledWindow, Gtk::PACK_SHRINK, 5); + onShow(); } diff --git a/livesupport/products/gLiveSupport/src/ScratchpadWindow.cxx b/livesupport/products/gLiveSupport/src/ScratchpadWindow.cxx index 0dc2d3289..a868b736e 100644 --- a/livesupport/products/gLiveSupport/src/ScratchpadWindow.cxx +++ b/livesupport/products/gLiveSupport/src/ScratchpadWindow.cxx @@ -22,7 +22,7 @@ Author : $Author: fgerlits $ - Version : $Revision: 1.11 $ + Version : $Revision: 1.12 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/ScratchpadWindow.cxx,v $ ------------------------------------------------------------------------------*/ @@ -242,7 +242,6 @@ ScratchpadWindow :: ScratchpadWindow (Ptr::Ref gLiveSupport, set_default_size(300, 300); set_modal(false); property_window_position().set_value(Gtk::WIN_POS_NONE); - set_resizable(true); showContents(); show_all_children(); diff --git a/livesupport/products/gLiveSupport/src/SearchWindow.cxx b/livesupport/products/gLiveSupport/src/SearchWindow.cxx index 6983ee414..1bc1458dc 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.11 $ + Version : $Revision: 1.12 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/SearchWindow.cxx,v $ ------------------------------------------------------------------------------*/ @@ -93,17 +93,20 @@ SearchWindow :: SearchWindow (Ptr::Ref gLiveSupport, } // set up the search results box - Gtk::Box * searchResultsView = constructSearchResultsView(); + ZebraTreeView * searchResultsView = constructSearchResultsView(); + Gtk::ScrolledWindow * scrolledWindow = Gtk::manage(new Gtk::ScrolledWindow); + scrolledWindow->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC); + scrolledWindow->add(*searchResultsView); // put them in one big box Gtk::VBox * bigBox = Gtk::manage(new Gtk::VBox); - bigBox->pack_start(*views); - bigBox->pack_start(*searchResultsView); + bigBox->pack_start(*views, Gtk::PACK_SHRINK); + bigBox->pack_start(*scrolledWindow); add(*bigBox); // show set_name("searchWindow"); - set_default_size(600, 250); + set_default_size(600, 500); set_modal(false); property_window_position().set_value(Gtk::WIN_POS_NONE); @@ -216,7 +219,7 @@ SearchWindow :: constructBrowseView(void) throw () /*------------------------------------------------------------------------------ * Construct the search results display. *----------------------------------------------------------------------------*/ -Gtk::VBox* +ZebraTreeView * SearchWindow :: constructSearchResultsView(void) throw () { Ptr::Ref wf = WidgetFactory::getInstance(); @@ -263,11 +266,7 @@ SearchWindow :: constructSearchResultsView(void) throw () } contextMenu->accelerate(*this); - - // make a new box and pack the one and only component into it - Gtk::VBox * view = Gtk::manage(new Gtk::VBox); - view->pack_start(*searchResults, Gtk::PACK_EXPAND_WIDGET, 5); - return view; + return searchResults; } diff --git a/livesupport/products/gLiveSupport/src/SearchWindow.h b/livesupport/products/gLiveSupport/src/SearchWindow.h index 934ae5218..ff8913ddb 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.10 $ + Version : $Revision: 1.11 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/SearchWindow.h,v $ ------------------------------------------------------------------------------*/ @@ -73,7 +73,7 @@ using namespace LiveSupport::Widgets; * The Search/Browse window. * * @author $Author: fgerlits $ - * @version $Revision: 1.10 $ + * @version $Revision: 1.11 $ */ class SearchWindow : public WhiteWindow, public LocalizedObject { @@ -126,9 +126,9 @@ class SearchWindow : public WhiteWindow, public LocalizedObject /** * Construct the search results display. * - * @return a pointer to the new box (already Gtk::manage()'ed) + * @return a pointer to the new tree view (already Gtk::manage()'ed) */ - Gtk::VBox* + ZebraTreeView * constructSearchResultsView(void) throw (); /** @@ -180,7 +180,7 @@ class SearchWindow : public WhiteWindow, public LocalizedObject * Lists one clip per row. * * @author $Author: fgerlits $ - * @version $Revision: 1.10 $ + * @version $Revision: 1.11 $ */ class ModelColumns : public ZebraTreeModelColumnRecord {