summaryrefslogtreecommitdiff
path: root/capplets
diff options
context:
space:
mode:
Diffstat (limited to 'capplets')
-rw-r--r--capplets/default-applications/mate-da-capplet.c174
-rw-r--r--capplets/default-applications/mate-da-capplet.h27
-rw-r--r--capplets/mouse/mate-mouse-properties.c8
-rw-r--r--capplets/windows/mate-window-properties.c61
-rw-r--r--capplets/windows/mate-window-properties.ui96
5 files changed, 285 insertions, 81 deletions
diff --git a/capplets/default-applications/mate-da-capplet.c b/capplets/default-applications/mate-da-capplet.c
index b82cdcaf..8ad4bf0d 100644
--- a/capplets/default-applications/mate-da-capplet.c
+++ b/capplets/default-applications/mate-da-capplet.c
@@ -27,6 +27,8 @@
#include <string.h>
#include <glib/gi18n.h>
#include <stdlib.h>
+#include <gio/gio.h>
+#include <gio/gdesktopappinfo.h>
#include "mate-da-capplet.h"
#include "capplet-util.h"
@@ -46,7 +48,7 @@ enum {
DA_N_COLUMNS
};
-/* for combo box */
+/* For combo box */
enum {
PIXBUF_COL,
TEXT_COL,
@@ -56,24 +58,11 @@ enum {
};
static void
-close_cb(GtkWidget* window, gint response, gpointer user_data)
-{
- if (response == GTK_RESPONSE_HELP)
- {
- capplet_help(GTK_WINDOW(window), "prefs-preferredapps");
- }
- else
- {
- gtk_widget_destroy(window);
- gtk_main_quit();
- }
-}
-
-static void
set_changed(GtkComboBox* combo, MateDACapplet* capplet, GList* list, gint type)
{
guint index;
GAppInfo* item;
+ GSettings* settings;
index = gtk_combo_box_get_active(combo);
@@ -84,72 +73,94 @@ set_changed(GtkComboBox* combo, MateDACapplet* capplet, GList* list, gint type)
switch (type)
{
case DA_TYPE_WEB_BROWSER:
-
- /* establecemos el item */
g_app_info_set_as_default_for_type(item, "x-scheme-handler/http", NULL);
g_app_info_set_as_default_for_type(item, "x-scheme-handler/https", NULL);
-
- /* about:config es usado por mozilla firefox y algunos otros con
- * webtoolkit */
+ /* about:config is used by firefox and others */
g_app_info_set_as_default_for_type(item, "x-scheme-handler/about", NULL);
break;
case DA_TYPE_EMAIL:
- /* por alguna extraña razon, solo se usa mailto, en vez de mail. */
g_app_info_set_as_default_for_type(item, "x-scheme-handler/mailto", NULL);
+ g_app_info_set_as_default_for_type(item, "application/x-extension-eml", NULL);
+ g_app_info_set_as_default_for_type(item, "message/rfc822", NULL);
break;
case DA_TYPE_FILE:
- /* falta agregar más mime-types */
g_app_info_set_as_default_for_type(item, "inode/directory", NULL);
break;
case DA_TYPE_TEXT:
- /* falta agregar más mime-types */
g_app_info_set_as_default_for_type(item, "text/plain", NULL);
break;
case DA_TYPE_MEDIA:
- /* por alguna extraña razon, solo se usa mailto, en vez de mail. */
- g_app_info_set_as_default_for_type(item, "audio/x-vorbis+ogg", NULL);
- g_app_info_set_as_default_for_type(item, "audio/x-scpls", NULL);
g_app_info_set_as_default_for_type(item, "audio/mpeg", NULL);
- g_app_info_set_as_default_for_type(item, "audio/x-wav", NULL);
g_app_info_set_as_default_for_type(item, "audio/x-mpegurl", NULL);
- g_app_info_set_as_default_for_type(item, "video/webm", NULL);
+ g_app_info_set_as_default_for_type(item, "audio/x-scpls", NULL);
+ g_app_info_set_as_default_for_type(item, "audio/x-vorbis+ogg", NULL);
+ g_app_info_set_as_default_for_type(item, "audio/x-wav", NULL);
break;
case DA_TYPE_VIDEO:
- /* por alguna extraña razon, solo se usa mailto, en vez de mail. */
+ g_app_info_set_as_default_for_type(item, "video/mp4", NULL);
g_app_info_set_as_default_for_type(item, "video/mpeg", NULL);
- g_app_info_set_as_default_for_type(item, "video/x-mpeg", NULL);
+ g_app_info_set_as_default_for_type(item, "video/mp2t", NULL);
g_app_info_set_as_default_for_type(item, "video/msvideo", NULL);
g_app_info_set_as_default_for_type(item, "video/quicktime", NULL);
- g_app_info_set_as_default_for_type(item, "video/x-avi", NULL);
- g_app_info_set_as_default_for_type(item, "video/x-ogm+ogg", NULL);
- g_app_info_set_as_default_for_type(item, "video/x-matroska", NULL);
g_app_info_set_as_default_for_type(item, "video/webm", NULL);
- g_app_info_set_as_default_for_type(item, "video/mp4", NULL);
+ g_app_info_set_as_default_for_type(item, "video/x-avi", NULL);
g_app_info_set_as_default_for_type(item, "video/x-flv", NULL);
+ g_app_info_set_as_default_for_type(item, "video/x-matroska", NULL);
+ g_app_info_set_as_default_for_type(item, "video/x-mpeg", NULL);
+ g_app_info_set_as_default_for_type(item, "video/x-ogm+ogg", NULL);
break;
case DA_TYPE_IMAGE:
- /* por alguna extraña razon, solo se usa mailto, en vez de mail. */
- g_app_info_set_as_default_for_type(item, "image/png", NULL);
- g_app_info_set_as_default_for_type(item, "image/jpeg", NULL);
- g_app_info_set_as_default_for_type(item, "image/gif", NULL);
g_app_info_set_as_default_for_type(item, "image/bmp", NULL);
+ g_app_info_set_as_default_for_type(item, "image/gif", NULL);
+ g_app_info_set_as_default_for_type(item, "image/jpeg", NULL);
+ g_app_info_set_as_default_for_type(item, "image/png", NULL);
g_app_info_set_as_default_for_type(item, "image/tiff", NULL);
break;
-
-
- default:;
+
+ case DA_TYPE_TERMINAL:
+ settings = g_settings_new (TERMINAL_SCHEMA);
+ g_settings_set_string (settings, TERMINAL_KEY, g_app_info_get_executable (item));
+ g_object_unref (settings);
+ break;
+
+ default:
break;
}
}
}
-/* Combo box callbacks */
+static void
+close_cb(GtkWidget* window, gint response, MateDACapplet* capplet)
+{
+ if (response == GTK_RESPONSE_HELP)
+ {
+ capplet_help(GTK_WINDOW(window), "prefs-preferredapps");
+ }
+ else
+ {
+ set_changed(GTK_COMBO_BOX(capplet->web_combo_box), capplet, capplet->web_browsers, DA_TYPE_WEB_BROWSER);
+ set_changed(GTK_COMBO_BOX(capplet->mail_combo_box), capplet, capplet->mail_readers, DA_TYPE_EMAIL);
+ set_changed(GTK_COMBO_BOX(capplet->file_combo_box), capplet, capplet->file_managers, DA_TYPE_FILE);
+ set_changed(GTK_COMBO_BOX(capplet->text_combo_box), capplet, capplet->text_editors, DA_TYPE_TEXT);
+ set_changed(GTK_COMBO_BOX(capplet->media_combo_box), capplet, capplet->media_players, DA_TYPE_MEDIA);
+ set_changed(GTK_COMBO_BOX(capplet->video_combo_box), capplet, capplet->video_players, DA_TYPE_VIDEO);
+ set_changed(GTK_COMBO_BOX(capplet->term_combo_box), capplet, capplet->terminals, DA_TYPE_TERMINAL);
+ set_changed(GTK_COMBO_BOX(capplet->visual_combo_box), capplet, capplet->visual_ats, DA_TYPE_VISUAL);
+ set_changed(GTK_COMBO_BOX(capplet->mobility_combo_box), capplet, capplet->mobility_ats, DA_TYPE_MOBILITY);
+ set_changed(GTK_COMBO_BOX(capplet->image_combo_box), capplet, capplet->image_viewers, DA_TYPE_IMAGE);
+
+ gtk_widget_destroy(window);
+ gtk_main_quit();
+ }
+}
+
+/* Combo boxes callbacks */
static void
web_combo_changed_cb(GtkComboBox* combo, MateDACapplet* capplet)
{
@@ -218,9 +229,12 @@ refresh_combo_box_icons(GtkIconTheme* theme, GtkComboBox* combo_box, GList* app_
gboolean valid;
GdkPixbuf* pixbuf;
gchar* icon_name;
-
+
model = gtk_combo_box_get_model(combo_box);
+ if (model == NULL)
+ return;
+
valid = gtk_tree_model_get_iter_first(model, &iter);
while (valid)
@@ -252,18 +266,18 @@ static struct {
} icons[] = {
{"web_browser_image", "web-browser"},
{"mail_reader_image", "emblem-mail"},
- {"media_player_image", "audio-x-generic"}, /* applications-multimedia */
+ {"media_player_image", "audio-x-generic"},
{"visual_image", "zoom-best-fit"},
{"mobility_image", "preferences-desktop-accessibility"},
{"messenger_image", "user-idle"},
{"filemanager_image", "file-manager"},
- {"imageviewer_image", "eog"}, /* no hay otra... */
+ {"imageviewer_image", "image-x-generic"},
{"video_image", "video-x-generic"},
{"text_image", "text-editor"},
{"terminal_image", "terminal"},
};
-/* Esta funcion se llama cuando se cambia o actualizan los iconos */
+/* Callback for icon theme change */
static void
theme_changed_cb(GtkIconTheme* theme, MateDACapplet* capplet)
{
@@ -287,6 +301,7 @@ theme_changed_cb(GtkIconTheme* theme, MateDACapplet* capplet)
refresh_combo_box_icons(theme, GTK_COMBO_BOX(capplet->web_combo_box), capplet->web_browsers);
refresh_combo_box_icons(theme, GTK_COMBO_BOX(capplet->mail_combo_box), capplet->mail_readers);
refresh_combo_box_icons(theme, GTK_COMBO_BOX(capplet->media_combo_box), capplet->media_players);
+ refresh_combo_box_icons(theme, GTK_COMBO_BOX(capplet->video_combo_box), capplet->video_players);
refresh_combo_box_icons(theme, GTK_COMBO_BOX(capplet->term_combo_box), capplet->terminals);
refresh_combo_box_icons(theme, GTK_COMBO_BOX(capplet->visual_combo_box), capplet->visual_ats);
refresh_combo_box_icons(theme, GTK_COMBO_BOX(capplet->mobility_combo_box), capplet->mobility_ats);
@@ -322,8 +337,27 @@ fill_combo_box(GtkIconTheme* theme, GtkComboBox* combo_box, GList* app_list, gch
GtkTreeIter iter;
GdkPixbuf* pixbuf;
GAppInfo* default_app;
-
- default_app = g_app_info_get_default_for_type(mime, FALSE);
+
+ default_app = NULL;
+ if (g_strcmp0(mime, "terminal") == 0)
+ {
+ GSettings *terminal_settings = g_settings_new (TERMINAL_SCHEMA);
+ gchar *default_terminal = g_settings_get_string (terminal_settings, TERMINAL_KEY);
+ for (entry = app_list; entry != NULL; entry = g_list_next(entry))
+ {
+ GAppInfo* item = (GAppInfo*) entry->data;
+ if (g_strcmp0 (g_app_info_get_executable (item), default_terminal) == 0)
+ {
+ default_app = item;
+ }
+ }
+ g_free (default_terminal);
+ g_object_unref (terminal_settings);
+ }
+ else
+ {
+ default_app = g_app_info_get_default_for_type (mime, FALSE);
+ }
if (theme == NULL)
{
@@ -335,7 +369,7 @@ fill_combo_box(GtkIconTheme* theme, GtkComboBox* combo_box, GList* app_list, gch
renderer = gtk_cell_renderer_pixbuf_new();
- /* not all cells have a pixbuf, this prevents the combo box to shrink */
+ /* Not all cells have a pixbuf, this prevents the combo box to shrink */
gtk_cell_renderer_set_fixed_size(renderer, -1, 22);
gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(combo_box), renderer, FALSE);
gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(combo_box), renderer,
@@ -353,13 +387,14 @@ fill_combo_box(GtkIconTheme* theme, GtkComboBox* combo_box, GList* app_list, gch
{
GAppInfo* item = (GAppInfo*) entry->data;
- // icon
+ /* Icon */
GIcon* icon = g_app_info_get_icon(item);
gchar* icon_name = g_icon_to_string(icon);
if (icon_name == NULL)
{
- icon_name = g_strdup("binary"); // default icon
+ /* Default icon */
+ icon_name = g_strdup("binary");
}
pixbuf = gtk_icon_theme_load_icon(theme, icon_name, 22, 0, NULL);
@@ -377,7 +412,7 @@ fill_combo_box(GtkIconTheme* theme, GtkComboBox* combo_box, GList* app_list, gch
g_object_unref(pixbuf);
}
- /* set the index */
+ /* Set the index for the default app */
if (default_app != NULL && g_app_info_equal(item, default_app))
{
gtk_combo_box_set_active(combo_box, index);
@@ -422,7 +457,7 @@ show_dialog(MateDACapplet* capplet, const gchar* start_page)
capplet->window = get_widget("preferred_apps_dialog");
- g_signal_connect(capplet->window, "response", G_CALLBACK(close_cb), NULL);
+ g_signal_connect(capplet->window, "response", G_CALLBACK(close_cb), capplet);
capplet->web_combo_box = get_widget("web_browser_combobox");
capplet->mail_combo_box = get_widget("mail_reader_combobox");
@@ -439,28 +474,44 @@ show_dialog(MateDACapplet* capplet, const gchar* start_page)
g_signal_connect(capplet->window, "screen-changed", G_CALLBACK(screen_changed_cb), capplet);
screen_changed_cb(capplet->window, gdk_screen_get_default(), capplet);
- // lists
+ /* Lists of default applications */
capplet->web_browsers = g_app_info_get_all_for_type("x-scheme-handler/http");
capplet->mail_readers = g_app_info_get_all_for_type("x-scheme-handler/mailto");
- //capplet->terminals = g_app_info_get_all_for_type("inode/directory");
capplet->media_players = g_app_info_get_all_for_type("audio/x-vorbis+ogg");
capplet->video_players = g_app_info_get_all_for_type("video/x-ogm+ogg");
- //capplet->visual_ats = g_app_info_get_all_for_type("inode/directory");
- //capplet->mobility_ats = g_app_info_get_all_for_type("inode/directory");
capplet->text_editors = g_app_info_get_all_for_type("text/plain");
capplet->image_viewers = g_app_info_get_all_for_type("image/png");
capplet->file_managers = g_app_info_get_all_for_type("inode/directory");
-
+ /* capplet->visual_ats = g_app_info_get_all_for_type("inode/directory"); */
+ /* capplet->mobility_ats = g_app_info_get_all_for_type("inode/directory"); */
+
+ /* Terminal havent mime types, so check in .desktop files for
+ Categories=TerminalEmulator */
+ GList *entry;
+ GList *all_apps;
+ capplet->terminals = NULL;
+ all_apps = g_app_info_get_all();
+ for (entry = all_apps; entry != NULL; entry = g_list_next(entry))
+ {
+ GDesktopAppInfo* item = (GDesktopAppInfo*) entry->data;
+ if (g_desktop_app_info_get_categories (item) != NULL &&
+ g_strrstr (g_desktop_app_info_get_categories (item), "TerminalEmulator"))
+ {
+ capplet->terminals = g_list_prepend (capplet->terminals, item);
+ }
+ }
+ capplet->terminals = g_list_reverse (capplet->terminals);
+
fill_combo_box(capplet->icon_theme, GTK_COMBO_BOX(capplet->web_combo_box), capplet->web_browsers, "x-scheme-handler/http");
fill_combo_box(capplet->icon_theme, GTK_COMBO_BOX(capplet->mail_combo_box), capplet->mail_readers, "x-scheme-handler/mailto");
- //fill_combo_box(capplet->icon_theme, GTK_COMBO_BOX(capplet->term_combo_box), capplet->terminals, "");
+ fill_combo_box(capplet->icon_theme, GTK_COMBO_BOX(capplet->term_combo_box), capplet->terminals, "terminal");
fill_combo_box(capplet->icon_theme, GTK_COMBO_BOX(capplet->media_combo_box), capplet->media_players, "audio/x-vorbis+ogg");
fill_combo_box(capplet->icon_theme, GTK_COMBO_BOX(capplet->video_combo_box), capplet->video_players, "video/x-ogm+ogg");
- //fill_combo_box(capplet->icon_theme, GTK_COMBO_BOX(capplet->visual_combo_box), capplet->visual_ats, NULL);
- //fill_combo_box(capplet->icon_theme, GTK_COMBO_BOX(capplet->mobility_combo_box), capplet->mobility_ats, NULL);
fill_combo_box(capplet->icon_theme, GTK_COMBO_BOX(capplet->image_combo_box), capplet->image_viewers, "image/png");
fill_combo_box(capplet->icon_theme, GTK_COMBO_BOX(capplet->text_combo_box), capplet->text_editors, "text/plain");
fill_combo_box(capplet->icon_theme, GTK_COMBO_BOX(capplet->file_combo_box), capplet->file_managers, "inode/directory");
+ /* fill_combo_box(capplet->icon_theme, GTK_COMBO_BOX(capplet->visual_combo_box), capplet->visual_ats, NULL); */
+ /* fill_combo_box(capplet->icon_theme, GTK_COMBO_BOX(capplet->mobility_combo_box), capplet->mobility_ats, NULL); */
g_signal_connect(capplet->web_combo_box, "changed", G_CALLBACK(web_combo_changed_cb), capplet);
g_signal_connect(capplet->mail_combo_box, "changed", G_CALLBACK(mail_combo_changed_cb), capplet);
@@ -474,7 +525,6 @@ show_dialog(MateDACapplet* capplet, const gchar* start_page)
g_signal_connect(capplet->file_combo_box, "changed", G_CALLBACK(file_combo_changed_cb), capplet);
- /* TODO: fix the name icon */
gtk_window_set_icon_name(GTK_WINDOW (capplet->window), "preferences-desktop-default-applications");
if (start_page != NULL)
diff --git a/capplets/default-applications/mate-da-capplet.h b/capplets/default-applications/mate-da-capplet.h
index b97ead48..eeb2828f 100644
--- a/capplets/default-applications/mate-da-capplet.h
+++ b/capplets/default-applications/mate-da-capplet.h
@@ -24,6 +24,9 @@
#include <gtk/gtk.h>
+#define TERMINAL_SCHEMA "org.mate.applications-terminal"
+#define TERMINAL_KEY "exec"
+
typedef struct _MateDACapplet {
GtkBuilder* builder;
@@ -38,13 +41,12 @@ typedef struct _MateDACapplet {
GtkWidget* video_combo_box;
GtkWidget* visual_combo_box;
GtkWidget* mobility_combo_box;
- /* Para el File Manager */
GtkWidget* file_combo_box;
GtkWidget* text_combo_box;
GtkWidget* image_combo_box;
- /* navegador web
- * por el momento default,new_win,new_tab no se utilizan */
+ /* Web Browser
+ * at the moment default,new_win,new_tab arent used */
GtkWidget* web_browser_command_entry;
GtkWidget* web_browser_command_label;
GtkWidget* web_browser_terminal_checkbutton;
@@ -52,52 +54,53 @@ typedef struct _MateDACapplet {
GtkWidget* new_win_radiobutton;
GtkWidget* new_tab_radiobutton;
- /* Para el File Manager */
+ /* File Manager */
GtkWidget* file_manager_command_entry;
GtkWidget* file_manager_command_label;
GtkWidget* file_manager_terminal_checkbutton;
- /* editor de texto */
+ /* Text Editor */
GtkWidget* text_editor_command_entry;
GtkWidget* text_editor_command_label;
GtkWidget* text_editor_terminal_checkbutton;
- /* cliente de correo */
+ /* Mail Client */
GtkWidget* mail_reader_command_entry;
GtkWidget* mail_reader_command_label;
GtkWidget* mail_reader_terminal_checkbutton;
- /* terminal */
+ /* Terminal */
GtkWidget* terminal_command_entry;
GtkWidget* terminal_command_label;
GtkWidget* terminal_exec_flag_entry;
GtkWidget* terminal_exec_flag_label;
- /* visor de imagenes */
+ /* Image Viewer */
GtkWidget* image_viewer_command_entry;
GtkWidget* image_viewer_command_label;
GtkWidget* image_viewer_terminal_checkbutton;
- /* reproductor de musica */
+ /* Audio Player */
GtkWidget* media_player_command_entry;
GtkWidget* media_player_command_label;
GtkWidget* media_player_terminal_checkbutton;
- /* reproductor de videos */
+ /* Video Player */
GtkWidget* video_player_command_entry;
GtkWidget* video_player_command_label;
GtkWidget* video_player_terminal_checkbutton;
- /* accesibilidad visual */
+ /* Visual Accessibility */
GtkWidget* visual_command_entry;
GtkWidget* visual_command_label;
GtkWidget* visual_startup_checkbutton;
- /* accesibilidad motriz */
+ /* Mobility Accessibility */
GtkWidget* mobility_command_entry;
GtkWidget* mobility_command_label;
GtkWidget* mobility_startup_checkbutton;
+ /* Lists of available apps */
GList* web_browsers;
GList* mail_readers;
GList* terminals;
diff --git a/capplets/mouse/mate-mouse-properties.c b/capplets/mouse/mate-mouse-properties.c
index 6b0f3bf2..a6a7b626 100644
--- a/capplets/mouse/mate-mouse-properties.c
+++ b/capplets/mouse/mate-mouse-properties.c
@@ -204,12 +204,14 @@ scrollmethod_gsettings_changed_event (GSettings *settings,
GtkBuilder *dialog)
{
int scroll_method = g_settings_get_int (touchpad_settings, "scroll-method");
- gtk_widget_set_sensitive (WID ("scroll_disabled_radio"),
+ gtk_toggle_button_set_active (WID ("scroll_disabled_radio"),
scroll_method == 0);
- gtk_widget_set_sensitive (WID ("scroll_edge_radio"),
+ gtk_toggle_button_set_active (WID ("scroll_edge_radio"),
scroll_method == 1);
- gtk_widget_set_sensitive (WID ("scroll_twofinger_radio"),
+ gtk_toggle_button_set_active (WID ("scroll_twofinger_radio"),
scroll_method == 2);
+ gtk_widget_set_sensitive (WID ("horiz_scroll_toggle"),
+ scroll_method != 0);
}
static void
diff --git a/capplets/windows/mate-window-properties.c b/capplets/windows/mate-window-properties.c
index d63789e9..34613d36 100644
--- a/capplets/windows/mate-window-properties.c
+++ b/capplets/windows/mate-window-properties.c
@@ -44,6 +44,8 @@ typedef struct
static MateWindowManager *current_wm; /* may be NULL */
static GtkWidget *dialog_win;
+static GObject *compositing_checkbutton;
+static GObject *compositing_fast_alt_tab_checkbutton;
static GObject *focus_mode_checkbutton;
static GObject *autoraise_checkbutton;
static GObject *autoraise_delay_slider;
@@ -61,6 +63,34 @@ static int n_mouse_modifiers = 0;
static void reload_mouse_modifiers (void);
static void
+compositing_manager_toggled_callback (GtkWidget *button,
+ void *data)
+{
+ MateWMSettings new_settings;
+
+ new_settings.flags = MATE_WM_SETTING_COMPOSITING_MANAGER;
+ new_settings.compositing_manager =
+ gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button));
+
+ if (current_wm != NULL && new_settings.compositing_manager != settings->compositing_manager)
+ mate_window_manager_change_settings (current_wm, &new_settings);
+}
+
+static void
+compositing_fast_alt_tab_toggled_callback (GtkWidget *button,
+ void *data)
+{
+ MateWMSettings new_settings;
+
+ new_settings.flags = MATE_WM_SETTING_COMPOSITING_ALTTAB;
+ new_settings.compositing_fast_alt_tab =
+ gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button));
+
+ if (current_wm != NULL && new_settings.compositing_fast_alt_tab != settings->compositing_fast_alt_tab)
+ mate_window_manager_change_settings (current_wm, &new_settings);
+}
+
+static void
mouse_focus_toggled_callback (GtkWidget *button,
void *data)
{
@@ -150,6 +180,9 @@ update_sensitivity (void)
gtk_widget_set_sensitive (GTK_WIDGET (double_click_titlebar_optionmenu),
n_double_click_actions > 1);
+ gtk_widget_set_sensitive (GTK_WIDGET (compositing_fast_alt_tab_checkbutton),
+ settings->compositing_manager);
+
/* 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
@@ -163,6 +196,12 @@ static void
init_settings_struct (MateWMSettings *settings)
{
/* Init fields that weren't initialized */
+ if ((settings->flags & MATE_WM_SETTING_COMPOSITING_MANAGER) == 0)
+ settings->compositing_manager = FALSE;
+
+ if ((settings->flags & MATE_WM_SETTING_COMPOSITING_ALTTAB) == 0)
+ settings->compositing_fast_alt_tab = FALSE;
+
if ((settings->flags & MATE_WM_SETTING_MOUSE_FOCUS) == 0)
settings->focus_follows_mouse = FALSE;
@@ -213,7 +252,10 @@ reload_settings (void)
g_assert (n_mouse_modifiers > 0);
if (current_wm != NULL) {
- new_settings.flags = MATE_WM_SETTING_MOUSE_FOCUS |
+ new_settings.flags =
+ MATE_WM_SETTING_COMPOSITING_MANAGER |
+ MATE_WM_SETTING_COMPOSITING_ALTTAB |
+ MATE_WM_SETTING_MOUSE_FOCUS |
MATE_WM_SETTING_AUTORAISE |
MATE_WM_SETTING_AUTORAISE_DELAY |
MATE_WM_SETTING_MOUSE_MOVE_MODIFIER |
@@ -227,6 +269,14 @@ reload_settings (void)
init_settings_struct (&new_settings);
+ if (new_settings.compositing_manager != settings->compositing_manager)
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (compositing_checkbutton),
+ new_settings.compositing_manager);
+
+ if (new_settings.compositing_fast_alt_tab != settings->compositing_fast_alt_tab)
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (compositing_fast_alt_tab_checkbutton),
+ new_settings.compositing_fast_alt_tab);
+
if (new_settings.focus_follows_mouse != settings->focus_follows_mouse)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (focus_mode_checkbutton),
new_settings.focus_follows_mouse);
@@ -409,6 +459,10 @@ main (int argc, char **argv)
dialog_win = GTK_WIDGET (gtk_builder_get_object (builder,
"main-dialog"));
+ compositing_checkbutton = gtk_builder_get_object (builder,
+ "compositing-manager-checkbutton");
+ compositing_fast_alt_tab_checkbutton = gtk_builder_get_object (builder,
+ "compositing-fast-alt-tab-checkbutton");
focus_mode_checkbutton = gtk_builder_get_object (builder,
"focus-mode-checkbutton");
autoraise_checkbutton = gtk_builder_get_object (builder,
@@ -448,6 +502,11 @@ main (int argc, char **argv)
g_signal_connect (G_OBJECT (dialog_win), "destroy",
G_CALLBACK (gtk_main_quit), NULL);
+ g_signal_connect (compositing_checkbutton, "toggled",
+ G_CALLBACK (compositing_manager_toggled_callback), NULL);
+
+ g_signal_connect (compositing_fast_alt_tab_checkbutton, "toggled",
+ G_CALLBACK (compositing_fast_alt_tab_toggled_callback), NULL);
g_signal_connect (focus_mode_checkbutton, "toggled",
G_CALLBACK (mouse_focus_toggled_callback), NULL);
diff --git a/capplets/windows/mate-window-properties.ui b/capplets/windows/mate-window-properties.ui
index dee6e1aa..3e495b79 100644
--- a/capplets/windows/mate-window-properties.ui
+++ b/capplets/windows/mate-window-properties.ui
@@ -18,6 +18,96 @@
<property name="border_width">5</property>
<property name="spacing">18</property>
<child>
+ <object class="GtkVBox" id="vbox11">
+ <property name="visible">True</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label4">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Compositing Manager</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="alignment6">
+ <property name="visible">True</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkVBox" id="vbox9">
+ <property name="visible">True</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkCheckButton" id="compositing-manager-checkbutton">
+ <property name="label" translatable="yes">Enable software _compositing window manager</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="alignment7">
+ <property name="visible">True</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkVBox" id="vbox10">
+ <property name="visible">True</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkCheckButton" id="compositing-fast-alt-tab-checkbutton">
+ <property name="label" translatable="yes">Disable _thumbnails in Alt-Tab</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkVBox" id="vbox2">
<property name="visible">True</property>
<property name="spacing">6</property>
@@ -158,7 +248,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">0</property>
+ <property name="position">1</property>
</packing>
</child>
<child>
@@ -240,7 +330,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">1</property>
+ <property name="position">2</property>
</packing>
</child>
<child>
@@ -316,7 +406,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">2</property>
+ <property name="position">3</property>
</packing>
</child>
</object>