Commit graph

107 commits

Author SHA1 Message Date
Thomas Wood
19b7502f5e keybindings: convert capplet to a settings panel
Add a module and CcPanel implementation for keyboard shortcuts settings.
2010-05-24 21:51:28 +01:00
Wang Xin
7c82b5b5cc [keybindings] Show shortcuts for the active window manager
Actually display the bindings for the running window manager instead
of all others (bug #600531).
2009-11-04 18:53:37 +01:00
Jens Granseuer
3f671fdceb Fix zombie bindings appearing after deleting custom shortcuts
Make GConf sync after deleting a custom binding so that the removed
directory actually gets pruned and doesn't come back when restarting
the application (bug 596351).
2009-10-24 14:01:00 +02:00
Robert Ancell
7551f36f2a Fix broken logic in keybinding tree model 2009-10-17 14:52:15 +02:00
Jens Granseuer
193594f8da Fix previous broken commit a01e8daa6d 2009-09-15 19:35:38 +02:00
Owen W. Taylor
a01e8daa6d Allow a window manager to inherit keybindings from another window manager
Mutter shares most (currently all) its keybindings with Metacity, and uses
the same /apps/metacity GConf keys. For 2.28, the schemas stay in Metacity;
the eventual plan is to have a gnome-wm-data package.

This patch allows a window manager to put a _GNOME_WM_KEYBINDINGS property
on its _NET_SUPPORTING_WM_CHECK window to provide a comma separated list of
window manager names to use for keybinding lookup instead of _NET_WM_NAME.

http://bugzilla.gnome.org/show_bug.cgi?id=594066
2009-09-12 14:18:59 -04:00
Jens Granseuer
5998aa90c0 Fix crash when iterating through the tree model
Don't use indices to move through iterators, don't skip the first
section, and verify that we got a new iterator before using it
(bug #591392).
2009-08-11 18:01:55 +02:00
Felix Riemann
9fcae9146b [keybindings] Remove libglade dependency from keybindings capplet 2009-07-10 19:52:36 +02:00
Matthias Clasen
59380c29e4 Make the custom keybinding UI smoother
These changes were proposed in bug 580792:
 - Make the apply button the default
 - Don't let the cancel button grab the default
 - Make both entries activate the default widget
 - Grab the focus to the first entry when presenting the dialog
2009-05-07 20:09:29 -04:00
Jens Granseuer
0f943122ff make activating a section header row expand or collapse the section as
2009-04-02  Jens Granseuer  <jensgr@gmx.net>

	* gnome-keybinding-properties.c: (start_editing_kb_cb): make
	activating a section header row expand or collapse the section as
	expected instead of crashing (bug #577474)

svn path=/trunk/; revision=9400
2009-04-02 16:40:37 +00:00
Jens Granseuer
1ed76a4387 for shortcuts without a description simply show "<Unknown Action>" instead
2009-02-23  Jens Granseuer  <jensgr@gmx.net>

	* gnome-keybinding-properties.c: (append_keys_to_tree),
	(update_custom_shortcut): for shortcuts without a description simply
	show "<Unknown Action>" instead of (unhelpful) parts of its GConf
	path (bug #572808)

svn path=/trunk/; revision=9285
2009-02-23 18:38:27 +00:00
Thomas Hindoe Paaboel Andersen
bc85298dcb Replace following deprecated gtk symbols: gtk_box_pack_start_defaults, gtk_widget_set_usize, and GTK_CHECK_* Bug #572325
svn path=/trunk/; revision=9284
2009-02-23 18:15:51 +00:00
Jens Granseuer
c9362a670b don't forget to save the shortcut command, too (bug #572501)
2009-02-20  Jens Granseuer  <jensgr@gmx.net>

	* gnome-keybinding-properties.c: (update_custom_shortcut): don't
	forget to save the shortcut command, too (bug #572501)

svn path=/trunk/; revision=9280
2009-02-20 19:51:44 +00:00
Bastien Nocera
4be1294945 Make Enter work as expected in the custom key shortcut edit dialogue
2009-01-28  Bastien Nocera  <hadess@hadess.net>

	* gnome-keybinding-properties.c (setup_dialog): Make Enter
	work as expected in the custom key shortcut edit dialogue


svn path=/trunk/; revision=9216
2009-01-28 12:06:38 +00:00
Bastien Nocera
1069e323e8 Only print warnings for non-custom keybindings, Set the GConf key for the
2009-01-28  Bastien Nocera  <hadess@hadess.net>

	* gnome-keybinding-properties.c (append_keys_to_tree),
	(edit_custom_shortcut), (update_custom_shortcut): Only print
	warnings for non-custom keybindings, Set the GConf key for
	the description when editing existing custom key shortcuts,
	Avoid warnings when the description for a custom key shortcut
	is empty


svn path=/trunk/; revision=9215
2009-01-28 12:01:15 +00:00
Bastien Nocera
d6169f8cdb Print a warning when a key doesn't have a schema, so no description, makes
2009-01-28  Bastien Nocera  <hadess@hadess.net>

	* gnome-keybinding-properties.c (append_keys_to_tree):
	Print a warning when a key doesn't have a schema, so no
	description, makes debugging things like:
	https://bugzilla.redhat.com/show_bug.cgi?id=482813
	easier


svn path=/trunk/; revision=9214
2009-01-28 11:35:08 +00:00
Jens Granseuer
70284272a7 fix argument type warnings by casting to appropriate type
2009-01-25  Jens Granseuer  <jensgr@gmx.net>

	* gnome-keybinding-properties.c: (add_custom_shortcut): fix argument
	type warnings by casting to appropriate type

svn path=/trunk/; revision=9209
2009-01-25 11:28:25 +00:00
Matthias Clasen
f4efa053da Respect lockdown for keybindings
svn path=/trunk/; revision=9141
2008-11-11 05:14:51 +00:00
Søren Sandmann Pedersen
2f4279fc08 +Sun Oct 26 18:06:45 2008 Søren Sandmann <sandmann@redhat.com>
+
+	* gnome-keybinding-properties.c (cb_dialog_response): Make it
+	compile again.
+


svn path=/trunk/; revision=9126
2008-10-26 22:06:47 +00:00
Matthias Clasen
5a4fc137bd >-------Bug 114796 – binding to arbitrary shell commands
2008-10-26  Matthias Clasen  <mclasen@redhat.com>

>-------Bug 114796 – binding to arbitrary shell commands

>-------* gnome-keybinding-properties.c:
>-------* gnome-keybinding-properties.glade: Add UI for adding and
>-------removing named custom shortcuts.


svn path=/trunk/; revision=9124
2008-10-26 18:41:34 +00:00
Søren Sandmann Pedersen
5978fd729c +Fri Oct 24 17:17:47 2008 Søren Sandmann <sandmann@redhat.com>
+
+	* Get rid of a number of unnecessary gnome.h includes
+
+	* capplets/keybindings/gnome-keybinding-properties.c: Use
+	gtk_init() instead of gnome_program_init().
+
+	* A couple of formatting fixes
+


svn path=/trunk/; revision=9098
2008-10-24 21:19:15 +00:00
Søren Sandmann
1616422ded Use gtk_show_uri() instead of gnome_help_display_desktop()
Fri Oct 24 15:42:11 2008  Søren Sandmann  <sandmann@redhat.com>

	* Use gtk_show_uri() instead of gnome_help_display_desktop()


svn path=/trunk/; revision=9094
2008-10-24 19:42:26 +00:00
Matthias Clasen
95d0d2b6ef Bug 556977 – avoid duplicate custom keybindings
2008-10-19  Matthias Clasen  <mclasen@redhat.com>

        Bug 556977 – avoid duplicate custom keybindings

        * capplets/keybindings/gnome-keybinding-properties.c: Filter
        out custom keybindings that are also listed in xml files.


svn path=/trunk/; revision=9083
2008-10-20 00:34:57 +00:00
Matthias Clasen
c2d6ffeeba Bug 556967 – fix editability of group headings
2008-10-19  Matthias Clasen  <mclasen@redhat.com>

        Bug 556967 – fix editability of group headings

        * capplets/keybindings/gnome-keybinding-properties.c
        (description_set_func): Don't let section headings be editable.


svn path=/trunk/; revision=9081
2008-10-19 22:36:40 +00:00
Jens Granseuer
4a8637592a Based on a patch by: Denis Washington <denisw@svn.gnome.org>
2008-07-26  Jens Granseuer  <jensgr@gmx.net>

	Based on a patch by: Denis Washington <denisw@svn.gnome.org>

	* gnome-keybinding-properties.c: (binding_name), (show_error),
	(accel_edited_callback): when trying to assign a shortcut that is
	already in use, ask the user whether to reassign it instead of
	refusing to do anything (bug #133318)

svn path=/trunk/; revision=8796
2008-07-26 09:13:40 +00:00
Jens Granseuer
d6c6b7362c Patch by: Matthias Clasen <mclasen@redhat.com>
2008-06-21  Jens Granseuer  <jensgr@gmx.net>

	Patch by: Matthias Clasen <mclasen@redhat.com>

	* at-properties.desktop.in.in:
	* main.c: (setup_dialog): use standard icon name from the icon naming
	spec (bug #539336)

2008-06-21  Jens Granseuer  <jensgr@gmx.net>

	Patch by: Matthias Clasen <mclasen@redhat.com>

	* appearance-main.c: (main):
	* data/gnome-appearance-properties.desktop.in.in: use standard icon
	name from the icon naming spec (bug #539339)

2008-06-21  Jens Granseuer  <jensgr@gmx.net>

	Patch by: Matthias Clasen <mclasen@redhat.com>

	* gnome-keybinding-properties.c: (setup_dialog):
	* keybinding.desktop.in.in: update icon name to use what
	gnome-icon-theme uses (bug #539338)

2008-06-21  Jens Granseuer  <jensgr@gmx.net>

	Patch by: Matthias Clasen <mclasen@redhat.com>

	* gnome-keyboard-properties.c: (main):
	* keyboard.desktop.in.in: use standard icon name from the icon naming
	spec (bug #539340)

2008-06-21  Jens Granseuer  <jensgr@gmx.net>

	Patch by: Matthias Clasen <mclasen@redhat.com>

	* gnome-window-properties.c: (main):
	* window-properties.desktop.in.in: update icon name to use what
	gnome-icon-theme uses (bug #539343)

svn path=/trunk/; revision=8767
2008-06-21 10:20:57 +00:00
Jens Granseuer
727f99a6a9 make editing the shortcut action work for custom bindings
2008-06-01  Jens Granseuer  <jensgr@gmx.net>

	* gnome-keybinding-properties.c: (create_dialog), (accel_set_func),
	(description_set_func), (keybinding_key_changed),
	(keybinding_description_changed), (clear_old_model),
	(append_keys_to_tree), (parse_start_tag),
	(append_keys_to_tree_from_file), (append_keys_to_tree_from_gconf),
	(cb_check_for_uniqueness), (accel_edited_callback),
	(accel_cleared_callback), (description_edited_callback),
	(real_start_editing_cb), (start_editing_cb), (setup_dialog):
	make editing the shortcut action work for custom bindings

svn path=/trunk/; revision=8740
2008-06-01 15:00:18 +00:00
Jens Granseuer
c1c3dc2067 add initial support for editing custom shortcuts (bug #114796).
2008-05-31  Jens Granseuer  <jensgr@gmx.net>

	* gnome-keybinding-properties.c: (append_keys_to_tree),
	(parse_start_tag), (append_keys_to_tree_from_file),
	(append_keys_to_tree_from_gconf), (reload_key_entries): add
	initial support for editing custom shortcuts (bug #114796).
	Adding/deleting shortcuts is not yet possible

svn path=/trunk/; revision=8737
2008-05-31 12:54:37 +00:00
Jens Granseuer
40ebc083ce get rid of unneeded sort model indirection
2008-04-01  Jens Granseuer  <jensgr@gmx.net>

	* gnome-keybinding-properties.c: (get_real_model), (clear_old_model),
	(append_keys_to_tree), (accel_edited_callback): get rid of unneeded
	sort model indirection

svn path=/trunk/; revision=8624
2008-04-01 19:24:43 +00:00
Bastien Nocera
e80c1a853b Fix category headers not appearing properly in the treeview when using a
2008-03-31  Bastien Nocera  <hadess@hadess.net>

        * gnome-keybinding-properties.c (append_keys_to_tree_from_file):
	Fix category headers not appearing properly in the
	treeview when using a non-UTF-8 locale (Closes: #513988)


svn path=/trunk/; revision=8613
2008-03-31 12:20:14 +00:00
Jens Granseuer
3d19d6f56d stop widget accelerators from activating while the user is entering a new
2008-03-15  Jens Granseuer  <jensgr@gmx.net>

	* gnome-keybinding-properties.c: (accel_edited_callback),
	(accel_cleared_callback), (start_editing_cb),
	(maybe_block_accels), (setup_dialog): stop widget accelerators
	from activating while the user is entering a new shortcut. This
	allows binding shortcuts that are used as accels in the capplet
	dialog, e.g. for the Help and Close buttons (bug #313228)

svn path=/trunk/; revision=8581
2008-03-14 23:23:57 +00:00
Jens Granseuer
c751e9191c remove debugging output
2008-03-14  Jens Granseuer  <jensgr@gmx.net>

	* gnome-keybinding-properties.c: (append_keys_to_tree_from_file):
	remove debugging output

svn path=/trunk/; revision=8580
2008-03-14 20:00:49 +00:00
Bastien Nocera
314fc15bdd reviewed by: Jens Granseuer <jensgr@gmx.net>
2007-08-05  Bastien Nocera  <hadess@hadess.net>

	reviewed by: Jens Granseuer <jensgr@gmx.net>

	* gnome-keybinding-properties.c: (keyval_is_forbidden),
	(accel_edited_callback): Make the arrows and tabs unbindable
	without a modifier (Closes: #463433)


svn path=/trunk/; revision=7962
2007-08-04 23:11:42 +00:00
Jens Granseuer
0eb282cfa1 fix GConf notification
2007-06-14  Jens Granseuer  <jensgr@gmx.net>

	* gnome-keybinding-properties.c: (setup_dialog): fix GConf
	notification

svn path=/trunk/; revision=7724
2007-06-14 19:47:28 +00:00
Jens Granseuer
bb29ad69ee add g_thread_init as required by glib
2007-05-02  Jens Granseuer  <jensgr@gmx.net>

	* gnome-keybinding-properties.c: (main): add g_thread_init as
	required by glib

svn path=/trunk/; revision=7542
2007-05-02 18:48:25 +00:00
Bastien Nocera
dddfaa2a2a Prepend the directory name before loading the files, otherwise, we're
2007-03-21  Bastien Nocera  <hadess@hadess.net>

	* gnome-keybinding-properties.c: (reload_key_entries):
	Prepend the directory name before loading the files, otherwise, we're
	loading them from the current directory, spotted by Fernando Herrera
	<fherrera@onirica.com> (Closes: #420796)


svn path=/trunk/; revision=7411
2007-03-21 19:01:27 +00:00
Bastien Nocera
b7e17af415 Fix the path from which we'd load the keybindings
2007-03-19  Bastien Nocera  <hadess@hadess.net>

	* Makefile.am:
	* gnome-keybinding-properties.c: (reload_key_entries):
	Fix the path from which we'd load the keybindings


svn path=/trunk/; revision=7398
2007-03-19 15:23:33 +00:00
Bastien Nocera
fc29de6d6b Make all the keybindings be external to the keybindings capplet itself.
2007-03-19  Bastien Nocera  <hadess@hadess.net>

	* capplets/keybindings/00-multimedia-key.xml.in:
	* capplets/keybindings/01-desktop-key.xml.in:
	* capplets/keybindings/50-metacity-desktop-key.xml.in:
	* capplets/keybindings/50-metacity-key.xml.in:
	* capplets/keybindings/Makefile.am:
	* capplets/keybindings/gnome-keybinding-properties.c:
	(create_dialog), (should_show_key), (count_rows_foreach),
	(ensure_scrollbar), (append_keys_to_tree), (parse_start_tag),
	(append_keys_to_tree_from_file), (reload_key_entries),
	(setup_dialog):
	* po/POTFILES.in: Make all the keybindings be external to the keybindings
	capplet itself. This allows applications to add their own keybindings
	without recompilation (Closes: #410758)


svn path=/trunk/; revision=7397
2007-03-19 15:14:06 +00:00
Jens Granseuer
3041f4bda8 clear GConf client cache before reloading since cached values don't pass
2007-02-19  Jens Granseuer  <jensgr@gmx.net>

	* gnome-keybinding-properties.c: (clear_old_model): clear GConf client
	cache before reloading since cached values don't pass the schema name
	along which can make entries vanish from the list (fixes bug 394776)

svn path=/trunk/; revision=7309
2007-02-19 17:35:34 +00:00
Mariano Suárez-Alvarez
a9b2d9ed9f added gconf:/apps/metacity/global_keybindings/cycle_group
2007-02-08  Mariano Suárez-Alvarez  <mariano@gnome.org>

	* gnome-keybinding-properties.c (metacity_key_list): added 
	gconf:/apps/metacity/global_keybindings/cycle_group


svn path=/trunk/; revision=7263
2007-02-08 17:57:07 +00:00
Mariano Suárez-Alvarez
7dca4de3e2 organize the way things a cleared at exit time so as to avoid warnings.
2007-02-07  Mariano Suárez-Alvarez  <mariano@gnome.org>

	* gnome-keybinding-properties.c (clear_old_model, reload_key_entries,
	cb_dialog_response, setup_dialog, main): organize the way things a cleared
	at exit time so as to avoid warnings. (fixes bug 405175)



svn path=/trunk/; revision=7255
2007-02-07 18:34:49 +00:00
Jens Granseuer
7aa1cede0d clean up sorting to not use an imaginary column; change accel sort order
2007-02-04  Jens Granseuer  <jensgr@gmx.net>

	* gnome-keybinding-properties.c: (keyentry_sort_func),
	(clear_old_model), (setup_dialog): clean up sorting to not use an
	imaginary column; change accel sort order to move disabled actions
	to the back of the list and also speed up sorting a bit

svn path=/trunk/; revision=7243
2007-02-04 15:47:49 +00:00
Jens Granseuer
765e80f953 support localized key names (interim fix for #145346)
2007-02-04  Jens Granseuer  <jensgr@gmx.net>

	* eggaccelerators.c: (egg_virtual_accelerator_name),
	(egg_virtual_accelerator_label):
	* eggaccelerators.h:
	* eggcellrendererkeys.c: (convert_keysym_state_to_string):
	* gnome-keybinding-properties.c: (binding_name),
	(accel_edited_callback): support localized key names (interim fix
	for #145346)

svn path=/trunk/; revision=7242
2007-02-04 13:46:41 +00:00
Jens Granseuer
09076c4e27 filter out CapsLock modifiers since it's otherwise possible to set the
2007-02-03  Jens Granseuer  <jensgr@gmx.net>

	* gnome-keybinding-properties.c: (accel_edited_callback): filter
	out CapsLock modifiers since it's otherwise possible to set the
	same accel for several actions (fixes #350424)

svn path=/trunk/; revision=7232
2007-02-02 23:22:15 +00:00
Jens Granseuer
1f8280c0a7 blacklist numbers, space, and tab as accels (fixes #359092)
2007-02-02  Jens Granseuer  <jensgr@gmx.net>

	* gnome-keybinding-properties.c: (accel_edited_callback): blacklist
	numbers, space, and tab as accels (fixes #359092)

svn path=/trunk/; revision=7231
2007-02-02 22:02:44 +00:00
Christian Persch
43d40d7a0a Don't define directories in configure. Remove some obsolete defines, and
2007-02-02  Christian Persch  <chpe@svn.gnome.org>

	* Makefile.am:
	* capplets/about-me/Makefile.am:
	* capplets/about-me/gnome-about-me-password.c: (passdlg_init):
	* capplets/about-me/gnome-about-me.c: (about_me_setup_dialog):
	* capplets/accessibility/at-properties/Makefile.am:
	* capplets/accessibility/keyboard/Makefile.am:
	* capplets/accessibility/keyboard/accessibility-keyboard.c:
	(setup_accessX_dialog):
	* capplets/background/Makefile.am:
	* capplets/background/gnome-wp-capplet.c: (gnome_wp_create_dialog):
	* capplets/common/Makefile.am:
	* capplets/common/capplet-util.c: (capplet_set_icon):
	* capplets/default-applications/Makefile.am:
	* capplets/display/Makefile.am:
	* capplets/file-types/Makefile.am:
	* capplets/file-types/file-types-capplet.c: (create_dialog):
	* capplets/file-types/mime-category-edit-dialog.c:
	(mime_category_edit_dialog_init):
	* capplets/file-types/mime-edit-dialog.c: (mime_edit_dialog_init):
	* capplets/file-types/service-edit-dialog.c:
	(service_edit_dialog_init):
	* capplets/font/Makefile.am:
	* capplets/keybindings/Makefile.am:
	* capplets/keybindings/gnome-keybinding-properties.c:
	(create_dialog):
	* capplets/keyboard/Makefile.am:
	* capplets/keyboard/gnome-keyboard-properties-xkblt.c:
	(xkb_layout_choose):
	* capplets/keyboard/gnome-keyboard-properties-xkbmc.c:
	(choose_model):
	* capplets/keyboard/gnome-keyboard-properties.c: (create_dialog):
	* capplets/localization/Makefile.am:
	* capplets/localization/gnome-localization-properties.c:
	(create_dialog):
	* capplets/mime-type/Makefile.am:
	* capplets/mouse/Makefile.am:
	* capplets/mouse/gnome-mouse-properties.c: (create_dialog):
	* capplets/network/Makefile.am:
	* capplets/network/gnome-network-preferences.c:
	(cb_http_details_button_clicked), (main):
	* capplets/rollback/Makefile.am:
	* capplets/sound/Makefile.am:
	* capplets/sound/sound-properties-capplet.c: (create_dialog),
	(device_test_button_clicked):
	* capplets/theme-switcher/Makefile.am:
	* capplets/ui-properties/Makefile.am:
	* capplets/ui-properties/gnome-ui-properties.c: (create_dialog):
	* capplets/url-properties/Makefile.am:
	* capplets/windows/Makefile.am:
	* capplets/wm-properties/wm-desktops/Makefile.am:
	* configure.in:
	* gnome-settings-daemon/Makefile.am:
	* gnome-settings-daemon/actions/Makefile.am:
	* gnome-settings-daemon/gnome-settings-xmodmap.c:
	(gnome_settings_modmap_dialog_call):
	* gnome-settings-daemon/gnome-settings-xrdb.c:
	* gnome-settings-daemon/gsd-media-keys-window.c: (action_changed),
	(gsd_media_keys_window_init):
	* gnome-settings-daemon/xrdb/Makefile.am:
	* typing-break/Makefile.am:
	* vfs-methods/themus/Makefile.am: Don't define directories in
	configure. Remove some obsolete defines, and use the standard
	installation paths. Bug #395383.

svn path=/trunk/; revision=7226
2007-02-02 18:12:40 +00:00
Jens Granseuer
7e4de1a53c remove left-over call to gnome_theme_init(). The rest of the code dealing
2007-01-31  Jens Granseuer  <jensgr@gmx.net>

	* gnome-keybinding-properties.c: (main): remove left-over call to
	gnome_theme_init(). The rest of the code dealing with (key) themes
	has been removed back in 2004... (fixes #157452)

svn path=/trunk/; revision=7220
2007-01-31 22:30:35 +00:00
Jens Granseuer
b5d35fbfa3 issue a sensible error message when trying to use unmodified keybindings
2007-01-30  Jens Granseuer  <jensgr@gmx.net>

	* gnome-keybinding-properties.c: (accel_edited_callback): issue a
	sensible error message when trying to use unmodified keybindings
	(fixes #328152)

svn path=/trunk/; revision=7205
2007-01-30 17:01:40 +00:00
Rodrigo Moya
00b23ef1af Fixes #394824
2007-01-10  Rodrigo Moya <rodrigo@gnome-db.org>

	Fixes #394824

	Patch by Jens Granseuer <jensgr@gmx.net>

	* gnome-keybinding-properties.c (key_entry_controlling_key_changed,
	setup_dialog, main): fixed leaks.

svn path=/trunk/; revision=7129
2007-01-10 17:34:03 +00:00
Rodrigo Moya
9a20027755 moved gtk_scrolled_window_ call back to its correct place.
2007-01-08  Rodrigo Moya <rodrigo@novell.com>

	* gnome-keybinding-properties.c (create_dialog, clear_old_model):
	moved gtk_scrolled_window_ call back to its correct place.

svn path=/trunk/; revision=7103
2007-01-08 18:14:43 +00:00