2
* glade_view.c -- Test utility for running a glade file.
4
* Copyright (C) 2007-2008 Johannes H. Jensen <joh@pseudoberries.com>
6
* This program is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU General Public License
8
* as published by the Free Software Foundation; either version 2
9
* of the License, or (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
18
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21
* Johannes H. Jensen <joh@pseudoberries.com>
25
#include <glade/glade.h>
27
int main (int argc, char **argv)
29
gchar *file, *root = NULL;
32
gtk_init (&argc, &argv);
35
g_printerr ("Usage: %s <glade-file> [root]\n", argv[0]);
43
ui = glade_xml_new (file, root, NULL);
46
g_printerr ("Could not open '%s'. Exiting.\n", file);
50
GtkWidget *checkbox = glade_xml_get_widget(ui, "snooze-check");
51
/* you can't do this from glade */
52
GtkWidget *checkbox_label = gtk_bin_get_child (GTK_BIN (checkbox));
53
g_object_set (G_OBJECT (checkbox_label), "use_markup", TRUE, NULL);