|
Packit |
88888e |
/*
|
|
Packit |
88888e |
* Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
|
|
Packit |
88888e |
*
|
|
Packit |
88888e |
* This library is free software; you can redistribute it and/or
|
|
Packit |
88888e |
* modify it under the terms of the GNU Lesser General Public
|
|
Packit |
88888e |
* License as published by the Free Software Foundation; either
|
|
Packit |
88888e |
* version 2 of the License, or (at your option) any later version.
|
|
Packit |
88888e |
*
|
|
Packit |
88888e |
* This library is distributed in the hope that it will be useful,
|
|
Packit |
88888e |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
88888e |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
88888e |
* Lesser General Public License for more details.
|
|
Packit |
88888e |
*
|
|
Packit |
88888e |
* You should have received a copy of the GNU Lesser General Public
|
|
Packit |
88888e |
* License along with this library; if not, write to the
|
|
Packit |
88888e |
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
Packit |
88888e |
* Boston, MA 02111-1307, USA.
|
|
Packit |
88888e |
*/
|
|
Packit |
88888e |
|
|
Packit |
88888e |
#include "config.h"
|
|
Packit |
88888e |
|
|
Packit |
88888e |
#include "libxklavier/xklavier.h"
|
|
Packit |
88888e |
#include "libgnomekbd/gkbd-indicator.h"
|
|
Packit |
88888e |
|
|
Packit |
88888e |
#include <string.h>
|
|
Packit |
88888e |
#include <sys/types.h>
|
|
Packit |
88888e |
#include <sys/stat.h>
|
|
Packit |
88888e |
#include <fcntl.h>
|
|
Packit |
88888e |
#include <unistd.h>
|
|
Packit |
88888e |
#include <stdlib.h>
|
|
Packit |
88888e |
|
|
Packit |
88888e |
#include <gdk/gdk.h>
|
|
Packit |
88888e |
#include <gdk/gdkx.h>
|
|
Packit |
88888e |
#include <glib/gi18n.h>
|
|
Packit |
88888e |
#include <gtk/gtk.h>
|
|
Packit |
88888e |
|
|
Packit |
88888e |
#include "X11/XKBlib.h"
|
|
Packit |
88888e |
|
|
Packit |
88888e |
int
|
|
Packit |
88888e |
main (int argc, char **argv)
|
|
Packit |
88888e |
{
|
|
Packit |
88888e |
GtkWidget *gki;
|
|
Packit |
88888e |
GtkWidget *mainwin;
|
|
Packit |
88888e |
GtkWidget *vbox;
|
|
Packit |
88888e |
|
|
Packit |
88888e |
bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
|
|
Packit |
88888e |
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
|
|
Packit |
88888e |
textdomain (GETTEXT_PACKAGE);
|
|
Packit |
88888e |
|
|
Packit |
88888e |
/* Different data dir defs in g-a and g-c-c */
|
|
Packit |
88888e |
gtk_init (&argc, &argv);
|
|
Packit |
88888e |
|
|
Packit |
88888e |
mainwin = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
|
Packit |
88888e |
|
|
Packit |
88888e |
gki = gkbd_indicator_new ();
|
|
Packit |
88888e |
|
|
Packit |
88888e |
gkbd_indicator_set_parent_tooltips (GKBD_INDICATOR (gki), TRUE);
|
|
Packit |
88888e |
|
|
Packit |
88888e |
gtk_window_resize (GTK_WINDOW (mainwin), 250, 250);
|
|
Packit |
88888e |
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
|
|
Packit |
88888e |
gtk_box_set_homogeneous (GTK_BOX (vbox), TRUE);
|
|
Packit |
88888e |
|
|
Packit |
88888e |
gtk_container_add (GTK_CONTAINER (mainwin), vbox);
|
|
Packit |
88888e |
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
|
|
Packit |
88888e |
gtk_container_add (GTK_CONTAINER (vbox),
|
|
Packit |
88888e |
gtk_label_new (_("Indicator:")));
|
|
Packit |
88888e |
gtk_container_add (GTK_CONTAINER (vbox), gki);
|
|
Packit |
88888e |
|
|
Packit |
88888e |
gtk_widget_show_all (mainwin);
|
|
Packit |
88888e |
|
|
Packit |
88888e |
g_signal_connect (G_OBJECT (mainwin),
|
|
Packit |
88888e |
"destroy", G_CALLBACK (gtk_main_quit), NULL);
|
|
Packit |
88888e |
|
|
Packit |
88888e |
|
|
Packit |
88888e |
gtk_main ();
|
|
Packit |
88888e |
|
|
Packit |
88888e |
return 0;
|
|
Packit |
88888e |
}
|