~ubuntu-branches/ubuntu/raring/gdm/raring

« back to all changes in this revision

Viewing changes to gui/simple-greeter/gdm-layouts.c

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-07-17 11:41:35 UTC
  • mfrom: (1.4.32 upstream)
  • Revision ID: james.westby@ubuntu.com-20090717114135-1ql0hht1lumoiscv
Tags: 2.26.1git20090717-0ubuntu1
* Update to latest upstream git head:
  - Make greeter login window be a dock. Fixes metacity complaining about
    session management. (LP: #395324)
* Drop patches which are fixed upstream:
  - 00git-greeter-session-management.patch
  - 00git-invalid-dmrc-layout.patch
  - 00git-use-after-free.patch
  - 00git-xklavier4.patch
  - 02_dont_force_us_keyboard.patch
  - 04_polkit1.patch
* 80_workaround_incorrect_directories.patch: Update to new upstream version.
* Drop 01_xconfigoptions.patch; these configure variables are not used any
  more in the upstream code, and upstream supplies the X.org -br option by
  default now. Also drop the corresponding configure changes from
  17_update_default_xserver.patch.
* Apply 15_usplash.patch to debian/gdm.init and drop the patch.
* 17_update_default_xserver.patch: Update to new upstream version, add
  corresponding configure change, add patch tag header, forward upstream,
  and rename to 02_x_server_location.patch.
* Drop 99_autoreconf.patch. The only remaining build system change is the
  previous item.
* Drop 20_xdm-stuff.patch, it's just cruft.
* Drop debian/Xsession, and change debian/rules to install the upstream one.
* 01_xrdb_nocpp.patch: Add patch tag header, forward upstream.
* Rename 80_workaround_incorrect_directories.patch to
  04_fix_external_program_directories.patch and add patch tag header.
* Rename 81_initial_server_on_vt7.patch to 05_initial_server_on_vt7.patch.
* debian/rules: Remove /var/gdm (empty and nonstandard) and /var/run (will
  be created at runtime), thanks lintian.
* debian/copyright: Point to versioned GPL, thanks lintian.
* debian/gdm.postrm: Use "set -e" to conform to policy.
* Add debian/xterm.desktop: Reintroduce "failsafe xterm" session.

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
                engine = xkl_engine_get_instance (GDK_DISPLAY ());
53
53
                xkl_engine_backup_names_prop (engine);
54
54
                config_registry = xkl_config_registry_get_instance (engine);
55
 
                xkl_config_registry_load (config_registry);
 
55
                xkl_config_registry_load (config_registry, FALSE);
56
56
 
57
57
                initial_config = xkl_config_rec_new ();
58
58
                if (!xkl_config_rec_get_from_backup (initial_config, engine)) {
189
189
#endif
190
190
}
191
191
 
 
192
gboolean
 
193
gdm_layout_is_valid (const char *layout_variant)
 
194
{
 
195
#ifdef HAVE_LIBXKLAVIER
 
196
        XklConfigItem *item;
 
197
        char          *layout;
 
198
        char          *variant;
 
199
        gboolean       retval;
 
200
 
 
201
        layout = g_strdup (layout_variant);
 
202
        variant = strchr (layout, '\t');
 
203
        if (variant != NULL) {
 
204
                variant[0] = '\0';
 
205
                variant++;
 
206
        }
 
207
 
 
208
        item = xkl_config_item_new ();
 
209
        g_snprintf (item->name, XKL_MAX_CI_NAME_LENGTH, "%s", layout);
 
210
 
 
211
        retval = xkl_config_registry_find_layout (config_registry, item);
 
212
 
 
213
        if (retval && variant != NULL) {
 
214
                g_snprintf (item->name, XKL_MAX_CI_NAME_LENGTH, "%s", variant);
 
215
                retval = xkl_config_registry_find_variant (config_registry, layout, item);
 
216
        }
 
217
 
 
218
        g_object_unref (item);
 
219
        g_free (layout);
 
220
 
 
221
        return retval;
 
222
#else
 
223
        return TRUE;
 
224
#endif
 
225
}
 
226
 
 
227
const char *
 
228
gdm_layout_get_default_layout (void)
 
229
{
 
230
#ifdef HAVE_LIBXKLAVIER
 
231
        init_xkl ();
 
232
 
 
233
        if (initial_config->layouts)
 
234
                return initial_config->layouts[0];
 
235
        else
 
236
                return NULL;
 
237
#else
 
238
        return NULL;
 
239
#endif
 
240
}
 
241
 
192
242
void
193
243
gdm_layout_activate (const char *layout)
194
244
{