gnome-region-panel.c 2.01 KB
Newer Older
1
2
3
4
5
/* keyboard-properties.c
 * Copyright (C) 2000-2001 Ximian, Inc.
 * Copyright (C) 2001 Jonathan Blandford
 *
 * Written by: Bradford Hovinen <hovinen@ximian.com>
Rachel Hestilow's avatar
Rachel Hestilow committed
6
 *             Rachel Hestilow <hestilow@ximian.com>
7
 *	       Jonathan Blandford <jrb@redhat.com>
8
 *             Rodrigo Moya <rodrigo@gnome.org>
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 * 02111-1307, USA.
 */

#ifdef HAVE_CONFIG_H
#  include <config.h>
#endif
29

30
#include <gio/gio.h>
31

32
33
#include "gnome-region-panel.h"
#include "gnome-region-panel-xkb.h"
34

35
enum {
Richard Hestilow's avatar
Richard Hestilow committed
36
37
38
39
	RESPONSE_APPLY = 1,
	RESPONSE_CLOSE
};

40
#define WID(s) GTK_WIDGET (gtk_builder_get_object (dialog, s))
41

42
43
static void
create_dialog (GtkBuilder * dialog)
44
{
45
	GtkWidget *image;
46

47
48
	image =
	    gtk_image_new_from_stock (GTK_STOCK_ADD, GTK_ICON_SIZE_BUTTON);
49
50
	gtk_button_set_image (GTK_BUTTON (WID ("xkb_layouts_add")), image);

51
52
53
54
55
	image =
	    gtk_image_new_from_stock (GTK_STOCK_REFRESH,
				      GTK_ICON_SIZE_BUTTON);
	gtk_button_set_image (GTK_BUTTON (WID ("xkb_reset_to_defaults")),
			      image);
56
57
}

58
59
60
static void
setup_dialog (GtkBuilder * dialog)
{
61
	setup_xkb_tabs (dialog);
62
63
}

64
GtkWidget *
65
gnome_region_properties_init (GtkBuilder * dialog)
66
{
67
	GtkWidget *region_notebook = NULL;
68

69
70
	create_dialog (dialog);
	if (dialog) {
71
		setup_dialog (dialog);
72
73
		region_notebook = WID ("region_notebook");
		gtk_widget_set_size_request (GTK_WIDGET (region_notebook), -1, 400);
74
	}
75

76
	return region_notebook;
77
}