2 * page_status.c -- Status Page Handling
3 * Copyright (C) 2002-2003 Charles Yates <charles.yates@pandora.be>
4 * Copyright (C) 2010 Dan Dennedy <dan@dennedy.org>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software Foundation,
18 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
30 #include "interface.h"
32 #include "dv1394app.h"
43 *page_operate
, page_operate_t
;
45 static GtkWidget
*this_page_get_widget( page super
)
47 page_operate
this = ( page_operate
)super
;
48 if ( this->widget
== NULL
)
49 this->widget
= create_page_operate( );
53 static void this_page_get_toolbar_info( page super
, GtkIconSize size
, GtkWidget
**icon
, char **label
)
55 page_operate
this = ( page_operate
)super
;
59 *icon
= gtk_image_new_from_stock( "gtk-justify-fill", size
);
60 *label
= _("_Operate");
64 static void this_page_on_connect( page super
)
66 page_operate
this = ( page_operate
)super
;
70 this->clips
->on_connect(this->clips
);
71 this->status
->on_connect(this->status
);
75 static void this_page_on_disconnect( page super
)
77 page_operate
this = ( page_operate
)super
;
81 this->clips
->on_disconnect(this->clips
);
82 this->status
->on_disconnect(this->status
);
86 static void this_page_close( page super
)
88 page_operate
this = ( page_operate
)super
;
92 this->clips
->close(this->clips
);
93 this->status
->close(this->status
);
98 static void this_page_show_status( page super
, mvcp_status status
)
100 page_operate
this = ( page_operate
)super
;
103 this->clips
->show_status(this->clips
, status
);
107 page
page_operate_init( dv1394app app
)
109 page_operate
this = calloc( 1, sizeof( page_operate_t
) );
111 this->parent
.get_widget
= this_page_get_widget
;
112 this->parent
.get_toolbar_info
= this_page_get_toolbar_info
;
113 this->parent
.on_connect
= this_page_on_connect
;
114 this->parent
.on_disconnect
= this_page_on_disconnect
;
115 this->parent
.close
= this_page_close
;
116 this->parent
.show_status
= this_page_show_status
;
118 this->clips
= page_clips_init( app
, (page
)this);
119 this->status
= page_status_init( app
, (page
)this );