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 $
|
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 $
|
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:
|
// Add the TreeView's view columns:
|
||||||
try {
|
try {
|
||||||
treeView->appendColumn(*getResourceUstring("typeColumnLabel"),
|
treeView->appendColumn(*getResourceUstring("typeColumnLabel"),
|
||||||
modelColumns.typeColumn);
|
modelColumns.typeColumn, 60);
|
||||||
treeView->appendColumn(*getResourceUstring("titleColumnLabel"),
|
treeView->appendColumn(*getResourceUstring("titleColumnLabel"),
|
||||||
modelColumns.titleColumn);
|
modelColumns.titleColumn, 200);
|
||||||
} catch (std::invalid_argument &e) {
|
} catch (std::invalid_argument &e) {
|
||||||
std::cerr << e.what() << std::endl;
|
std::cerr << e.what() << std::endl;
|
||||||
std::exit(1);
|
std::exit(1);
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: fgerlits $
|
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 $
|
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
|
// show
|
||||||
set_name("searchWindow");
|
set_name("searchWindow");
|
||||||
set_default_size(450, 250);
|
set_default_size(600, 250);
|
||||||
set_modal(false);
|
set_modal(false);
|
||||||
property_window_position().set_value(Gtk::WIN_POS_NONE);
|
property_window_position().set_value(Gtk::WIN_POS_NONE);
|
||||||
|
|
||||||
|
@ -227,13 +227,13 @@ SearchWindow :: constructSearchResultsView(void) throw ()
|
||||||
// add the TreeView's view columns
|
// add the TreeView's view columns
|
||||||
try {
|
try {
|
||||||
searchResults->appendColumn(*getResourceUstring("typeColumnLabel"),
|
searchResults->appendColumn(*getResourceUstring("typeColumnLabel"),
|
||||||
modelColumns.typeColumn);
|
modelColumns.typeColumn, 60);
|
||||||
searchResults->appendColumn(*getResourceUstring("titleColumnLabel"),
|
searchResults->appendColumn(*getResourceUstring("titleColumnLabel"),
|
||||||
modelColumns.titleColumn);
|
modelColumns.titleColumn, 200);
|
||||||
searchResults->appendColumn(*getResourceUstring("creatorColumnLabel"),
|
searchResults->appendColumn(*getResourceUstring("creatorColumnLabel"),
|
||||||
modelColumns.creatorColumn);
|
modelColumns.creatorColumn, 200);
|
||||||
searchResults->appendColumn(*getResourceUstring("lengthColumnLabel"),
|
searchResults->appendColumn(*getResourceUstring("lengthColumnLabel"),
|
||||||
modelColumns.lengthColumn);
|
modelColumns.lengthColumn, 120);
|
||||||
} catch (std::invalid_argument &e) {
|
} catch (std::invalid_argument &e) {
|
||||||
std::cerr << e.what() << std::endl;
|
std::cerr << e.what() << std::endl;
|
||||||
std::exit(1);
|
std::exit(1);
|
||||||
|
@ -253,6 +253,10 @@ SearchWindow :: constructSearchResultsView(void) throw ()
|
||||||
*getResourceUstring("addToScratchpadMenuItem"),
|
*getResourceUstring("addToScratchpadMenuItem"),
|
||||||
sigc::mem_fun(*this,
|
sigc::mem_fun(*this,
|
||||||
&SearchWindow::onAddToScratchpad)));
|
&SearchWindow::onAddToScratchpad)));
|
||||||
|
contextMenuList.push_back(Gtk::Menu_Helpers::MenuElem(
|
||||||
|
*getResourceUstring("addToLiveModeMenuItem"),
|
||||||
|
sigc::mem_fun(*this,
|
||||||
|
&SearchWindow::onAddToLiveMode)));
|
||||||
} catch (std::invalid_argument &e) {
|
} catch (std::invalid_argument &e) {
|
||||||
std::cerr << e.what() << std::endl;
|
std::cerr << e.what() << std::endl;
|
||||||
std::exit(1);
|
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 $
|
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 $
|
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.
|
* The Search/Browse window.
|
||||||
*
|
*
|
||||||
* @author $Author: fgerlits $
|
* @author $Author: fgerlits $
|
||||||
* @version $Revision: 1.9 $
|
* @version $Revision: 1.10 $
|
||||||
*/
|
*/
|
||||||
class SearchWindow : public WhiteWindow, public LocalizedObject
|
class SearchWindow : public WhiteWindow, public LocalizedObject
|
||||||
{
|
{
|
||||||
|
@ -169,12 +169,18 @@ class SearchWindow : public WhiteWindow, public LocalizedObject
|
||||||
void
|
void
|
||||||
onAddToScratchpad(void) throw ();
|
onAddToScratchpad(void) throw ();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a playable to the live mode.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
onAddToLiveMode(void) throw ();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The columns model needed by Gtk::TreeView.
|
* The columns model needed by Gtk::TreeView.
|
||||||
* Lists one clip per row.
|
* Lists one clip per row.
|
||||||
*
|
*
|
||||||
* @author $Author: fgerlits $
|
* @author $Author: fgerlits $
|
||||||
* @version $Revision: 1.9 $
|
* @version $Revision: 1.10 $
|
||||||
*/
|
*/
|
||||||
class ModelColumns : public ZebraTreeModelColumnRecord
|
class ModelColumns : public ZebraTreeModelColumnRecord
|
||||||
{
|
{
|
||||||
|
|
|
@ -172,6 +172,7 @@ hu:table
|
||||||
allStringForBrowse { "--- minden ---" }
|
allStringForBrowse { "--- minden ---" }
|
||||||
|
|
||||||
addToScratchpadMenuItem:string { "_Hasznos csuporba betenni" }
|
addToScratchpadMenuItem:string { "_Hasznos csuporba betenni" }
|
||||||
|
addToLiveModeMenuItem:string { "Élő _adásba" }
|
||||||
}
|
}
|
||||||
|
|
||||||
liveModeWindow:table
|
liveModeWindow:table
|
||||||
|
|
|
@ -174,6 +174,7 @@ root:table
|
||||||
allStringForBrowse { "--- all ---" }
|
allStringForBrowse { "--- all ---" }
|
||||||
|
|
||||||
addToScratchpadMenuItem:string { "_Add To Scratchpad" }
|
addToScratchpadMenuItem:string { "_Add To Scratchpad" }
|
||||||
|
addToLiveModeMenuItem:string { "Add To _Live Mode" }
|
||||||
}
|
}
|
||||||
|
|
||||||
liveModeWindow:table
|
liveModeWindow:table
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue