2002-05-10 Seth Nickell <snickell@stanford.edu>
* .cvsignore:
* Makefile.am:
* gnome-window-properties.c: (wm_selection_changed),
(wm_widget_clear), (wm_widget_new), (wm_widget_add_wm),
(response_cb), (state_changed), (restart_label_update),
(restart_dialog_raise), (restart_dialog_destroyed),
(show_restart_dialog), (hide_restart_dialog), (update_session),
(init_session), (update_gui), (init_callback), (restart_finalize),
(restart_failure), (show_restart_info), (restart_finish),
(restart_callback), (restart), (revert_callback),
(cancel_callback), (apply_wm), (create_dialog), (main):
* gnome-window-properties.glade:
* window-capplet.png:
* window-properties.desktop.in:
* wm-exec.c: (wm_is_running), (find_gnome_wm_window),
(find_wm_window_from_client), (window_has_wm_state),
(descendent_has_wm_state), (find_wm_window_from_hunt),
(find_wm_window), (start_timeout), (start_do), (kill_timeout),
(wm_restart), (wm_guess_current):
* wm-list.c: (is_blank), (wm_compare), (wm_free),
(wm_check_present), (wm_copy), (wm_list_find), (wm_list_find_exec),
(wm_list_find_files), (wm_list_read_dir), (wm_list_init),
(wm_list_save), (wm_list_revert), (wm_list_add), (wm_list_delete),
(wm_list_set_current), (wm_list_get_current), (wm_list_get_revert),
(wm_read_from_xml), (wm_list_read_from_xml), (wm_write_to_xml),
(wm_list_write_to_xml), (xml_read_bool), (xml_write_bool):
* wm-properties.h:
2002-05-11 04:28:20 +00:00
|
|
|
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
|
2002-06-04 22:58:35 +00:00
|
|
|
|
2002-10-22 02:53:48 +00:00
|
|
|
/* gnome-window-properties.c
|
2002-06-04 22:58:35 +00:00
|
|
|
* Copyright (C) 2002 Seth Nickell
|
2002-10-29 06:19:52 +00:00
|
|
|
* Copyright (C) 2002 Red Hat, Inc.
|
2002-06-04 22:58:35 +00:00
|
|
|
*
|
|
|
|
* Written by: Seth Nickell <snickell@stanford.edu>
|
2002-10-29 06:19:52 +00:00
|
|
|
* Havoc Pennington <hp@redhat.com>
|
2002-06-04 22:58:35 +00:00
|
|
|
*
|
|
|
|
* 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.
|
2002-05-10 Seth Nickell <snickell@stanford.edu>
* .cvsignore:
* Makefile.am:
* gnome-window-properties.c: (wm_selection_changed),
(wm_widget_clear), (wm_widget_new), (wm_widget_add_wm),
(response_cb), (state_changed), (restart_label_update),
(restart_dialog_raise), (restart_dialog_destroyed),
(show_restart_dialog), (hide_restart_dialog), (update_session),
(init_session), (update_gui), (init_callback), (restart_finalize),
(restart_failure), (show_restart_info), (restart_finish),
(restart_callback), (restart), (revert_callback),
(cancel_callback), (apply_wm), (create_dialog), (main):
* gnome-window-properties.glade:
* window-capplet.png:
* window-properties.desktop.in:
* wm-exec.c: (wm_is_running), (find_gnome_wm_window),
(find_wm_window_from_client), (window_has_wm_state),
(descendent_has_wm_state), (find_wm_window_from_hunt),
(find_wm_window), (start_timeout), (start_do), (kill_timeout),
(wm_restart), (wm_guess_current):
* wm-list.c: (is_blank), (wm_compare), (wm_free),
(wm_check_present), (wm_copy), (wm_list_find), (wm_list_find_exec),
(wm_list_find_files), (wm_list_read_dir), (wm_list_init),
(wm_list_save), (wm_list_revert), (wm_list_add), (wm_list_delete),
(wm_list_set_current), (wm_list_get_current), (wm_list_get_revert),
(wm_read_from_xml), (wm_list_read_from_xml), (wm_write_to_xml),
(wm_list_write_to_xml), (xml_read_bool), (xml_write_bool):
* wm-properties.h:
2002-05-11 04:28:20 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifdef HAVE_CONFIG_H
|
2002-10-29 06:19:52 +00:00
|
|
|
#include <config.h>
|
2002-05-10 Seth Nickell <snickell@stanford.edu>
* .cvsignore:
* Makefile.am:
* gnome-window-properties.c: (wm_selection_changed),
(wm_widget_clear), (wm_widget_new), (wm_widget_add_wm),
(response_cb), (state_changed), (restart_label_update),
(restart_dialog_raise), (restart_dialog_destroyed),
(show_restart_dialog), (hide_restart_dialog), (update_session),
(init_session), (update_gui), (init_callback), (restart_finalize),
(restart_failure), (show_restart_info), (restart_finish),
(restart_callback), (restart), (revert_callback),
(cancel_callback), (apply_wm), (create_dialog), (main):
* gnome-window-properties.glade:
* window-capplet.png:
* window-properties.desktop.in:
* wm-exec.c: (wm_is_running), (find_gnome_wm_window),
(find_wm_window_from_client), (window_has_wm_state),
(descendent_has_wm_state), (find_wm_window_from_hunt),
(find_wm_window), (start_timeout), (start_do), (kill_timeout),
(wm_restart), (wm_guess_current):
* wm-list.c: (is_blank), (wm_compare), (wm_free),
(wm_check_present), (wm_copy), (wm_list_find), (wm_list_find_exec),
(wm_list_find_files), (wm_list_read_dir), (wm_list_init),
(wm_list_save), (wm_list_revert), (wm_list_add), (wm_list_delete),
(wm_list_set_current), (wm_list_get_current), (wm_list_get_revert),
(wm_read_from_xml), (wm_list_read_from_xml), (wm_write_to_xml),
(wm_list_write_to_xml), (xml_read_bool), (xml_write_bool):
* wm-properties.h:
2002-05-11 04:28:20 +00:00
|
|
|
#endif
|
|
|
|
|
2002-06-04 22:58:35 +00:00
|
|
|
#include <glade/glade.h>
|
|
|
|
#include <gnome-wm-manager.h>
|
Split code for changing window managers into libgnome-window-settings.
2002-06-02 Seth Nickell <snickell@stanford.edu>
* Makefile.am:
* gnome-window-properties.c: (wm_selection_changed),
(wm_widget_add_wm), (update_gui), (apply_wm), (create_dialog),
(main):
Split code for changing window managers into libgnome-window-settings.
This is so in the future we can potentially move this into gnome-settings-daemon,
though for now its not robust enough that we really want to do that.
* metacity-window-manager.c: (window_manager_new),
(metacity_window_manager_init), (metacity_window_manager_finalize),
(metacity_window_manager_class_init),
(metacity_window_manager_get_type):
* metacity-window-manager.h:
Update to match changes to gnome-window-manager.h
* wm-exec.c:
* wm-list.c:
* wm-properties.h:
Move these into libgnome-window-settings.
(Jacob, I did make dist, and then built the resulting tarball, hope I
don't cause problems this time :-/)
2002-06-03 00:27:15 +00:00
|
|
|
|
2002-05-10 Seth Nickell <snickell@stanford.edu>
* .cvsignore:
* Makefile.am:
* gnome-window-properties.c: (wm_selection_changed),
(wm_widget_clear), (wm_widget_new), (wm_widget_add_wm),
(response_cb), (state_changed), (restart_label_update),
(restart_dialog_raise), (restart_dialog_destroyed),
(show_restart_dialog), (hide_restart_dialog), (update_session),
(init_session), (update_gui), (init_callback), (restart_finalize),
(restart_failure), (show_restart_info), (restart_finish),
(restart_callback), (restart), (revert_callback),
(cancel_callback), (apply_wm), (create_dialog), (main):
* gnome-window-properties.glade:
* window-capplet.png:
* window-properties.desktop.in:
* wm-exec.c: (wm_is_running), (find_gnome_wm_window),
(find_wm_window_from_client), (window_has_wm_state),
(descendent_has_wm_state), (find_wm_window_from_hunt),
(find_wm_window), (start_timeout), (start_do), (kill_timeout),
(wm_restart), (wm_guess_current):
* wm-list.c: (is_blank), (wm_compare), (wm_free),
(wm_check_present), (wm_copy), (wm_list_find), (wm_list_find_exec),
(wm_list_find_files), (wm_list_read_dir), (wm_list_init),
(wm_list_save), (wm_list_revert), (wm_list_add), (wm_list_delete),
(wm_list_set_current), (wm_list_get_current), (wm_list_get_revert),
(wm_read_from_xml), (wm_list_read_from_xml), (wm_write_to_xml),
(wm_list_write_to_xml), (xml_read_bool), (xml_write_bool):
* wm-properties.h:
2002-05-11 04:28:20 +00:00
|
|
|
#include "capplet-util.h"
|
|
|
|
#include "gconf-property-editor.h"
|
|
|
|
|
2002-10-29 06:19:52 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
int number;
|
|
|
|
char *name;
|
|
|
|
const char *value; /* machine-readable name for storing config */
|
2002-12-02 01:14:14 +00:00
|
|
|
GtkWidget *radio;
|
2002-10-29 06:19:52 +00:00
|
|
|
} MouseClickModifier;
|
2002-06-04 22:58:35 +00:00
|
|
|
|
2002-10-29 06:19:52 +00:00
|
|
|
static GladeXML *dialog;
|
|
|
|
static GnomeWindowManager *current_wm; /* may be NULL */
|
|
|
|
static GtkWidget *dialog_win;
|
|
|
|
static GtkWidget *focus_mode_checkbutton;
|
|
|
|
static GtkWidget *autoraise_checkbutton;
|
2002-12-02 01:14:14 +00:00
|
|
|
static GtkWidget *autoraise_delay_slider;
|
2002-10-29 06:19:52 +00:00
|
|
|
static GtkWidget *autoraise_delay_hbox;
|
|
|
|
static GtkWidget *double_click_titlebar_optionmenu;
|
2002-12-02 01:14:14 +00:00
|
|
|
static GtkWidget *alt_click_hbox;
|
2002-10-29 06:19:52 +00:00
|
|
|
|
2004-06-22 01:50:50 +00:00
|
|
|
static GnomeWMSettings *settings;
|
2002-10-29 06:19:52 +00:00
|
|
|
static const GnomeWMDoubleClickAction *double_click_actions = NULL;
|
|
|
|
static int n_double_click_actions = 0;
|
|
|
|
|
|
|
|
static MouseClickModifier *mouse_modifiers = NULL;
|
|
|
|
static int n_mouse_modifiers = 0;
|
|
|
|
|
|
|
|
static void reload_mouse_modifiers (void);
|
Split code for changing window managers into libgnome-window-settings.
2002-06-02 Seth Nickell <snickell@stanford.edu>
* Makefile.am:
* gnome-window-properties.c: (wm_selection_changed),
(wm_widget_add_wm), (update_gui), (apply_wm), (create_dialog),
(main):
Split code for changing window managers into libgnome-window-settings.
This is so in the future we can potentially move this into gnome-settings-daemon,
though for now its not robust enough that we really want to do that.
* metacity-window-manager.c: (window_manager_new),
(metacity_window_manager_init), (metacity_window_manager_finalize),
(metacity_window_manager_class_init),
(metacity_window_manager_get_type):
* metacity-window-manager.h:
Update to match changes to gnome-window-manager.h
* wm-exec.c:
* wm-list.c:
* wm-properties.h:
Move these into libgnome-window-settings.
(Jacob, I did make dist, and then built the resulting tarball, hope I
don't cause problems this time :-/)
2002-06-03 00:27:15 +00:00
|
|
|
|
2002-05-10 Seth Nickell <snickell@stanford.edu>
* .cvsignore:
* Makefile.am:
* gnome-window-properties.c: (wm_selection_changed),
(wm_widget_clear), (wm_widget_new), (wm_widget_add_wm),
(response_cb), (state_changed), (restart_label_update),
(restart_dialog_raise), (restart_dialog_destroyed),
(show_restart_dialog), (hide_restart_dialog), (update_session),
(init_session), (update_gui), (init_callback), (restart_finalize),
(restart_failure), (show_restart_info), (restart_finish),
(restart_callback), (restart), (revert_callback),
(cancel_callback), (apply_wm), (create_dialog), (main):
* gnome-window-properties.glade:
* window-capplet.png:
* window-properties.desktop.in:
* wm-exec.c: (wm_is_running), (find_gnome_wm_window),
(find_wm_window_from_client), (window_has_wm_state),
(descendent_has_wm_state), (find_wm_window_from_hunt),
(find_wm_window), (start_timeout), (start_do), (kill_timeout),
(wm_restart), (wm_guess_current):
* wm-list.c: (is_blank), (wm_compare), (wm_free),
(wm_check_present), (wm_copy), (wm_list_find), (wm_list_find_exec),
(wm_list_find_files), (wm_list_read_dir), (wm_list_init),
(wm_list_save), (wm_list_revert), (wm_list_add), (wm_list_delete),
(wm_list_set_current), (wm_list_get_current), (wm_list_get_revert),
(wm_read_from_xml), (wm_list_read_from_xml), (wm_write_to_xml),
(wm_list_write_to_xml), (xml_read_bool), (xml_write_bool):
* wm-properties.h:
2002-05-11 04:28:20 +00:00
|
|
|
static void
|
2002-10-29 06:19:52 +00:00
|
|
|
mouse_focus_toggled_callback (GtkWidget *button,
|
|
|
|
void *data)
|
2002-05-10 Seth Nickell <snickell@stanford.edu>
* .cvsignore:
* Makefile.am:
* gnome-window-properties.c: (wm_selection_changed),
(wm_widget_clear), (wm_widget_new), (wm_widget_add_wm),
(response_cb), (state_changed), (restart_label_update),
(restart_dialog_raise), (restart_dialog_destroyed),
(show_restart_dialog), (hide_restart_dialog), (update_session),
(init_session), (update_gui), (init_callback), (restart_finalize),
(restart_failure), (show_restart_info), (restart_finish),
(restart_callback), (restart), (revert_callback),
(cancel_callback), (apply_wm), (create_dialog), (main):
* gnome-window-properties.glade:
* window-capplet.png:
* window-properties.desktop.in:
* wm-exec.c: (wm_is_running), (find_gnome_wm_window),
(find_wm_window_from_client), (window_has_wm_state),
(descendent_has_wm_state), (find_wm_window_from_hunt),
(find_wm_window), (start_timeout), (start_do), (kill_timeout),
(wm_restart), (wm_guess_current):
* wm-list.c: (is_blank), (wm_compare), (wm_free),
(wm_check_present), (wm_copy), (wm_list_find), (wm_list_find_exec),
(wm_list_find_files), (wm_list_read_dir), (wm_list_init),
(wm_list_save), (wm_list_revert), (wm_list_add), (wm_list_delete),
(wm_list_set_current), (wm_list_get_current), (wm_list_get_revert),
(wm_read_from_xml), (wm_list_read_from_xml), (wm_write_to_xml),
(wm_list_write_to_xml), (xml_read_bool), (xml_write_bool):
* wm-properties.h:
2002-05-11 04:28:20 +00:00
|
|
|
{
|
2002-10-29 06:19:52 +00:00
|
|
|
GnomeWMSettings new_settings;
|
2002-05-10 Seth Nickell <snickell@stanford.edu>
* .cvsignore:
* Makefile.am:
* gnome-window-properties.c: (wm_selection_changed),
(wm_widget_clear), (wm_widget_new), (wm_widget_add_wm),
(response_cb), (state_changed), (restart_label_update),
(restart_dialog_raise), (restart_dialog_destroyed),
(show_restart_dialog), (hide_restart_dialog), (update_session),
(init_session), (update_gui), (init_callback), (restart_finalize),
(restart_failure), (show_restart_info), (restart_finish),
(restart_callback), (restart), (revert_callback),
(cancel_callback), (apply_wm), (create_dialog), (main):
* gnome-window-properties.glade:
* window-capplet.png:
* window-properties.desktop.in:
* wm-exec.c: (wm_is_running), (find_gnome_wm_window),
(find_wm_window_from_client), (window_has_wm_state),
(descendent_has_wm_state), (find_wm_window_from_hunt),
(find_wm_window), (start_timeout), (start_do), (kill_timeout),
(wm_restart), (wm_guess_current):
* wm-list.c: (is_blank), (wm_compare), (wm_free),
(wm_check_present), (wm_copy), (wm_list_find), (wm_list_find_exec),
(wm_list_find_files), (wm_list_read_dir), (wm_list_init),
(wm_list_save), (wm_list_revert), (wm_list_add), (wm_list_delete),
(wm_list_set_current), (wm_list_get_current), (wm_list_get_revert),
(wm_read_from_xml), (wm_list_read_from_xml), (wm_write_to_xml),
(wm_list_write_to_xml), (xml_read_bool), (xml_write_bool):
* wm-properties.h:
2002-05-11 04:28:20 +00:00
|
|
|
|
2002-10-29 06:19:52 +00:00
|
|
|
new_settings.flags = GNOME_WM_SETTING_MOUSE_FOCUS;
|
|
|
|
new_settings.focus_follows_mouse =
|
|
|
|
gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button));
|
2002-05-10 Seth Nickell <snickell@stanford.edu>
* .cvsignore:
* Makefile.am:
* gnome-window-properties.c: (wm_selection_changed),
(wm_widget_clear), (wm_widget_new), (wm_widget_add_wm),
(response_cb), (state_changed), (restart_label_update),
(restart_dialog_raise), (restart_dialog_destroyed),
(show_restart_dialog), (hide_restart_dialog), (update_session),
(init_session), (update_gui), (init_callback), (restart_finalize),
(restart_failure), (show_restart_info), (restart_finish),
(restart_callback), (restart), (revert_callback),
(cancel_callback), (apply_wm), (create_dialog), (main):
* gnome-window-properties.glade:
* window-capplet.png:
* window-properties.desktop.in:
* wm-exec.c: (wm_is_running), (find_gnome_wm_window),
(find_wm_window_from_client), (window_has_wm_state),
(descendent_has_wm_state), (find_wm_window_from_hunt),
(find_wm_window), (start_timeout), (start_do), (kill_timeout),
(wm_restart), (wm_guess_current):
* wm-list.c: (is_blank), (wm_compare), (wm_free),
(wm_check_present), (wm_copy), (wm_list_find), (wm_list_find_exec),
(wm_list_find_files), (wm_list_read_dir), (wm_list_init),
(wm_list_save), (wm_list_revert), (wm_list_add), (wm_list_delete),
(wm_list_set_current), (wm_list_get_current), (wm_list_get_revert),
(wm_read_from_xml), (wm_list_read_from_xml), (wm_write_to_xml),
(wm_list_write_to_xml), (xml_read_bool), (xml_write_bool):
* wm-properties.h:
2002-05-11 04:28:20 +00:00
|
|
|
|
2004-06-22 01:50:50 +00:00
|
|
|
if (current_wm != NULL && new_settings.focus_follows_mouse != settings->focus_follows_mouse)
|
2002-10-29 06:19:52 +00:00
|
|
|
gnome_window_manager_change_settings (current_wm, &new_settings);
|
2002-05-10 Seth Nickell <snickell@stanford.edu>
* .cvsignore:
* Makefile.am:
* gnome-window-properties.c: (wm_selection_changed),
(wm_widget_clear), (wm_widget_new), (wm_widget_add_wm),
(response_cb), (state_changed), (restart_label_update),
(restart_dialog_raise), (restart_dialog_destroyed),
(show_restart_dialog), (hide_restart_dialog), (update_session),
(init_session), (update_gui), (init_callback), (restart_finalize),
(restart_failure), (show_restart_info), (restart_finish),
(restart_callback), (restart), (revert_callback),
(cancel_callback), (apply_wm), (create_dialog), (main):
* gnome-window-properties.glade:
* window-capplet.png:
* window-properties.desktop.in:
* wm-exec.c: (wm_is_running), (find_gnome_wm_window),
(find_wm_window_from_client), (window_has_wm_state),
(descendent_has_wm_state), (find_wm_window_from_hunt),
(find_wm_window), (start_timeout), (start_do), (kill_timeout),
(wm_restart), (wm_guess_current):
* wm-list.c: (is_blank), (wm_compare), (wm_free),
(wm_check_present), (wm_copy), (wm_list_find), (wm_list_find_exec),
(wm_list_find_files), (wm_list_read_dir), (wm_list_init),
(wm_list_save), (wm_list_revert), (wm_list_add), (wm_list_delete),
(wm_list_set_current), (wm_list_get_current), (wm_list_get_revert),
(wm_read_from_xml), (wm_list_read_from_xml), (wm_write_to_xml),
(wm_list_write_to_xml), (xml_read_bool), (xml_write_bool):
* wm-properties.h:
2002-05-11 04:28:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2002-10-29 06:19:52 +00:00
|
|
|
autoraise_toggled_callback (GtkWidget *button,
|
|
|
|
void *data)
|
2002-05-10 Seth Nickell <snickell@stanford.edu>
* .cvsignore:
* Makefile.am:
* gnome-window-properties.c: (wm_selection_changed),
(wm_widget_clear), (wm_widget_new), (wm_widget_add_wm),
(response_cb), (state_changed), (restart_label_update),
(restart_dialog_raise), (restart_dialog_destroyed),
(show_restart_dialog), (hide_restart_dialog), (update_session),
(init_session), (update_gui), (init_callback), (restart_finalize),
(restart_failure), (show_restart_info), (restart_finish),
(restart_callback), (restart), (revert_callback),
(cancel_callback), (apply_wm), (create_dialog), (main):
* gnome-window-properties.glade:
* window-capplet.png:
* window-properties.desktop.in:
* wm-exec.c: (wm_is_running), (find_gnome_wm_window),
(find_wm_window_from_client), (window_has_wm_state),
(descendent_has_wm_state), (find_wm_window_from_hunt),
(find_wm_window), (start_timeout), (start_do), (kill_timeout),
(wm_restart), (wm_guess_current):
* wm-list.c: (is_blank), (wm_compare), (wm_free),
(wm_check_present), (wm_copy), (wm_list_find), (wm_list_find_exec),
(wm_list_find_files), (wm_list_read_dir), (wm_list_init),
(wm_list_save), (wm_list_revert), (wm_list_add), (wm_list_delete),
(wm_list_set_current), (wm_list_get_current), (wm_list_get_revert),
(wm_read_from_xml), (wm_list_read_from_xml), (wm_write_to_xml),
(wm_list_write_to_xml), (xml_read_bool), (xml_write_bool):
* wm-properties.h:
2002-05-11 04:28:20 +00:00
|
|
|
{
|
2002-10-29 06:19:52 +00:00
|
|
|
GnomeWMSettings new_settings;
|
2002-05-10 Seth Nickell <snickell@stanford.edu>
* .cvsignore:
* Makefile.am:
* gnome-window-properties.c: (wm_selection_changed),
(wm_widget_clear), (wm_widget_new), (wm_widget_add_wm),
(response_cb), (state_changed), (restart_label_update),
(restart_dialog_raise), (restart_dialog_destroyed),
(show_restart_dialog), (hide_restart_dialog), (update_session),
(init_session), (update_gui), (init_callback), (restart_finalize),
(restart_failure), (show_restart_info), (restart_finish),
(restart_callback), (restart), (revert_callback),
(cancel_callback), (apply_wm), (create_dialog), (main):
* gnome-window-properties.glade:
* window-capplet.png:
* window-properties.desktop.in:
* wm-exec.c: (wm_is_running), (find_gnome_wm_window),
(find_wm_window_from_client), (window_has_wm_state),
(descendent_has_wm_state), (find_wm_window_from_hunt),
(find_wm_window), (start_timeout), (start_do), (kill_timeout),
(wm_restart), (wm_guess_current):
* wm-list.c: (is_blank), (wm_compare), (wm_free),
(wm_check_present), (wm_copy), (wm_list_find), (wm_list_find_exec),
(wm_list_find_files), (wm_list_read_dir), (wm_list_init),
(wm_list_save), (wm_list_revert), (wm_list_add), (wm_list_delete),
(wm_list_set_current), (wm_list_get_current), (wm_list_get_revert),
(wm_read_from_xml), (wm_list_read_from_xml), (wm_write_to_xml),
(wm_list_write_to_xml), (xml_read_bool), (xml_write_bool):
* wm-properties.h:
2002-05-11 04:28:20 +00:00
|
|
|
|
2002-10-29 06:19:52 +00:00
|
|
|
new_settings.flags = GNOME_WM_SETTING_AUTORAISE;
|
|
|
|
new_settings.autoraise =
|
|
|
|
gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button));
|
2002-05-10 Seth Nickell <snickell@stanford.edu>
* .cvsignore:
* Makefile.am:
* gnome-window-properties.c: (wm_selection_changed),
(wm_widget_clear), (wm_widget_new), (wm_widget_add_wm),
(response_cb), (state_changed), (restart_label_update),
(restart_dialog_raise), (restart_dialog_destroyed),
(show_restart_dialog), (hide_restart_dialog), (update_session),
(init_session), (update_gui), (init_callback), (restart_finalize),
(restart_failure), (show_restart_info), (restart_finish),
(restart_callback), (restart), (revert_callback),
(cancel_callback), (apply_wm), (create_dialog), (main):
* gnome-window-properties.glade:
* window-capplet.png:
* window-properties.desktop.in:
* wm-exec.c: (wm_is_running), (find_gnome_wm_window),
(find_wm_window_from_client), (window_has_wm_state),
(descendent_has_wm_state), (find_wm_window_from_hunt),
(find_wm_window), (start_timeout), (start_do), (kill_timeout),
(wm_restart), (wm_guess_current):
* wm-list.c: (is_blank), (wm_compare), (wm_free),
(wm_check_present), (wm_copy), (wm_list_find), (wm_list_find_exec),
(wm_list_find_files), (wm_list_read_dir), (wm_list_init),
(wm_list_save), (wm_list_revert), (wm_list_add), (wm_list_delete),
(wm_list_set_current), (wm_list_get_current), (wm_list_get_revert),
(wm_read_from_xml), (wm_list_read_from_xml), (wm_write_to_xml),
(wm_list_write_to_xml), (xml_read_bool), (xml_write_bool):
* wm-properties.h:
2002-05-11 04:28:20 +00:00
|
|
|
|
2004-06-22 01:50:50 +00:00
|
|
|
if (current_wm != NULL && new_settings.autoraise != settings->autoraise)
|
2002-10-29 06:19:52 +00:00
|
|
|
gnome_window_manager_change_settings (current_wm, &new_settings);
|
2002-05-10 Seth Nickell <snickell@stanford.edu>
* .cvsignore:
* Makefile.am:
* gnome-window-properties.c: (wm_selection_changed),
(wm_widget_clear), (wm_widget_new), (wm_widget_add_wm),
(response_cb), (state_changed), (restart_label_update),
(restart_dialog_raise), (restart_dialog_destroyed),
(show_restart_dialog), (hide_restart_dialog), (update_session),
(init_session), (update_gui), (init_callback), (restart_finalize),
(restart_failure), (show_restart_info), (restart_finish),
(restart_callback), (restart), (revert_callback),
(cancel_callback), (apply_wm), (create_dialog), (main):
* gnome-window-properties.glade:
* window-capplet.png:
* window-properties.desktop.in:
* wm-exec.c: (wm_is_running), (find_gnome_wm_window),
(find_wm_window_from_client), (window_has_wm_state),
(descendent_has_wm_state), (find_wm_window_from_hunt),
(find_wm_window), (start_timeout), (start_do), (kill_timeout),
(wm_restart), (wm_guess_current):
* wm-list.c: (is_blank), (wm_compare), (wm_free),
(wm_check_present), (wm_copy), (wm_list_find), (wm_list_find_exec),
(wm_list_find_files), (wm_list_read_dir), (wm_list_init),
(wm_list_save), (wm_list_revert), (wm_list_add), (wm_list_delete),
(wm_list_set_current), (wm_list_get_current), (wm_list_get_revert),
(wm_read_from_xml), (wm_list_read_from_xml), (wm_write_to_xml),
(wm_list_write_to_xml), (xml_read_bool), (xml_write_bool):
* wm-properties.h:
2002-05-11 04:28:20 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2002-12-02 01:14:14 +00:00
|
|
|
autoraise_delay_value_changed_callback (GtkWidget *slider,
|
2002-10-29 06:19:52 +00:00
|
|
|
void *data)
|
2002-05-10 Seth Nickell <snickell@stanford.edu>
* .cvsignore:
* Makefile.am:
* gnome-window-properties.c: (wm_selection_changed),
(wm_widget_clear), (wm_widget_new), (wm_widget_add_wm),
(response_cb), (state_changed), (restart_label_update),
(restart_dialog_raise), (restart_dialog_destroyed),
(show_restart_dialog), (hide_restart_dialog), (update_session),
(init_session), (update_gui), (init_callback), (restart_finalize),
(restart_failure), (show_restart_info), (restart_finish),
(restart_callback), (restart), (revert_callback),
(cancel_callback), (apply_wm), (create_dialog), (main):
* gnome-window-properties.glade:
* window-capplet.png:
* window-properties.desktop.in:
* wm-exec.c: (wm_is_running), (find_gnome_wm_window),
(find_wm_window_from_client), (window_has_wm_state),
(descendent_has_wm_state), (find_wm_window_from_hunt),
(find_wm_window), (start_timeout), (start_do), (kill_timeout),
(wm_restart), (wm_guess_current):
* wm-list.c: (is_blank), (wm_compare), (wm_free),
(wm_check_present), (wm_copy), (wm_list_find), (wm_list_find_exec),
(wm_list_find_files), (wm_list_read_dir), (wm_list_init),
(wm_list_save), (wm_list_revert), (wm_list_add), (wm_list_delete),
(wm_list_set_current), (wm_list_get_current), (wm_list_get_revert),
(wm_read_from_xml), (wm_list_read_from_xml), (wm_write_to_xml),
(wm_list_write_to_xml), (xml_read_bool), (xml_write_bool):
* wm-properties.h:
2002-05-11 04:28:20 +00:00
|
|
|
{
|
2002-10-29 06:19:52 +00:00
|
|
|
GnomeWMSettings new_settings;
|
2002-05-10 Seth Nickell <snickell@stanford.edu>
* .cvsignore:
* Makefile.am:
* gnome-window-properties.c: (wm_selection_changed),
(wm_widget_clear), (wm_widget_new), (wm_widget_add_wm),
(response_cb), (state_changed), (restart_label_update),
(restart_dialog_raise), (restart_dialog_destroyed),
(show_restart_dialog), (hide_restart_dialog), (update_session),
(init_session), (update_gui), (init_callback), (restart_finalize),
(restart_failure), (show_restart_info), (restart_finish),
(restart_callback), (restart), (revert_callback),
(cancel_callback), (apply_wm), (create_dialog), (main):
* gnome-window-properties.glade:
* window-capplet.png:
* window-properties.desktop.in:
* wm-exec.c: (wm_is_running), (find_gnome_wm_window),
(find_wm_window_from_client), (window_has_wm_state),
(descendent_has_wm_state), (find_wm_window_from_hunt),
(find_wm_window), (start_timeout), (start_do), (kill_timeout),
(wm_restart), (wm_guess_current):
* wm-list.c: (is_blank), (wm_compare), (wm_free),
(wm_check_present), (wm_copy), (wm_list_find), (wm_list_find_exec),
(wm_list_find_files), (wm_list_read_dir), (wm_list_init),
(wm_list_save), (wm_list_revert), (wm_list_add), (wm_list_delete),
(wm_list_set_current), (wm_list_get_current), (wm_list_get_revert),
(wm_read_from_xml), (wm_list_read_from_xml), (wm_write_to_xml),
(wm_list_write_to_xml), (xml_read_bool), (xml_write_bool):
* wm-properties.h:
2002-05-11 04:28:20 +00:00
|
|
|
|
2002-10-29 06:19:52 +00:00
|
|
|
new_settings.flags = GNOME_WM_SETTING_AUTORAISE_DELAY;
|
|
|
|
new_settings.autoraise_delay =
|
2002-12-02 01:14:14 +00:00
|
|
|
gtk_range_get_value (GTK_RANGE (slider)) * 1000;
|
2002-05-10 Seth Nickell <snickell@stanford.edu>
* .cvsignore:
* Makefile.am:
* gnome-window-properties.c: (wm_selection_changed),
(wm_widget_clear), (wm_widget_new), (wm_widget_add_wm),
(response_cb), (state_changed), (restart_label_update),
(restart_dialog_raise), (restart_dialog_destroyed),
(show_restart_dialog), (hide_restart_dialog), (update_session),
(init_session), (update_gui), (init_callback), (restart_finalize),
(restart_failure), (show_restart_info), (restart_finish),
(restart_callback), (restart), (revert_callback),
(cancel_callback), (apply_wm), (create_dialog), (main):
* gnome-window-properties.glade:
* window-capplet.png:
* window-properties.desktop.in:
* wm-exec.c: (wm_is_running), (find_gnome_wm_window),
(find_wm_window_from_client), (window_has_wm_state),
(descendent_has_wm_state), (find_wm_window_from_hunt),
(find_wm_window), (start_timeout), (start_do), (kill_timeout),
(wm_restart), (wm_guess_current):
* wm-list.c: (is_blank), (wm_compare), (wm_free),
(wm_check_present), (wm_copy), (wm_list_find), (wm_list_find_exec),
(wm_list_find_files), (wm_list_read_dir), (wm_list_init),
(wm_list_save), (wm_list_revert), (wm_list_add), (wm_list_delete),
(wm_list_set_current), (wm_list_get_current), (wm_list_get_revert),
(wm_read_from_xml), (wm_list_read_from_xml), (wm_write_to_xml),
(wm_list_write_to_xml), (xml_read_bool), (xml_write_bool):
* wm-properties.h:
2002-05-11 04:28:20 +00:00
|
|
|
|
2004-06-22 01:50:50 +00:00
|
|
|
if (current_wm != NULL && new_settings.autoraise_delay != settings->autoraise_delay)
|
2002-10-29 06:19:52 +00:00
|
|
|
gnome_window_manager_change_settings (current_wm, &new_settings);
|
2002-05-10 Seth Nickell <snickell@stanford.edu>
* .cvsignore:
* Makefile.am:
* gnome-window-properties.c: (wm_selection_changed),
(wm_widget_clear), (wm_widget_new), (wm_widget_add_wm),
(response_cb), (state_changed), (restart_label_update),
(restart_dialog_raise), (restart_dialog_destroyed),
(show_restart_dialog), (hide_restart_dialog), (update_session),
(init_session), (update_gui), (init_callback), (restart_finalize),
(restart_failure), (show_restart_info), (restart_finish),
(restart_callback), (restart), (revert_callback),
(cancel_callback), (apply_wm), (create_dialog), (main):
* gnome-window-properties.glade:
* window-capplet.png:
* window-properties.desktop.in:
* wm-exec.c: (wm_is_running), (find_gnome_wm_window),
(find_wm_window_from_client), (window_has_wm_state),
(descendent_has_wm_state), (find_wm_window_from_hunt),
(find_wm_window), (start_timeout), (start_do), (kill_timeout),
(wm_restart), (wm_guess_current):
* wm-list.c: (is_blank), (wm_compare), (wm_free),
(wm_check_present), (wm_copy), (wm_list_find), (wm_list_find_exec),
(wm_list_find_files), (wm_list_read_dir), (wm_list_init),
(wm_list_save), (wm_list_revert), (wm_list_add), (wm_list_delete),
(wm_list_set_current), (wm_list_get_current), (wm_list_get_revert),
(wm_read_from_xml), (wm_list_read_from_xml), (wm_write_to_xml),
(wm_list_write_to_xml), (xml_read_bool), (xml_write_bool):
* wm-properties.h:
2002-05-11 04:28:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2002-10-29 06:19:52 +00:00
|
|
|
double_click_titlebar_changed_callback (GtkWidget *optionmenu,
|
|
|
|
void *data)
|
2002-05-10 Seth Nickell <snickell@stanford.edu>
* .cvsignore:
* Makefile.am:
* gnome-window-properties.c: (wm_selection_changed),
(wm_widget_clear), (wm_widget_new), (wm_widget_add_wm),
(response_cb), (state_changed), (restart_label_update),
(restart_dialog_raise), (restart_dialog_destroyed),
(show_restart_dialog), (hide_restart_dialog), (update_session),
(init_session), (update_gui), (init_callback), (restart_finalize),
(restart_failure), (show_restart_info), (restart_finish),
(restart_callback), (restart), (revert_callback),
(cancel_callback), (apply_wm), (create_dialog), (main):
* gnome-window-properties.glade:
* window-capplet.png:
* window-properties.desktop.in:
* wm-exec.c: (wm_is_running), (find_gnome_wm_window),
(find_wm_window_from_client), (window_has_wm_state),
(descendent_has_wm_state), (find_wm_window_from_hunt),
(find_wm_window), (start_timeout), (start_do), (kill_timeout),
(wm_restart), (wm_guess_current):
* wm-list.c: (is_blank), (wm_compare), (wm_free),
(wm_check_present), (wm_copy), (wm_list_find), (wm_list_find_exec),
(wm_list_find_files), (wm_list_read_dir), (wm_list_init),
(wm_list_save), (wm_list_revert), (wm_list_add), (wm_list_delete),
(wm_list_set_current), (wm_list_get_current), (wm_list_get_revert),
(wm_read_from_xml), (wm_list_read_from_xml), (wm_write_to_xml),
(wm_list_write_to_xml), (xml_read_bool), (xml_write_bool):
* wm-properties.h:
2002-05-11 04:28:20 +00:00
|
|
|
{
|
2002-10-29 06:19:52 +00:00
|
|
|
GnomeWMSettings new_settings;
|
|
|
|
|
|
|
|
new_settings.flags = GNOME_WM_SETTING_DOUBLE_CLICK_ACTION;
|
|
|
|
new_settings.double_click_action =
|
|
|
|
gtk_option_menu_get_history (GTK_OPTION_MENU (optionmenu));
|
|
|
|
|
2004-06-22 01:50:50 +00:00
|
|
|
if (current_wm != NULL && new_settings.double_click_action != settings->double_click_action)
|
2002-10-29 06:19:52 +00:00
|
|
|
gnome_window_manager_change_settings (current_wm, &new_settings);
|
2002-05-10 Seth Nickell <snickell@stanford.edu>
* .cvsignore:
* Makefile.am:
* gnome-window-properties.c: (wm_selection_changed),
(wm_widget_clear), (wm_widget_new), (wm_widget_add_wm),
(response_cb), (state_changed), (restart_label_update),
(restart_dialog_raise), (restart_dialog_destroyed),
(show_restart_dialog), (hide_restart_dialog), (update_session),
(init_session), (update_gui), (init_callback), (restart_finalize),
(restart_failure), (show_restart_info), (restart_finish),
(restart_callback), (restart), (revert_callback),
(cancel_callback), (apply_wm), (create_dialog), (main):
* gnome-window-properties.glade:
* window-capplet.png:
* window-properties.desktop.in:
* wm-exec.c: (wm_is_running), (find_gnome_wm_window),
(find_wm_window_from_client), (window_has_wm_state),
(descendent_has_wm_state), (find_wm_window_from_hunt),
(find_wm_window), (start_timeout), (start_do), (kill_timeout),
(wm_restart), (wm_guess_current):
* wm-list.c: (is_blank), (wm_compare), (wm_free),
(wm_check_present), (wm_copy), (wm_list_find), (wm_list_find_exec),
(wm_list_find_files), (wm_list_read_dir), (wm_list_init),
(wm_list_save), (wm_list_revert), (wm_list_add), (wm_list_delete),
(wm_list_set_current), (wm_list_get_current), (wm_list_get_revert),
(wm_read_from_xml), (wm_list_read_from_xml), (wm_write_to_xml),
(wm_list_write_to_xml), (xml_read_bool), (xml_write_bool):
* wm-properties.h:
2002-05-11 04:28:20 +00:00
|
|
|
}
|
|
|
|
|
2002-12-02 01:14:14 +00:00
|
|
|
#if 0
|
|
|
|
/* This was for option menu */
|
2002-05-10 Seth Nickell <snickell@stanford.edu>
* .cvsignore:
* Makefile.am:
* gnome-window-properties.c: (wm_selection_changed),
(wm_widget_clear), (wm_widget_new), (wm_widget_add_wm),
(response_cb), (state_changed), (restart_label_update),
(restart_dialog_raise), (restart_dialog_destroyed),
(show_restart_dialog), (hide_restart_dialog), (update_session),
(init_session), (update_gui), (init_callback), (restart_finalize),
(restart_failure), (show_restart_info), (restart_finish),
(restart_callback), (restart), (revert_callback),
(cancel_callback), (apply_wm), (create_dialog), (main):
* gnome-window-properties.glade:
* window-capplet.png:
* window-properties.desktop.in:
* wm-exec.c: (wm_is_running), (find_gnome_wm_window),
(find_wm_window_from_client), (window_has_wm_state),
(descendent_has_wm_state), (find_wm_window_from_hunt),
(find_wm_window), (start_timeout), (start_do), (kill_timeout),
(wm_restart), (wm_guess_current):
* wm-list.c: (is_blank), (wm_compare), (wm_free),
(wm_check_present), (wm_copy), (wm_list_find), (wm_list_find_exec),
(wm_list_find_files), (wm_list_read_dir), (wm_list_init),
(wm_list_save), (wm_list_revert), (wm_list_add), (wm_list_delete),
(wm_list_set_current), (wm_list_get_current), (wm_list_get_revert),
(wm_read_from_xml), (wm_list_read_from_xml), (wm_write_to_xml),
(wm_list_write_to_xml), (xml_read_bool), (xml_write_bool):
* wm-properties.h:
2002-05-11 04:28:20 +00:00
|
|
|
static void
|
2002-10-29 06:19:52 +00:00
|
|
|
alt_click_modifier_changed_callback (GtkWidget *optionmenu,
|
|
|
|
void *data)
|
2002-05-10 Seth Nickell <snickell@stanford.edu>
* .cvsignore:
* Makefile.am:
* gnome-window-properties.c: (wm_selection_changed),
(wm_widget_clear), (wm_widget_new), (wm_widget_add_wm),
(response_cb), (state_changed), (restart_label_update),
(restart_dialog_raise), (restart_dialog_destroyed),
(show_restart_dialog), (hide_restart_dialog), (update_session),
(init_session), (update_gui), (init_callback), (restart_finalize),
(restart_failure), (show_restart_info), (restart_finish),
(restart_callback), (restart), (revert_callback),
(cancel_callback), (apply_wm), (create_dialog), (main):
* gnome-window-properties.glade:
* window-capplet.png:
* window-properties.desktop.in:
* wm-exec.c: (wm_is_running), (find_gnome_wm_window),
(find_wm_window_from_client), (window_has_wm_state),
(descendent_has_wm_state), (find_wm_window_from_hunt),
(find_wm_window), (start_timeout), (start_do), (kill_timeout),
(wm_restart), (wm_guess_current):
* wm-list.c: (is_blank), (wm_compare), (wm_free),
(wm_check_present), (wm_copy), (wm_list_find), (wm_list_find_exec),
(wm_list_find_files), (wm_list_read_dir), (wm_list_init),
(wm_list_save), (wm_list_revert), (wm_list_add), (wm_list_delete),
(wm_list_set_current), (wm_list_get_current), (wm_list_get_revert),
(wm_read_from_xml), (wm_list_read_from_xml), (wm_write_to_xml),
(wm_list_write_to_xml), (xml_read_bool), (xml_write_bool):
* wm-properties.h:
2002-05-11 04:28:20 +00:00
|
|
|
{
|
2002-10-29 06:19:52 +00:00
|
|
|
GnomeWMSettings new_settings;
|
|
|
|
int history;
|
|
|
|
|
|
|
|
new_settings.flags = GNOME_WM_SETTING_MOUSE_MOVE_MODIFIER;
|
|
|
|
history = gtk_option_menu_get_history (GTK_OPTION_MENU (optionmenu));
|
2002-05-10 Seth Nickell <snickell@stanford.edu>
* .cvsignore:
* Makefile.am:
* gnome-window-properties.c: (wm_selection_changed),
(wm_widget_clear), (wm_widget_new), (wm_widget_add_wm),
(response_cb), (state_changed), (restart_label_update),
(restart_dialog_raise), (restart_dialog_destroyed),
(show_restart_dialog), (hide_restart_dialog), (update_session),
(init_session), (update_gui), (init_callback), (restart_finalize),
(restart_failure), (show_restart_info), (restart_finish),
(restart_callback), (restart), (revert_callback),
(cancel_callback), (apply_wm), (create_dialog), (main):
* gnome-window-properties.glade:
* window-capplet.png:
* window-properties.desktop.in:
* wm-exec.c: (wm_is_running), (find_gnome_wm_window),
(find_wm_window_from_client), (window_has_wm_state),
(descendent_has_wm_state), (find_wm_window_from_hunt),
(find_wm_window), (start_timeout), (start_do), (kill_timeout),
(wm_restart), (wm_guess_current):
* wm-list.c: (is_blank), (wm_compare), (wm_free),
(wm_check_present), (wm_copy), (wm_list_find), (wm_list_find_exec),
(wm_list_find_files), (wm_list_read_dir), (wm_list_init),
(wm_list_save), (wm_list_revert), (wm_list_add), (wm_list_delete),
(wm_list_set_current), (wm_list_get_current), (wm_list_get_revert),
(wm_read_from_xml), (wm_list_read_from_xml), (wm_write_to_xml),
(wm_list_write_to_xml), (xml_read_bool), (xml_write_bool):
* wm-properties.h:
2002-05-11 04:28:20 +00:00
|
|
|
|
2002-10-29 06:19:52 +00:00
|
|
|
if (history >= n_mouse_modifiers) /* paranoia */
|
|
|
|
return;
|
2002-05-10 Seth Nickell <snickell@stanford.edu>
* .cvsignore:
* Makefile.am:
* gnome-window-properties.c: (wm_selection_changed),
(wm_widget_clear), (wm_widget_new), (wm_widget_add_wm),
(response_cb), (state_changed), (restart_label_update),
(restart_dialog_raise), (restart_dialog_destroyed),
(show_restart_dialog), (hide_restart_dialog), (update_session),
(init_session), (update_gui), (init_callback), (restart_finalize),
(restart_failure), (show_restart_info), (restart_finish),
(restart_callback), (restart), (revert_callback),
(cancel_callback), (apply_wm), (create_dialog), (main):
* gnome-window-properties.glade:
* window-capplet.png:
* window-properties.desktop.in:
* wm-exec.c: (wm_is_running), (find_gnome_wm_window),
(find_wm_window_from_client), (window_has_wm_state),
(descendent_has_wm_state), (find_wm_window_from_hunt),
(find_wm_window), (start_timeout), (start_do), (kill_timeout),
(wm_restart), (wm_guess_current):
* wm-list.c: (is_blank), (wm_compare), (wm_free),
(wm_check_present), (wm_copy), (wm_list_find), (wm_list_find_exec),
(wm_list_find_files), (wm_list_read_dir), (wm_list_init),
(wm_list_save), (wm_list_revert), (wm_list_add), (wm_list_delete),
(wm_list_set_current), (wm_list_get_current), (wm_list_get_revert),
(wm_read_from_xml), (wm_list_read_from_xml), (wm_write_to_xml),
(wm_list_write_to_xml), (xml_read_bool), (xml_write_bool):
* wm-properties.h:
2002-05-11 04:28:20 +00:00
|
|
|
|
2002-10-29 06:19:52 +00:00
|
|
|
new_settings.mouse_move_modifier = mouse_modifiers[history].value;
|
2002-05-10 Seth Nickell <snickell@stanford.edu>
* .cvsignore:
* Makefile.am:
* gnome-window-properties.c: (wm_selection_changed),
(wm_widget_clear), (wm_widget_new), (wm_widget_add_wm),
(response_cb), (state_changed), (restart_label_update),
(restart_dialog_raise), (restart_dialog_destroyed),
(show_restart_dialog), (hide_restart_dialog), (update_session),
(init_session), (update_gui), (init_callback), (restart_finalize),
(restart_failure), (show_restart_info), (restart_finish),
(restart_callback), (restart), (revert_callback),
(cancel_callback), (apply_wm), (create_dialog), (main):
* gnome-window-properties.glade:
* window-capplet.png:
* window-properties.desktop.in:
* wm-exec.c: (wm_is_running), (find_gnome_wm_window),
(find_wm_window_from_client), (window_has_wm_state),
(descendent_has_wm_state), (find_wm_window_from_hunt),
(find_wm_window), (start_timeout), (start_do), (kill_timeout),
(wm_restart), (wm_guess_current):
* wm-list.c: (is_blank), (wm_compare), (wm_free),
(wm_check_present), (wm_copy), (wm_list_find), (wm_list_find_exec),
(wm_list_find_files), (wm_list_read_dir), (wm_list_init),
(wm_list_save), (wm_list_revert), (wm_list_add), (wm_list_delete),
(wm_list_set_current), (wm_list_get_current), (wm_list_get_revert),
(wm_read_from_xml), (wm_list_read_from_xml), (wm_write_to_xml),
(wm_list_write_to_xml), (xml_read_bool), (xml_write_bool):
* wm-properties.h:
2002-05-11 04:28:20 +00:00
|
|
|
|
2002-10-29 06:19:52 +00:00
|
|
|
if (current_wm != NULL &&
|
|
|
|
strcmp (new_settings.mouse_move_modifier,
|
|
|
|
settings.mouse_move_modifier) != 0)
|
|
|
|
gnome_window_manager_change_settings (current_wm, &new_settings);
|
2002-05-10 Seth Nickell <snickell@stanford.edu>
* .cvsignore:
* Makefile.am:
* gnome-window-properties.c: (wm_selection_changed),
(wm_widget_clear), (wm_widget_new), (wm_widget_add_wm),
(response_cb), (state_changed), (restart_label_update),
(restart_dialog_raise), (restart_dialog_destroyed),
(show_restart_dialog), (hide_restart_dialog), (update_session),
(init_session), (update_gui), (init_callback), (restart_finalize),
(restart_failure), (show_restart_info), (restart_finish),
(restart_callback), (restart), (revert_callback),
(cancel_callback), (apply_wm), (create_dialog), (main):
* gnome-window-properties.glade:
* window-capplet.png:
* window-properties.desktop.in:
* wm-exec.c: (wm_is_running), (find_gnome_wm_window),
(find_wm_window_from_client), (window_has_wm_state),
(descendent_has_wm_state), (find_wm_window_from_hunt),
(find_wm_window), (start_timeout), (start_do), (kill_timeout),
(wm_restart), (wm_guess_current):
* wm-list.c: (is_blank), (wm_compare), (wm_free),
(wm_check_present), (wm_copy), (wm_list_find), (wm_list_find_exec),
(wm_list_find_files), (wm_list_read_dir), (wm_list_init),
(wm_list_save), (wm_list_revert), (wm_list_add), (wm_list_delete),
(wm_list_set_current), (wm_list_get_current), (wm_list_get_revert),
(wm_read_from_xml), (wm_list_read_from_xml), (wm_write_to_xml),
(wm_list_write_to_xml), (xml_read_bool), (xml_write_bool):
* wm-properties.h:
2002-05-11 04:28:20 +00:00
|
|
|
}
|
2002-12-02 01:14:14 +00:00
|
|
|
#else
|
|
|
|
static void
|
|
|
|
alt_click_radio_toggled_callback (GtkWidget *radio,
|
|
|
|
void *data)
|
|
|
|
{
|
|
|
|
GnomeWMSettings new_settings;
|
|
|
|
gboolean active;
|
|
|
|
MouseClickModifier *modifier = data;
|
|
|
|
|
|
|
|
new_settings.flags = GNOME_WM_SETTING_MOUSE_MOVE_MODIFIER;
|
|
|
|
active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (radio));
|
|
|
|
|
2004-06-22 01:50:50 +00:00
|
|
|
if (active && current_wm != NULL) {
|
|
|
|
new_settings.mouse_move_modifier = modifier->value;
|
|
|
|
|
|
|
|
if ((settings->mouse_move_modifier == NULL) ||
|
|
|
|
(strcmp (new_settings.mouse_move_modifier,
|
|
|
|
settings->mouse_move_modifier) != 0))
|
2002-12-02 01:14:14 +00:00
|
|
|
gnome_window_manager_change_settings (current_wm, &new_settings);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
2002-05-10 Seth Nickell <snickell@stanford.edu>
* .cvsignore:
* Makefile.am:
* gnome-window-properties.c: (wm_selection_changed),
(wm_widget_clear), (wm_widget_new), (wm_widget_add_wm),
(response_cb), (state_changed), (restart_label_update),
(restart_dialog_raise), (restart_dialog_destroyed),
(show_restart_dialog), (hide_restart_dialog), (update_session),
(init_session), (update_gui), (init_callback), (restart_finalize),
(restart_failure), (show_restart_info), (restart_finish),
(restart_callback), (restart), (revert_callback),
(cancel_callback), (apply_wm), (create_dialog), (main):
* gnome-window-properties.glade:
* window-capplet.png:
* window-properties.desktop.in:
* wm-exec.c: (wm_is_running), (find_gnome_wm_window),
(find_wm_window_from_client), (window_has_wm_state),
(descendent_has_wm_state), (find_wm_window_from_hunt),
(find_wm_window), (start_timeout), (start_do), (kill_timeout),
(wm_restart), (wm_guess_current):
* wm-list.c: (is_blank), (wm_compare), (wm_free),
(wm_check_present), (wm_copy), (wm_list_find), (wm_list_find_exec),
(wm_list_find_files), (wm_list_read_dir), (wm_list_init),
(wm_list_save), (wm_list_revert), (wm_list_add), (wm_list_delete),
(wm_list_set_current), (wm_list_get_current), (wm_list_get_revert),
(wm_read_from_xml), (wm_list_read_from_xml), (wm_write_to_xml),
(wm_list_write_to_xml), (xml_read_bool), (xml_write_bool):
* wm-properties.h:
2002-05-11 04:28:20 +00:00
|
|
|
|
|
|
|
static void
|
2002-10-29 06:19:52 +00:00
|
|
|
update_sensitivity (void)
|
2002-05-10 Seth Nickell <snickell@stanford.edu>
* .cvsignore:
* Makefile.am:
* gnome-window-properties.c: (wm_selection_changed),
(wm_widget_clear), (wm_widget_new), (wm_widget_add_wm),
(response_cb), (state_changed), (restart_label_update),
(restart_dialog_raise), (restart_dialog_destroyed),
(show_restart_dialog), (hide_restart_dialog), (update_session),
(init_session), (update_gui), (init_callback), (restart_finalize),
(restart_failure), (show_restart_info), (restart_finish),
(restart_callback), (restart), (revert_callback),
(cancel_callback), (apply_wm), (create_dialog), (main):
* gnome-window-properties.glade:
* window-capplet.png:
* window-properties.desktop.in:
* wm-exec.c: (wm_is_running), (find_gnome_wm_window),
(find_wm_window_from_client), (window_has_wm_state),
(descendent_has_wm_state), (find_wm_window_from_hunt),
(find_wm_window), (start_timeout), (start_do), (kill_timeout),
(wm_restart), (wm_guess_current):
* wm-list.c: (is_blank), (wm_compare), (wm_free),
(wm_check_present), (wm_copy), (wm_list_find), (wm_list_find_exec),
(wm_list_find_files), (wm_list_read_dir), (wm_list_init),
(wm_list_save), (wm_list_revert), (wm_list_add), (wm_list_delete),
(wm_list_set_current), (wm_list_get_current), (wm_list_get_revert),
(wm_read_from_xml), (wm_list_read_from_xml), (wm_write_to_xml),
(wm_list_write_to_xml), (xml_read_bool), (xml_write_bool):
* wm-properties.h:
2002-05-11 04:28:20 +00:00
|
|
|
{
|
2002-10-29 06:19:52 +00:00
|
|
|
gtk_widget_set_sensitive (autoraise_checkbutton,
|
2004-06-22 01:50:50 +00:00
|
|
|
settings->focus_follows_mouse);
|
2002-10-29 06:19:52 +00:00
|
|
|
|
|
|
|
gtk_widget_set_sensitive (autoraise_delay_hbox,
|
2004-06-22 01:50:50 +00:00
|
|
|
settings->focus_follows_mouse && settings->autoraise);
|
2002-10-29 06:19:52 +00:00
|
|
|
|
|
|
|
gtk_widget_set_sensitive (double_click_titlebar_optionmenu,
|
|
|
|
n_double_click_actions > 1);
|
|
|
|
|
|
|
|
/* disable the whole dialog while no WM is running, or
|
|
|
|
* a WM we don't understand is running. We should probably do
|
|
|
|
* something better. I don't want to just launch the config tool
|
|
|
|
* as we would on startup though, because then you'd get weirdness
|
|
|
|
* in the gap time between old and new WM.
|
|
|
|
*/
|
|
|
|
gtk_widget_set_sensitive (dialog_win, current_wm != NULL);
|
2002-05-10 Seth Nickell <snickell@stanford.edu>
* .cvsignore:
* Makefile.am:
* gnome-window-properties.c: (wm_selection_changed),
(wm_widget_clear), (wm_widget_new), (wm_widget_add_wm),
(response_cb), (state_changed), (restart_label_update),
(restart_dialog_raise), (restart_dialog_destroyed),
(show_restart_dialog), (hide_restart_dialog), (update_session),
(init_session), (update_gui), (init_callback), (restart_finalize),
(restart_failure), (show_restart_info), (restart_finish),
(restart_callback), (restart), (revert_callback),
(cancel_callback), (apply_wm), (create_dialog), (main):
* gnome-window-properties.glade:
* window-capplet.png:
* window-properties.desktop.in:
* wm-exec.c: (wm_is_running), (find_gnome_wm_window),
(find_wm_window_from_client), (window_has_wm_state),
(descendent_has_wm_state), (find_wm_window_from_hunt),
(find_wm_window), (start_timeout), (start_do), (kill_timeout),
(wm_restart), (wm_guess_current):
* wm-list.c: (is_blank), (wm_compare), (wm_free),
(wm_check_present), (wm_copy), (wm_list_find), (wm_list_find_exec),
(wm_list_find_files), (wm_list_read_dir), (wm_list_init),
(wm_list_save), (wm_list_revert), (wm_list_add), (wm_list_delete),
(wm_list_set_current), (wm_list_get_current), (wm_list_get_revert),
(wm_read_from_xml), (wm_list_read_from_xml), (wm_write_to_xml),
(wm_list_write_to_xml), (xml_read_bool), (xml_write_bool):
* wm-properties.h:
2002-05-11 04:28:20 +00:00
|
|
|
}
|
|
|
|
|
2002-10-29 06:19:52 +00:00
|
|
|
static void
|
|
|
|
init_settings_struct (GnomeWMSettings *settings)
|
2002-05-10 Seth Nickell <snickell@stanford.edu>
* .cvsignore:
* Makefile.am:
* gnome-window-properties.c: (wm_selection_changed),
(wm_widget_clear), (wm_widget_new), (wm_widget_add_wm),
(response_cb), (state_changed), (restart_label_update),
(restart_dialog_raise), (restart_dialog_destroyed),
(show_restart_dialog), (hide_restart_dialog), (update_session),
(init_session), (update_gui), (init_callback), (restart_finalize),
(restart_failure), (show_restart_info), (restart_finish),
(restart_callback), (restart), (revert_callback),
(cancel_callback), (apply_wm), (create_dialog), (main):
* gnome-window-properties.glade:
* window-capplet.png:
* window-properties.desktop.in:
* wm-exec.c: (wm_is_running), (find_gnome_wm_window),
(find_wm_window_from_client), (window_has_wm_state),
(descendent_has_wm_state), (find_wm_window_from_hunt),
(find_wm_window), (start_timeout), (start_do), (kill_timeout),
(wm_restart), (wm_guess_current):
* wm-list.c: (is_blank), (wm_compare), (wm_free),
(wm_check_present), (wm_copy), (wm_list_find), (wm_list_find_exec),
(wm_list_find_files), (wm_list_read_dir), (wm_list_init),
(wm_list_save), (wm_list_revert), (wm_list_add), (wm_list_delete),
(wm_list_set_current), (wm_list_get_current), (wm_list_get_revert),
(wm_read_from_xml), (wm_list_read_from_xml), (wm_write_to_xml),
(wm_list_write_to_xml), (xml_read_bool), (xml_write_bool):
* wm-properties.h:
2002-05-11 04:28:20 +00:00
|
|
|
{
|
2002-10-29 06:19:52 +00:00
|
|
|
/* Init fields that weren't initialized */
|
|
|
|
if ((settings->flags & GNOME_WM_SETTING_MOUSE_FOCUS) == 0)
|
|
|
|
settings->focus_follows_mouse = FALSE;
|
2002-05-10 Seth Nickell <snickell@stanford.edu>
* .cvsignore:
* Makefile.am:
* gnome-window-properties.c: (wm_selection_changed),
(wm_widget_clear), (wm_widget_new), (wm_widget_add_wm),
(response_cb), (state_changed), (restart_label_update),
(restart_dialog_raise), (restart_dialog_destroyed),
(show_restart_dialog), (hide_restart_dialog), (update_session),
(init_session), (update_gui), (init_callback), (restart_finalize),
(restart_failure), (show_restart_info), (restart_finish),
(restart_callback), (restart), (revert_callback),
(cancel_callback), (apply_wm), (create_dialog), (main):
* gnome-window-properties.glade:
* window-capplet.png:
* window-properties.desktop.in:
* wm-exec.c: (wm_is_running), (find_gnome_wm_window),
(find_wm_window_from_client), (window_has_wm_state),
(descendent_has_wm_state), (find_wm_window_from_hunt),
(find_wm_window), (start_timeout), (start_do), (kill_timeout),
(wm_restart), (wm_guess_current):
* wm-list.c: (is_blank), (wm_compare), (wm_free),
(wm_check_present), (wm_copy), (wm_list_find), (wm_list_find_exec),
(wm_list_find_files), (wm_list_read_dir), (wm_list_init),
(wm_list_save), (wm_list_revert), (wm_list_add), (wm_list_delete),
(wm_list_set_current), (wm_list_get_current), (wm_list_get_revert),
(wm_read_from_xml), (wm_list_read_from_xml), (wm_write_to_xml),
(wm_list_write_to_xml), (xml_read_bool), (xml_write_bool):
* wm-properties.h:
2002-05-11 04:28:20 +00:00
|
|
|
|
2002-10-29 06:19:52 +00:00
|
|
|
if ((settings->flags & GNOME_WM_SETTING_AUTORAISE) == 0)
|
|
|
|
settings->autoraise = FALSE;
|
2002-05-10 Seth Nickell <snickell@stanford.edu>
* .cvsignore:
* Makefile.am:
* gnome-window-properties.c: (wm_selection_changed),
(wm_widget_clear), (wm_widget_new), (wm_widget_add_wm),
(response_cb), (state_changed), (restart_label_update),
(restart_dialog_raise), (restart_dialog_destroyed),
(show_restart_dialog), (hide_restart_dialog), (update_session),
(init_session), (update_gui), (init_callback), (restart_finalize),
(restart_failure), (show_restart_info), (restart_finish),
(restart_callback), (restart), (revert_callback),
(cancel_callback), (apply_wm), (create_dialog), (main):
* gnome-window-properties.glade:
* window-capplet.png:
* window-properties.desktop.in:
* wm-exec.c: (wm_is_running), (find_gnome_wm_window),
(find_wm_window_from_client), (window_has_wm_state),
(descendent_has_wm_state), (find_wm_window_from_hunt),
(find_wm_window), (start_timeout), (start_do), (kill_timeout),
(wm_restart), (wm_guess_current):
* wm-list.c: (is_blank), (wm_compare), (wm_free),
(wm_check_present), (wm_copy), (wm_list_find), (wm_list_find_exec),
(wm_list_find_files), (wm_list_read_dir), (wm_list_init),
(wm_list_save), (wm_list_revert), (wm_list_add), (wm_list_delete),
(wm_list_set_current), (wm_list_get_current), (wm_list_get_revert),
(wm_read_from_xml), (wm_list_read_from_xml), (wm_write_to_xml),
(wm_list_write_to_xml), (xml_read_bool), (xml_write_bool):
* wm-properties.h:
2002-05-11 04:28:20 +00:00
|
|
|
|
2002-10-29 06:19:52 +00:00
|
|
|
if ((settings->flags & GNOME_WM_SETTING_AUTORAISE_DELAY) == 0)
|
|
|
|
settings->autoraise_delay = 1000;
|
|
|
|
|
|
|
|
if ((settings->flags & GNOME_WM_SETTING_MOUSE_MOVE_MODIFIER) == 0)
|
|
|
|
settings->mouse_move_modifier = "Super";
|
2002-05-11 04:48:16 +00:00
|
|
|
|
2002-10-29 06:19:52 +00:00
|
|
|
if ((settings->flags & GNOME_WM_SETTING_DOUBLE_CLICK_ACTION) == 0)
|
|
|
|
settings->double_click_action = 0;
|
|
|
|
}
|
2002-05-11 04:48:16 +00:00
|
|
|
|
2002-10-29 06:19:52 +00:00
|
|
|
static void
|
2002-12-02 01:14:14 +00:00
|
|
|
set_alt_click_value (const GnomeWMSettings *settings)
|
2002-10-29 06:19:52 +00:00
|
|
|
{
|
2004-06-22 01:50:50 +00:00
|
|
|
gboolean match_found = FALSE;
|
|
|
|
int i;
|
|
|
|
|
|
|
|
/* We look for a matching modifier and set it. */
|
|
|
|
if (settings->mouse_move_modifier != NULL) {
|
|
|
|
for (i = 0; i < n_mouse_modifiers; i ++)
|
|
|
|
if (strcmp (mouse_modifiers[i].value,
|
|
|
|
settings->mouse_move_modifier) == 0) {
|
|
|
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (mouse_modifiers[i].radio),
|
|
|
|
TRUE);
|
|
|
|
match_found = TRUE;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* No matching modifier was found; we set all the toggle buttons to be
|
|
|
|
* insensitive. */
|
|
|
|
for (i = 0; i < n_mouse_modifiers; i++) {
|
|
|
|
gtk_toggle_button_set_inconsistent (GTK_TOGGLE_BUTTON (mouse_modifiers[i].radio),
|
|
|
|
! match_found);
|
|
|
|
}
|
2002-05-10 Seth Nickell <snickell@stanford.edu>
* .cvsignore:
* Makefile.am:
* gnome-window-properties.c: (wm_selection_changed),
(wm_widget_clear), (wm_widget_new), (wm_widget_add_wm),
(response_cb), (state_changed), (restart_label_update),
(restart_dialog_raise), (restart_dialog_destroyed),
(show_restart_dialog), (hide_restart_dialog), (update_session),
(init_session), (update_gui), (init_callback), (restart_finalize),
(restart_failure), (show_restart_info), (restart_finish),
(restart_callback), (restart), (revert_callback),
(cancel_callback), (apply_wm), (create_dialog), (main):
* gnome-window-properties.glade:
* window-capplet.png:
* window-properties.desktop.in:
* wm-exec.c: (wm_is_running), (find_gnome_wm_window),
(find_wm_window_from_client), (window_has_wm_state),
(descendent_has_wm_state), (find_wm_window_from_hunt),
(find_wm_window), (start_timeout), (start_do), (kill_timeout),
(wm_restart), (wm_guess_current):
* wm-list.c: (is_blank), (wm_compare), (wm_free),
(wm_check_present), (wm_copy), (wm_list_find), (wm_list_find_exec),
(wm_list_find_files), (wm_list_read_dir), (wm_list_init),
(wm_list_save), (wm_list_revert), (wm_list_add), (wm_list_delete),
(wm_list_set_current), (wm_list_get_current), (wm_list_get_revert),
(wm_read_from_xml), (wm_list_read_from_xml), (wm_write_to_xml),
(wm_list_write_to_xml), (xml_read_bool), (xml_write_bool):
* wm-properties.h:
2002-05-11 04:28:20 +00:00
|
|
|
}
|
|
|
|
|
2002-06-04 22:58:35 +00:00
|
|
|
static void
|
2002-10-29 06:19:52 +00:00
|
|
|
rebuild_double_click_actions_menu (void)
|
2002-06-04 22:58:35 +00:00
|
|
|
{
|
2002-10-29 06:19:52 +00:00
|
|
|
int i;
|
|
|
|
GtkWidget *menu;
|
|
|
|
|
2002-06-04 22:58:35 +00:00
|
|
|
menu = gtk_menu_new ();
|
2002-10-29 06:19:52 +00:00
|
|
|
i = 0;
|
|
|
|
while (i < n_double_click_actions) {
|
|
|
|
GtkWidget *mi;
|
|
|
|
|
|
|
|
mi = gtk_menu_item_new_with_label (double_click_actions[i].human_readable_name);
|
|
|
|
gtk_menu_shell_append (GTK_MENU_SHELL (menu),
|
|
|
|
mi);
|
|
|
|
|
|
|
|
gtk_widget_show (mi);
|
|
|
|
|
|
|
|
++i;
|
|
|
|
}
|
|
|
|
|
|
|
|
gtk_option_menu_set_menu (GTK_OPTION_MENU (double_click_titlebar_optionmenu),
|
|
|
|
menu);
|
|
|
|
}
|
2002-06-04 22:58:35 +00:00
|
|
|
|
2002-10-29 06:19:52 +00:00
|
|
|
static void
|
|
|
|
reload_settings (void)
|
|
|
|
{
|
|
|
|
GnomeWMSettings new_settings;
|
2002-06-05 00:36:57 +00:00
|
|
|
|
2002-10-29 06:19:52 +00:00
|
|
|
g_assert (n_mouse_modifiers > 0);
|
|
|
|
|
|
|
|
if (current_wm != NULL) {
|
|
|
|
new_settings.flags = GNOME_WM_SETTING_MOUSE_FOCUS |
|
|
|
|
GNOME_WM_SETTING_AUTORAISE |
|
|
|
|
GNOME_WM_SETTING_AUTORAISE_DELAY |
|
|
|
|
GNOME_WM_SETTING_MOUSE_MOVE_MODIFIER |
|
|
|
|
GNOME_WM_SETTING_DOUBLE_CLICK_ACTION;
|
|
|
|
|
|
|
|
/* this will clear any flags that don't get filled in */
|
|
|
|
gnome_window_manager_get_settings (current_wm, &new_settings);
|
|
|
|
} else {
|
|
|
|
new_settings.flags = 0;
|
|
|
|
}
|
2002-06-04 22:58:35 +00:00
|
|
|
|
2002-10-29 06:19:52 +00:00
|
|
|
init_settings_struct (&new_settings);
|
|
|
|
|
2004-06-22 01:50:50 +00:00
|
|
|
if (new_settings.focus_follows_mouse != settings->focus_follows_mouse)
|
2002-10-29 06:19:52 +00:00
|
|
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (focus_mode_checkbutton),
|
|
|
|
new_settings.focus_follows_mouse);
|
2002-06-04 22:58:35 +00:00
|
|
|
|
2004-06-22 01:50:50 +00:00
|
|
|
if (new_settings.autoraise != settings->autoraise)
|
2002-10-29 06:19:52 +00:00
|
|
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (autoraise_checkbutton),
|
|
|
|
new_settings.autoraise);
|
2002-06-05 00:36:57 +00:00
|
|
|
|
2004-06-22 01:50:50 +00:00
|
|
|
if (new_settings.autoraise_delay != settings->autoraise_delay)
|
2002-12-02 01:14:14 +00:00
|
|
|
gtk_range_set_value (GTK_RANGE (autoraise_delay_slider),
|
|
|
|
new_settings.autoraise_delay / 1000.0);
|
2002-10-29 06:19:52 +00:00
|
|
|
|
|
|
|
if (n_double_click_actions > 0 &&
|
2004-06-22 01:50:50 +00:00
|
|
|
new_settings.double_click_action != settings->double_click_action) {
|
2002-10-29 06:19:52 +00:00
|
|
|
gtk_option_menu_set_history (GTK_OPTION_MENU (double_click_titlebar_optionmenu),
|
|
|
|
new_settings.double_click_action);
|
|
|
|
}
|
|
|
|
|
2004-06-22 01:50:50 +00:00
|
|
|
if (settings->mouse_move_modifier == NULL ||
|
|
|
|
new_settings.mouse_move_modifier == NULL ||
|
|
|
|
strcmp (settings->mouse_move_modifier,
|
2002-10-29 06:19:52 +00:00
|
|
|
new_settings.mouse_move_modifier) != 0) {
|
2002-12-02 01:14:14 +00:00
|
|
|
set_alt_click_value (&new_settings);
|
2002-06-04 22:58:35 +00:00
|
|
|
}
|
|
|
|
|
2004-06-22 01:50:50 +00:00
|
|
|
gnome_wm_settings_free (settings);
|
|
|
|
settings = gnome_wm_settings_copy (&new_settings);
|
2002-06-05 00:36:57 +00:00
|
|
|
|
2002-10-29 06:19:52 +00:00
|
|
|
update_sensitivity ();
|
2002-06-04 22:58:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2002-10-29 06:19:52 +00:00
|
|
|
wm_settings_changed_callback (GnomeWindowManager *wm,
|
|
|
|
void *data)
|
2002-06-04 22:58:35 +00:00
|
|
|
{
|
2002-10-29 06:19:52 +00:00
|
|
|
reload_settings ();
|
|
|
|
}
|
2002-06-04 22:58:35 +00:00
|
|
|
|
2002-10-29 06:19:52 +00:00
|
|
|
static void
|
|
|
|
update_wm (GdkScreen *screen,
|
|
|
|
gboolean load_settings)
|
|
|
|
{
|
|
|
|
g_assert (n_mouse_modifiers > 0);
|
2002-06-04 22:58:35 +00:00
|
|
|
|
2002-10-29 06:19:52 +00:00
|
|
|
if (current_wm != NULL) {
|
|
|
|
g_signal_handlers_disconnect_by_func (G_OBJECT (current_wm),
|
|
|
|
G_CALLBACK (wm_settings_changed_callback),
|
|
|
|
NULL);
|
|
|
|
current_wm = NULL;
|
|
|
|
double_click_actions = NULL;
|
|
|
|
n_double_click_actions = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
current_wm = gnome_wm_manager_get_current (screen);
|
|
|
|
|
|
|
|
if (current_wm != NULL) {
|
|
|
|
g_signal_connect (G_OBJECT (current_wm), "settings_changed",
|
|
|
|
G_CALLBACK (wm_settings_changed_callback), NULL);
|
|
|
|
|
|
|
|
gnome_window_manager_get_double_click_actions (current_wm,
|
|
|
|
&double_click_actions,
|
|
|
|
&n_double_click_actions);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
rebuild_double_click_actions_menu ();
|
|
|
|
if (load_settings)
|
|
|
|
reload_settings ();
|
2002-06-04 22:58:35 +00:00
|
|
|
}
|
|
|
|
|
2002-05-11 05:01:07 +00:00
|
|
|
static void
|
2002-10-29 06:19:52 +00:00
|
|
|
wm_changed_callback (GdkScreen *screen,
|
|
|
|
void *data)
|
|
|
|
{
|
|
|
|
update_wm (screen, TRUE);
|
|
|
|
}
|
2002-06-04 22:58:35 +00:00
|
|
|
|
2002-10-29 06:19:52 +00:00
|
|
|
static void
|
|
|
|
response_cb (GtkWidget *dialog_win,
|
|
|
|
int response_id,
|
|
|
|
void *data)
|
|
|
|
{
|
Ignore gladep (grrr) files.
2002-05-11 Seth Nickell <snickell@stanford.edu>
* .cvsignore:
Ignore gladep (grrr) files.
* Makefile.am:
* gnome-window-manager.c: (gnome_window_manager_new):
* gnome-window-manager.h:
* metacity-window-manager.c: (window_manager_new),
(metacity_set_theme), (metacity_get_theme_list),
(metacity_set_font), (metacity_get_focus_follows_mouse),
(metacity_set_focus_follows_mouse), (finalize), (class_init),
(init), (metacity_window_manager_get_type):
* metacity-window-manager.h:
First pass at adding settings modules.
* window-capplet.png:
Use the wm-properties icon.
* wm-list.c: (wm_list_find), (wm_list_find_exec):
Nix some warnings caused by non-use of const.
* gnome-window-properties.c: (setup_dialog):
* gnome-window-properties.glade:
Tweak appearance some more.
2002-05-11 19:08:05 +00:00
|
|
|
|
2002-10-29 06:19:52 +00:00
|
|
|
if (response_id == GTK_RESPONSE_HELP) {
|
2004-06-07 11:41:13 +00:00
|
|
|
capplet_help (GTK_WINDOW (dialog_win),
|
|
|
|
"user-guide.xml",
|
|
|
|
"goscustdesk-58");
|
2002-10-29 06:19:52 +00:00
|
|
|
} else {
|
|
|
|
gtk_widget_destroy (dialog_win);
|
|
|
|
}
|
2002-05-11 05:01:07 +00:00
|
|
|
}
|
|
|
|
|
2002-10-29 06:19:52 +00:00
|
|
|
static void
|
|
|
|
try_spawn_config_tool (GdkScreen *screen)
|
|
|
|
{
|
|
|
|
GError *error;
|
|
|
|
|
|
|
|
error = NULL;
|
|
|
|
gnome_wm_manager_spawn_config_tool_for_current (screen, &error);
|
|
|
|
|
|
|
|
if (error != NULL) {
|
|
|
|
GtkWidget *no_tool_dialog;
|
|
|
|
char *str;
|
|
|
|
char *escaped;
|
|
|
|
|
|
|
|
escaped = g_markup_escape_text (error->message, -1);
|
|
|
|
|
2007-01-07 17:00:21 +00:00
|
|
|
str = g_strdup_printf ("<b>%s</b>\n\n%s",
|
|
|
|
_("Cannot start the preferences application for your window manager"),
|
2002-10-29 06:19:52 +00:00
|
|
|
escaped);
|
|
|
|
g_free (escaped);
|
|
|
|
|
|
|
|
no_tool_dialog =
|
|
|
|
gtk_message_dialog_new (NULL,
|
|
|
|
GTK_DIALOG_DESTROY_WITH_PARENT,
|
|
|
|
GTK_MESSAGE_ERROR,
|
|
|
|
GTK_BUTTONS_CLOSE,
|
|
|
|
" ");
|
|
|
|
gtk_window_set_title (GTK_WINDOW (no_tool_dialog), "");
|
|
|
|
gtk_window_set_resizable (GTK_WINDOW (no_tool_dialog), FALSE);
|
|
|
|
|
|
|
|
gtk_label_set_markup (GTK_LABEL (GTK_MESSAGE_DIALOG (no_tool_dialog)->label),
|
|
|
|
str);
|
|
|
|
|
|
|
|
g_free (str);
|
|
|
|
|
|
|
|
gtk_dialog_run (GTK_DIALOG (no_tool_dialog));
|
|
|
|
|
|
|
|
gtk_widget_destroy (no_tool_dialog);
|
|
|
|
g_error_free (error);
|
|
|
|
|
|
|
|
exit (1);
|
|
|
|
}
|
Split code for changing window managers into libgnome-window-settings.
2002-06-02 Seth Nickell <snickell@stanford.edu>
* Makefile.am:
* gnome-window-properties.c: (wm_selection_changed),
(wm_widget_add_wm), (update_gui), (apply_wm), (create_dialog),
(main):
Split code for changing window managers into libgnome-window-settings.
This is so in the future we can potentially move this into gnome-settings-daemon,
though for now its not robust enough that we really want to do that.
* metacity-window-manager.c: (window_manager_new),
(metacity_window_manager_init), (metacity_window_manager_finalize),
(metacity_window_manager_class_init),
(metacity_window_manager_get_type):
* metacity-window-manager.h:
Update to match changes to gnome-window-manager.h
* wm-exec.c:
* wm-list.c:
* wm-properties.h:
Move these into libgnome-window-settings.
(Jacob, I did make dist, and then built the resulting tarball, hope I
don't cause problems this time :-/)
2002-06-03 00:27:15 +00:00
|
|
|
|
2002-10-29 06:19:52 +00:00
|
|
|
/* exit, let the config tool handle it */
|
|
|
|
exit (0);
|
|
|
|
}
|
Split code for changing window managers into libgnome-window-settings.
2002-06-02 Seth Nickell <snickell@stanford.edu>
* Makefile.am:
* gnome-window-properties.c: (wm_selection_changed),
(wm_widget_add_wm), (update_gui), (apply_wm), (create_dialog),
(main):
Split code for changing window managers into libgnome-window-settings.
This is so in the future we can potentially move this into gnome-settings-daemon,
though for now its not robust enough that we really want to do that.
* metacity-window-manager.c: (window_manager_new),
(metacity_window_manager_init), (metacity_window_manager_finalize),
(metacity_window_manager_class_init),
(metacity_window_manager_get_type):
* metacity-window-manager.h:
Update to match changes to gnome-window-manager.h
* wm-exec.c:
* wm-list.c:
* wm-properties.h:
Move these into libgnome-window-settings.
(Jacob, I did make dist, and then built the resulting tarball, hope I
don't cause problems this time :-/)
2002-06-03 00:27:15 +00:00
|
|
|
|
2002-05-10 Seth Nickell <snickell@stanford.edu>
* .cvsignore:
* Makefile.am:
* gnome-window-properties.c: (wm_selection_changed),
(wm_widget_clear), (wm_widget_new), (wm_widget_add_wm),
(response_cb), (state_changed), (restart_label_update),
(restart_dialog_raise), (restart_dialog_destroyed),
(show_restart_dialog), (hide_restart_dialog), (update_session),
(init_session), (update_gui), (init_callback), (restart_finalize),
(restart_failure), (show_restart_info), (restart_finish),
(restart_callback), (restart), (revert_callback),
(cancel_callback), (apply_wm), (create_dialog), (main):
* gnome-window-properties.glade:
* window-capplet.png:
* window-properties.desktop.in:
* wm-exec.c: (wm_is_running), (find_gnome_wm_window),
(find_wm_window_from_client), (window_has_wm_state),
(descendent_has_wm_state), (find_wm_window_from_hunt),
(find_wm_window), (start_timeout), (start_do), (kill_timeout),
(wm_restart), (wm_guess_current):
* wm-list.c: (is_blank), (wm_compare), (wm_free),
(wm_check_present), (wm_copy), (wm_list_find), (wm_list_find_exec),
(wm_list_find_files), (wm_list_read_dir), (wm_list_init),
(wm_list_save), (wm_list_revert), (wm_list_add), (wm_list_delete),
(wm_list_set_current), (wm_list_get_current), (wm_list_get_revert),
(wm_read_from_xml), (wm_list_read_from_xml), (wm_write_to_xml),
(wm_list_write_to_xml), (xml_read_bool), (xml_write_bool):
* wm-properties.h:
2002-05-11 04:28:20 +00:00
|
|
|
int
|
|
|
|
main (int argc, char **argv)
|
|
|
|
{
|
2007-01-31 17:51:13 +00:00
|
|
|
GnomeProgram *program;
|
2002-10-29 06:19:52 +00:00
|
|
|
GdkScreen *screen;
|
2004-06-22 01:50:50 +00:00
|
|
|
GnomeWMSettings new_settings;
|
2002-12-02 01:14:14 +00:00
|
|
|
int i;
|
2002-10-29 06:19:52 +00:00
|
|
|
|
2002-05-30 23:06:37 +00:00
|
|
|
bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
|
|
|
|
bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
|
|
|
|
textdomain (GETTEXT_PACKAGE);
|
2002-05-10 Seth Nickell <snickell@stanford.edu>
* .cvsignore:
* Makefile.am:
* gnome-window-properties.c: (wm_selection_changed),
(wm_widget_clear), (wm_widget_new), (wm_widget_add_wm),
(response_cb), (state_changed), (restart_label_update),
(restart_dialog_raise), (restart_dialog_destroyed),
(show_restart_dialog), (hide_restart_dialog), (update_session),
(init_session), (update_gui), (init_callback), (restart_finalize),
(restart_failure), (show_restart_info), (restart_finish),
(restart_callback), (restart), (revert_callback),
(cancel_callback), (apply_wm), (create_dialog), (main):
* gnome-window-properties.glade:
* window-capplet.png:
* window-properties.desktop.in:
* wm-exec.c: (wm_is_running), (find_gnome_wm_window),
(find_wm_window_from_client), (window_has_wm_state),
(descendent_has_wm_state), (find_wm_window_from_hunt),
(find_wm_window), (start_timeout), (start_do), (kill_timeout),
(wm_restart), (wm_guess_current):
* wm-list.c: (is_blank), (wm_compare), (wm_free),
(wm_check_present), (wm_copy), (wm_list_find), (wm_list_find_exec),
(wm_list_find_files), (wm_list_read_dir), (wm_list_init),
(wm_list_save), (wm_list_revert), (wm_list_add), (wm_list_delete),
(wm_list_set_current), (wm_list_get_current), (wm_list_get_revert),
(wm_read_from_xml), (wm_list_read_from_xml), (wm_write_to_xml),
(wm_list_write_to_xml), (xml_read_bool), (xml_write_bool):
* wm-properties.h:
2002-05-11 04:28:20 +00:00
|
|
|
|
2007-01-31 17:51:13 +00:00
|
|
|
program = gnome_program_init ("gnome-window-properties", VERSION,
|
|
|
|
LIBGNOMEUI_MODULE, argc, argv,
|
|
|
|
NULL);
|
2002-05-10 Seth Nickell <snickell@stanford.edu>
* .cvsignore:
* Makefile.am:
* gnome-window-properties.c: (wm_selection_changed),
(wm_widget_clear), (wm_widget_new), (wm_widget_add_wm),
(response_cb), (state_changed), (restart_label_update),
(restart_dialog_raise), (restart_dialog_destroyed),
(show_restart_dialog), (hide_restart_dialog), (update_session),
(init_session), (update_gui), (init_callback), (restart_finalize),
(restart_failure), (show_restart_info), (restart_finish),
(restart_callback), (restart), (revert_callback),
(cancel_callback), (apply_wm), (create_dialog), (main):
* gnome-window-properties.glade:
* window-capplet.png:
* window-properties.desktop.in:
* wm-exec.c: (wm_is_running), (find_gnome_wm_window),
(find_wm_window_from_client), (window_has_wm_state),
(descendent_has_wm_state), (find_wm_window_from_hunt),
(find_wm_window), (start_timeout), (start_do), (kill_timeout),
(wm_restart), (wm_guess_current):
* wm-list.c: (is_blank), (wm_compare), (wm_free),
(wm_check_present), (wm_copy), (wm_list_find), (wm_list_find_exec),
(wm_list_find_files), (wm_list_read_dir), (wm_list_init),
(wm_list_save), (wm_list_revert), (wm_list_add), (wm_list_delete),
(wm_list_set_current), (wm_list_get_current), (wm_list_get_revert),
(wm_read_from_xml), (wm_list_read_from_xml), (wm_write_to_xml),
(wm_list_write_to_xml), (xml_read_bool), (xml_write_bool):
* wm-properties.h:
2002-05-11 04:28:20 +00:00
|
|
|
|
2002-10-29 06:19:52 +00:00
|
|
|
gnome_wm_manager_init ();
|
2002-06-04 22:58:35 +00:00
|
|
|
|
2002-10-29 06:19:52 +00:00
|
|
|
screen = gdk_display_get_default_screen (gdk_display_get_default ());
|
|
|
|
|
|
|
|
current_wm = gnome_wm_manager_get_current (screen);
|
|
|
|
|
|
|
|
if (current_wm == NULL) {
|
|
|
|
try_spawn_config_tool (screen);
|
|
|
|
return 0;
|
|
|
|
}
|
Split code for changing window managers into libgnome-window-settings.
2002-06-02 Seth Nickell <snickell@stanford.edu>
* Makefile.am:
* gnome-window-properties.c: (wm_selection_changed),
(wm_widget_add_wm), (update_gui), (apply_wm), (create_dialog),
(main):
Split code for changing window managers into libgnome-window-settings.
This is so in the future we can potentially move this into gnome-settings-daemon,
though for now its not robust enough that we really want to do that.
* metacity-window-manager.c: (window_manager_new),
(metacity_window_manager_init), (metacity_window_manager_finalize),
(metacity_window_manager_class_init),
(metacity_window_manager_get_type):
* metacity-window-manager.h:
Update to match changes to gnome-window-manager.h
* wm-exec.c:
* wm-list.c:
* wm-properties.h:
Move these into libgnome-window-settings.
(Jacob, I did make dist, and then built the resulting tarball, hope I
don't cause problems this time :-/)
2002-06-03 00:27:15 +00:00
|
|
|
|
2002-10-29 06:19:52 +00:00
|
|
|
dialog = glade_xml_new (GLADEDIR "/gnome-window-properties.glade",
|
|
|
|
"main-dialog", GETTEXT_PACKAGE);
|
2002-06-04 22:58:35 +00:00
|
|
|
|
2002-10-29 06:19:52 +00:00
|
|
|
if (dialog == NULL) {
|
|
|
|
g_warning ("Missing glade file for gnome-window-properties");
|
|
|
|
exit (1);
|
|
|
|
}
|
Split code for changing window managers into libgnome-window-settings.
2002-06-02 Seth Nickell <snickell@stanford.edu>
* Makefile.am:
* gnome-window-properties.c: (wm_selection_changed),
(wm_widget_add_wm), (update_gui), (apply_wm), (create_dialog),
(main):
Split code for changing window managers into libgnome-window-settings.
This is so in the future we can potentially move this into gnome-settings-daemon,
though for now its not robust enough that we really want to do that.
* metacity-window-manager.c: (window_manager_new),
(metacity_window_manager_init), (metacity_window_manager_finalize),
(metacity_window_manager_class_init),
(metacity_window_manager_get_type):
* metacity-window-manager.h:
Update to match changes to gnome-window-manager.h
* wm-exec.c:
* wm-list.c:
* wm-properties.h:
Move these into libgnome-window-settings.
(Jacob, I did make dist, and then built the resulting tarball, hope I
don't cause problems this time :-/)
2002-06-03 00:27:15 +00:00
|
|
|
|
2002-10-29 06:19:52 +00:00
|
|
|
dialog_win = WID ("main-dialog");
|
|
|
|
focus_mode_checkbutton = WID ("focus-mode-checkbutton");
|
|
|
|
autoraise_checkbutton = WID ("autoraise-checkbutton");
|
2002-12-02 01:14:14 +00:00
|
|
|
autoraise_delay_slider = WID ("autoraise-delay-slider");
|
2002-10-29 06:19:52 +00:00
|
|
|
autoraise_delay_hbox = WID ("autoraise-delay-hbox");
|
|
|
|
double_click_titlebar_optionmenu = WID ("double-click-titlebar-optionmenu");
|
2002-12-02 01:14:14 +00:00
|
|
|
alt_click_hbox = WID ("alt-click-box");
|
2002-10-29 06:19:52 +00:00
|
|
|
|
2002-12-02 01:14:14 +00:00
|
|
|
gtk_range_set_range (GTK_RANGE (autoraise_delay_slider),
|
|
|
|
0, 10);
|
2002-10-29 06:19:52 +00:00
|
|
|
|
2002-12-02 01:14:14 +00:00
|
|
|
gtk_range_set_increments (GTK_RANGE (autoraise_delay_slider),
|
|
|
|
0.2, 1.0);
|
2002-10-29 06:19:52 +00:00
|
|
|
|
2002-12-02 01:14:14 +00:00
|
|
|
#if 0
|
2002-10-29 06:19:52 +00:00
|
|
|
size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
|
|
|
|
gtk_size_group_add_widget (size_group, double_click_titlebar_optionmenu);
|
|
|
|
gtk_size_group_add_widget (size_group, alt_click_optionmenu);
|
|
|
|
g_object_unref (G_OBJECT (size_group));
|
2002-12-02 01:14:14 +00:00
|
|
|
#endif
|
|
|
|
|
2004-06-22 01:50:50 +00:00
|
|
|
new_settings.flags = 0;
|
|
|
|
init_settings_struct (&new_settings);
|
|
|
|
settings = gnome_wm_settings_copy (&new_settings);
|
2002-10-29 06:19:52 +00:00
|
|
|
|
|
|
|
reload_mouse_modifiers ();
|
|
|
|
update_wm (screen, FALSE);
|
Split code for changing window managers into libgnome-window-settings.
2002-06-02 Seth Nickell <snickell@stanford.edu>
* Makefile.am:
* gnome-window-properties.c: (wm_selection_changed),
(wm_widget_add_wm), (update_gui), (apply_wm), (create_dialog),
(main):
Split code for changing window managers into libgnome-window-settings.
This is so in the future we can potentially move this into gnome-settings-daemon,
though for now its not robust enough that we really want to do that.
* metacity-window-manager.c: (window_manager_new),
(metacity_window_manager_init), (metacity_window_manager_finalize),
(metacity_window_manager_class_init),
(metacity_window_manager_get_type):
* metacity-window-manager.h:
Update to match changes to gnome-window-manager.h
* wm-exec.c:
* wm-list.c:
* wm-properties.h:
Move these into libgnome-window-settings.
(Jacob, I did make dist, and then built the resulting tarball, hope I
don't cause problems this time :-/)
2002-06-03 00:27:15 +00:00
|
|
|
|
2004-06-22 01:50:50 +00:00
|
|
|
set_alt_click_value (&new_settings);
|
2002-12-02 01:14:14 +00:00
|
|
|
gtk_range_set_value (GTK_RANGE (autoraise_delay_slider),
|
2004-06-22 01:50:50 +00:00
|
|
|
new_settings.autoraise_delay / 1000.0);
|
2002-10-29 06:19:52 +00:00
|
|
|
gtk_option_menu_set_history (GTK_OPTION_MENU (double_click_titlebar_optionmenu),
|
2004-06-22 01:50:50 +00:00
|
|
|
new_settings.double_click_action);
|
|
|
|
|
2002-10-29 06:19:52 +00:00
|
|
|
reload_settings (); /* must come before below signal connections */
|
Split code for changing window managers into libgnome-window-settings.
2002-06-02 Seth Nickell <snickell@stanford.edu>
* Makefile.am:
* gnome-window-properties.c: (wm_selection_changed),
(wm_widget_add_wm), (update_gui), (apply_wm), (create_dialog),
(main):
Split code for changing window managers into libgnome-window-settings.
This is so in the future we can potentially move this into gnome-settings-daemon,
though for now its not robust enough that we really want to do that.
* metacity-window-manager.c: (window_manager_new),
(metacity_window_manager_init), (metacity_window_manager_finalize),
(metacity_window_manager_class_init),
(metacity_window_manager_get_type):
* metacity-window-manager.h:
Update to match changes to gnome-window-manager.h
* wm-exec.c:
* wm-list.c:
* wm-properties.h:
Move these into libgnome-window-settings.
(Jacob, I did make dist, and then built the resulting tarball, hope I
don't cause problems this time :-/)
2002-06-03 00:27:15 +00:00
|
|
|
|
2002-10-29 06:19:52 +00:00
|
|
|
g_signal_connect (G_OBJECT (dialog_win), "response",
|
|
|
|
G_CALLBACK (response_cb), NULL);
|
|
|
|
|
|
|
|
g_signal_connect (G_OBJECT (dialog_win), "destroy",
|
|
|
|
G_CALLBACK (gtk_main_quit), NULL);
|
|
|
|
|
|
|
|
|
|
|
|
g_signal_connect (G_OBJECT (focus_mode_checkbutton), "toggled",
|
|
|
|
G_CALLBACK (mouse_focus_toggled_callback), NULL);
|
|
|
|
|
|
|
|
g_signal_connect (G_OBJECT (autoraise_checkbutton), "toggled",
|
|
|
|
G_CALLBACK (autoraise_toggled_callback), NULL);
|
|
|
|
|
2002-12-02 01:14:14 +00:00
|
|
|
g_signal_connect (G_OBJECT (autoraise_delay_slider), "value_changed",
|
2002-10-29 06:19:52 +00:00
|
|
|
G_CALLBACK (autoraise_delay_value_changed_callback), NULL);
|
|
|
|
|
|
|
|
g_signal_connect (G_OBJECT (double_click_titlebar_optionmenu), "changed",
|
|
|
|
G_CALLBACK (double_click_titlebar_changed_callback), NULL);
|
|
|
|
|
|
|
|
g_signal_connect (G_OBJECT (screen), "window_manager_changed",
|
|
|
|
G_CALLBACK (wm_changed_callback), NULL);
|
2002-12-02 01:14:14 +00:00
|
|
|
|
|
|
|
i = 0;
|
|
|
|
while (i < n_mouse_modifiers) {
|
|
|
|
g_signal_connect (G_OBJECT (mouse_modifiers[i].radio), "toggled",
|
|
|
|
G_CALLBACK (alt_click_radio_toggled_callback),
|
|
|
|
&mouse_modifiers[i]);
|
|
|
|
++i;
|
|
|
|
}
|
2002-10-29 06:19:52 +00:00
|
|
|
|
2004-08-20 16:50:57 +00:00
|
|
|
capplet_set_icon (dialog_win, "gnome-window-manager");
|
2002-10-29 06:19:52 +00:00
|
|
|
gtk_widget_show (dialog_win);
|
|
|
|
|
|
|
|
gtk_main ();
|
2002-05-10 Seth Nickell <snickell@stanford.edu>
* .cvsignore:
* Makefile.am:
* gnome-window-properties.c: (wm_selection_changed),
(wm_widget_clear), (wm_widget_new), (wm_widget_add_wm),
(response_cb), (state_changed), (restart_label_update),
(restart_dialog_raise), (restart_dialog_destroyed),
(show_restart_dialog), (hide_restart_dialog), (update_session),
(init_session), (update_gui), (init_callback), (restart_finalize),
(restart_failure), (show_restart_info), (restart_finish),
(restart_callback), (restart), (revert_callback),
(cancel_callback), (apply_wm), (create_dialog), (main):
* gnome-window-properties.glade:
* window-capplet.png:
* window-properties.desktop.in:
* wm-exec.c: (wm_is_running), (find_gnome_wm_window),
(find_wm_window_from_client), (window_has_wm_state),
(descendent_has_wm_state), (find_wm_window_from_hunt),
(find_wm_window), (start_timeout), (start_do), (kill_timeout),
(wm_restart), (wm_guess_current):
* wm-list.c: (is_blank), (wm_compare), (wm_free),
(wm_check_present), (wm_copy), (wm_list_find), (wm_list_find_exec),
(wm_list_find_files), (wm_list_read_dir), (wm_list_init),
(wm_list_save), (wm_list_revert), (wm_list_add), (wm_list_delete),
(wm_list_set_current), (wm_list_get_current), (wm_list_get_revert),
(wm_read_from_xml), (wm_list_read_from_xml), (wm_write_to_xml),
(wm_list_write_to_xml), (xml_read_bool), (xml_write_bool):
* wm-properties.h:
2002-05-11 04:28:20 +00:00
|
|
|
|
2007-01-31 17:51:13 +00:00
|
|
|
g_object_unref (dialog);
|
|
|
|
g_object_unref (program);
|
2002-05-10 Seth Nickell <snickell@stanford.edu>
* .cvsignore:
* Makefile.am:
* gnome-window-properties.c: (wm_selection_changed),
(wm_widget_clear), (wm_widget_new), (wm_widget_add_wm),
(response_cb), (state_changed), (restart_label_update),
(restart_dialog_raise), (restart_dialog_destroyed),
(show_restart_dialog), (hide_restart_dialog), (update_session),
(init_session), (update_gui), (init_callback), (restart_finalize),
(restart_failure), (show_restart_info), (restart_finish),
(restart_callback), (restart), (revert_callback),
(cancel_callback), (apply_wm), (create_dialog), (main):
* gnome-window-properties.glade:
* window-capplet.png:
* window-properties.desktop.in:
* wm-exec.c: (wm_is_running), (find_gnome_wm_window),
(find_wm_window_from_client), (window_has_wm_state),
(descendent_has_wm_state), (find_wm_window_from_hunt),
(find_wm_window), (start_timeout), (start_do), (kill_timeout),
(wm_restart), (wm_guess_current):
* wm-list.c: (is_blank), (wm_compare), (wm_free),
(wm_check_present), (wm_copy), (wm_list_find), (wm_list_find_exec),
(wm_list_find_files), (wm_list_read_dir), (wm_list_init),
(wm_list_save), (wm_list_revert), (wm_list_add), (wm_list_delete),
(wm_list_set_current), (wm_list_get_current), (wm_list_get_revert),
(wm_read_from_xml), (wm_list_read_from_xml), (wm_write_to_xml),
(wm_list_write_to_xml), (xml_read_bool), (xml_write_bool):
* wm-properties.h:
2002-05-11 04:28:20 +00:00
|
|
|
return 0;
|
|
|
|
}
|
2002-10-29 06:19:52 +00:00
|
|
|
|
|
|
|
#include <X11/Xlib.h>
|
|
|
|
#include <X11/keysym.h>
|
|
|
|
#include <gdk/gdkx.h>
|
2002-12-02 01:14:14 +00:00
|
|
|
|
|
|
|
static void
|
|
|
|
fill_radio (GtkRadioButton *group,
|
|
|
|
MouseClickModifier *modifier)
|
|
|
|
{
|
|
|
|
modifier->radio =
|
2006-01-03 10:28:24 +00:00
|
|
|
gtk_radio_button_new_with_mnemonic_from_widget (group,
|
2002-12-02 01:14:14 +00:00
|
|
|
modifier->name);
|
|
|
|
gtk_box_pack_start (GTK_BOX (alt_click_hbox),
|
|
|
|
modifier->radio, FALSE, FALSE, 0);
|
|
|
|
|
|
|
|
gtk_widget_show (modifier->radio);
|
|
|
|
}
|
|
|
|
|
2002-10-29 06:19:52 +00:00
|
|
|
static void
|
|
|
|
reload_mouse_modifiers (void)
|
|
|
|
{
|
2002-12-02 01:14:14 +00:00
|
|
|
XModifierKeymap *modmap;
|
|
|
|
KeySym *keymap;
|
|
|
|
int keysyms_per_keycode;
|
|
|
|
int map_size;
|
|
|
|
int i;
|
|
|
|
gboolean have_meta;
|
|
|
|
gboolean have_hyper;
|
|
|
|
gboolean have_super;
|
|
|
|
int min_keycode, max_keycode;
|
2004-10-20 14:40:45 +00:00
|
|
|
int mod_meta, mod_super, mod_hyper;
|
2002-10-29 06:19:52 +00:00
|
|
|
|
2002-12-02 01:14:14 +00:00
|
|
|
XDisplayKeycodes (gdk_display,
|
|
|
|
&min_keycode,
|
|
|
|
&max_keycode);
|
|
|
|
|
|
|
|
keymap = XGetKeyboardMapping (gdk_display,
|
|
|
|
min_keycode,
|
|
|
|
max_keycode - min_keycode,
|
|
|
|
&keysyms_per_keycode);
|
2002-10-29 06:19:52 +00:00
|
|
|
|
2002-12-02 01:14:14 +00:00
|
|
|
modmap = XGetModifierMapping (gdk_display);
|
2002-10-29 06:19:52 +00:00
|
|
|
|
2002-12-02 01:14:14 +00:00
|
|
|
have_super = FALSE;
|
|
|
|
have_meta = FALSE;
|
|
|
|
have_hyper = FALSE;
|
2002-10-29 06:19:52 +00:00
|
|
|
|
2002-12-02 01:14:14 +00:00
|
|
|
/* there are 8 modifiers, and the first 3 are shift, shift lock,
|
|
|
|
* and control
|
|
|
|
*/
|
|
|
|
map_size = 8 * modmap->max_keypermod;
|
|
|
|
i = 3 * modmap->max_keypermod;
|
2004-10-20 14:40:45 +00:00
|
|
|
mod_meta = mod_super = mod_hyper = 0;
|
2002-12-02 01:14:14 +00:00
|
|
|
while (i < map_size) {
|
|
|
|
/* get the key code at this point in the map,
|
|
|
|
* see if its keysym is one we're interested in
|
|
|
|
*/
|
|
|
|
int keycode = modmap->modifiermap[i];
|
2002-10-29 06:19:52 +00:00
|
|
|
|
2002-12-02 01:14:14 +00:00
|
|
|
if (keycode >= min_keycode &&
|
|
|
|
keycode <= max_keycode) {
|
|
|
|
int j = 0;
|
|
|
|
KeySym *syms = keymap + (keycode - min_keycode) * keysyms_per_keycode;
|
2002-10-29 06:19:52 +00:00
|
|
|
|
2002-12-02 01:14:14 +00:00
|
|
|
while (j < keysyms_per_keycode) {
|
|
|
|
if (syms[j] == XK_Super_L ||
|
|
|
|
syms[j] == XK_Super_R)
|
2004-10-20 14:40:45 +00:00
|
|
|
mod_super = i / modmap->max_keypermod;
|
2002-12-02 01:14:14 +00:00
|
|
|
else if (syms[j] == XK_Hyper_L ||
|
|
|
|
syms[j] == XK_Hyper_R)
|
2004-10-20 14:40:45 +00:00
|
|
|
mod_hyper = i / modmap->max_keypermod;
|
2002-12-02 01:14:14 +00:00
|
|
|
else if ((syms[j] == XK_Meta_L ||
|
2004-10-20 14:40:45 +00:00
|
|
|
syms[j] == XK_Meta_R))
|
|
|
|
mod_meta = i / modmap->max_keypermod;
|
2002-12-02 01:14:14 +00:00
|
|
|
++j;
|
|
|
|
}
|
|
|
|
}
|
2002-10-29 06:19:52 +00:00
|
|
|
|
2002-12-02 01:14:14 +00:00
|
|
|
++i;
|
|
|
|
}
|
2004-10-20 14:40:45 +00:00
|
|
|
|
|
|
|
if ((1 << mod_meta) != Mod1Mask)
|
|
|
|
have_meta = TRUE;
|
|
|
|
if (mod_super != 0 &&
|
|
|
|
mod_super != mod_meta)
|
|
|
|
have_super = TRUE;
|
|
|
|
if (mod_hyper != 0 &&
|
|
|
|
mod_hyper != mod_meta &&
|
|
|
|
mod_hyper != mod_super)
|
|
|
|
have_hyper = TRUE;
|
2002-12-02 01:14:14 +00:00
|
|
|
|
|
|
|
XFreeModifiermap (modmap);
|
|
|
|
XFree (keymap);
|
|
|
|
|
|
|
|
i = 0;
|
|
|
|
while (i < n_mouse_modifiers) {
|
|
|
|
g_free (mouse_modifiers[i].name);
|
|
|
|
if (mouse_modifiers[i].radio)
|
|
|
|
gtk_widget_destroy (mouse_modifiers[i].radio);
|
|
|
|
++i;
|
|
|
|
}
|
|
|
|
g_free (mouse_modifiers);
|
|
|
|
mouse_modifiers = NULL;
|
2002-10-29 06:19:52 +00:00
|
|
|
|
|
|
|
|
2002-12-02 01:14:14 +00:00
|
|
|
n_mouse_modifiers = 2; /* control, alt */
|
|
|
|
if (have_super)
|
|
|
|
++n_mouse_modifiers;
|
|
|
|
if (have_hyper)
|
|
|
|
++n_mouse_modifiers;
|
|
|
|
if (have_meta)
|
|
|
|
++n_mouse_modifiers;
|
|
|
|
|
|
|
|
g_free (mouse_modifiers);
|
|
|
|
|
|
|
|
mouse_modifiers = g_new0 (MouseClickModifier, n_mouse_modifiers);
|
|
|
|
|
|
|
|
i = 0;
|
|
|
|
|
|
|
|
mouse_modifiers[i].number = i;
|
2006-01-03 10:28:24 +00:00
|
|
|
mouse_modifiers[i].name = g_strdup (_("C_ontrol"));
|
2002-12-02 01:14:14 +00:00
|
|
|
mouse_modifiers[i].value = "Control";
|
|
|
|
++i;
|
|
|
|
|
|
|
|
mouse_modifiers[i].number = i;
|
2006-01-03 10:28:24 +00:00
|
|
|
mouse_modifiers[i].name = g_strdup (_("_Alt"));
|
2002-12-02 01:14:14 +00:00
|
|
|
mouse_modifiers[i].value = "Alt";
|
|
|
|
++i;
|
|
|
|
|
|
|
|
if (have_hyper) {
|
|
|
|
mouse_modifiers[i].number = i;
|
2006-01-03 10:28:24 +00:00
|
|
|
mouse_modifiers[i].name = g_strdup (_("H_yper"));
|
2002-12-02 01:14:14 +00:00
|
|
|
mouse_modifiers[i].value = "Hyper";
|
|
|
|
++i;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (have_super) {
|
|
|
|
mouse_modifiers[i].number = i;
|
2006-01-03 10:28:24 +00:00
|
|
|
mouse_modifiers[i].name = g_strdup (_("S_uper (or \"Windows logo\")"));
|
2002-12-02 01:14:14 +00:00
|
|
|
mouse_modifiers[i].value = "Super";
|
|
|
|
++i;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (have_meta) {
|
|
|
|
mouse_modifiers[i].number = i;
|
2006-01-03 10:28:24 +00:00
|
|
|
mouse_modifiers[i].name = g_strdup (_("_Meta"));
|
2002-12-02 01:14:14 +00:00
|
|
|
mouse_modifiers[i].value = "Meta";
|
|
|
|
++i;
|
|
|
|
}
|
|
|
|
|
|
|
|
g_assert (i == n_mouse_modifiers);
|
|
|
|
|
|
|
|
i = 0;
|
|
|
|
while (i < n_mouse_modifiers) {
|
|
|
|
fill_radio (i == 0 ? NULL : GTK_RADIO_BUTTON (mouse_modifiers[i-1].radio),
|
|
|
|
&mouse_modifiers[i]);
|
|
|
|
++i;
|
|
|
|
}
|
|
|
|
|
|
|
|
#if 0
|
|
|
|
/* Build modifier option menu */
|
|
|
|
{
|
|
|
|
GtkWidget *menu;
|
2002-10-29 06:19:52 +00:00
|
|
|
|
2002-12-02 01:14:14 +00:00
|
|
|
menu = gtk_menu_new ();
|
|
|
|
i = 0;
|
|
|
|
while (i < n_mouse_modifiers) {
|
|
|
|
GtkWidget *mi;
|
2002-10-29 06:19:52 +00:00
|
|
|
|
2002-12-02 01:14:14 +00:00
|
|
|
mi = gtk_menu_item_new_with_label (mouse_modifiers[i].name);
|
|
|
|
gtk_menu_shell_append (GTK_MENU_SHELL (menu),
|
|
|
|
mi);
|
2002-10-29 06:19:52 +00:00
|
|
|
|
2002-12-02 01:14:14 +00:00
|
|
|
gtk_widget_show (mi);
|
2002-10-29 06:19:52 +00:00
|
|
|
|
2002-12-02 01:14:14 +00:00
|
|
|
++i;
|
|
|
|
}
|
2002-10-29 06:19:52 +00:00
|
|
|
|
2002-12-02 01:14:14 +00:00
|
|
|
gtk_option_menu_set_menu (GTK_OPTION_MENU (alt_click_optionmenu),
|
|
|
|
menu);
|
|
|
|
}
|
|
|
|
#endif
|
2002-10-29 06:19:52 +00:00
|
|
|
}
|