2 * page.c -- 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.
24 GtkWidget
*page_get_widget( page
this )
26 return this->get_widget( this );
29 void page_get_toolbar_info( page
this, GtkIconSize size
, GtkWidget
**icon
, char **label
)
31 if ( this->get_toolbar_info
)
33 this->get_toolbar_info( this, size
, icon
, label
);
37 *icon
= gtk_image_new_from_stock( "gtk-execute", size
);
42 /** Called on connection being established to a server.
45 void page_on_connect( page
this )
47 if ( this->on_connect
)
48 this->on_connect( this );
51 /** Called on a disconnection from a server.
54 void page_on_disconnect( page
this )
56 if ( this->on_disconnect
)
57 this->on_disconnect( this );
60 /** Called when the user changes the selected unit.
63 void page_on_unit_change( page
this, int unit
)
65 if ( this->on_unit_change
)
66 this->on_unit_change( this, unit
);
69 /** Called to propogate status information to any page that's interested.
72 void page_show_status( page
this, mvcp_status status
)
74 if ( this->show_status
)
75 this->show_status( this, status
);
81 void page_close( page
this )