added "add to live mode" functionality in search window;
some cosmetic changes (made tree view column default widths wider)
This commit is contained in:
parent
3bfbf614a3
commit
95deecc9a4
5 changed files with 40 additions and 12 deletions
|
@ -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<GLiveSupport>::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);
|
||||
|
|
|
@ -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<GLiveSupport>::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<Gtk::TreeView::Selection> refSelection =
|
||||
searchResults->get_selection();
|
||||
Gtk::TreeModel::iterator iter = refSelection->get_selected();
|
||||
if (iter) {
|
||||
Ptr<Playable>::Ref playable = (*iter)[modelColumns.playableColumn];
|
||||
gLiveSupport->addToLiveMode(playable);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -172,6 +172,7 @@ hu:table
|
|||
allStringForBrowse { "--- minden ---" }
|
||||
|
||||
addToScratchpadMenuItem:string { "_Hasznos csuporba betenni" }
|
||||
addToLiveModeMenuItem:string { "Élő _adásba" }
|
||||
}
|
||||
|
||||
liveModeWindow:table
|
||||
|
|
|
@ -174,6 +174,7 @@ root:table
|
|||
allStringForBrowse { "--- all ---" }
|
||||
|
||||
addToScratchpadMenuItem:string { "_Add To Scratchpad" }
|
||||
addToLiveModeMenuItem:string { "Add To _Live Mode" }
|
||||
}
|
||||
|
||||
liveModeWindow:table
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue