~ubuntu-branches/ubuntu/oneiric/cairo-dock/oneiric-201110111206

« back to all changes in this revision

Viewing changes to src/cairo-dock-keybinder.c

  • Committer: Bazaar Package Importer
  • Author(s): Julien Lavergne, Matthieu Baerts (matttbe), Julien Lavergne
  • Date: 2009-10-04 16:33:52 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20091004163352-ttbbjfmpb8uzl8j4
Tags: 2.0.9-0ubuntu1
[ Matthieu Baerts (matttbe) ]
* New Upstream Version. (LP: #435587)
* Added apport hook in debian/apport
 - Add debian/apport
 - debian/cairo-dock-core.install: Added debian/apport/cairo-dock.py
* Use .desktop provided by upstream
 - Removed debian/*.desktop
 - debian/cairo-dock-core.install: install upstream desktop files. 

[ Julien Lavergne ]
* Adjust debian/changelog with Daniel Holbach suggestions.
* debian/patches/01_rename_cairo-dock-package-theme.patch: drop, 
  merged upstream.
* debian/patches/01-desktop-file-category.patch:
 - Remove Encoding field and set category to Utility.
* debian/patches/02-merge-changelog.patch:
 - Merge ChangeLog and ChangeLog-2.0.9.
* debian/apport: Remove commands with grep, python doesn't like it.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/**
2
 
* keybinder for Cairo-Dock
3
 
*
4
 
* Copyright : (C) 2008 Cedric GESTES, Havoc Pennington and Tim Janik
5
 
* E-mail    : ctaf42@gmail.com
6
 
*
7
 
* This program is free software; you can redistribute it and/or
8
 
* modify it under the terms of the GNU General Public License
9
 
* as published by the Free Software Foundation; either version 3
10
 
* of the License, or (at your option) any later version.
11
 
*
12
 
* This program is distributed in the hope that it will be useful,
13
 
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 
* GNU General Public License for more details.
16
 
*   http://www.gnu.org/licenses/licenses.html#GPL
 
1
/*
 
2
** cairo-dock-keybinder.c
 
3
** Login : <ctaf42@localhost.localdomain>
 
4
** Started on  Thu Jan 31 03:57:17 2008 Cedric GESTES
 
5
** $Id$
 
6
**
 
7
** Author(s)
 
8
**  - Cedric GESTES <ctaf42@gmail.com>
 
9
**  - Havoc Pennington
 
10
**  - Tim Janik
 
11
**
 
12
** Copyright (C) 2008 Cedric GESTES
 
13
** This program is free software; you can redistribute it and/or modify
 
14
** it under the terms of the GNU General Public License as published by
 
15
** the Free Software Foundation; either version 3 of the License, or
 
16
** (at your option) any later version.
 
17
**
 
18
** This program is distributed in the hope that it will be useful,
 
19
** but WITHOUT ANY WARRANTY; without even the implied warranty of
 
20
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
21
** GNU General Public License for more details.
 
22
**
 
23
** You should have received a copy of the GNU General Public License
 
24
** along with this program; if not, write to the Free Software
 
25
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
26
*
18
27
* imported from tomboy_keybinder.c
19
28
*/
79
88
                caps_lock_mask | scroll_lock_mask,
80
89
                num_lock_mask  | caps_lock_mask | scroll_lock_mask,
81
90
        };
82
 
        int i;
83
 
 
 
91
        
 
92
        guint i;
84
93
        for (i = 0; i < G_N_ELEMENTS (mod_masks); i++) {
85
94
                if (grab) {
86
95
                        XGrabKey (GDK_WINDOW_XDISPLAY (rootwin),
277
286
        Binding *binding;
278
287
        gboolean success;
279
288
 
280
 
        if (!keystring)
281
 
          return FALSE;
 
289
        cd_debug ("%s (%s)", __func__, keystring);
 
290
        if (!keystring)
 
291
                return FALSE;
282
292
        binding = g_new0 (Binding, 1);
283
293
        binding->keystring = g_strdup (keystring);
284
294
        binding->handler = handler;
285
295
        binding->user_data = user_data;
286
296
 
287
297
        /* Sets the binding's keycode and modifiers */
288
 
        cd_debug ("%s", keystring);
289
298
        success = do_grab_key (binding);
290
299
 
291
300
        if (success) {
303
312
cd_keybinder_unbind (const char           *keystring,
304
313
                         CDBindkeyHandler  handler)
305
314
{
 
315
        cd_debug ("%s (%s)", __func__, keystring);
306
316
        GSList *iter;
307
317
 
308
318
        if (!keystring)
317
327
                do_ungrab_key (binding);
318
328
 
319
329
                bindings = g_slist_remove (bindings, binding);
320
 
 
 
330
                
 
331
                g_print (" --- remove key binding '%s'\n", binding->keystring);
321
332
                g_free (binding->keystring);
322
333
                g_free (binding);
323
334
                break;