diff options
author | Sergey V. Udaltsov <svu@src.gnome.org> | 2004-02-23 09:00:40 +0000 |
---|---|---|
committer | Sergey V. Udaltsov <svu@src.gnome.org> | 2004-02-23 09:00:40 +0000 |
commit | 6943f94ebadd9f7886a8b20268ac9637316905e9 (patch) | |
tree | bbc2ce8c05f7072d9eaac8212cd4ca38471479b9 | |
parent | 783b256b9c55a9f691b8dcaa746ee599965c850f (diff) | |
download | gnome-control-center-6943f94ebadd9f7886a8b20268ac9637316905e9.tar.gz |
first work on preview - just looking at how it may be
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | capplets/keyboard/Makefile.am | 5 | ||||
-rw-r--r-- | capplets/keyboard/gnome-keyboard-properties-xkb.c | 2 | ||||
-rw-r--r-- | capplets/keyboard/gnome-keyboard-properties-xkb.h | 2 | ||||
-rw-r--r-- | capplets/keyboard/gnome-keyboard-properties-xkbpv.c | 43 | ||||
-rw-r--r-- | capplets/keyboard/gnome-keyboard-properties.glade | 38 | ||||
-rw-r--r-- | configure.in | 1 |
7 files changed, 91 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am index 2dbfb3544..24c5f1b4c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = po libsounds libbackground libwindow-settings libgswitchit gnome-settings-daemon capplets control-center vfs-methods idl schemas typing-break +SUBDIRS = po libsounds libbackground libwindow-settings libgswitchit kbdraw gnome-settings-daemon capplets control-center vfs-methods idl schemas typing-break #I removed the root-manager for now # diff --git a/capplets/keyboard/Makefile.am b/capplets/keyboard/Makefile.am index 5a4417b03..29debbe44 100644 --- a/capplets/keyboard/Makefile.am +++ b/capplets/keyboard/Makefile.am @@ -4,10 +4,13 @@ gnome_keyboard_properties_SOURCES = gnome-keyboard-properties.c \ gnome-keyboard-properties-xkb.c \ gnome-keyboard-properties-xkblt.c \ gnome-keyboard-properties-xkbot.c \ + gnome-keyboard-properties-xkbpv.c \ gnome-keyboard-properties-xkb.h gnome_keyboard_properties_LDADD = \ ../accessibility/keyboard/libaccessibility-keyboard.a \ - $(GNOMECC_CAPPLETS_LIBS) $(LIBXKLAVIER_LIBS) ../../libgswitchit/libgswitchit.a + $(GNOMECC_CAPPLETS_LIBS) $(LIBXKLAVIER_LIBS) \ + ../../libgswitchit/libgswitchit.a \ + ../../kbdraw/libkbdraw.a @INTLTOOL_DESKTOP_RULE@ diff --git a/capplets/keyboard/gnome-keyboard-properties-xkb.c b/capplets/keyboard/gnome-keyboard-properties-xkb.c index 4cd72706f..792cdf0cc 100644 --- a/capplets/keyboard/gnome-keyboard-properties-xkb.c +++ b/capplets/keyboard/gnome-keyboard-properties-xkb.c @@ -233,6 +233,8 @@ setup_xkb_tabs (GladeXML * dialog, GConfChangeSet * changeset) GSwitchItXkbConfigLoadInitial (&initialConfig); enable_disable_restoring (dialog); + + init_preview(dialog); } void diff --git a/capplets/keyboard/gnome-keyboard-properties-xkb.h b/capplets/keyboard/gnome-keyboard-properties-xkb.h index 8a7a2e843..b6230309f 100644 --- a/capplets/keyboard/gnome-keyboard-properties-xkb.h +++ b/capplets/keyboard/gnome-keyboard-properties-xkb.h @@ -58,5 +58,7 @@ extern void sort_tree_content (GtkWidget * treeView); extern void enable_disable_restoring(GladeXML * dialog); +extern void init_preview(GladeXML * dialog); + G_END_DECLS #endif /* __GNOME_KEYBOARD_PROPERTY_XKB_H */ diff --git a/capplets/keyboard/gnome-keyboard-properties-xkbpv.c b/capplets/keyboard/gnome-keyboard-properties-xkbpv.c new file mode 100644 index 000000000..b4399795a --- /dev/null +++ b/capplets/keyboard/gnome-keyboard-properties-xkbpv.c @@ -0,0 +1,43 @@ +/* -*- mode: c; style: linux -*- */ + +/* gnome-keyboard-properties-xkb.c + * Copyright (C) 2003 Sergey V. Oudaltsov + * + * Written by: Sergey V. Oudaltsov <svu@users.sourceforge.net> + * + * 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 + +#include <gnome.h> +#include <glade/glade.h> + +#include "capplet-util.h" + +#include "gnome-keyboard-properties-xkb.h" +#include "kbdraw/keyboard-drawing.h" + +void +init_preview (GladeXML * dialog) +{ + GtkWidget *frame = WID ("preview_frame"); + GtkWidget *kbdraw = keyboard_drawing_new (); + gtk_container_add (GTK_CONTAINER (frame), kbdraw); + gtk_widget_show (kbdraw); +} diff --git a/capplets/keyboard/gnome-keyboard-properties.glade b/capplets/keyboard/gnome-keyboard-properties.glade index 67bdd856d..1c01e5b87 100644 --- a/capplets/keyboard/gnome-keyboard-properties.glade +++ b/capplets/keyboard/gnome-keyboard-properties.glade @@ -1711,6 +1711,44 @@ <property name="type">tab</property> </packing> </child> + + <child> + <widget class="GtkAlignment" id="preview_frame"> + <property name="border_width">12</property> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">1</property> + <property name="yscale">1</property> + + <child> + <placeholder/> + </child> + </widget> + <packing> + <property name="tab_expand">False</property> + <property name="tab_fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label58"> + <property name="visible">True</property> + <property name="label" translatable="yes">Layout Preview</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="type">tab</property> + </packing> + </child> </widget> <packing> <property name="padding">0</property> diff --git a/configure.in b/configure.in index 840c9f2bb..ee112664c 100644 --- a/configure.in +++ b/configure.in @@ -436,6 +436,7 @@ libbackground/Makefile libwindow-settings/Makefile libwindow-settings/gnome-window-settings-2.0.pc libgswitchit/Makefile +kbdraw/Makefile capplets/Makefile capplets/common/Makefile capplets/background/Makefile |