From d317e2704e5aa76ae0c85eb5746f6e0f3e6f3f8a Mon Sep 17 00:00:00 2001 From: Jonathan Blandford Date: Tue, 8 Jan 2002 21:03:07 +0000 Subject: [PATCH] Add locate-pointer. Initial attempt at locate-pointer. Don't understand Tue Jan 8 15:50:59 2002 Jonathan Blandford * Makefile.am: Add locate-pointer. * gnome-settings-keyboard.c: Initial attempt at locate-pointer. Don't understand XKB enough to figure it out. * gnome-settings-locate-pointer.[ch]: Draw the locate pointer box. Pretty snazzy for a useless (but fun) feature. * gnome-settings-mouse.c: Move locate pointer to it's own file. Tue Jan 8 15:49:15 2002 Jonathan Blandford * .cvsignore: update * Makefile.am: Add gnome-keyboard-properties.c * gnome-keyboard-properties.c: New, much nicer capplet. * gnome-keyboard-properties.glade: glade file for above. * keyboard-bell.png: * keyboard-cursor.png: * keyboard-repeat.png: * keyboard-volume.png: Images for above. Note, keyboard-cursor.png is my pathetic attempt at artwork, and will prolly change in the future. Tue Jan 8 15:47:24 2002 Jonathan Blandford * .cvsignore: New ignores. * gnome-mouse-properties.glade: Update of glade file for cursors * mouse-cursor-normal-large.png: New images * mouse-cursor-normal.png: * mouse-cursor-white-large.png: * mouse-cursor-white.png: * mouse-properties-capplet.c: (setup_dialog), (create_dialog), (main): Add support for new properties. Don't fully work yet, but we'll get it later. * mouse-properties.glade: not sure what changed -- need to remove this file. --- capplets/keyboard/.cvsignore | 3 +- capplets/keyboard/ChangeLog | 13 + capplets/keyboard/Makefile.am | 12 +- capplets/keyboard/gnome-keyboard-properties.c | 300 +++++ .../keyboard/gnome-keyboard-properties.glade | 1036 +++++++++++++++++ capplets/keyboard/keyboard-bell.png | Bin 0 -> 4199 bytes capplets/keyboard/keyboard-cursor.png | Bin 0 -> 261 bytes capplets/keyboard/keyboard-repeat.png | Bin 0 -> 3852 bytes capplets/keyboard/keyboard-volume.png | Bin 0 -> 4655 bytes capplets/mouse/.cvsignore | 2 +- capplets/mouse/ChangeLog | 14 + capplets/mouse/gnome-mouse-properties.c | 71 +- capplets/mouse/gnome-mouse-properties.glade | 155 ++- capplets/mouse/mouse-cursor-normal-large.png | Bin 0 -> 251 bytes capplets/mouse/mouse-cursor-normal.png | Bin 0 -> 241 bytes capplets/mouse/mouse-cursor-white-large.png | Bin 0 -> 268 bytes capplets/mouse/mouse-cursor-white.png | Bin 0 -> 221 bytes capplets/mouse/mouse-properties-capplet.c | 71 +- capplets/mouse/mouse-properties.glade | 160 ++- gnome-settings-daemon/ChangeLog | 9 + gnome-settings-daemon/Makefile.am | 2 + .../gnome-settings-keyboard.c | 57 +- .../gnome-settings-locate-pointer.c | 220 ++++ .../gnome-settings-locate-pointer.h | 22 + gnome-settings-daemon/gnome-settings-mouse.c | 52 +- gnome-settings-daemon/gnome-settings-mouse.h | 7 - 26 files changed, 2043 insertions(+), 163 deletions(-) create mode 100644 capplets/keyboard/gnome-keyboard-properties.c create mode 100644 capplets/keyboard/gnome-keyboard-properties.glade create mode 100644 capplets/keyboard/keyboard-bell.png create mode 100644 capplets/keyboard/keyboard-cursor.png create mode 100644 capplets/keyboard/keyboard-repeat.png create mode 100644 capplets/keyboard/keyboard-volume.png create mode 100644 capplets/mouse/mouse-cursor-normal-large.png create mode 100644 capplets/mouse/mouse-cursor-normal.png create mode 100644 capplets/mouse/mouse-cursor-white-large.png create mode 100644 capplets/mouse/mouse-cursor-white.png create mode 100644 gnome-settings-daemon/gnome-settings-locate-pointer.c create mode 100644 gnome-settings-daemon/gnome-settings-locate-pointer.h diff --git a/capplets/keyboard/.cvsignore b/capplets/keyboard/.cvsignore index 38d4f5b1c..18da3f4f2 100644 --- a/capplets/keyboard/.cvsignore +++ b/capplets/keyboard/.cvsignore @@ -5,8 +5,7 @@ Makefile.in *.lo *.la *.o -keyboard-properties -keyboard-properties-capplet +gnome-keyboard-properties keyboard.desktop keyboard.desktop.in *.oaf diff --git a/capplets/keyboard/ChangeLog b/capplets/keyboard/ChangeLog index 56657848e..d02ea53f7 100644 --- a/capplets/keyboard/ChangeLog +++ b/capplets/keyboard/ChangeLog @@ -1,3 +1,16 @@ +Tue Jan 8 15:49:15 2002 Jonathan Blandford + + * .cvsignore: update + * Makefile.am: Add gnome-keyboard-properties.c + * gnome-keyboard-properties.c: New, much nicer capplet. + * gnome-keyboard-properties.glade: glade file for above. + * keyboard-bell.png: + * keyboard-cursor.png: + * keyboard-repeat.png: + * keyboard-volume.png: Images for above. Note, + keyboard-cursor.png is my pathetic attempt at artwork, and will + prolly change in the future. + 2001-12-20 Seth Nickell * keyboard.desktop.in: diff --git a/capplets/keyboard/Makefile.am b/capplets/keyboard/Makefile.am index 21bf9337c..571c6ef6d 100644 --- a/capplets/keyboard/Makefile.am +++ b/capplets/keyboard/Makefile.am @@ -1,15 +1,19 @@ bin_PROGRAMS = gnome-keyboard-properties gnome_keyboard_properties_LDADD = $(GNOMECC_CAPPLETS_LIBS) -gnome_keyboard_properties_SOURCES = keyboard-properties.c +gnome_keyboard_properties_SOURCES = gnome-keyboard-properties.c @INTLTOOL_DESKTOP_RULE@ Gladedir = $(GNOMECC_GLADE_DIR) -Glade_DATA = keyboard-properties.glade +Glade_DATA = gnome-keyboard-properties.glade -iconsdir = $(GNOMECC_ICONS_DIR) -icons_DATA = keyboard-capplet.png +iconsdir = $(GNOMECC_PIXMAPS_DIR) +icons_DATA = keyboard-capplet.png \ + keyboard-repeat.png \ + keyboard-cursor.png \ + keyboard-volume.png \ + keyboard-bell.png desktopdir = $(GNOMECC_DESKTOP_DIR) desktop_DATA = keyboard.desktop diff --git a/capplets/keyboard/gnome-keyboard-properties.c b/capplets/keyboard/gnome-keyboard-properties.c new file mode 100644 index 000000000..7b0fadf50 --- /dev/null +++ b/capplets/keyboard/gnome-keyboard-properties.c @@ -0,0 +1,300 @@ +/* -*- mode: c; style: linux -*- */ + +/* keyboard-properties.c + * Copyright (C) 2000-2001 Ximian, Inc. + * Copyright (C) 2001 Jonathan Blandford + * + * Written by: Bradford Hovinen + * Richard Hestilow + * Jonathan Blandford + * + * 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 +#endif + +#include +#include +#include + +#include "capplet-util.h" +#include "gconf-property-editor.h" + +static GladeXML * +create_dialog (void) +{ + GladeXML *dialog; + + dialog = glade_xml_new (GNOMECC_DATA_DIR "/interfaces/gnome-keyboard-properties.glade", "keyboard_dialog", NULL); + + return dialog; +} + +static GConfValue * +rate_to_widget (GConfValue *value) +{ + GConfValue *new_value; + int rate; + + rate = gconf_value_get_int (value); + + new_value = gconf_value_new (GCONF_VALUE_INT); + + if (rate >= (255 + 192) / 2) + gconf_value_set_int (new_value, 0); + else if (rate >= (192 + 64) / 2) + gconf_value_set_int (new_value, 1); + else if (rate >= (64 + 1) / 2) + gconf_value_set_int (new_value, 2); + else + gconf_value_set_int (new_value, 3); + + return new_value; +} + +static GConfValue * +rate_from_widget (GConfValue *value) +{ + static int rates[] = { + 255, 192, 64, 1 + }; + + GConfValue *new_value; + + new_value = gconf_value_new (GCONF_VALUE_INT); + gconf_value_set_int (new_value, rates[gconf_value_get_int (value)]); + return new_value; +} + +static GConfValue * +delay_to_widget (GConfValue *value) +{ + GConfValue *new_value; + int delay; + + delay = gconf_value_get_int (value); + + new_value = gconf_value_new (GCONF_VALUE_INT); + + if (delay >= (1000 + 700) / 2) + gconf_value_set_int (new_value, 0); + else if (delay >= (700 + 300) / 2) + gconf_value_set_int (new_value, 1); + else if (delay >= (300) / 2) + gconf_value_set_int (new_value, 2); + else + gconf_value_set_int (new_value, 3); + + return new_value; +} + +static GConfValue * +delay_from_widget (GConfValue *value) +{ + static int delays[] = { + 1000, 700, 300, 0 + }; + + GConfValue *new_value; + + new_value = gconf_value_new (GCONF_VALUE_INT); + gconf_value_set_int (new_value, delays[gconf_value_get_int (value)]); + return new_value; +} + +static GConfEnumStringPair bell_enums[] = { + { 0, "custom" }, + { 1, "on" }, + { 2, "off" } +}; + +static GConfValue * +bell_from_widget (GConfValue *value) +{ + GConfValue *new_value; + + new_value = gconf_value_new (GCONF_VALUE_STRING); + gconf_value_set_string (new_value, + gconf_enum_to_string (bell_enums, gconf_value_get_int (value))); + + return new_value; +} + +static GConfValue * +bell_to_widget (GConfValue *value) +{ + GConfValue *new_value; + gint val = 2; + + new_value = gconf_value_new (GCONF_VALUE_INT); + gconf_string_to_enum (bell_enums, + gconf_value_get_string (value), + &val); + gconf_value_set_int (new_value, val); + + return new_value; +} + +static void +bell_guard (GtkWidget *toggle, + GladeXML *dialog) +{ + gtk_widget_set_sensitive (WID ("bell_custom_fileentry"), GTK_TOGGLE_BUTTON (toggle)->active); +} + +gboolean +mnemonic_activate (GtkWidget *toggle, + gboolean group_cycling, + GtkWidget *entry) +{ + if (! group_cycling) + gtk_widget_grab_focus (entry); + return FALSE; +} + +static void +setup_dialog (GladeXML *dialog, + GConfChangeSet *changeset) +{ + GObject *peditor; + GnomeProgram *program; + gchar *filename; + + /* load all the images */ + program = gnome_program_get (); + filename = gnome_program_locate_file (program, GNOME_FILE_DOMAIN_APP_PIXMAP, "keyboard-repeat.png", TRUE, NULL); + gtk_image_set_from_file (GTK_IMAGE (WID ("repeat_image")), filename); + g_free (filename); + filename = gnome_program_locate_file (program, GNOME_FILE_DOMAIN_APP_PIXMAP, "keyboard-cursor.png", TRUE, NULL); + gtk_image_set_from_file (GTK_IMAGE (WID ("cursor_image")), filename); + g_free (filename); + filename = gnome_program_locate_file (program, GNOME_FILE_DOMAIN_APP_PIXMAP, "keyboard-volume.png", TRUE, NULL); + gtk_image_set_from_file (GTK_IMAGE (WID ("volume_image")), filename); + g_free (filename); + filename = gnome_program_locate_file (program, GNOME_FILE_DOMAIN_APP_PIXMAP, "keyboard-bell.png", TRUE, NULL); + gtk_image_set_from_file (GTK_IMAGE (WID ("bell_image")), filename); + g_free (filename); + + peditor = gconf_peditor_new_boolean + (NULL, "/desktop/gnome/peripherals/keyboard/repeat", WID ("repeat_toggle"), NULL); + gconf_peditor_widget_set_guard (GCONF_PROPERTY_EDITOR (peditor), WID ("repeat_table")); + + gconf_peditor_new_select_menu + (NULL, "/gnome/desktop/peripherals/keyboard/delay", WID ("repeat_delay_omenu"), + "conv-to-widget-cb", delay_to_widget, + "conv-from-widget-cb", delay_from_widget, + NULL); + + gconf_peditor_new_select_menu + (NULL, "/gnome/desktop/peripherals/keyboard/rate", WID ("repeat_speed_omenu"), + "conv-to-widget-cb", rate_to_widget, + "conv-from-widget-cb", rate_from_widget, + NULL); + + peditor = gconf_peditor_new_boolean + (NULL, "/desktop/gnome/interface/cursor_blink", WID ("cursor_toggle"), NULL); + gconf_peditor_widget_set_guard (GCONF_PROPERTY_EDITOR (peditor), WID ("cursor_hbox")); + gconf_peditor_new_numeric_range + (NULL, "/desktop/gnome/interface/cursor_blink_time", WID ("cursor_blink_time_scale"), NULL); + + + peditor = gconf_peditor_new_boolean + (NULL, "/desktop/gnome/peripherals/keyboard/click", WID ("volume_toggle"), NULL); + gconf_peditor_widget_set_guard (GCONF_PROPERTY_EDITOR (peditor), WID ("volume_hbox")); + gconf_peditor_new_numeric_range + (NULL, "/desktop/gnome/peripherals/keyboard/clickvolume", WID ("volume_scale"), NULL); + + g_signal_connect (G_OBJECT (WID ("bell_custom_radio")), "toggled", (GCallback) bell_guard, dialog); + peditor = gconf_peditor_new_select_radio + (NULL, "/desktop/gnome/peripherals/keyboard/bell_mode", + gtk_radio_button_get_group (GTK_RADIO_BUTTON (WID ("bell_disabled_radio"))), + "conv-to-widget-cb", bell_to_widget, + "conv-from-widget-cb", bell_from_widget, + NULL); + g_signal_connect (G_OBJECT (WID ("bell_custom_radio")), "mnemonic_activate", (GCallback) mnemonic_activate, WID ("bell_custom_entry")); + +} + +static void +get_legacy_settings (void) +{ + GConfClient *client; + gboolean val_bool, def; + gulong val_int; + + client = gconf_client_get_default (); + + COPY_FROM_LEGACY (bool, "/gnome/desktop/peripherals/keyboard/repeat", "/Desktop/Keyboard/repeat=true"); + COPY_FROM_LEGACY (bool, "/gnome/desktop/peripherals/keyboard/click", "/Desktop/Keyboard/click=true"); + COPY_FROM_LEGACY (int, "/gnome/desktop/peripherals/keyboard/rate", "/Desktop/Keyboard/rate=30"); + COPY_FROM_LEGACY (int, "/gnome/desktop/peripherals/keyboard/delay", "/Desktop/Keyboard/delay=500"); + COPY_FROM_LEGACY (int, "/gnome/desktop/peripherals/keyboard/volume", "/Desktop/Keyboard/clickvolume=0"); + COPY_FROM_LEGACY (int, "/gnome/desktop/peripherals/keyboard/bell_volume", "/Desktop/Bell/percent=50"); + COPY_FROM_LEGACY (int, "/gnome/desktop/peripherals/keyboard/bell_pitch", "/Desktop/Bell/pitch=50"); + COPY_FROM_LEGACY (int, "/gnome/desktop/peripherals/keyboard/bell_duration", "/Desktop/Bell/duration=100"); +} + + +int +main (int argc, char **argv) +{ + GConfClient *client; + GConfChangeSet *changeset; + GladeXML *dialog; + GtkWidget *dialog_win; + + static gboolean apply_only; + static gboolean get_legacy; + static struct poptOption cap_options[] = { + { "apply", '\0', POPT_ARG_NONE, &apply_only, 0, + N_("Just apply settings and quit (compatibility only; now handled by daemon)"), NULL }, + { "init-session-settings", '\0', POPT_ARG_NONE, &apply_only, 0, + N_("Just apply settings and quit (compatibility only; now handled by daemon)"), NULL }, + { "get-legacy", '\0', POPT_ARG_NONE, &get_legacy, 0, + N_("Retrieve and store legacy settings"), NULL }, + { NULL, '\0', 0, NULL, 0, NULL, NULL } + }; + + bindtextdomain (PACKAGE, GNOMELOCALEDIR); + bind_textdomain_codeset (PACKAGE, "UTF-8"); + textdomain (PACKAGE); + + gnome_program_init (argv[0], VERSION, LIBGNOMEUI_MODULE, argc, argv, + GNOME_PARAM_POPT_TABLE, cap_options, + GNOME_PARAM_APP_DATADIR, GNOMECC_DATA_DIR, + NULL); + + client = gconf_client_get_default (); + gconf_client_add_dir (client, "/desktop/gnome/peripherals/keyboard", GCONF_CLIENT_PRELOAD_ONELEVEL, NULL); + gconf_client_add_dir (client, "/desktop/gnome/interface", GCONF_CLIENT_PRELOAD_ONELEVEL, NULL); + + if (get_legacy) { + get_legacy_settings (); + } else { + changeset = gconf_change_set_new (); + dialog = create_dialog (); + setup_dialog (dialog, changeset); + + gtk_widget_show_all (WID ("keyboard_dialog")); + gtk_main (); + + gconf_change_set_unref (changeset); + } + + return 0; +} diff --git a/capplets/keyboard/gnome-keyboard-properties.glade b/capplets/keyboard/gnome-keyboard-properties.glade new file mode 100644 index 000000000..a87a1e875 --- /dev/null +++ b/capplets/keyboard/gnome-keyboard-properties.glade @@ -0,0 +1,1036 @@ + + + + + + + + Keyboard Properties + GTK_WINDOW_TOPLEVEL + no + no + no + no + GTK_WIN_POS_NONE + + + + no + 8 + yes + + + + GTK_BUTTONBOX_END + 8 + yes + + + + yes + yes + yes + gtk-help + yes + yes + + + + + + yes + yes + Done + yes + + + + + 0 + no + yes + GTK_PACK_END + + + + + + yes + yes + yes + GTK_POS_TOP + no + 2 + 2 + no + yes + + + + 4 + no + 4 + yes + + + + Repeat Rate + 0 + GTK_SHADOW_ETCHED_IN + yes + + + + 8 + no + 8 + yes + + + + no + 0 + yes + + + + 0.5 + 0.5 + 0 + 0 + yes + + + 0 + no + no + + + + + 0 + no + yes + + + + + + no + 4 + yes + + + + yes + Keyboard _repeats when key is held down + no + yes + yes + yes + + + 0 + no + no + + + + + + no + 4 + 4 + 2 + 2 + yes + + + + _Delay before repeating: + GTK_JUSTIFY_CENTER + no + 0 + 0.5 + 0 + 0 + repeat_delay_omenu + yes + yes + + + 0 + 1 + 0 + 1 + 0 + 0 + fill + + + + + + + Repeat s_peed: + GTK_JUSTIFY_CENTER + no + 0 + 0.5 + 0 + 0 + repeat_speed_omenu + yes + yes + + + 0 + 1 + 1 + 2 + 0 + 0 + fill + + + + + + + yes + 0 + yes + + + + yes + + + + yes + + + + Very long + 0.0 + convertwidget2 + yes + yes + + + + + + + + yes + + + + Long + 0.0 + convertwidget3 + yes + yes + + + + + + + + yes + + + + Medium + 0.0 + convertwidget4 + yes + yes + + + + + + + + yes + + + + Short + 0.0 + convertwidget5 + yes + yes + + + + + + + + + 1 + 2 + 0 + 1 + 0 + 0 + expand|fill + expand + + + + + + yes + 0 + yes + + + + yes + + + + yes + + + + Very fast + 0.0 + convertwidget11 + yes + yes + + + + + + + + yes + + + + Fast + 0.0 + convertwidget12 + yes + yes + + + + + + + + yes + + + + Medium + 0.0 + convertwidget13 + yes + yes + + + + + + + + yes + + + + Slow + 0.0 + convertwidget14 + yes + yes + + + + + + + + + 1 + 2 + 1 + 2 + 0 + 0 + fill + + + + + + 0 + no + yes + + + + + 0 + yes + yes + + + + + + + 0 + yes + yes + + + + + + Cursor + 0 + GTK_SHADOW_ETCHED_IN + yes + + + + 8 + no + 8 + yes + + + + no + 0 + yes + + + + 0.5 + 0.5 + 0 + 0 + yes + + + 0 + no + no + + + + + 0 + no + yes + + + + + + no + 8 + yes + + + + no + 4 + yes + + + + yes + _Cursor blinks in text fields + no + yes + yes + yes + + + 0 + no + no + + + + + + no + 4 + yes + + + + _Blink speed: + cursor_blink_time_scale + GTK_JUSTIFY_CENTER + no + 0.5 + 0.5 + 0 + 0 + yes + yes + + + 0 + no + no + + + + + + <i>slow</i> + yes + GTK_JUSTIFY_CENTER + no + 0.5 + 0.5 + 0 + 0 + yes + + + 0 + no + no + + + + + + yes + no + GTK_POS_TOP + 1 + yes + 100 100 2500 200 200 200 + + + 0 + yes + yes + + + + + + <i>fast</i> + yes + GTK_JUSTIFY_CENTER + no + 0.5 + 0.5 + 0 + 0 + yes + + + 0 + no + no + + + + + 0 + yes + yes + + + + + 0 + no + no + + + + + + Set the speed the cursor blinks in text fields. + GTK_JUSTIFY_LEFT + yes + 0 + 0.5 + 0 + 0 + yes + + + 0 + yes + yes + + + + + 0 + yes + yes + + + + + + + 0 + yes + yes + + + + + + + + _Keyboard + GTK_JUSTIFY_CENTER + no + 0.5 + 0.5 + 0 + 0 + yes + yes + + + tab + + + + + + 4 + no + 4 + yes + + + + Keyclick Volume + 0 + GTK_SHADOW_ETCHED_IN + yes + + + + 8 + no + 8 + yes + + + + no + 0 + yes + + + + 0.5 + 0.5 + 0 + 0 + yes + + + 0 + no + no + + + + + 0 + no + yes + + + + + + no + 8 + yes + + + + no + 4 + yes + + + + yes + Key_press makes sound + no + yes + yes + yes + + + 0 + no + no + + + + + + no + 4 + yes + + + + _Volume: + volume_scale + GTK_JUSTIFY_CENTER + no + 0.5 + 0.5 + 0 + 0 + yes + yes + + + 0 + no + no + + + + + + <i>quiet</i> + yes + GTK_JUSTIFY_CENTER + no + 0.5 + 0.5 + 0 + 0 + yes + + + 0 + no + no + + + + + + yes + no + GTK_POS_TOP + 1 + yes + 0 -100 100 20 20 20 + + + 0 + yes + yes + + + + + + <i>loud</i> + yes + GTK_JUSTIFY_CENTER + no + 0.5 + 0.5 + 0 + 0 + yes + + + 0 + no + no + + + + + 0 + no + no + + + + + 0 + no + yes + + + + + + Set the volume of the clicking sound made when pressing a key + GTK_JUSTIFY_LEFT + yes + 0 + 0.5 + 0 + 0 + yes + + + 0 + yes + yes + + + + + 0 + yes + yes + + + + + + + 0 + yes + yes + + + + + + Keyboard Bell + 0 + GTK_SHADOW_ETCHED_IN + yes + + + + 8 + no + 8 + yes + + + + no + 0 + yes + + + + 0.5 + 0.5 + 0 + 0 + yes + + + 0 + no + no + + + + + 0 + no + yes + + + + + + no + 8 + yes + + + + no + 4 + yes + + + + yes + Keyboard bell _off + yes + no + yes + yes + + + 0 + no + no + + + + + + yes + Keyboard bell _enabled + yes + no + yes + yes + bell_disabled_radio + + + 0 + no + no + + + + + + no + 4 + yes + + + + yes + _Custom keyboard bell: + yes + no + yes + yes + bell_disabled_radio + + + 0 + no + no + + + + + + no + no + yes + no + + + + yes + yes + + 0 + yes + yes + + + + + 0 + yes + yes + + + + + 0 + no + no + + + + + 0 + no + yes + + + + + + The keyboard bell is the <i>beep</i> sound heard when the system wants to get your attention. You can select a custom sound file to play instead of the traditional beeping noise. + GTK_JUSTIFY_LEFT + yes + yes + 0 + 0.5 + 0 + 0 + yes + + + 0 + yes + yes + + + + + 0 + yes + yes + + + + + + + 0 + yes + yes + + + + + + + + _Sound + GTK_JUSTIFY_CENTER + no + 0.5 + 0.5 + 0 + 0 + yes + yes + + + tab + + + + + 0 + yes + yes + + + + + 4 + yes + yes + + + + diff --git a/capplets/keyboard/keyboard-bell.png b/capplets/keyboard/keyboard-bell.png new file mode 100644 index 0000000000000000000000000000000000000000..01211339a4c17ab4bad2b7f6c08684332b67c8e0 GIT binary patch literal 4199 zcmV-t5SZ_YP)Brh$?7h`n5qE6?K?PA(StN)`fDp1LBtZ7bHks{R?jIw55CVeQ z<&Qq|&%EdS=Dg2y&iOra7WgOri68#G34C3A2y6ic0>WkDBw*B+#Qa^b2e=-18(4Ok zxbeUTKG16yoZlDCX?yt(|QdqhAuKtQY zxq_eO0`;GL&jSv8Q=GmOR;vX?u@V#OA$>>+qjIl>NHVSiUIVJHpqbsk8|OXWKx9o;-eTkOq!g}4L5!pcXSk(CQerr4*M7RO&B}z1tOym z3$%Pj?tD(>dC!HwZ-Bx5z5i0CLZKk0Y2bEyaN1qy zhJhqWgu`JJMPbZ{+}i;eI1L;HYHt1htvvtS^XHmQ0kqHR-zPE(W4|#0vMhrDcDtP$ z7A|1gw8?m)qfrzUMNyGN0h_~#-R2||3?d357DdJ)TT!ekf*=sq!VJwAdSTNd@Jrx! zKm|4evw+)xcl+gXHN*u$KokX{+%5{gyNHST<3R+~YQtf7B3mrjR0UCziE_FDFeC|^ z!+~N^cxLUBmf16I3j2IM1|_z>%=diYQ()UAIb98T1X!|c z5p(CyArR=pX0xLzDvDwwE+(FqwicStG!q>g!_D7WGzyp{2xQB$eA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aE tdp9SJUiFea;+vhHx9r>X(0sxLHno{5v6@NKt^wW0;OXk;vd$@?2>?8wSwR2* literal 0 HcmV?d00001 diff --git a/capplets/keyboard/keyboard-repeat.png b/capplets/keyboard/keyboard-repeat.png new file mode 100644 index 0000000000000000000000000000000000000000..58a33770e67e60817ddbd85faeee8534d6f896fe GIT binary patch literal 3852 zcmV+n5A*PeP)bv}`GN9l?A6^rQ#YXL9 zBIUe`&wop_zjWcMwaZn@a!f1f&9_qNb=C9cR1xy6iFM8i)pS@@%dk~=(5E)uES9O5a*iDvF^5Y+;GDUNGTCQ5HJJ8<8c`u z8*N{;^8H)-`}@BQ$iG&=JMlnPC>&gS!{1)N?z+FZW^yPHHlz!Iph-u22hZ-@#peI` z9?5uuGq0Uv=^aZM7#iT!y|1Du3IM7qNF?HX@t)5q@l?DtXc*T6KjmG>g7OaTx%}%7 ze`Wp0Zo6fUt{R4^hX|ShqFFhdYigo+`ZP+WmtyDvw*F)*S6+D~)z#Ik|A+NxLc`Dv znwy%q`|i)s)YeQO6d;lvnOn1bVddNX>74nq-$`tLG6P0_e*TB9zwU!8_aCU$CQr&o z(+rG25LMHuuBzhrkp>=o;6Xgs!^h_fU-$x!;~)??ZiZ8*PxAGzZX}&aF}#K)?mS?3Zho$a4aIcRG$%NY8_CJdo-Kr0rs?WfS$Xl<-rj-ERKgkol7RQ-0N>UF zs-o81d*8j=zx1zPnid<5ak#FIfMy&6?f z(KVG#n;v7&?q89WlSNi`1kaUtj!Pnups%Ozm3fP+ZVU#4l`rqEyYc1^-}r%&@{(yw zmMr!)HRLp%YZ}=1>OL!DS*_1K`&?~Lch4~J3ee6Uc;{^e6c-i$*H3=>laDW)zfcQ= z0;ob|U|^7a`}cC-z#+=YiYYCf!K~R81OovKGXMx;!^3R-(T~|%yO(Jtg=m^aDw!me zOk;+1tW<`EW2X|qQ1HO?;*yFxK6QKHr@wcQUAz8=!NCEhl}*J^HTnl)B$IKZ>(kbJo^;w`;pLaH_WEm_ z(z0?r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JqV1NGG*%QC7)XUt3wAn8%xz1%8=AY zBUqNCySsx#Uy4F8OSMu&YmHMamy`Y72W{J~ji|IBgm66Yt_Qy4^_}v=O7De6hh6Ldw$?i9IF3&UVGAKrKuicR%pQKv5W@p(Xsw4s zP!8WmYhCle+r!{JFBHA=qPK_*02%M^lGfTjVh%ie%QX_v$H<9cFGw$u{T>Adyl#vD zX^tq$nci5}yXK5wo?&(?c#~A|u4TRd53j<*hB-h@9R4DDWL&;WQp*uQ%@NEr9N*GA z>JiuU2mvV$^Qe1R9=M+FvAv_?88s~ChLZlz@U4X!G26qy<%r~zBgVQTyrB;>VB}Gc lV5Z?Z{P5=w@AzQke*wQ=gv0)rv10%L002ovPDHLkV1mHl9i{*P literal 0 HcmV?d00001 diff --git a/capplets/mouse/.cvsignore b/capplets/mouse/.cvsignore index ee1369d6f..1ffabe228 100644 --- a/capplets/mouse/.cvsignore +++ b/capplets/mouse/.cvsignore @@ -5,7 +5,7 @@ Makefile.in *.o *.lo *.la -mouse-properties-capplet +gnome-mouse-properties mouse.desktop mouse.desktop.in *.oaf \ No newline at end of file diff --git a/capplets/mouse/ChangeLog b/capplets/mouse/ChangeLog index f460dfa45..d0219fd1a 100644 --- a/capplets/mouse/ChangeLog +++ b/capplets/mouse/ChangeLog @@ -1,3 +1,17 @@ +Tue Jan 8 15:47:24 2002 Jonathan Blandford + + * .cvsignore: New ignores. + * gnome-mouse-properties.glade: Update of glade file for cursors + * mouse-cursor-normal-large.png: New images + * mouse-cursor-normal.png: + * mouse-cursor-white-large.png: + * mouse-cursor-white.png: + * mouse-properties-capplet.c: (setup_dialog), (create_dialog), + (main): Add support for new properties. Don't fully work yet, but + we'll get it later. + * mouse-properties.glade: not sure what changed -- need to remove + this file. + 2001-12-20 Seth Nickell * mouse.desktop.in: diff --git a/capplets/mouse/gnome-mouse-properties.c b/capplets/mouse/gnome-mouse-properties.c index 76f495ff2..ddcddddba 100644 --- a/capplets/mouse/gnome-mouse-properties.c +++ b/capplets/mouse/gnome-mouse-properties.c @@ -42,6 +42,13 @@ enum DOUBLE_CLICK_TEST_ON, }; +enum +{ + COLUMN_PIXBUF, + COLUMN_TEXT, + N_COLUMNS +}; + /* We use this in at least half a dozen places, so it makes sense just to * define the macro */ @@ -54,11 +61,10 @@ GdkPixbuf *right_handed_pixbuf; GdkPixbuf *double_click_on_pixbuf; GdkPixbuf *double_click_maybe_pixbuf; GdkPixbuf *double_click_off_pixbuf; - +GConfClient *client; /* State in testing the double-click speed. Global for a great deal of * convenience */ - gint double_click_state = DOUBLE_CLICK_TEST_OFF; /* normalilzation routines */ @@ -318,11 +324,15 @@ load_pixbufs (void) static void setup_dialog (GladeXML *dialog, GConfChangeSet *changeset) { - GObject *peditor; - GConfValue *value; + GObject *peditor; + GtkWidget *tree_view; + GtkTreeModel *model; + GtkCellRenderer *renderer; + GtkTreeViewColumn *column; + GtkTreeIter iter; + GConfValue *value; - /* Buttons page - */ + /* Buttons page */ /* Left-handed toggle */ peditor = gconf_peditor_new_boolean (changeset, "/desktop/gnome/peripherals/mouse/left_handed", WID ("left_handed_toggle"), NULL); @@ -336,6 +346,48 @@ setup_dialog (GladeXML *dialog, GConfChangeSet *changeset) /* Double-click time */ g_signal_connect (WID ("double_click_darea"), "expose_event", (GCallback) drawing_area_expose_event, changeset); + /* Cursors page */ + tree_view = WID ("cursor_tree"); + model = (GtkTreeModel *) gtk_list_store_new (N_COLUMNS, GDK_TYPE_PIXBUF, GTK_TYPE_STRING); + gtk_tree_view_set_model (GTK_TREE_VIEW (tree_view), model); + column = gtk_tree_view_column_new (); + renderer = gtk_cell_renderer_pixbuf_new (); + gtk_tree_view_column_pack_start (column, renderer, FALSE); + gtk_tree_view_column_set_attributes (column, renderer, + "pixbuf", COLUMN_PIXBUF, + NULL); + renderer = gtk_cell_renderer_text_new (); + gtk_tree_view_column_pack_start (column, renderer, TRUE); + gtk_tree_view_column_set_attributes (column, renderer, + "markup", COLUMN_TEXT, + NULL); + gtk_list_store_append (GTK_LIST_STORE (model), &iter); + gtk_list_store_set (GTK_LIST_STORE (model), &iter, + COLUMN_PIXBUF, gdk_pixbuf_new_from_file ("mouse-cursor-normal.png", NULL), + COLUMN_TEXT, "Default Cursor\nThe default cursor that ships with X", + -1); + gtk_list_store_append (GTK_LIST_STORE (model), &iter); + gtk_list_store_set (GTK_LIST_STORE (model), &iter, + COLUMN_PIXBUF, gdk_pixbuf_new_from_file ("mouse-cursor-white.png", NULL), + COLUMN_TEXT, "White Cursor\nThe default cursor inverted", + -1); + gtk_list_store_append (GTK_LIST_STORE (model), &iter); + gtk_list_store_set (GTK_LIST_STORE (model), &iter, + COLUMN_PIXBUF, gdk_pixbuf_new_from_file ("mouse-cursor-normal-large.png", NULL), + COLUMN_TEXT, "Large Cursor\nLarge version of normal cursor", + -1); + gtk_list_store_append (GTK_LIST_STORE (model), &iter); + gtk_list_store_set (GTK_LIST_STORE (model), &iter, + COLUMN_PIXBUF, gdk_pixbuf_new_from_file ("mouse-cursor-white-large.png", NULL), + COLUMN_TEXT, "Large White Cursor\nLarge version of white cursor", + -1); + gtk_tree_view_append_column (GTK_TREE_VIEW (tree_view), column); + + + gconf_peditor_new_boolean + (changeset, "/desktop/gnome/peripherals/mouse/locate_pointer_id", WID ("locate_pointer_toggle"), NULL); + /* Motion page */ + /* speed */ gconf_peditor_new_numeric_range (changeset, DOUBLE_CLICK_KEY, WID ("delay_scale"), "conv-to-widget-cb", double_click_from_gconf, @@ -352,6 +404,7 @@ setup_dialog (GladeXML *dialog, GConfChangeSet *changeset) (changeset, "/desktop/gnome/peripherals/mouse/motion_threshold", WID ("sensitivity_scale"), NULL); + /* DnD threshold */ gconf_peditor_new_numeric_range (changeset, "/desktop/gnome/peripherals/mouse/drag_threshold", WID ("drag_threshold_scale"), "conv-to-widget-cb", threshold_from_gconf, @@ -386,10 +439,6 @@ create_dialog (void) gtk_size_group_add_widget (size_group, WID ("slow_label")); gtk_size_group_add_widget (size_group, WID ("small_label")); - /* Remove cursors page */ - widget = glade_xml_get_widget (dialog, "main_notebook"); - gtk_notebook_remove_page (GTK_NOTEBOOK (widget), 1); - g_object_weak_ref (G_OBJECT (widget), (GWeakNotify) g_object_unref, dialog); return dialog; @@ -447,7 +496,7 @@ main (int argc, char **argv) setup_dialog (dialog, changeset); dialog_win = gtk_dialog_new_with_buttons - (_("Keyboard properties"), NULL, -1, + (_("Mouse Properties"), NULL, -1, GTK_STOCK_APPLY, GTK_RESPONSE_APPLY, GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, NULL); diff --git a/capplets/mouse/gnome-mouse-properties.glade b/capplets/mouse/gnome-mouse-properties.glade index e18b73dbf..c2a2a8216 100644 --- a/capplets/mouse/gnome-mouse-properties.glade +++ b/capplets/mouse/gnome-mouse-properties.glade @@ -312,51 +312,128 @@ - + 4 - Mouse Cursor - 0 - GTK_SHADOW_ETCHED_IN + no + 4 yes + + + Cursor Theme + 0 + GTK_SHADOW_ETCHED_IN + yes + + + + 8 + no + 8 + yes - - - 4 - no - 4 - yes - - - - yes - - - - - - You will need to restart your login session for this setting to take effect. - GTK_JUSTIFY_LEFT - yes - 0 - 0.5 - 0 - 0 - yes - - - 0 - no - no - - - - - - + + + yes + GTK_SHADOW_IN + + + yes + no + + + + + 0 + yes + yes + + + + + Note: You will need to restart your login session for this setting to take effect. + GTK_JUSTIFY_LEFT + yes + yes + 0 + 0.5 + 0 + 0 + yes + + + 0 + no + no + + + + + + + 0 + yes + yes + + + + + Locate Pointer + 0 + GTK_SHADOW_ETCHED_IN + yes + + + + 8 + no + 8 + yes + + + + yes + _Show position of cursor when Control is pressed + no + yes + yes + yes + + + + + Draws a quick box around the cursor when the control key has been pressed and released + GTK_JUSTIFY_LEFT + yes + 0 + 0.5 + 0 + 0 + yes + + + 0 + no + no + + + + + + + 0 + no + no + + + + - _Cursors + C_ursors yes GTK_JUSTIFY_CENTER no diff --git a/capplets/mouse/mouse-cursor-normal-large.png b/capplets/mouse/mouse-cursor-normal-large.png new file mode 100644 index 0000000000000000000000000000000000000000..afef4ea8e268910cc62f8ffb7b0e6c968967f244 GIT binary patch literal 251 zcmeAS@N?(olHy`uVBq!ia0vp^k|4~%1|*NXY)uAIEa{HEjtmSN`?>!lvI6;>1s;*b z3=G_YAk0{w5<>&kwKk%Ngvx~=+LEKsP+)5S5QV$RVkfm{s+Jj@qD_xzvw z`aGM}vs)&D%>O*&!>?`qR=%fwZLy2}jL77L0)Y;iEv=V0m>oStnss8yi=|I{eH3?Z^!S#-wrY9fW$XHy sPpK~c%CX0`x0KgR|J`Bq`%|V~v3NFb_Bs9iKvyw%y85}Sb4q9e07jcwga7~l literal 0 HcmV?d00001 diff --git a/capplets/mouse/mouse-cursor-normal.png b/capplets/mouse/mouse-cursor-normal.png new file mode 100644 index 0000000000000000000000000000000000000000..1d9351c808c84e5e6a609c6fdb7a8b050287f33c GIT binary patch literal 241 zcmeAS@N?(olHy`uVBq!ia0vp^k|4~%1|*NXY)uAIEa{HEjtmSN`?>!lvI6;>1s;*b z3=G_YAk0{w5<>&kwKk%Nhu!8v|n8BnOf)5S5QV$R#EXSo^_1Xv!-eDOEF za#v2G<0gAGm$R;W-YnPC`taOzB8%sF<+l+hAAQc6#Lnm$q97jBddGv6OEFTTCuM<% zQ0pZR7A?iNjI(0>U-os!aCk3>EzqOi8i7p6Rd6aeB8!-eO3FBeGH5ObNbU? i9rN$j`F!Mj3iBzh=&ynezwCf+VeoYIb6Mw<&;$UkcT(2? literal 0 HcmV?d00001 diff --git a/capplets/mouse/mouse-cursor-white-large.png b/capplets/mouse/mouse-cursor-white-large.png new file mode 100644 index 0000000000000000000000000000000000000000..8f98438a43236515f6b88b8ed9b0e51e7a371f24 GIT binary patch literal 268 zcmeAS@N?(olHy`uVBq!ia0vp^k|4~%1|*NXY)uAIEa{HEjtmSN`?>!lvI6;RN#5=* z4F5rJ!QSPQfg+p*9+AZi4BP@B%(zy0Zz)iay~NYkmHiSU2dfcVrk-jEP^i<>#WAE} z&e6*Uxeh4sFb7!w`5#}_uF0crnybWJ@$tg)tJ6LeN5z-ug=gj_JQon%;wmE0vO%E7 zAb{hfQ=$s<(g_+<+>``b7YOt!Okla`I8`$zZN9GNrN-2YmIb??1)tvk!Q$&8+kkBy z*TqiG(P_AnYjcF_!-nN;hBeYR4XRGoPFH^~W>{*nlkw;>d$Ii*@Am;6#o+1c=d#Wz Gp$P!3I$NCp literal 0 HcmV?d00001 diff --git a/capplets/mouse/mouse-cursor-white.png b/capplets/mouse/mouse-cursor-white.png new file mode 100644 index 0000000000000000000000000000000000000000..2be63acdb6e61d37dfae59f39941e8a23ba81755 GIT binary patch literal 221 zcmeAS@N?(olHy`uVBq!ia0vp^k|4~%1|*NXY)uAIEa{HEjtmSN`?>!lvI6;>1s;*b z3=G_YAk0{w5<>&kwKk%Ng@lkqL56i_I~)5S5QV$R#E2e}v&Ian^l{Q4hX zrq9J)Dv{o`*W$t2Dlf<6607=Si(lAGcr@>ZtxIcyOQRPD_f$c)MH94Kltn$90x~wW z&z9V?&E({>gx^#8SQ0p8_y1tI&^GPw6T5!T1#C~Qms)=kzi{&zEAK%at|p%!Z-MqQ Nc)I$ztaD0e0sx>BNZJ4Z literal 0 HcmV?d00001 diff --git a/capplets/mouse/mouse-properties-capplet.c b/capplets/mouse/mouse-properties-capplet.c index 76f495ff2..ddcddddba 100644 --- a/capplets/mouse/mouse-properties-capplet.c +++ b/capplets/mouse/mouse-properties-capplet.c @@ -42,6 +42,13 @@ enum DOUBLE_CLICK_TEST_ON, }; +enum +{ + COLUMN_PIXBUF, + COLUMN_TEXT, + N_COLUMNS +}; + /* We use this in at least half a dozen places, so it makes sense just to * define the macro */ @@ -54,11 +61,10 @@ GdkPixbuf *right_handed_pixbuf; GdkPixbuf *double_click_on_pixbuf; GdkPixbuf *double_click_maybe_pixbuf; GdkPixbuf *double_click_off_pixbuf; - +GConfClient *client; /* State in testing the double-click speed. Global for a great deal of * convenience */ - gint double_click_state = DOUBLE_CLICK_TEST_OFF; /* normalilzation routines */ @@ -318,11 +324,15 @@ load_pixbufs (void) static void setup_dialog (GladeXML *dialog, GConfChangeSet *changeset) { - GObject *peditor; - GConfValue *value; + GObject *peditor; + GtkWidget *tree_view; + GtkTreeModel *model; + GtkCellRenderer *renderer; + GtkTreeViewColumn *column; + GtkTreeIter iter; + GConfValue *value; - /* Buttons page - */ + /* Buttons page */ /* Left-handed toggle */ peditor = gconf_peditor_new_boolean (changeset, "/desktop/gnome/peripherals/mouse/left_handed", WID ("left_handed_toggle"), NULL); @@ -336,6 +346,48 @@ setup_dialog (GladeXML *dialog, GConfChangeSet *changeset) /* Double-click time */ g_signal_connect (WID ("double_click_darea"), "expose_event", (GCallback) drawing_area_expose_event, changeset); + /* Cursors page */ + tree_view = WID ("cursor_tree"); + model = (GtkTreeModel *) gtk_list_store_new (N_COLUMNS, GDK_TYPE_PIXBUF, GTK_TYPE_STRING); + gtk_tree_view_set_model (GTK_TREE_VIEW (tree_view), model); + column = gtk_tree_view_column_new (); + renderer = gtk_cell_renderer_pixbuf_new (); + gtk_tree_view_column_pack_start (column, renderer, FALSE); + gtk_tree_view_column_set_attributes (column, renderer, + "pixbuf", COLUMN_PIXBUF, + NULL); + renderer = gtk_cell_renderer_text_new (); + gtk_tree_view_column_pack_start (column, renderer, TRUE); + gtk_tree_view_column_set_attributes (column, renderer, + "markup", COLUMN_TEXT, + NULL); + gtk_list_store_append (GTK_LIST_STORE (model), &iter); + gtk_list_store_set (GTK_LIST_STORE (model), &iter, + COLUMN_PIXBUF, gdk_pixbuf_new_from_file ("mouse-cursor-normal.png", NULL), + COLUMN_TEXT, "Default Cursor\nThe default cursor that ships with X", + -1); + gtk_list_store_append (GTK_LIST_STORE (model), &iter); + gtk_list_store_set (GTK_LIST_STORE (model), &iter, + COLUMN_PIXBUF, gdk_pixbuf_new_from_file ("mouse-cursor-white.png", NULL), + COLUMN_TEXT, "White Cursor\nThe default cursor inverted", + -1); + gtk_list_store_append (GTK_LIST_STORE (model), &iter); + gtk_list_store_set (GTK_LIST_STORE (model), &iter, + COLUMN_PIXBUF, gdk_pixbuf_new_from_file ("mouse-cursor-normal-large.png", NULL), + COLUMN_TEXT, "Large Cursor\nLarge version of normal cursor", + -1); + gtk_list_store_append (GTK_LIST_STORE (model), &iter); + gtk_list_store_set (GTK_LIST_STORE (model), &iter, + COLUMN_PIXBUF, gdk_pixbuf_new_from_file ("mouse-cursor-white-large.png", NULL), + COLUMN_TEXT, "Large White Cursor\nLarge version of white cursor", + -1); + gtk_tree_view_append_column (GTK_TREE_VIEW (tree_view), column); + + + gconf_peditor_new_boolean + (changeset, "/desktop/gnome/peripherals/mouse/locate_pointer_id", WID ("locate_pointer_toggle"), NULL); + /* Motion page */ + /* speed */ gconf_peditor_new_numeric_range (changeset, DOUBLE_CLICK_KEY, WID ("delay_scale"), "conv-to-widget-cb", double_click_from_gconf, @@ -352,6 +404,7 @@ setup_dialog (GladeXML *dialog, GConfChangeSet *changeset) (changeset, "/desktop/gnome/peripherals/mouse/motion_threshold", WID ("sensitivity_scale"), NULL); + /* DnD threshold */ gconf_peditor_new_numeric_range (changeset, "/desktop/gnome/peripherals/mouse/drag_threshold", WID ("drag_threshold_scale"), "conv-to-widget-cb", threshold_from_gconf, @@ -386,10 +439,6 @@ create_dialog (void) gtk_size_group_add_widget (size_group, WID ("slow_label")); gtk_size_group_add_widget (size_group, WID ("small_label")); - /* Remove cursors page */ - widget = glade_xml_get_widget (dialog, "main_notebook"); - gtk_notebook_remove_page (GTK_NOTEBOOK (widget), 1); - g_object_weak_ref (G_OBJECT (widget), (GWeakNotify) g_object_unref, dialog); return dialog; @@ -447,7 +496,7 @@ main (int argc, char **argv) setup_dialog (dialog, changeset); dialog_win = gtk_dialog_new_with_buttons - (_("Keyboard properties"), NULL, -1, + (_("Mouse Properties"), NULL, -1, GTK_STOCK_APPLY, GTK_RESPONSE_APPLY, GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, NULL); diff --git a/capplets/mouse/mouse-properties.glade b/capplets/mouse/mouse-properties.glade index 99b905b1f..0a7c7136c 100644 --- a/capplets/mouse/mouse-properties.glade +++ b/capplets/mouse/mouse-properties.glade @@ -12,7 +12,7 @@ GTK_WIN_POS_NONE - + no 8 yes @@ -54,7 +54,7 @@ - + yes yes yes @@ -312,51 +312,129 @@ - + 4 - Mouse Cursor - 0 - GTK_SHADOW_ETCHED_IN + no + 4 yes + + + Cursor Theme + 0 + GTK_SHADOW_ETCHED_IN + yes + + + + 8 + no + 8 + yes - - - 4 - no - 4 - yes - - - - yes - - - - - - You will need to restart your login session for this setting to take effect. - GTK_JUSTIFY_LEFT - yes - 0 - 0.5 - 0 - 0 - yes - - - 0 - no - no - - - - - - + + + yes + GTK_SHADOW_IN + + + yes + yes + no + + + + + 0 + yes + yes + + + + + <b>Note:</b> You will need to logout for this setting to take effect. + GTK_JUSTIFY_LEFT + yes + yes + 0 + 0.5 + 0 + 0 + yes + + + 0 + no + no + + + + + + + 0 + yes + yes + + + + + Locate Pointer + 0 + GTK_SHADOW_ETCHED_IN + yes + + + + 8 + no + 8 + yes + + + + yes + _Show position of cursor when the Control key is pressed + no + yes + yes + yes + + + + + Animates a quick marker around the cursor when the Control key has been pressed and released. + GTK_JUSTIFY_LEFT + yes + 0 + 0.5 + 0 0 yes + + + 0 + no + no + + + + + + + 0 + no + no + + + + - _Cursors + C_ursors yes GTK_JUSTIFY_CENTER no diff --git a/gnome-settings-daemon/ChangeLog b/gnome-settings-daemon/ChangeLog index ea92dda90..96500080e 100644 --- a/gnome-settings-daemon/ChangeLog +++ b/gnome-settings-daemon/ChangeLog @@ -1,3 +1,12 @@ +Tue Jan 8 15:50:59 2002 Jonathan Blandford + + * Makefile.am: Add locate-pointer. + * gnome-settings-keyboard.c: Initial attempt at locate-pointer. + Don't understand XKB enough to figure it out. + * gnome-settings-locate-pointer.[ch]: Draw the locate pointer + box. Pretty snazzy for a useless (but fun) feature. + * gnome-settings-mouse.c: Move locate pointer to it's own file. + 2002-01-08 Richard Hestilow * gnome-settings-daemon.c (main): Initialize libgnomeui, diff --git a/gnome-settings-daemon/Makefile.am b/gnome-settings-daemon/Makefile.am index 97e62ee20..295668fb9 100644 --- a/gnome-settings-daemon/Makefile.am +++ b/gnome-settings-daemon/Makefile.am @@ -11,6 +11,8 @@ gnome_settings_daemon_SOURCES = \ gnome-settings-background.c \ gnome-settings-xsettings.c \ gnome-settings-xsettings.h \ + gnome-settings-locate-pointer.c \ + gnome-settings-locate-pointer.h \ gnome-settings-sound.c \ gnome-settings-sound.h \ xsettings-common.c \ diff --git a/gnome-settings-daemon/gnome-settings-keyboard.c b/gnome-settings-daemon/gnome-settings-keyboard.c index 997bd883a..bd928064a 100644 --- a/gnome-settings-daemon/gnome-settings-keyboard.c +++ b/gnome-settings-daemon/gnome-settings-keyboard.c @@ -32,11 +32,20 @@ #include "gnome-settings-keyboard.h" #include "gnome-settings-daemon.h" +#include "gnome-settings-locate-pointer.h" #ifdef HAVE_X11_EXTENSIONS_XF86MISC_H # include #endif +#define HAVE_XKB +#ifdef HAVE_XKB +# include +#endif + +static gboolean use_xkb = FALSE; +static gint xkb_event_type = 0; + static void apply_settings (void) { @@ -58,7 +67,7 @@ apply_settings (void) click = gconf_client_get_bool (client, "/gnome/desktop/peripherals/keyboard/click", NULL); rate = gconf_client_get_int (client, "/gnome/desktop/peripherals/keyboard/rate", NULL); delay = gconf_client_get_int (client, "/gnome/desktop/peripherals/keyboard/delay", NULL); - volume = gconf_client_get_int (client, "/gnome/desktop/peripherals/keyboard/volume", NULL); + volume = gconf_client_get_int (client, "/gnome/desktop/peripherals/keyboard/click_volume", NULL); bell_volume = gconf_client_get_int (client, "/gnome/desktop/peripherals/keyboard/bell_volume", NULL); bell_pitch = gconf_client_get_int (client, "/gnome/desktop/peripherals/keyboard/bell_pitch", NULL); bell_duration = gconf_client_get_int (client, "/gnome/desktop/peripherals/keyboard/bell_duration", NULL); @@ -93,10 +102,56 @@ apply_settings (void) &kbdcontrol); } +#ifdef HAVE_XKB +/* XKB support + */ +static GdkFilterReturn +gnome_settings_keyboard_xkb_filter (GdkXEvent *xevent, + GdkEvent *event, + gpointer data) +{ + if (((XEvent *) xevent)->type == xkb_event_type) { + XkbEvent *xkb_event = (XkbEvent *)xevent; + if (xkb_event->any.xkb_type == XkbStateNotify) { + /* gnome_settings_locate_pointer (); */ + } + } + return GDK_FILTER_CONTINUE; +} +#endif + +static void +gnome_settings_keyboard_init_xkb (void) +{ +#ifdef HAVE_XKB + gint xkb_major = XkbMajorVersion; + gint xkb_minor = XkbMinorVersion; + g_print ("foo1\n"); + if (XkbLibraryVersion (&xkb_major, &xkb_minor)) { + xkb_major = XkbMajorVersion; + xkb_minor = XkbMinorVersion; + g_print ("foo2\n"); + + if (XkbQueryExtension (gdk_display, NULL, &xkb_event_type, NULL, + &xkb_major, &xkb_minor)) { + g_print ("foo3\n"); + XkbSelectEvents (gdk_display, + XkbUseCoreKbd, + XkbMapNotifyMask | XkbStateNotifyMask, + XkbMapNotifyMask | XkbStateNotifyMask); + gdk_window_add_filter (NULL, gnome_settings_keyboard_xkb_filter, NULL); + } + } +#endif +} + + + void gnome_settings_keyboard_init (GConfClient *client) { gnome_settings_daemon_register_callback ("/desktop/gnome/peripherals/keyboard", (KeyCallbackFunc) apply_settings); + gnome_settings_keyboard_init_xkb (); } void diff --git a/gnome-settings-daemon/gnome-settings-locate-pointer.c b/gnome-settings-daemon/gnome-settings-locate-pointer.c new file mode 100644 index 000000000..5a01c445e --- /dev/null +++ b/gnome-settings-daemon/gnome-settings-locate-pointer.c @@ -0,0 +1,220 @@ +#include + +#include "gnome-settings-locate-pointer.h" +#include "gnome-settings-daemon.h" + +#define LARGE_SIZE 101 +#define SMALL_SIZE 51 + +typedef enum { + STAGE_ONE, + STAGE_TWO, + STAGE_THREE, + STAGE_FOUR, + STAGE_DONE +} LocatePointerStage; + +static LocatePointerStage stage; +static GdkWindow *window = NULL; +static gint cursor_x, cursor_y; +static guint locate_pointer_id = 0; + +static gint +locate_pointer_expose (GtkWidget *widget, + GdkEventExpose *event, + gpointer data) +{ + gint size; + GdkPoint points[4]; + + if (event->window != window) + return FALSE; + + switch (stage) + { + case STAGE_ONE: + case STAGE_TWO: + size = LARGE_SIZE; + break; + case STAGE_THREE: + case STAGE_FOUR: + size = SMALL_SIZE; + break; + default: + return; + } + + gdk_draw_rectangle (event->window, + widget->style->black_gc, + TRUE, + 0, 0, size, size); + switch (stage) + { + case STAGE_ONE: + case STAGE_THREE: + gdk_draw_rectangle (event->window, + widget->style->white_gc, + FALSE, + 1, 1, size - 3, size - 3); + break; + case STAGE_TWO: + case STAGE_FOUR: + points[0].x = size/2; + points[0].y = 0 + 1; + points[1].x = size - 2; + points[1].y = size/2; + points[2].x = size/2; + points[2].y = size - 2; + points[3].x = 0 + 1; + points[3].y = size/2; + gdk_draw_polygon (event->window, + widget->style->white_gc, + FALSE, points, 4); + break; + default: + g_assert_not_reached (); + } + + return TRUE; +} + +static void +setup_window (void) +{ + gint size; + GdkBitmap *mask; + GdkGC *gc; + GdkColor col; + GdkPoint points[4]; + + gdk_window_hide (window); + switch (stage) + { + case STAGE_ONE: + case STAGE_TWO: + size = LARGE_SIZE; + break; + case STAGE_THREE: + case STAGE_FOUR: + size = SMALL_SIZE; + break; + default: + return; + } + + gdk_window_move_resize (window, + cursor_x - size/2, + cursor_y - size/2, + size, size); + mask = gdk_pixmap_new (window, size, size, 1); + gc = gdk_gc_new (mask); + switch (stage) + { + case STAGE_ONE: + case STAGE_THREE: + col.pixel = 1; + gdk_gc_set_foreground (gc, &col); + gdk_draw_rectangle (mask, gc, TRUE, 0, 0, size, size); + col.pixel = 0; + gdk_gc_set_foreground (gc, &col); + gdk_draw_rectangle (mask, gc, TRUE, 3, 3, size - 6, size - 6); + break; + case STAGE_TWO: + case STAGE_FOUR: + col.pixel = 0; + gdk_gc_set_foreground (gc, &col); + gdk_draw_rectangle (mask, gc, TRUE, 0, 0, size, size); + col.pixel = 1; + gdk_gc_set_foreground (gc, &col); + points[0].x = size/2; + points[0].y = 0; + points[1].x = size - 1; + points[1].y = size/2; + points[2].x = size/2; + points[2].y = size - 1; + points[3].x = 0; + points[3].y = size/2; + gdk_draw_polygon (mask, gc, FALSE, points, 4); + points[0].x = size/2; + points[0].y = 0 + 1; + points[1].x = size - 2; + points[1].y = size/2; + points[2].x = size/2; + points[2].y = size - 2; + points[3].x = 0 + 1; + points[3].y = size/2; + gdk_draw_polygon (mask, gc, FALSE, points, 4); + points[0].x = size/2; + points[0].y = 0 + 2; + points[1].x = size - 3; + points[1].y = size/2; + points[2].x = size/2; + points[2].y = size - 3; + points[3].x = 0 + 2; + points[3].y = size/2; + gdk_draw_polygon (mask, gc, FALSE, points, 4); + break; + default: + g_assert_not_reached (); + } + + gdk_window_shape_combine_mask (window, mask, 0, 0); + gdk_gc_destroy (gc); + gdk_pixmap_unref (mask); + gdk_window_show (window); +} + +static void +create_window (void) +{ + GdkWindowAttr attributes; + GtkWidget *invisible; + + invisible = gnome_settings_daemon_get_invisible (); + + attributes.window_type = GDK_WINDOW_TEMP; + attributes.wclass = GDK_INPUT_OUTPUT; + attributes.visual = gtk_widget_get_visual (invisible); + attributes.colormap = gtk_widget_get_colormap (invisible); + attributes.event_mask = GDK_VISIBILITY_NOTIFY_MASK | GDK_EXPOSURE_MASK; + attributes.width = 1; + attributes.height = 1; + window = gdk_window_new (gdk_get_default_root_window (), + &attributes, + GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP); + gdk_window_set_user_data (window, invisible); + g_signal_connect (G_OBJECT (invisible), + "expose_event", + (GCallback) locate_pointer_expose, + NULL); +} + +static gboolean +locate_pointer_timeout (gpointer data) +{ + stage++; + if (stage == STAGE_DONE) + { + gdk_window_hide (window); + locate_pointer_id = 0; + return FALSE; + } + setup_window (); + return TRUE; +} + +void +gnome_settings_locate_pointer (void) +{ + gdk_window_get_pointer (gdk_get_default_root_window (), &cursor_x, &cursor_y, NULL); + + if (locate_pointer_id) + gtk_timeout_remove (locate_pointer_id); + if (window == NULL) + create_window (); + + stage = STAGE_ONE; + setup_window (); + gdk_window_show (window); + locate_pointer_id = gtk_timeout_add (125, locate_pointer_timeout, NULL); +} diff --git a/gnome-settings-daemon/gnome-settings-locate-pointer.h b/gnome-settings-daemon/gnome-settings-locate-pointer.h new file mode 100644 index 000000000..4344aa696 --- /dev/null +++ b/gnome-settings-daemon/gnome-settings-locate-pointer.h @@ -0,0 +1,22 @@ +/* + * Copyright © 2001 Jonathan Blandford + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Red Hat not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. Red Hat makes no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + * Authors: Jonathan Blandford + */ + +#ifndef LOCATE_POINTER_H +#define LOCATE_POINTER_H + +void gnome_settings_locate_pointer (void); + +#endif diff --git a/gnome-settings-daemon/gnome-settings-mouse.c b/gnome-settings-daemon/gnome-settings-mouse.c index c3038da25..d69ca2a07 100644 --- a/gnome-settings-daemon/gnome-settings-mouse.c +++ b/gnome-settings-daemon/gnome-settings-mouse.c @@ -7,52 +7,6 @@ #define MAX_BUTTONS 10 -#if 0 -GdkWindow *window = NULL; - -static gint -locate_pointer_expose (GtkWidget *widget, - GdkExposeEvent *event, - gpointer data) -{ -} - - -static void -create_window (void) -{ - GdkWindowAttr attributes; - attributes.window_type = GDK_WINDOW_CHILD; - attributes.wclass = GDK_INPUT_OUTPUT; - attributes.visual = gtk_widget_get_visual (GTK_WIDGET (tree_view)); - attributes.colormap = gtk_widget_get_colormap (GTK_WIDGET (tree_view)); - attributes.event_mask = GDK_VISIBILITY_NOTIFY_MASK | GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK; - window = gdk_window_new (gdk_get_default_root_window (), - &attributes, - GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP); - gdk_window_set_user_data (tree_view->priv->drag_highlight_window, gnome_settings_daemon_get_invisible ()); - g_signal_connect (G_OBJECT (gnome_settings_daemon_get_invisible ()), - "expose_event", - locate_pointer_expose, - NULL); -} - -static void -locate_pointer (void) -{ - GtkWidget *window; - gint cursor_x, cursor_y; - - window = gtk_window_new (GTK_WINDOW_POPUP); - gdk_window_get_pointer (NULL, &cursor_x, &cursor_y, NULL); - - if (window == NULL) - create_window (); - -} -#endif - - static void @@ -136,6 +90,11 @@ set_motion_threshold (gint motion_threshold) 0, 0, motion_threshold); } +static void +set_drag_threshold (gint drag_threshold) +{ + +} static void @@ -171,4 +130,5 @@ gnome_settings_mouse_init (GConfClient *client) void gnome_settings_mouse_load (GConfClient *client) { + } diff --git a/gnome-settings-daemon/gnome-settings-mouse.h b/gnome-settings-daemon/gnome-settings-mouse.h index 0a6a0943b..5974a6090 100644 --- a/gnome-settings-daemon/gnome-settings-mouse.h +++ b/gnome-settings-daemon/gnome-settings-mouse.h @@ -11,13 +11,6 @@ * suitability of this software for any purpose. It is provided "as is" * without express or implied warranty. * - * RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL RED HAT - * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * * Authors: Jonathan Blandford */