join clips and status control to same 'operate' page
[rugen] / src / page_clips.c
index 173f97e..aeefc74 100644 (file)
@@ -47,6 +47,8 @@ typedef struct
        // TODO: This comes out later
        int mode;
        GtkWidget *modes[ 4 ];
+
+       struct page_t *parent_page;
 }
 *page_clips, page_clips_t;
 
@@ -488,7 +490,7 @@ void on_mode_change( GtkMenuItem *menuitem, gpointer data )
 static GtkWidget *this_page_get_widget( page_clips this )
 {
        if ( this->widget == NULL )
-               this->widget = create_page_clips( );
+               this->widget = this->parent_page->get_widget(this->parent_page);
        return this->widget;
 }
 
@@ -533,12 +535,13 @@ static void this_page_close( page_clips this )
                free( this );
 }
 
-page page_clips_init( dv1394app app )
+page page_clips_init( dv1394app app, struct page_t *parent_page)
 {
        page_clips this = calloc( 1, sizeof( page_clips_t ) );
        GtkWidget *widget;
        int index = 0;
 
+       this->parent_page = parent_page;
        this->parent.get_widget = ( GtkWidget *(*)( page ) )this_page_get_widget;
        this->parent.get_toolbar_info = this_page_get_toolbar_info;
        this->parent.on_connect = ( void (*)( page ) )this_page_on_connect;