2002-01-08 21:03:07 +00:00
|
|
|
/* keyboard-properties.c
|
|
|
|
* Copyright (C) 2000-2001 Ximian, Inc.
|
|
|
|
* Copyright (C) 2001 Jonathan Blandford
|
|
|
|
*
|
|
|
|
* Written by: Bradford Hovinen <hovinen@ximian.com>
|
2002-04-21 21:22:35 +00:00
|
|
|
* Rachel Hestilow <hestilow@ximian.com>
|
2002-01-08 21:03:07 +00:00
|
|
|
* Jonathan Blandford <jrb@redhat.com>
|
2010-10-13 12:53:49 +02:00
|
|
|
* Rodrigo Moya <rodrigo@gnome.org>
|
2002-01-08 21:03:07 +00:00
|
|
|
*
|
|
|
|
* 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
|
2010-10-31 22:55:27 -04:00
|
|
|
|
2010-10-13 12:53:49 +02:00
|
|
|
#include <gio/gio.h>
|
2010-10-31 22:55:27 -04:00
|
|
|
#include <gconf/gconf-client.h>
|
2002-01-08 21:03:07 +00:00
|
|
|
|
2010-10-31 23:24:40 -04:00
|
|
|
#include "gnome-region-panel.h"
|
|
|
|
#include "gnome-region-panel-xkb.h"
|
2003-11-12 22:00:55 +00:00
|
|
|
|
2007-11-03 02:22:05 +00:00
|
|
|
enum {
|
2002-02-11 04:41:20 +00:00
|
|
|
RESPONSE_APPLY = 1,
|
|
|
|
RESPONSE_CLOSE
|
|
|
|
};
|
|
|
|
|
2010-11-01 00:40:52 -04:00
|
|
|
#define WID(s) GTK_WIDGET (gtk_builder_get_object (dialog, s))
|
2010-10-13 12:53:49 +02:00
|
|
|
|
2010-05-21 23:22:29 +01:00
|
|
|
static void
|
|
|
|
create_dialog (GtkBuilder * dialog)
|
2002-01-08 21:03:07 +00:00
|
|
|
{
|
2007-05-05 18:57:09 +00:00
|
|
|
GtkWidget *image;
|
2002-01-08 21:03:07 +00:00
|
|
|
|
2010-05-21 23:22:29 +01:00
|
|
|
image =
|
|
|
|
gtk_image_new_from_stock (GTK_STOCK_ADD, GTK_ICON_SIZE_BUTTON);
|
2007-05-05 18:57:09 +00:00
|
|
|
gtk_button_set_image (GTK_BUTTON (WID ("xkb_layouts_add")), image);
|
|
|
|
|
2010-05-21 23:22:29 +01:00
|
|
|
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);
|
2002-01-08 21:03:07 +00:00
|
|
|
}
|
|
|
|
|
2010-10-13 12:53:49 +02:00
|
|
|
static void
|
|
|
|
setup_dialog (GtkBuilder * dialog)
|
|
|
|
{
|
2010-10-13 13:06:57 +02:00
|
|
|
setup_xkb_tabs (dialog);
|
2002-01-08 21:03:07 +00:00
|
|
|
}
|
|
|
|
|
2010-05-21 23:22:29 +01:00
|
|
|
GtkWidget *
|
2010-10-31 23:24:40 -04:00
|
|
|
gnome_region_properties_init (GtkBuilder * dialog)
|
2010-05-21 23:22:29 +01:00
|
|
|
{
|
|
|
|
GtkWidget *dialog_win = NULL;
|
2007-05-05 18:57:09 +00:00
|
|
|
|
2010-05-21 23:22:29 +01:00
|
|
|
create_dialog (dialog);
|
|
|
|
if (dialog) {
|
2010-10-13 12:53:49 +02:00
|
|
|
setup_dialog (dialog);
|
2010-11-09 13:36:43 +01:00
|
|
|
dialog_win = WID ("region_dialog");
|
2010-05-21 23:22:29 +01:00
|
|
|
/* g_signal_connect (dialog_win, "response",
|
|
|
|
G_CALLBACK (dialog_response_cb), NULL); */
|
2002-01-08 21:03:07 +00:00
|
|
|
}
|
2009-02-27 17:56:39 +00:00
|
|
|
|
2010-05-21 23:22:29 +01:00
|
|
|
return dialog_win;
|
2002-01-08 21:03:07 +00:00
|
|
|
}
|