#include <iostream>#include <vector>#include <string>#include <pthread.h>#include "storyboard.h"#include "frame.h"#include "preferences.h"#include "error.h"#include "page_editor.h"#include "commands.h"#include "stringutils.h"#include "support.h"#include "cell-renderers/mg-popup-entry.h"#include "cell-renderers/mg-cell-renderer-popup.h"#include "cell-renderers/mg-cell-renderer-list.h"Include dependency graph for storyboard.cc:

Go to the source code of this file.
Enumerations | |
| enum | SceneStatus { SCENE_INIT, SCENE_IDLE, SCENE_STARTING, SCENE_RUNNING, SCENE_RESTART } |
| enum | { COLUMN_THUMBNAIL = 0, COLUMN_NAME, COLUMN_NAME_MODE, COLUMN_VALUE, COLUMN_VALUE_MODE, N_COLUMNS } |
Functions | |
| static int | getSceneFromPath (gchar *path) |
| static void | removeImages (std::vector< GdkPixbuf * > **list) |
| static void | tree_model_row_inserted_cb (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data) |
| static gboolean | tree_view_row_select (GtkWidget *widget, GdkEventButton *event, gpointer data) |
| static void | tree_view_row_activated (GtkTreeView *treeview, GtkTreePath *path, GtkTreeViewColumn *col, gpointer data) |
| static void | on_name_start_editing (MgCellRendererPopup *cell) |
| static void | on_name_show_popup (MgCellRendererList *cell, const gchar *path_string, gint x1, gint y1, gint x2, gint y2, GtkTreeModel *model) |
| static void | on_name_edited (MgCellRendererList *cell, gchar *path_string, gchar *new_text, GtkTreeStore *model) |
| static void | on_value_start_editing (MgCellRendererPopup *cell) |
| static void | on_value_show_popup (MgCellRendererList *cell, const gchar *path_string, gint x1, gint y1, gint x2, gint y2, GtkTreeStore *model) |
| static void | on_value_edited (MgCellRendererList *cell, gchar *path_string, gchar *new_text, GtkTreeStore *model) |
| static gboolean | scroll_handler (gpointer data) |
| static gboolean | expansion_handler (gpointer data) |
| void * | showScenesThread (void *arg) |
| Storyboard * | GetStoryboard () |
Variables | |
| KinoCommon * | common |
| navigate_control | g_nav_ctl |
| enum SceneStatus | showScenesRunning = SCENE_INIT |
| static std::vector< GdkPixbuf * > * | backup = NULL |
| static pthread_mutex_t | scene_mutex = PTHREAD_MUTEX_INITIALIZER |
|
|
Definition at line 57 of file storyboard.cc. 00058 {
00059 COLUMN_THUMBNAIL = 0,
00060 COLUMN_NAME,
00061 COLUMN_NAME_MODE,
00062 COLUMN_VALUE,
00063 COLUMN_VALUE_MODE,
00064 N_COLUMNS
00065 };
|
|
|
Definition at line 49 of file storyboard.cc. 00049 {
00050 SCENE_INIT,
00051 SCENE_IDLE,
00052 SCENE_STARTING,
00053 SCENE_RUNNING,
00054 SCENE_RESTART
00055 };
|
|
|
Definition at line 435 of file storyboard.cc. References scroll_handler(). Referenced by showScenesThread(). 00436 {
00437 GtkTreeView* view = GTK_TREE_VIEW( data );
00438 gtk_tree_view_expand_all( view );
00439
00440 GdkWindow* win = gtk_tree_view_get_bin_window( view );
00441 GdkRectangle rect;
00442 gtk_tree_view_get_visible_rect( view, &rect );
00443 gtk_tree_view_tree_to_widget_coords( view, rect.x, rect.y, &rect.x, &rect.y );
00444 gdk_window_invalidate_rect( win, &rect, TRUE );
00445
00446 g_idle_add( scroll_handler, data );
00447
00448 return FALSE;
00449 }
|
|
|
Definition at line 73 of file storyboard.cc. References common, KinoCommon::getPageEditor(), and scenes. Referenced by on_name_edited(), on_name_show_popup(), and on_value_edited(). 00074 {
00075 std::vector< int > scenes = common->getPageEditor() ->GetScene();
00076 int i = atoi( path );
00077 if ( i > ( int ) scenes.size() )
00078 i = scenes.size() - 1;
00079 return ( i <= 0 ) ? 0 : scenes[ i - 1 ];
00080 }
|
|
|
Definition at line 820 of file storyboard.cc. References common. Referenced by KinoCommon::activateWidgets(), KinoCommon::newFile(), on_name_edited(), PageEditor::ResetBar(), KinoCommon::setCurrentScene(), and KinoCommon::setTimeFormat(). 00821 {
00822 static Storyboard * singleton = new Storyboard( common );
00823 return singleton;
00824 }
|
|
||||||||||||||||||||
|
Definition at line 199 of file storyboard.cc. References COLUMN_NAME, COLUMN_NAME_MODE, COLUMN_VALUE, COLUMN_VALUE_MODE, common, navigate_control::escaped, g_nav_ctl, Preferences::getInstance(), KinoCommon::getPlayList(), getSceneFromPath(), GetStoryboard(), and StringUtils::split(). Referenced by Storyboard::Storyboard(). 00203 {
00204 GtkTreePath *path = gtk_tree_path_new_from_string( path_string );
00205 GtkTreeIter iter;
00206 gchar *parentPathString = path_string;
00207 GtkTreePath *parentPath = NULL;
00208 GtkTreeIter parent;
00209 vector< std::string > metaNames;
00210 vector< std::string >::iterator metaNamesIter;
00211 int currentScene = getSceneFromPath( const_cast< char* >( path_string ) );
00212 int i = 0;
00213
00214 path_string = strrchr( path_string, ':' );
00215 if ( path_string )
00216 {
00217 *path_string = 0;
00218 parentPath = gtk_tree_path_new_from_string( parentPathString );
00219 gtk_tree_model_get_iter( GTK_TREE_MODEL( model ), &parent, parentPath );
00220 }
00221 gtk_tree_model_get_iter( GTK_TREE_MODEL( model ), &iter, path );
00222
00223 StringUtils::split( Preferences::getInstance().metaNames, ",", metaNames );
00224
00225
00226 for ( GList *l = cell->list; l; l = l->next )
00227 {
00228 if ( cell->selected_index == i++ )
00229 {
00230 // Get the existing name
00231 const char *name = mg_popup_entry_get_text( MG_POPUP_ENTRY( cell->parent.editable ) );
00232
00233 // Update the model
00234 gtk_tree_store_set( model, &iter, COLUMN_NAME, (gchar*) l->data, COLUMN_VALUE, "-", -1 );
00235
00236 // Refresh the view
00237 gtk_tree_model_row_changed( GTK_TREE_MODEL( model ), path, &iter );
00238
00239 if ( name[0] != '(' )
00240 {
00241 // Clear the old xml attribute
00242 common->getPlayList()->SetSeqAttribute( currentScene, name, "" );
00243 }
00244 else
00245 {
00246 // Set the new xml attribute name, and value = ""
00247 common->getPlayList()->SetSeqAttribute( currentScene, (char*) l->data, "-" );
00248
00249 // See if there is an unset metadata item
00250 for ( metaNamesIter = metaNames.begin(); metaNamesIter != metaNames.end(); ++metaNamesIter )
00251 {
00252 std::string metaname = *metaNamesIter;
00253 if ( metaname.at( 0 ) == '*' )
00254 metaname.erase( 0,1 );
00255
00256 // There is
00257 if ( common->getPlayList()->GetSeqAttribute( currentScene, metaname.c_str() ) == "" )
00258 {
00259 GetStoryboard()->setSkip();
00260 // Add an extra metadata row to let user add attributes
00261 gtk_tree_store_append( model, &iter, &parent );
00262 gtk_tree_store_set( model, &iter,
00263 COLUMN_NAME, _("(new)"),
00264 COLUMN_NAME_MODE, GTK_CELL_RENDERER_MODE_EDITABLE,
00265 COLUMN_VALUE, "",
00266 COLUMN_VALUE_MODE, GTK_CELL_RENDERER_MODE_EDITABLE,
00267 -1 );
00268 GetStoryboard()->clearSkip();
00269 break;
00270 }
00271 }
00272 }
00273
00274 break;
00275 }
00276 }
00277
00278 g_nav_ctl.escaped = FALSE;
00279
00280 if ( path )
00281 gtk_tree_path_free( path );
00282 if ( parentPath )
00283 gtk_tree_path_free( parentPath );
00284 }
|
|
||||||||||||||||||||||||||||||||
|
Definition at line 164 of file storyboard.cc. References common, Preferences::getInstance(), KinoCommon::getPlayList(), getSceneFromPath(), and StringUtils::split(). Referenced by Storyboard::Storyboard(). 00171 {
00172 GtkTreePath *path = gtk_tree_path_new_from_string( path_string );
00173 GtkTreeIter iter;
00174 vector< std::string > metaNames;
00175 vector< std::string >::iterator metaNamesIter;
00176 GList *list = NULL;
00177 int currentScene = getSceneFromPath( const_cast< char* >( path_string ) );
00178
00179 gtk_tree_model_get_iter (model, &iter, path);
00180 StringUtils::split( Preferences::getInstance().metaNames, ",", metaNames );
00181
00182 for ( metaNamesIter = metaNames.begin(); metaNamesIter != metaNames.end(); ++metaNamesIter )
00183 {
00184 std::string metaname = *metaNamesIter;
00185 if ( metaname.at( 0 ) != '*' )
00186 {
00187 // Only add the name if it does not yet exist
00188 if ( common->getPlayList()->GetSeqAttribute( currentScene, metaname.c_str() ) == "" )
00189 list = g_list_append( list, strdup( metaname.c_str() ) );
00190 }
00191 }
00192 cell->list = list;
00193 cell->selected_index = 0;
00194
00195 gtk_tree_path_free( path );
00196 }
|
|
|
Definition at line 158 of file storyboard.cc. References navigate_control::escaped, and g_nav_ctl. Referenced by Storyboard::Storyboard().
|
|
||||||||||||||||||||
|
Definition at line 331 of file storyboard.cc. References COLUMN_NAME, COLUMN_VALUE, common, navigate_control::escaped, g_nav_ctl, Preferences::getInstance(), KinoCommon::getPlayList(), and getSceneFromPath(). Referenced by Storyboard::Storyboard(). 00335 {
00336 GtkTreePath *path = gtk_tree_path_new_from_string( path_string );
00337 GtkTreeIter iter;
00338 GValue name;
00339 gchar *name_string;
00340
00341 // Get the attribute name
00342 gtk_tree_model_get_iter( GTK_TREE_MODEL( model ), &iter, path );
00343 memset( &name, 0, sizeof( name ) );
00344 gtk_tree_model_get_value( GTK_TREE_MODEL( model ), &iter, COLUMN_NAME, &name );
00345 name_string = const_cast< char* >( g_value_get_string( &name ) );
00346
00347 if ( name_string && name_string[0] != '(' )
00348 {
00349 if ( Preferences::getInstance().metaValues.find( name_string ) != Preferences::getInstance().metaValues.end() )
00350 {
00351 vector< std::pair< std::string, std::string > >& metaValues = Preferences::getInstance().metaValues[ name_string ];
00352 vector< std::pair< std::string, std::string > >::iterator metaValuesIter;
00353 char *value = NULL;
00354 char *label = NULL;
00355
00356 // See if values range is open-ended (* in metaValues)
00357 for ( metaValuesIter = metaValues.begin(); metaValuesIter != metaValues.end() && metaValuesIter->first != "*"; ++metaValuesIter );
00358
00359 if ( metaValuesIter != metaValues.end() && MG_CELL_RENDERER_POPUP( cell )->shown == FALSE )
00360 {
00361 // Get the value from the entry
00362 label = value = const_cast< char* >( mg_popup_entry_get_text( MG_POPUP_ENTRY( cell->parent.editable ) ) );
00363
00364 // See if a hidden value exists for the label value
00365 for ( metaValuesIter = metaValues.begin(); metaValuesIter != metaValues.end(); ++metaValuesIter )
00366 {
00367 if ( metaValuesIter->first == label )
00368 {
00369 value = const_cast< char* >( metaValuesIter->second.c_str() );
00370 break;
00371 }
00372 }
00373 }
00374 else if ( MG_CELL_RENDERER_POPUP( cell )->shown == TRUE )
00375 {
00376 int i = 0;
00377
00378 // Get the value from the popup list
00379 for ( GList *l = cell->list; l; l = l->next )
00380 {
00381 if ( cell->selected_index == i++ )
00382 {
00383 label = (char*) l->data;
00384 break;
00385 }
00386 }
00387
00388 // See if a hidden value exists for the label value
00389 for ( metaValuesIter = metaValues.begin(); metaValuesIter != metaValues.end(); ++metaValuesIter )
00390 {
00391 if ( metaValuesIter->first == label )
00392 {
00393 value = const_cast< char* >( metaValuesIter->second.c_str() );
00394 break;
00395 }
00396 }
00397 }
00398
00399 if ( value )
00400 {
00401 // Update the model
00402 gtk_tree_store_set( model, &iter, COLUMN_VALUE, label, -1 );
00403
00404 // Refresh the view
00405 gtk_tree_model_row_changed( GTK_TREE_MODEL( model ), path, &iter );
00406
00407 // Set the old xml attribute
00408 common->getPlayList()->SetSeqAttribute( getSceneFromPath( const_cast< char* >( path_string ) ), name_string, value );
00409 }
00410 }
00411 }
00412
00413 g_nav_ctl.escaped = FALSE;
00414
00415 if ( path )
00416 gtk_tree_path_free( path );
00417 g_value_unset( &name );
00418 }
|
|
||||||||||||||||||||||||||||||||
|
Definition at line 293 of file storyboard.cc. References COLUMN_NAME, and Preferences::getInstance(). Referenced by Storyboard::Storyboard(). 00300 {
00301 GtkTreePath *path = gtk_tree_path_new_from_string( path_string );
00302 GtkTreeIter iter;
00303 GValue name;
00304 gchar *name_string;
00305 vector< std::pair< std::string, std::string > > metaValues;
00306 vector< std::pair< std::string, std::string > >::iterator metaValuesIter;
00307 GList *list = NULL;
00308
00309 // Get the attribute name
00310 gtk_tree_model_get_iter( GTK_TREE_MODEL( model ), &iter, path );
00311 memset( &name, 0, sizeof( name ) );
00312 gtk_tree_model_get_value( GTK_TREE_MODEL( model ), &iter, COLUMN_NAME, &name );
00313 name_string = const_cast< char* >( g_value_get_string( &name ) );
00314
00315 // Put non-* values into the popup list
00316 metaValues = Preferences::getInstance().metaValues[ name_string ];
00317 for ( metaValuesIter = metaValues.begin(); metaValuesIter != metaValues.end(); ++metaValuesIter )
00318 {
00319 if ( metaValuesIter->first != "*" )
00320 list = g_list_append( list, strdup( metaValuesIter->first.c_str() ) );
00321 }
00322 cell->list = list;
00323 cell->selected_index = 0;
00324
00325 if ( path )
00326 gtk_tree_path_free( path );
00327 g_value_unset( &name );
00328 }
|
|
|
Definition at line 287 of file storyboard.cc. References navigate_control::escaped, and g_nav_ctl. Referenced by Storyboard::Storyboard().
|
|
|
Definition at line 82 of file storyboard.cc. Referenced by showScenesThread(). 00083 {
00084 if ( *list != NULL )
00085 {
00086 std::vector< GdkPixbuf * >::iterator iter;
00087 for ( iter = ( *list ) ->begin(); iter != ( *list ) ->end(); iter++ )
00088 {
00089 if ( *iter != NULL )
00090 g_object_unref( *iter );
00091 }
00092 ( *list ) ->erase( ( *list ) ->begin(), ( *list ) ->end() );
00093 delete ( *list );
00094 *list = NULL;
00095 }
00096 }
|
|
|
Definition at line 420 of file storyboard.cc. Referenced by expansion_handler(). 00421 {
00422 GtkTreeView* view = GTK_TREE_VIEW( data );
00423 GtkTreeSelection* selection = gtk_tree_view_get_selection( view );
00424 GtkTreeIter iter;
00425 GtkTreeModel* model;
00426 if ( gtk_tree_selection_get_selected( selection, &model, &iter ) == TRUE )
00427 {
00428 GtkTreePath* path = gtk_tree_model_get_path( model, &iter );
00429 gtk_tree_view_scroll_to_cell( view, path, NULL, TRUE, 0.5, 0.0 );
00430 gtk_tree_path_free( path );
00431 }
00432 return FALSE;
00433 }
|
|
|
Definition at line 551 of file storyboard.cc. References backup, Storyboard::clearSkip(), COLUMN_NAME, COLUMN_NAME_MODE, COLUMN_THUMBNAIL, COLUMN_VALUE, COLUMN_VALUE_MODE, common, expansion_handler(), fail_neg, FRAME_MAX_HEIGHT, FRAME_MAX_WIDTH, KinoCommon::getCurrentScene(), GetFramePool(), Frame::GetFrameRate(), Preferences::getInstance(), Storyboard::getModel(), KinoCommon::getPageEditor(), KinoCommon::getPlayList(), Storyboard::getTime(), KinoCommon::getTimeFormat(), Storyboard::getView(), pixels, removeImages(), SCENE_IDLE, scene_mutex, SCENE_RUNNING, Storyboard::select(), Storyboard::setSkip(), showScenesRunning, and StringUtils::split(). Referenced by Storyboard::redraw(). 00552 {
00553 Frame & frame = *( GetFramePool( ) ->GetFrame( ) );
00554 GdkPixbuf *image = NULL;
00555 GdkPixbuf *thumbnail = NULL;
00556 static std::vector< GdkPixbuf * > *icons = NULL;
00557 std::vector< int > scene;
00558 int frameNum = 0;
00559 Storyboard *storyboard = static_cast<Storyboard *>( arg );
00560 GtkTreeIter iter, child;
00561 unsigned char *pixels = new unsigned char[ FRAME_MAX_WIDTH * FRAME_MAX_HEIGHT * 4 ];
00562
00563 frame.decoder->quality = DV_QUALITY_DC;
00564 if ( Preferences::getInstance().displayQuality < 4 )
00565 frame.decoder->quality |= DV_QUALITY_COLOR;
00566
00567
00568 while ( showScenesRunning != SCENE_IDLE )
00569 {
00570 // Apparently(?) the thumbs generated cannot be removed while they're used in the
00571 // icon list - this doesn't appear to be the case for the timeline page, but is
00572 // definitely causing problems here - could be the modified images causing an issue
00573 // perhaps? Anyway, to avoid a blank list during the execution of this thread, take
00574 // a backup of the previous list and create a new one (see comments below).
00575
00576 icons = new std::vector< GdkPixbuf *>;
00577
00578 // Change from SCENE_STARTING to SCENE_RUNNING
00579 showScenesRunning = SCENE_RUNNING;
00580
00581 // Get the scene list (contains the frame number first frame of each scene)
00582 scene = common->getPageEditor() ->GetScene();
00583
00584 // Create the icons vector but terminate if the running state changes
00585 for ( unsigned int i = 0; showScenesRunning == SCENE_RUNNING && i < scene.size(); ++i )
00586 {
00587
00588 frameNum = i == 0 ? 0 : scene[ i - 1 ];
00589
00590 fail_neg( common->getPlayList() ->GetFrame( frameNum, frame ) );
00591
00592 frame.ExtractHeader();
00593 frame.ExtractRGB( pixels );
00594
00595 // Get the image
00596 image = gdk_pixbuf_new_from_data( pixels, GDK_COLORSPACE_RGB, FALSE, 8,
00597 frame.GetWidth(), frame.GetHeight(), frame.GetWidth() * 3,
00598 NULL, NULL );
00599
00600 // create the thumbnail
00601 thumbnail = gdk_pixbuf_scale_simple( image, 80, frame.IsWide() ? 45 : 60, GDK_INTERP_NEAREST );
00602 icons->push_back( thumbnail );
00603 g_object_unref( image );
00604 }
00605
00606 // Render the icons if we're still running, otherwise remove the [partial] list generated
00607 // NB: The freeze followed by a thread_leave causes the icon list to be blanked on the screen and
00608 // removing the current list before clearing the iconlist causes possible core dumps if a redraw
00609 // is required before the new list is in place - hence the backup keeps the last used list until
00610 // we're sure that we can safely remove them
00611
00612 if ( showScenesRunning == SCENE_RUNNING )
00613 {
00614 pthread_mutex_lock( &scene_mutex );
00615 storyboard->setSkip();
00616 gdk_threads_enter();
00617 gtk_tree_store_clear( storyboard->getModel() );
00618 for ( unsigned int i = 0; showScenesRunning == SCENE_RUNNING && i < scene.size(); ++i )
00619 {
00620 char start[ 1024 ] = "";
00621 vector< std::string > metaNames;
00622 vector< std::string >::iterator metaNamesIter;
00623 StringUtils::split( Preferences::getInstance().metaNames, ",", metaNames );
00624
00625 // Generate scene info
00626 frameNum = ( i == 0 ) ? 0 : scene[ i - 1 ];
00627 fail_neg( common->getPlayList() ->GetFrame( frameNum, frame ) );
00628 frame.ExtractHeader();
00629 storyboard->getTime().setFramerate( frame.GetFrameRate() );
00630 char* fileName = common->getPlayList() ->GetFileNameOfFrame( frameNum );
00631 snprintf( start, 1024, "%s\n%s\n%s",
00632 g_path_get_basename( fileName ),
00633 storyboard->getTime().parseFramesToString( frameNum, common->getTimeFormat() ).c_str(),
00634 storyboard->getTime().parseFramesToString( scene[ i ] - frameNum, common->getTimeFormat() ).c_str()
00635 );
00636 free( fileName );
00637
00638 // Put the thumbnail and scene metadata into the model
00639 gtk_tree_store_append( storyboard->getModel(), &iter, NULL );
00640 gtk_tree_store_set( storyboard->getModel(), &iter,
00641 COLUMN_THUMBNAIL, ( *icons ) [ i ],
00642 COLUMN_NAME, _("File:\nBegin:\nDuration:"),
00643 COLUMN_NAME_MODE, GTK_CELL_RENDERER_MODE_ACTIVATABLE,
00644 COLUMN_VALUE, start,
00645 COLUMN_VALUE_MODE, GTK_CELL_RENDERER_MODE_ACTIVATABLE,
00646 -1 );
00647
00648 for ( metaNamesIter = metaNames.begin(); metaNamesIter != metaNames.end(); ++metaNamesIter )
00649 {
00650 std::string metaname = *metaNamesIter;
00651 if ( metaname.at(0) == '*' )
00652 metaname.erase(0,1);
00653
00654 // Add standard metadata where exists or required (*name)
00655 if ( metaNamesIter->at( 0 ) == '*' || common->getPlayList()->GetSeqAttribute( frameNum, metaname.c_str() ) != "" )
00656 {
00657 vector< std::pair< std::string, std::string > >& metaValues = Preferences::getInstance().metaValues[ metaname ];
00658 vector< std::pair< std::string, std::string > >::iterator metaValuesIter;
00659 std::string labelString = common->getPlayList()->GetSeqAttribute( frameNum, metaname.c_str() );
00660 char *label = const_cast< char* >( labelString.c_str() );
00661
00662 // See if a label exists for the value
00663 for ( metaValuesIter = metaValues.begin(); metaValuesIter != metaValues.end(); ++metaValuesIter )
00664 {
00665 if ( metaValuesIter->second == label )
00666 {
00667 label = const_cast< char* >( metaValuesIter->first.c_str() );
00668 break;
00669 }
00670 }
00671
00672 gtk_tree_store_append( storyboard->getModel(), &child, &iter );
00673 gtk_tree_store_set( storyboard->getModel(), &child,
00674 COLUMN_NAME, metaname.c_str(),
00675 COLUMN_NAME_MODE, GTK_CELL_RENDERER_MODE_EDITABLE,
00676 COLUMN_VALUE, label,
00677 COLUMN_VALUE_MODE, GTK_CELL_RENDERER_MODE_EDITABLE,
00678 -1 );
00679 }
00680 }
00681 // See if we should add extra row for setting a new metadata item
00682 for ( metaNamesIter = metaNames.begin(); metaNamesIter != metaNames.end(); ++metaNamesIter )
00683 {
00684 std::string metaname = *metaNamesIter;
00685 if ( metaname.at( 0 ) == '*' )
00686 metaname.erase( 0, 1 );
00687
00688 if ( common->getPlayList()->GetSeqAttribute( frameNum, metaname.c_str() ) == "" )
00689 {
00690
00691 gtk_tree_store_append( storyboard->getModel(), &child, &iter );
00692 gtk_tree_store_set( storyboard->getModel(), &child,
00693 COLUMN_NAME, _("(new)"),
00694 COLUMN_NAME_MODE, GTK_CELL_RENDERER_MODE_EDITABLE,
00695 COLUMN_VALUE, "",
00696 COLUMN_VALUE_MODE, GTK_CELL_RENDERER_MODE_EDITABLE,
00697 -1 );
00698 break;
00699 }
00700 }
00701 }
00702 if ( scene.size() )
00703 storyboard->select( common->getCurrentScene() );
00704
00705 gdk_threads_leave();
00706 storyboard->clearSkip();
00707 pthread_mutex_unlock( &scene_mutex );
00708
00709 if ( scene.size() && Preferences::getInstance().expandStoryboard )
00710 g_idle_add( expansion_handler, storyboard->getView() );
00711
00712 // Clean up temporary backup now
00713 removeImages( &backup );
00714 // Now backup
00715 backup = icons;
00716 }
00717 else
00718 {
00719 // Remove any unused thumbs in icons
00720 removeImages( &icons );
00721 }
00722 // If we're still running now, it's OK to idle again.
00723 if ( showScenesRunning == SCENE_RUNNING )
00724 showScenesRunning = SCENE_IDLE;
00725
00726 }
00727 GetFramePool( ) ->DoneWithFrame( &frame );
00728
00729 delete[] pixels;
00730 return NULL;
00731 }
|
|
||||||||||||||||||||
|
Definition at line 98 of file storyboard.cc. References Storyboard::getSkip(), Storyboard::moveScene(), and Storyboard::setSkip(). Referenced by Storyboard::Storyboard(). 00099 {
00100 Storyboard * storyboard = ( Storyboard* ) ( data );
00101 //std::cerr << "tree_model_row_inserted_cb skip " << storyboard->getSkip() << std::endl;
00102 if ( ! storyboard->getSkip() )
00103 {
00104 gchar * row = gtk_tree_path_to_string( path );
00105 int row_num = atoi( row );
00106 //std::cerr << "tree_model_row_inserted_cb row " << row << std::endl;
00107 if ( strchr( row, ':' ) != NULL )
00108 row_num++;
00109 storyboard->setSkip();
00110 storyboard->moveScene( row_num );
00111 g_free( row );
00112 }
00113 }
|
|
||||||||||||||||||||
|
Definition at line 145 of file storyboard.cc. Referenced by Storyboard::Storyboard(). 00146 {
00147 // Reserve this action for future use.
00148 #if 0
00149 if ( gtk_tree_view_row_expanded( treeview, path ) )
00150 gtk_tree_view_collapse_row( treeview, path );
00151 else
00152 gtk_tree_view_expand_row( treeview, path, FALSE );
00153 #endif
00154 }
|
|
||||||||||||||||
|
Definition at line 115 of file storyboard.cc. References common, and KinoCommon::selectScene(). Referenced by Storyboard::Storyboard(). 00116 {
00117 GtkTreeView * treeview = GTK_TREE_VIEW( widget );
00118 GtkTreeSelection *selection = gtk_tree_view_get_selection( treeview );
00119
00120 GtkTreeIter iter;
00121 GtkTreeModel *model;
00122
00123 if ( gtk_tree_selection_get_selected ( selection, &model, &iter ) )
00124 {
00125 gchar * row = gtk_tree_model_get_string_from_iter( model, &iter );
00126 if ( strchr( row, ':' ) )
00127 {
00128 GtkTreeViewColumn* column;
00129 GtkTreePath *path;
00130 gtk_tree_view_get_cursor( treeview, &path, &column );
00131 if ( path && column )
00132 gtk_tree_view_set_cursor( treeview, path, column, TRUE);
00133 }
00134 else
00135 {
00136 common->selectScene( atoi( row ) );
00137 }
00138 g_free( row );
00139 }
00140
00141 return FALSE;
00142 }
|
|
|
Definition at line 69 of file storyboard.cc. Referenced by GetEditorBackup(), and showScenesThread(). |
|
|
|
|
Definition at line 70 of file storyboard.cc. Referenced by showScenesThread(). |
|
|
Definition at line 67 of file storyboard.cc. Referenced by Storyboard::redraw(), and showScenesThread(). |
1.4.2