diff --git a/livesupport/products/gLiveSupport/src/ScratchpadWindow.cxx b/livesupport/products/gLiveSupport/src/ScratchpadWindow.cxx index 3fdd06c43..0dc2d3289 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.10 $ + Version : $Revision: 1.11 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/ScratchpadWindow.cxx,v $ ------------------------------------------------------------------------------*/ @@ -118,9 +118,9 @@ ScratchpadWindow :: ScratchpadWindow (Ptr::Ref gLiveSupport, // Add the TreeView's view columns: try { treeView->appendColumn(*getResourceUstring("typeColumnLabel"), - modelColumns.typeColumn); + modelColumns.typeColumn, 60); treeView->appendColumn(*getResourceUstring("titleColumnLabel"), - modelColumns.titleColumn); + modelColumns.titleColumn, 200); } catch (std::invalid_argument &e) { std::cerr << e.what() << std::endl; std::exit(1); diff --git a/livesupport/products/gLiveSupport/src/SearchWindow.cxx b/livesupport/products/gLiveSupport/src/SearchWindow.cxx index 428d0a9d6..6983ee414 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.10 $ + Version : $Revision: 1.11 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/SearchWindow.cxx,v $ ------------------------------------------------------------------------------*/ @@ -103,7 +103,7 @@ SearchWindow :: SearchWindow (Ptr::Ref gLiveSupport, // show set_name("searchWindow"); - set_default_size(450, 250); + set_default_size(600, 250); set_modal(false); property_window_position().set_value(Gtk::WIN_POS_NONE); @@ -227,13 +227,13 @@ SearchWindow :: constructSearchResultsView(void) throw () // add the TreeView's view columns try { searchResults->appendColumn(*getResourceUstring("typeColumnLabel"), - modelColumns.typeColumn); + modelColumns.typeColumn, 60); searchResults->appendColumn(*getResourceUstring("titleColumnLabel"), - modelColumns.titleColumn); + modelColumns.titleColumn, 200); searchResults->appendColumn(*getResourceUstring("creatorColumnLabel"), - modelColumns.creatorColumn); + modelColumns.creatorColumn, 200); searchResults->appendColumn(*getResourceUstring("lengthColumnLabel"), - modelColumns.lengthColumn); + modelColumns.lengthColumn, 120); } catch (std::invalid_argument &e) { std::cerr << e.what() << std::endl; std::exit(1); @@ -253,6 +253,10 @@ SearchWindow :: constructSearchResultsView(void) throw () *getResourceUstring("addToScratchpadMenuItem"), sigc::mem_fun(*this, &SearchWindow::onAddToScratchpad))); + contextMenuList.push_back(Gtk::Menu_Helpers::MenuElem( + *getResourceUstring("addToLiveModeMenuItem"), + sigc::mem_fun(*this, + &SearchWindow::onAddToLiveMode))); } catch (std::invalid_argument &e) { std::cerr << e.what() << std::endl; std::exit(1); @@ -415,3 +419,19 @@ SearchWindow :: onAddToScratchpad(void) throw () } } + +/*------------------------------------------------------------------------------ + * Add a playable to the live mode. + *----------------------------------------------------------------------------*/ +void +SearchWindow :: onAddToLiveMode(void) throw () +{ + Glib::RefPtr refSelection = + searchResults->get_selection(); + Gtk::TreeModel::iterator iter = refSelection->get_selected(); + if (iter) { + Ptr::Ref playable = (*iter)[modelColumns.playableColumn]; + gLiveSupport->addToLiveMode(playable); + } +} + diff --git a/livesupport/products/gLiveSupport/src/SearchWindow.h b/livesupport/products/gLiveSupport/src/SearchWindow.h index 76a374dc3..934ae5218 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.9 $ + Version : $Revision: 1.10 $ 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.9 $ + * @version $Revision: 1.10 $ */ class SearchWindow : public WhiteWindow, public LocalizedObject { @@ -169,12 +169,18 @@ class SearchWindow : public WhiteWindow, public LocalizedObject void onAddToScratchpad(void) throw (); + /** + * Add a playable to the live mode. + */ + void + onAddToLiveMode(void) throw (); + /** * The columns model needed by Gtk::TreeView. * Lists one clip per row. * * @author $Author: fgerlits $ - * @version $Revision: 1.9 $ + * @version $Revision: 1.10 $ */ class ModelColumns : public ZebraTreeModelColumnRecord { diff --git a/livesupport/products/gLiveSupport/var/hu.txt b/livesupport/products/gLiveSupport/var/hu.txt index 4dcdba04c..f011a4a1c 100644 --- a/livesupport/products/gLiveSupport/var/hu.txt +++ b/livesupport/products/gLiveSupport/var/hu.txt @@ -172,6 +172,7 @@ hu:table allStringForBrowse { "--- minden ---" } addToScratchpadMenuItem:string { "_Hasznos csuporba betenni" } + addToLiveModeMenuItem:string { "Élő _adásba" } } liveModeWindow:table diff --git a/livesupport/products/gLiveSupport/var/root.txt b/livesupport/products/gLiveSupport/var/root.txt index 999fd6f3e..6027d63b4 100644 --- a/livesupport/products/gLiveSupport/var/root.txt +++ b/livesupport/products/gLiveSupport/var/root.txt @@ -174,6 +174,7 @@ root:table allStringForBrowse { "--- all ---" } addToScratchpadMenuItem:string { "_Add To Scratchpad" } + addToLiveModeMenuItem:string { "Add To _Live Mode" } } liveModeWindow:table