summaryrefslogtreecommitdiff
path: root/gkb-new
diff options
context:
space:
mode:
authorDavyd Madeley <davyd@madeley.id.au>2004-09-13 08:02:32 +0000
committerDavyd Madeley <davyd@src.gnome.org>2004-09-13 08:02:32 +0000
commited8ab4a8c648f74cc620e5f84b1c75980ba5e970 (patch)
treeb9b517a60b101c051f72dd5cfec88978a5194ba3 /gkb-new
parent0cd10105448ad99cb0fa93814212440a6916f126 (diff)
Reverting changes from 2004-09-12 as they break the freeze.
2004-09-13 Davyd Madeley <davyd@madeley.id.au> * gkb.schemas.in: * gkb.c: * GNOME_GKBApplet.server.in.in: * gkb-applet.c: * Makefile.am: Reverting changes from 2004-09-12 as they break the freeze.
Diffstat (limited to 'gkb-new')
-rw-r--r--gkb-new/ChangeLog9
-rw-r--r--gkb-new/GNOME_GKBApplet.server.in.in35
-rw-r--r--gkb-new/Makefile.am24
-rw-r--r--gkb-new/gkb-applet.c11
-rw-r--r--gkb-new/gkb.c18
-rw-r--r--gkb-new/gkb.schemas.in87
6 files changed, 58 insertions, 126 deletions
diff --git a/gkb-new/ChangeLog b/gkb-new/ChangeLog
index a7f672478..836515cb0 100644
--- a/gkb-new/ChangeLog
+++ b/gkb-new/ChangeLog
@@ -1,3 +1,12 @@
+2004-09-13 Davyd Madeley <davyd@madeley.id.au>
+
+ * gkb.schemas.in:
+ * gkb.c:
+ * GNOME_GKBApplet.server.in.in:
+ * gkb-applet.c:
+ * Makefile.am: Reverting changes from 2004-09-12 as they break the
+ freeze.
+
2004-09-12 Szabolcs Ban <shooby@gnome.hu>
* gkb.schemas.in: fixing schemas, too...
diff --git a/gkb-new/GNOME_GKBApplet.server.in.in b/gkb-new/GNOME_GKBApplet.server.in.in
deleted file mode 100644
index e28438862..000000000
--- a/gkb-new/GNOME_GKBApplet.server.in.in
+++ /dev/null
@@ -1,35 +0,0 @@
-<oaf_info>
-
-<oaf_server iid="OAFIID:GNOME_GKBApplet_Factory"
- type="exe"
- location="@LIBEXECDIR@/gkb_applet2">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:Bonobo/GenericFactory:1.0"/>
- <item value="IDL:Bonobo/Unknown:1.0"/>
- </oaf_attribute>
- <oaf_attribute name="name" type="string" _value="Gnome Keyboard Applet Factory"/>
- <oaf_attribute name="description" type="string" _value="Gnome Keyboard Applet Factory"/>
-
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_GKBApplet"
- type="factory"
- location="OAFIID:GNOME_GKBApplet_Factory">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/Vertigo/PanelAppletShell:1.0"/>
- <item value="IDL:Bonobo/Control:1.0"/>
- <item value="IDL:Bonobo/Unknown:1.0"/>
- </oaf_attribute>
- <oaf_attribute name="name" type="string" _value="GKB Applet"/>
- <oaf_attribute name="description" type="string" _value="Keyboard Layout Changer"/>
- <oaf_attribute name="panel:icon" type="string" value="gkb.png"/>
- <oaf_attribute name="bugzilla:bugzilla" type="string" value="GNOME"/>
- <oaf_attribute name="bugzilla:product" type="string" value="gnome-applets"/>
- <oaf_attribute name="bugzilla:component" type="string" value="gkb"/>
- <oaf_attribute name="bugzilla:other_binaries" type="string" value="gkb_applet2"/>
-
-</oaf_server>
-
-</oaf_info>
diff --git a/gkb-new/Makefile.am b/gkb-new/Makefile.am
index 23a248ecf..d097e2bc1 100644
--- a/gkb-new/Makefile.am
+++ b/gkb-new/Makefile.am
@@ -4,7 +4,7 @@ INCLUDES = \
bin_PROGRAMS = gnome-keyboard-layout
bin_SCRIPTS = gkb_xmmap
-libexec_PROGRAMS = gkb_applet2
+noinst_LIBRARIES = libgkb.a
gkb_COMMON = \
gkb.c \
@@ -21,13 +21,10 @@ gkb_COMMON = \
gconf.c
gnome_keyboard_layout_SOURCES = $(gkb_COMMON) gnome-keyboard-layout.c
-
gnome_keyboard_layout_LDADD = \
$(GNOME_APPLETS_LIBS) $(X_LIBS) $(INTLLIBS)
-gkb_applet2_SOURCES = $(gkb_COMMON) gkb-applet.c
-gkb_applet2_LDADD = \
- $(GNOME_APPLETS_LIBS)
+libgkb_a_SOURCES = $(gkb_COMMON) gkb-applet.c
if GKB_SUN
gkb_DDIRS= xmodmap.sun descs.sun
@@ -53,20 +50,8 @@ ui_DATA = GNOME_KeyboardApplet.xml
EXTRA_DIST = \
$(GKB_ICON) \
- $(schemas_in_files) \
- $(ui_DATA) \
- GNOME_CharpickerApplet.server.in.in
-
-serverdir = $(libdir)/bonobo/servers
-server_in_files = GNOME_GKBApplet.server.in
-server_DATA = $(server_in_files:.server.in=.server)
-
-$(server_in_files): $(server_in_files:.server.in=.server.in.in)
- sed -e "s|\@LIBEXECDIR\@|$(libexecdir)|" $< > $@
-
-CLEANFILES = $(server_in_files) $(server_DATA)
-
-@INTLTOOL_SERVER_RULE@
+ $(schemas_in_files) \
+ $(ui_DATA)
gkb_xmmap: gkb_xmmap.in
sed "s,\$${prefix},$(prefix),g" \
@@ -77,4 +62,3 @@ if GCONF_SCHEMAS_INSTALL
install-data-local:
GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(schemas_DATA) ;
endif
-
diff --git a/gkb-new/gkb-applet.c b/gkb-new/gkb-applet.c
index 08ab99709..48cc0feb6 100644
--- a/gkb-new/gkb-applet.c
+++ b/gkb-new/gkb-applet.c
@@ -348,7 +348,7 @@ fill_gkb_applet (PanelApplet *applet)
gboolean gail_loaded = FALSE;
-static gboolean
+gboolean
gkb_factory (PanelApplet *applet,
const gchar *iid,
gpointer data)
@@ -356,13 +356,6 @@ gkb_factory (PanelApplet *applet,
if (GTK_IS_ACCESSIBLE (gtk_widget_get_accessible (GTK_WIDGET (applet))))
gail_loaded = TRUE;
- return !strcmp (iid, "OAFIID:GNOME_GKBApplet") &&
+ return !strcmp (iid, "OAFIID:GNOME_KeyboardApplet") &&
fill_gkb_applet (applet);
}
-
-PANEL_APPLET_BONOBO_FACTORY ("OAFIID:GNOME_GKBApplet_Factory",
- PANEL_TYPE_APPLET,
- "gkb_applet2",
- "0",
- gkb_factory,
- NULL)
diff --git a/gkb-new/gkb.c b/gkb-new/gkb.c
index 397abe21f..c22b672ee 100644
--- a/gkb-new/gkb.c
+++ b/gkb-new/gkb.c
@@ -132,13 +132,10 @@ gkb_count_sizes (GKB * gkb)
}
/* Flag has either the with or the height set */
- if (flag_width == 0) {
- flag_height -= 4;
- flag_width = (gint) flag_height * 1.5;
- } else {
- flag_width -= 4;
+ if (flag_width == 0)
+ flag_width = (gint) flag_height *1.5;
+ else
flag_height = (gint) flag_width / 1.5;
- }
label_width = flag_width;
label_height = flag_height;
@@ -157,9 +154,9 @@ gkb_count_sizes (GKB * gkb)
applet_width += label_width;
}
- gkb->w = flag_width;
- gkb->h = flag_height;
-
+ gkb->w = flag_width - 1;
+ /* FIXME the applet is just a little bigger than panel, so I add the -2 here*/
+ gkb->h = flag_height - 1;
if (horizontal) {
gtk_widget_set_size_request (gkb->label_frame1, -1, gkb->h);
gtk_widget_set_size_request (gkb->label_frame2, -1, gkb->h);
@@ -351,6 +348,7 @@ loadprop (GKB *gkb, int i)
actdata = g_new0 (GkbKeymap, 1);
+
buf = g_strdup_printf ("name_%d",i);
actdata->name = gkb_load_pref (gkb, buf, (i?_("US 105 key keyboard"):_("Gnome Keyboard Default")));
g_free (buf);
@@ -421,7 +419,7 @@ load_properties (GKB * gkb)
gkb->old_state = gkb->state;
gkb->is_small = gconf_applet_get_bool ("small");
- text = gkb_load_pref (gkb, "mode", "Label");
+ text = gkb_load_pref (gkb, "mode", "Flag and Label");
gkb->mode = gkb_util_get_mode_from_text (text);
g_free (text);
diff --git a/gkb-new/gkb.schemas.in b/gkb-new/gkb.schemas.in
index 6c11006db..46c776935 100644
--- a/gkb-new/gkb.schemas.in
+++ b/gkb-new/gkb.schemas.in
@@ -1,9 +1,8 @@
<gconfschemafile>
<schemalist>
<schema>
- <key>/schemas/desktop/gnome/peripherals/keyboard/layout/num</key>
- <applyto>/desktop/gnome/peripherals/keyboard/layout/num</applyto>
- <owner>gkb_applet2</owner>
+ <key>/schemas/apps/gkb-applet/prefs/num</key>
+ <owner>gkb-applet</owner>
<type>int</type>
<default>10</default>
<locale name="C">
@@ -12,9 +11,8 @@
</locale>
</schema>
<schema>
- <key>/schemas/desktop/gnome/peripherals/keyboard/layout/small</key>
- <applyto>/desktop/gnome/peripherals/keyboard/layout/small</applyto>
- <owner>gkb_applet2</owner>
+ <key>/schemas/apps/gkb-applet/prefs/small</key>
+ <owner>gkb-applet</owner>
<type>bool</type>
<default>true</default>
<locale name="C">
@@ -22,20 +20,18 @@
</locale>
</schema>
<schema>
- <key>/schemas/desktop/gnome/peripherals/keyboard/layout/mode</key>
- <applyto>/desktop/gnome/peripherals/keyboard/layout/mode</applyto>
- <owner>gkb_applet2</owner>
+ <key>/schemas/apps/gkb-applet/prefs/mode</key>
+ <owner>gkb-applet</owner>
<type>string</type>
- <default>Label</default>
+ <default>Flag and Label</default>
<locale name="C">
<short>Appearance mode of the applet</short>
<long>It can be "Flag and Label", "Label" or "Flag"</long>
</locale>
</schema>
<schema>
- <key>/schemas/desktop/gnome/peripherals/keyboard/layout/key</key>
- <applyto>/desktop/gnome/peripherals/keyboard/layout/key</applyto>
- <owner>gkb_applet2</owner>
+ <key>/schemas/apps/gkb-applet/prefs/key</key>
+ <owner>gkb-applet</owner>
<type>string</type>
<default>Mod1-Shift_L</default>
<locale name="C">
@@ -44,9 +40,8 @@
</locale>
</schema>
<schema>
- <key>/schemas/desktop/gnome/peripherals/keyboard/layout/name_0</key>
- <applyto>/desktop/gnome/peripherals/keyboard/layout/name_0</applyto>
- <owner>gkb_applet2</owner>
+ <key>/schemas/apps/gkb-applet/prefs/name_0</key>
+ <owner>gkb-applet</owner>
<type>string</type>
<default>US 105 key keyboard (with windows keys)</default>
<locale name="C">
@@ -55,9 +50,8 @@
</locale>
</schema>
<schema>
- <key>/schemas/desktop/gnome/peripherals/keyboard/layout/label_0</key>
- <applyto>/desktop/gnome/peripherals/keyboard/layout/label_0</applyto>
- <owner>gkb_applet2</owner>
+ <key>/schemas/apps/gkb-applet/prefs/label_0</key>
+ <owner>gkb-applet</owner>
<type>string</type>
<default>us</default>
<locale name="C">
@@ -66,9 +60,8 @@
</locale>
</schema>
<schema>
- <key>/schemas/desktop/gnome/peripherals/keyboard/layout/country_0</key>
- <applyto>/desktop/gnome/peripherals/keyboard/layout/country_0</applyto>
- <owner>gkb_applet2</owner>
+ <key>/schemas/apps/gkb-applet/prefs/country_0</key>
+ <owner>gkb-applet</owner>
<type>string</type>
<default>United States</default>
<locale name="C">
@@ -77,9 +70,8 @@
</locale>
</schema>
<schema>
- <key>/schemas/desktop/gnome/peripherals/keyboard/layout/lang_0</key>
- <applyto>/desktop/gnome/peripherals/keyboard/layout/lang_0</applyto>
- <owner>gkb_applet2</owner>
+ <key>/schemas/apps/gkb-applet/prefs/lang_0</key>
+ <owner>gkb-applet</owner>
<type>string</type>
<default>English</default>
<locale name="C">
@@ -88,9 +80,8 @@
</locale>
</schema>
<schema>
- <key>/schemas/desktop/gnome/peripherals/keyboard/layout/flag_0</key>
- <applyto>/desktop/gnome/peripherals/keyboard/layout/flag_0</applyto>
- <owner>gkb_applet2</owner>
+ <key>/schemas/apps/gkb-applet/prefs/flag_0</key>
+ <owner>gkb-applet</owner>
<type>string</type>
<default>us.png</default>
<locale name="C">
@@ -99,9 +90,8 @@
</locale>
</schema>
<schema>
- <key>/schemas/desktop/gnome/peripherals/keyboard/layout/command_0</key>
- <applyto>/desktop/gnome/peripherals/keyboard/layout/command_0</applyto>
- <owner>gkb_applet2</owner>
+ <key>/schemas/apps/gkb-applet/prefs/command_0</key>
+ <owner>gkb-applet</owner>
<type>string</type>
<default>gkb_xmmap us</default>
<locale name="C">
@@ -110,9 +100,8 @@
</locale>
</schema>
<schema>
- <key>/schemas/desktop/gnome/peripherals/keyboard/layout/name_1</key>
- <applyto>/desktop/gnome/peripherals/keyboard/layout/name_1</applyto>
- <owner>gkb_applet2</owner>
+ <key>/schemas/apps/gkb-applet/prefs/name_1</key>
+ <owner>gkb-applet</owner>
<type>string</type>
<default>Hungarian 105 keys latin2</default>
<locale name="C">
@@ -121,9 +110,8 @@
</locale>
</schema>
<schema>
- <key>/schemas/desktop/gnome/peripherals/keyboard/layout/label_1</key>
- <applyto>/desktop/gnome/peripherals/keyboard/layout/label_1</applyto>
- <owner>gkb_applet2</owner>
+ <key>/schemas/apps/gkb-applet/prefs/label_1</key>
+ <owner>gkb-applet</owner>
<type>string</type>
<default>hu</default>
<locale name="C">
@@ -132,9 +120,8 @@
</locale>
</schema>
<schema>
- <key>/schemas/desktop/gnome/peripherals/keyboard/layout/country_1</key>
- <applyto>/desktop/gnome/peripherals/keyboard/layout/country_1</applyto>
- <owner>gkb_applet2</owner>
+ <key>/schemas/apps/gkb-applet/prefs/country_1</key>
+ <owner>gkb-applet</owner>
<type>string</type>
<default>Hungary</default>
<locale name="C">
@@ -143,9 +130,8 @@
</locale>
</schema>
<schema>
- <key>/schemas/desktop/gnome/peripherals/keyboard/layout/lang_1</key>
- <applyto>/desktop/gnome/peripherals/keyboard/layout/lang_1</applyto>
- <owner>gkb_applet2</owner>
+ <key>/schemas/apps/gkb-applet/prefs/lang_1</key>
+ <owner>gkb-applet</owner>
<type>string</type>
<default>Hungarian</default>
<locale name="C">
@@ -154,9 +140,8 @@
</locale>
</schema>
<schema>
- <key>/schemas/desktop/gnome/peripherals/keyboard/layout/flag_1</key>
- <applyto>/desktop/gnome/peripherals/keyboard/layout/flag_1</applyto>
- <owner>gkb_applet2</owner>
+ <key>/schemas/apps/gkb-applet/prefs/flag_1</key>
+ <owner>gkb-applet</owner>
<type>string</type>
<default>hu.png</default>
<locale name="C">
@@ -165,9 +150,8 @@
</locale>
</schema>
<schema>
- <key>/schemas/desktop/gnome/peripherals/keyboard/layout/command_1</key>
- <applyto>/desktop/gnome/peripherals/keyboard/layout/command_1</applyto>
- <owner>gkb_applet2</owner>
+ <key>/schemas/apps/gkb-applet/prefs/command_1</key>
+ <owner>gkb-applet</owner>
<type>string</type>
<default>gkb_xmmap hu</default>
<locale name="C">
@@ -176,9 +160,8 @@
</locale>
</schema>
<schema>
- <key>/schemas/desktop/gnome/peripherals/keyboard/layout/current</key>
- <applyto>/desktop/gnome/peripherals/keyboard/layout/current</applyto>
- <owner>gkb_applet2</owner>
+ <key>/schemas/apps/gkb-applet/prefs/current</key>
+ <owner>gkb-applet</owner>
<type>int</type>
<default>0</default>
<locale name="C">