summaryrefslogtreecommitdiff
path: root/capplets
diff options
context:
space:
mode:
Diffstat (limited to 'capplets')
-rw-r--r--capplets/about-me/e-image-chooser.c2
-rw-r--r--capplets/about-me/e-image-chooser.h4
-rw-r--r--capplets/accessibility/at-properties/main.c6
-rw-r--r--capplets/appearance/Makefile.am2
-rw-r--r--capplets/appearance/appearance-font.c326
-rw-r--r--capplets/appearance/appearance-main.c6
-rw-r--r--capplets/appearance/appearance-support.c5
-rw-r--r--capplets/appearance/appearance-ui.c244
-rw-r--r--capplets/appearance/appearance-ui.h21
-rw-r--r--capplets/appearance/appearance.h8
-rw-r--r--capplets/appearance/data/appearance.ui384
-rw-r--r--capplets/appearance/theme-installer.c2
-rw-r--r--capplets/appearance/theme-save.c11
-rw-r--r--capplets/common/activate-settings-daemon.c2
-rw-r--r--capplets/common/capplet-util.c2
-rw-r--r--capplets/common/mate-theme-info.c6
-rw-r--r--capplets/common/theme-thumbnail.c2
-rw-r--r--capplets/display/display-capplet.ui258
-rw-r--r--capplets/display/mate-display-properties.desktop.in.in4
-rw-r--r--capplets/display/scrollarea.c81
-rw-r--r--capplets/display/xrandr-capplet.c604
-rw-r--r--capplets/keybindings/eggaccelerators.c22
-rw-r--r--capplets/keybindings/eggcellrendererkeys.c11
-rw-r--r--capplets/keybindings/mate-keybinding-properties.c51
-rw-r--r--capplets/keybindings/mate-keybinding.desktop.in.in2
-rw-r--r--capplets/keyboard/mate-keyboard-properties-a11y.c18
-rw-r--r--capplets/keyboard/mate-keyboard-properties-dialog.ui6
-rw-r--r--capplets/keyboard/mate-keyboard-properties-layout-chooser.ui18
-rw-r--r--capplets/keyboard/mate-keyboard-properties-model-chooser.ui6
-rw-r--r--capplets/keyboard/mate-keyboard-properties-options-dialog.ui1
-rw-r--r--capplets/keyboard/mate-keyboard-properties-xkb.c4
-rw-r--r--capplets/keyboard/mate-keyboard-properties-xkblt.c1
-rw-r--r--capplets/keyboard/mate-keyboard-properties-xkbot.c2
-rw-r--r--capplets/keyboard/mate-keyboard-properties.c19
-rw-r--r--capplets/mouse/mate-mouse-properties.c43
-rw-r--r--capplets/mouse/mate-mouse-properties.ui486
-rw-r--r--capplets/network/mate-network-properties.c29
-rw-r--r--capplets/network/mate-network-properties.desktop.in.in2
-rw-r--r--capplets/windows/mate-window-properties.c2
39 files changed, 1822 insertions, 881 deletions
diff --git a/capplets/about-me/e-image-chooser.c b/capplets/about-me/e-image-chooser.c
index 099b23cd..3c1e7f71 100644
--- a/capplets/about-me/e-image-chooser.c
+++ b/capplets/about-me/e-image-chooser.c
@@ -48,7 +48,7 @@ enum {
};
-static gint image_chooser_signals [LAST_SIGNAL] = { 0 };
+static guint image_chooser_signals [LAST_SIGNAL] = { 0 };
static void e_image_chooser_init (EImageChooser *chooser);
static void e_image_chooser_class_init (EImageChooserClass *klass);
diff --git a/capplets/about-me/e-image-chooser.h b/capplets/about-me/e-image-chooser.h
index 6d1ce92c..2df53646 100644
--- a/capplets/about-me/e-image-chooser.h
+++ b/capplets/about-me/e-image-chooser.h
@@ -63,4 +63,8 @@ void e_image_chooser_set_editable (EImageChooser *chooser, gboolean edit
gboolean e_image_chooser_get_image_data (EImageChooser *chooser, char **data, gsize *data_length);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _E_IMAGE_CHOOSER_H_ */
diff --git a/capplets/accessibility/at-properties/main.c b/capplets/accessibility/at-properties/main.c
index 8c62cc1f..f046517e 100644
--- a/capplets/accessibility/at-properties/main.c
+++ b/capplets/accessibility/at-properties/main.c
@@ -5,9 +5,9 @@
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-lowlevel.h>
-#define GSM_SERVICE_DBUS "org.mate.SessionManager"
-#define GSM_PATH_DBUS "/org/mate/SessionManager"
-#define GSM_INTERFACE_DBUS "org.mate.SessionManager"
+#define GSM_SERVICE_DBUS "org.gnome.SessionManager"
+#define GSM_PATH_DBUS "/org/gnome/SessionManager"
+#define GSM_INTERFACE_DBUS "org.gnome.SessionManager"
enum {
GSM_LOGOUT_MODE_NORMAL = 0,
diff --git a/capplets/appearance/Makefile.am b/capplets/appearance/Makefile.am
index c28d3815..500fcc64 100644
--- a/capplets/appearance/Makefile.am
+++ b/capplets/appearance/Makefile.am
@@ -16,6 +16,8 @@ mate_appearance_properties_SOURCES = \
appearance-themes.h \
appearance-style.c \
appearance-style.h \
+ appearance-ui.c \
+ appearance-ui.h \
appearance-support.c \
appearance-support.h \
mate-wp-info.c \
diff --git a/capplets/appearance/appearance-font.c b/capplets/appearance/appearance-font.c
index 99281f23..19583a4f 100644
--- a/capplets/appearance/appearance-font.c
+++ b/capplets/appearance/appearance-font.c
@@ -25,17 +25,11 @@
#include <stdarg.h>
#include <math.h>
-#ifdef HAVE_XFT2
- #include <gdk/gdkx.h>
- #include <X11/Xft/Xft.h>
-#endif /* HAVE_XFT2 */
-
#include <glib/gi18n.h>
#include <gio/gio.h>
#include "capplet-util.h"
-#ifdef HAVE_XFT2
/* X servers sometimes lie about the screen's physical dimensions, so we cannot
* compute an accurate DPI value. When this happens, the user gets fonts that
* are too huge or too tiny. So, we see what the server returns: if it reports
@@ -49,66 +43,44 @@
#define DPI_FALLBACK 96
#define DPI_LOW_REASONABLE_VALUE 50
#define DPI_HIGH_REASONABLE_VALUE 500
-#endif /* HAVE_XFT2 */
static gboolean in_change = FALSE;
-#define MAX_FONT_POINT_WITHOUT_WARNING 32
-#define MAX_FONT_SIZE_WITHOUT_WARNING MAX_FONT_POINT_WITHOUT_WARNING * 1024
-
-#ifdef HAVE_XFT2
-
-/*
- * Code for displaying previews of font rendering with various Xft options
- */
-
-static void sample_size_request(GtkWidget* darea, GtkRequisition* requisition)
-{
- GdkPixbuf* pixbuf = g_object_get_data(G_OBJECT(darea), "sample-pixbuf");
-
- requisition->width = gdk_pixbuf_get_width(pixbuf) + 2;
- requisition->height = gdk_pixbuf_get_height(pixbuf) + 2;
-}
-
#if GTK_CHECK_VERSION (3, 0, 0)
static void sample_draw(GtkWidget* darea, cairo_t* cr)
#else
static void sample_expose(GtkWidget* darea, GdkEventExpose* expose)
#endif
{
+ cairo_surface_t* surface = g_object_get_data(G_OBJECT(darea), "sample-surface");
GtkAllocation allocation;
- GdkPixbuf* pixbuf = g_object_get_data(G_OBJECT(darea), "sample-pixbuf");
- GdkWindow* window = gtk_widget_get_window(darea);
- GtkStyle* style = gtk_widget_get_style(darea);
- int width = gdk_pixbuf_get_width(pixbuf);
- int height = gdk_pixbuf_get_height(pixbuf);
+ int x, y, w, h;
gtk_widget_get_allocation (darea, &allocation);
+ x = allocation.width;
+ y = allocation.height;
+ w = cairo_image_surface_get_width (surface);
+ h = cairo_image_surface_get_height (surface);
- int x = (allocation.width - width) / 2;
- int y = (allocation.height - height) / 2;
+#if !GTK_CHECK_VERSION (3, 0, 0)
+ cairo_t *cr = gdk_cairo_create (expose->window);
+#endif
-#if GTK_CHECK_VERSION (3, 0, 0)
- cairo_set_line_width(cr, 1);
+ cairo_set_line_width (cr, 1);
+ cairo_set_line_cap (cr, CAIRO_LINE_CAP_SQUARE);
- cairo_set_source_rgb(cr, 1.0, 1.0, 1.0);
- cairo_rectangle(cr, 0, 0, allocation.width, allocation.height);
- cairo_stroke_preserve(cr);
- cairo_fill(cr);
+ cairo_set_source_rgb (cr, 1.0, 1.0, 1.0);
+ cairo_rectangle (cr, 0, 0, x, y);
+ cairo_fill_preserve (cr);
+ cairo_set_source_rgb (cr, 0.0, 0.0, 0.0);
+ cairo_stroke (cr);
- cairo_set_source_rgb(cr, 0.0, 0.0, 0.0);
- cairo_rectangle(cr, 0, 0, allocation.width - 1, allocation.height - 1);
- cairo_stroke_preserve(cr);
- cairo_fill(cr);
+ cairo_set_source_surface (cr, surface, (x - w) / 2, (y - h) / 2);
- gdk_cairo_set_source_pixbuf(cr, pixbuf, 0, 0);
cairo_paint(cr);
- cairo_fill (cr);
-#else
- gdk_draw_rectangle(window, style->white_gc, TRUE, 0, 0, allocation.width, allocation.height);
- gdk_draw_rectangle(window, style->black_gc, FALSE, 0, 0, allocation.width - 1, allocation.height - 1);
- gdk_draw_pixbuf(window, NULL, pixbuf, 0, 0, x, y, width, height, GDK_RGB_DITHER_NORMAL, 0, 0);
+#if !GTK_CHECK_VERSION (3, 0, 0)
+ cairo_destroy (cr);
#endif
}
@@ -132,193 +104,90 @@ typedef enum {
RGBA_VBGR
} RgbaOrder;
-static XftFont* open_pattern(FcPattern* pattern, Antialiasing antialiasing, Hinting hinting)
+static void set_fontoptions(PangoContext *context, Antialiasing antialiasing, Hinting hinting)
{
- #ifdef FC_HINT_STYLE
- static const int hintstyles[] = {
- FC_HINT_NONE, FC_HINT_SLIGHT, FC_HINT_MEDIUM, FC_HINT_FULL
- };
- #endif /* FC_HINT_STYLE */
-
- FcPattern* res_pattern;
- FcResult result;
- XftFont* font;
-
- Display* xdisplay = gdk_x11_get_default_xdisplay();
- int screen = gdk_x11_get_default_screen();
-
- res_pattern = XftFontMatch(xdisplay, screen, pattern, &result);
+ cairo_font_options_t *opt;
+ cairo_antialias_t aa;
+ cairo_hint_style_t hs;
- if (res_pattern == NULL)
- {
- return NULL;
+ switch (antialiasing) {
+ case ANTIALIAS_NONE:
+ aa = CAIRO_ANTIALIAS_NONE;
+ break;
+ case ANTIALIAS_GRAYSCALE:
+ aa = CAIRO_ANTIALIAS_GRAY;
+ break;
+ case ANTIALIAS_RGBA:
+ aa = CAIRO_ANTIALIAS_SUBPIXEL;
+ break;
+ default:
+ aa = CAIRO_ANTIALIAS_DEFAULT;
+ break;
}
- FcPatternDel(res_pattern, FC_HINTING);
- FcPatternAddBool(res_pattern, FC_HINTING, hinting != HINT_NONE);
-
- #ifdef FC_HINT_STYLE
- FcPatternDel(res_pattern, FC_HINT_STYLE);
- FcPatternAddInteger(res_pattern, FC_HINT_STYLE, hintstyles[hinting]);
- #endif /* FC_HINT_STYLE */
-
- FcPatternDel(res_pattern, FC_ANTIALIAS);
- FcPatternAddBool(res_pattern, FC_ANTIALIAS, antialiasing != ANTIALIAS_NONE);
-
- FcPatternDel(res_pattern, FC_RGBA);
- FcPatternAddInteger(res_pattern, FC_RGBA, antialiasing == ANTIALIAS_RGBA ? FC_RGBA_RGB : FC_RGBA_NONE);
-
- FcPatternDel(res_pattern, FC_DPI);
- FcPatternAddInteger(res_pattern, FC_DPI, 96);
-
- font = XftFontOpenPattern(xdisplay, res_pattern);
-
- if (!font)
- {
- FcPatternDestroy(res_pattern);
+ switch (hinting) {
+ case HINT_NONE:
+ hs = CAIRO_HINT_STYLE_NONE;
+ break;
+ case HINT_SLIGHT:
+ hs = CAIRO_HINT_STYLE_SLIGHT;
+ break;
+ case HINT_MEDIUM:
+ hs = CAIRO_HINT_STYLE_MEDIUM;
+ break;
+ case HINT_FULL:
+ hs = CAIRO_HINT_STYLE_FULL;
+ break;
+ default:
+ hs = CAIRO_HINT_STYLE_DEFAULT;
+ break;
}
- return font;
+ opt = cairo_font_options_create ();
+ cairo_font_options_set_antialias (opt, aa);
+ cairo_font_options_set_hint_style (opt, hs);
+ pango_cairo_context_set_font_options (context, opt);
+ cairo_font_options_destroy (opt);
}
static void setup_font_sample(GtkWidget* darea, Antialiasing antialiasing, Hinting hinting)
{
- const char* string1 = "abcfgop AO ";
- const char* string2 = "abcfgop";
-
- XftColor black, white;
- XRenderColor rendcolor;
-
- Display* xdisplay = gdk_x11_get_default_xdisplay();
-
-#if GTK_CHECK_VERSION (3, 0, 0)
- Colormap xcolormap = DefaultColormap(xdisplay, 0);
-#else
- GdkColormap* colormap = gdk_rgb_get_colormap();
- Colormap xcolormap = GDK_COLORMAP_XCOLORMAP(colormap);
-#endif
-
-#if GTK_CHECK_VERSION (3, 0, 0)
- GdkVisual* visual = gdk_visual_get_system ();
-#else
- GdkVisual* visual = gdk_colormap_get_visual(colormap);
-#endif
- Visual* xvisual = GDK_VISUAL_XVISUAL(visual);
-
- FcPattern* pattern;
- XftFont* font1;
- XftFont* font2;
- XGlyphInfo extents1 = { 0 };
- XGlyphInfo extents2 = { 0 };
-#if !GTK_CHECK_VERSION (3, 0, 0)
- GdkPixmap* pixmap;
-#endif
- XftDraw* draw;
- GdkPixbuf* tmp_pixbuf;
- GdkPixbuf* pixbuf;
-
+ const char *str = "<span font=\"18\" style=\"normal\">abcfgop AO </span>"
+ "<span font=\"20\" style=\"italic\">abcfgop</span>";
+
+ PangoContext *context;
+ PangoLayout *layout;
+ PangoFontDescription *fd;
+ PangoRectangle extents;
+ cairo_surface_t *surface;
+ cairo_t *cr;
int width, height;
- int ascent, descent;
-
- pattern = FcPatternBuild (NULL,
- FC_FAMILY, FcTypeString, "Serif",
- FC_SLANT, FcTypeInteger, FC_SLANT_ROMAN,
- FC_SIZE, FcTypeDouble, 18.,
- NULL);
- font1 = open_pattern (pattern, antialiasing, hinting);
- FcPatternDestroy (pattern);
-
- pattern = FcPatternBuild (NULL,
- FC_FAMILY, FcTypeString, "Serif",
- FC_SLANT, FcTypeInteger, FC_SLANT_ITALIC,
- FC_SIZE, FcTypeDouble, 20.,
- NULL);
- font2 = open_pattern (pattern, antialiasing, hinting);
- FcPatternDestroy (pattern);
-
- ascent = 0;
- descent = 0;
-
- if (font1)
- {
- XftTextExtentsUtf8 (xdisplay, font1, (unsigned char*) string1,
- strlen (string1), &extents1);
- ascent = MAX (ascent, font1->ascent);
- descent = MAX (descent, font1->descent);
- }
-
- if (font2)
- {
- XftTextExtentsUtf8 (xdisplay, font2, (unsigned char*) string2, strlen (string2), &extents2);
- ascent = MAX (ascent, font2->ascent);
- descent = MAX (descent, font2->descent);
- }
-
- width = extents1.xOff + extents2.xOff + 4;
- height = ascent + descent + 2;
-
-#if !GTK_CHECK_VERSION (3, 0, 0)
- pixmap = gdk_pixmap_new (NULL, width, height, visual->depth);
-#endif
-
-#if GTK_CHECK_VERSION (3, 0, 0)
- draw = XftDrawCreate (xdisplay, GDK_WINDOW_XID (gdk_screen_get_root_window (gdk_screen_get_default ())), xvisual, xcolormap);
-#else
- draw = XftDrawCreate (xdisplay, GDK_DRAWABLE_XID (pixmap), xvisual, xcolormap);
-#endif
- rendcolor.red = 0;
- rendcolor.green = 0;
- rendcolor.blue = 0;
- rendcolor.alpha = 0xffff;
-
- XftColorAllocValue(xdisplay, xvisual, xcolormap, &rendcolor, &black);
+ context = gtk_widget_get_pango_context (darea);
+ set_fontoptions (context, antialiasing, hinting);
+ layout = pango_layout_new (context);
- rendcolor.red = 0xffff;
- rendcolor.green = 0xffff;
- rendcolor.blue = 0xffff;
- rendcolor.alpha = 0xffff;
-
- XftColorAllocValue(xdisplay, xvisual, xcolormap, &rendcolor, &white);
- XftDrawRect(draw, &white, 0, 0, width, height);
-
- if (font1)
- {
- XftDrawStringUtf8(draw, &black, font1, 2, 2 + ascent, (unsigned char*) string1, strlen(string1));
- }
-
- if (font2)
- {
- XftDrawStringUtf8(draw, &black, font2, 2 + extents1.xOff, 2 + ascent, (unsigned char*) string2, strlen(string2));
- }
+ fd = pango_font_description_from_string ("Serif");
+ pango_layout_set_font_description (layout, fd);
+ pango_font_description_free (fd);
- XftDrawDestroy(draw);
+ pango_layout_set_markup (layout, str, -1);
- if (font1)
- {
- XftFontClose(xdisplay, font1);
- }
-
- if (font2)
- {
- XftFontClose(xdisplay, font2);
- }
+ pango_layout_get_extents (layout, NULL, &extents);
+ width = PANGO_PIXELS(extents.width) + 4;
+ height = PANGO_PIXELS(extents.height) + 2;
-#if GTK_CHECK_VERSION (3, 0, 0)
- tmp_pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE,8, width, height);
-#else
- tmp_pixbuf = gdk_pixbuf_get_from_drawable(NULL, pixmap, colormap, 0, 0, 0, 0, width, height);
-#endif
- pixbuf = gdk_pixbuf_scale_simple(tmp_pixbuf, 1 * width, 1 * height, GDK_INTERP_TILES);
+ surface = cairo_image_surface_create (CAIRO_FORMAT_A8, width, height);
+ cr = cairo_create (surface);
-#if !GTK_CHECK_VERSION (3, 0, 0)
- g_object_unref(pixmap);
-#endif
- g_object_unref(tmp_pixbuf);
+ cairo_move_to (cr, 2, 1);
+ pango_cairo_show_layout (cr, layout);
+ g_object_unref (layout);
+ cairo_destroy (cr);
- g_object_set_data_full(G_OBJECT(darea), "sample-pixbuf", pixbuf, (GDestroyNotify) g_object_unref);
+ g_object_set_data_full(G_OBJECT(darea), "sample-surface", surface, (GDestroyNotify) cairo_surface_destroy);
- g_signal_connect(darea, "size_request", G_CALLBACK(sample_size_request), NULL);
+ gtk_widget_set_size_request (GTK_WIDGET(darea), width + 2, height + 2);
#if GTK_CHECK_VERSION (3, 0, 0)
g_signal_connect(darea, "draw", G_CALLBACK(sample_draw), NULL);
#else
@@ -327,7 +196,7 @@ static void setup_font_sample(GtkWidget* darea, Antialiasing antialiasing, Hinti
}
/*
- * Code implementing a group of radio buttons with different Xft option combinations.
+ * Code implementing a group of radio buttons with different cairo option combinations.
* If one of the buttons is matched by the GSettings key, we pick it. Otherwise we
* show the group as inconsistent.
*/
@@ -414,7 +283,6 @@ setup_font_pair (GtkWidget *radio,
g_signal_connect (radio, "toggled",
G_CALLBACK (font_radio_toggled), pair);
}
-#endif /* HAVE_XFT2 */
static void
marco_titlebar_load_sensitivity (AppearanceData *data)
@@ -432,7 +300,6 @@ marco_changed (GSettings *settings,
marco_titlebar_load_sensitivity (user_data);
}
-#ifdef HAVE_XFT2
/*
* EnumGroup - a group of radio buttons for a gsettings enum
*/
@@ -503,7 +370,7 @@ enum_group_create (GSettings *settings,
group = g_new (EnumGroup, 1);
- group->settings = settings;
+ group->settings = g_object_ref (settings);
group->settings_key = g_strdup (settings_key);
group->items = NULL;
@@ -541,8 +408,8 @@ enum_group_create (GSettings *settings,
static void
enum_group_destroy (EnumGroup *group)
{
- group->settings = NULL;
g_signal_handler_disconnect (group->settings, group->settings_signal_id);
+ g_clear_object (&group->settings);
group->settings_signal_id = 0;
g_free (group->settings_key);
@@ -735,7 +602,6 @@ cb_show_details (GtkWidget *button,
gtk_window_present (GTK_WINDOW (data->font_details));
}
-#endif /* HAVE_XFT2 */
void font_init(AppearanceData* data)
{
@@ -790,20 +656,16 @@ void font_init(AppearanceData* data)
marco_titlebar_load_sensitivity(data);
- #ifdef HAVE_XFT2
- setup_font_pair(appearance_capplet_get_widget(data, "monochrome_radio"), appearance_capplet_get_widget (data, "monochrome_sample"), ANTIALIAS_NONE, HINT_FULL);
- setup_font_pair(appearance_capplet_get_widget(data, "best_shapes_radio"), appearance_capplet_get_widget (data, "best_shapes_sample"), ANTIALIAS_GRAYSCALE, HINT_MEDIUM);
- setup_font_pair(appearance_capplet_get_widget(data, "best_contrast_radio"), appearance_capplet_get_widget (data, "best_contrast_sample"), ANTIALIAS_GRAYSCALE, HINT_FULL);
- setup_font_pair(appearance_capplet_get_widget(data, "subpixel_radio"), appearance_capplet_get_widget (data, "subpixel_sample"), ANTIALIAS_RGBA, HINT_FULL);
+ setup_font_pair(appearance_capplet_get_widget(data, "monochrome_radio"), appearance_capplet_get_widget (data, "monochrome_sample"), ANTIALIAS_NONE, HINT_FULL);
+ setup_font_pair(appearance_capplet_get_widget(data, "best_shapes_radio"), appearance_capplet_get_widget (data, "best_shapes_sample"), ANTIALIAS_GRAYSCALE, HINT_MEDIUM);
+ setup_font_pair(appearance_capplet_get_widget(data, "best_contrast_radio"), appearance_capplet_get_widget (data, "best_contrast_sample"), ANTIALIAS_GRAYSCALE, HINT_FULL);
+ setup_font_pair(appearance_capplet_get_widget(data, "subpixel_radio"), appearance_capplet_get_widget (data, "subpixel_sample"), ANTIALIAS_RGBA, HINT_FULL);
- font_render_load (data->font_settings);
+ font_render_load (data->font_settings);
- g_signal_connect (data->font_settings, "changed", G_CALLBACK (font_render_changed), NULL);
+ g_signal_connect (data->font_settings, "changed", G_CALLBACK (font_render_changed), NULL);
- g_signal_connect (appearance_capplet_get_widget (data, "details_button"), "clicked", G_CALLBACK (cb_show_details), data);
- #else /* !HAVE_XFT2 */
- gtk_widget_hide (appearance_capplet_get_widget (data, "font_render_frame"));
- #endif /* HAVE_XFT2 */
+ g_signal_connect (appearance_capplet_get_widget (data, "details_button"), "clicked", G_CALLBACK (cb_show_details), data);
}
void font_shutdown(AppearanceData* data)
diff --git a/capplets/appearance/appearance-main.c b/capplets/appearance/appearance-main.c
index be4f3682..b51591e9 100644
--- a/capplets/appearance/appearance-main.c
+++ b/capplets/appearance/appearance-main.c
@@ -25,6 +25,7 @@
#include "appearance-font.h"
#include "appearance-themes.h"
#include "appearance-style.h"
+#include "appearance-ui.h"
#include "appearance-support.h"
#include "theme-installer.h"
#include "theme-thumbnail.h"
@@ -72,9 +73,7 @@ init_appearance_data (int *argc, char ***argv, GOptionContext *context)
data->interface_settings = g_settings_new (INTERFACE_SCHEMA);
data->marco_settings = g_settings_new (MARCO_SCHEMA);
data->mouse_settings = g_settings_new (MOUSE_SCHEMA);
-#ifdef HAVE_XFT2
data->font_settings = g_settings_new (FONT_RENDER_SCHEMA);
-#endif /* HAVE_XFT2 */
data->ui = ui;
data->thumb_factory = mate_desktop_thumbnail_factory_new (MATE_DESKTOP_THUMBNAIL_SIZE_NORMAL);
}
@@ -108,9 +107,7 @@ main_window_response (GtkWidget *widget,
g_object_unref (data->interface_settings);
g_object_unref (data->marco_settings);
g_object_unref (data->mouse_settings);
-#ifdef HAVE_XFT2
g_object_unref (data->font_settings);
-#endif /* HAVE_XFT2 */
g_object_unref (data->ui);
}
else if (response_id == GTK_RESPONSE_HELP)
@@ -192,6 +189,7 @@ main (int argc, char **argv)
desktop_init (data, (const gchar **) wallpaper_files);
g_strfreev (wallpaper_files);
font_init (data);
+ ui_init (data);
/* init support for other window managers */
support_init (data);
diff --git a/capplets/appearance/appearance-support.c b/capplets/appearance/appearance-support.c
index 25cc003c..35e4f263 100644
--- a/capplets/appearance/appearance-support.c
+++ b/capplets/appearance/appearance-support.c
@@ -77,6 +77,7 @@ metacity_theme_apply(const gchar *theme, const gchar *font)
{
gchar *gsettings_cmd = NULL;
+ /* for metacity <= 3.12 */
gsettings_cmd = g_strdup_printf("gsettings set org.gnome.desktop.wm.preferences theme '%s'", theme);
g_spawn_command_line_async (gsettings_cmd, NULL);
g_free (gsettings_cmd);
@@ -85,6 +86,10 @@ metacity_theme_apply(const gchar *theme, const gchar *font)
g_spawn_command_line_async (gsettings_cmd, NULL);
g_free (gsettings_cmd);
+ /* for metacity >= 3.16 */
+ gsettings_cmd = g_strdup_printf("gsettings set org.gnome.metacity theme '%s'", theme);
+ g_spawn_command_line_async (gsettings_cmd, NULL);
+ g_free (gsettings_cmd);
}
}
diff --git a/capplets/appearance/appearance-ui.c b/capplets/appearance/appearance-ui.c
new file mode 100644
index 00000000..04b8a49e
--- /dev/null
+++ b/capplets/appearance/appearance-ui.c
@@ -0,0 +1,244 @@
+/*
+ * Copyright (C) 2007 The GNOME Foundation
+ * Written by Jonathan Blandford <[email protected]>
+ * Jens Granseuer <[email protected]>
+ * All Rights Reserved
+ *
+ * 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 of the License, 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.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#include "appearance.h"
+#include "stdio.h"
+
+
+static void
+show_handlebar (AppearanceData *data, gboolean show)
+{
+ GtkWidget *handlebox = appearance_capplet_get_widget (data, "toolbar_handlebox");
+ GtkWidget *toolbar = appearance_capplet_get_widget (data, "toolbar_toolbar");
+ GtkWidget *align = appearance_capplet_get_widget (data, "toolbar_align");
+
+ g_object_ref (handlebox);
+ g_object_ref (toolbar);
+
+ if (gtk_bin_get_child (GTK_BIN (align)))
+ gtk_container_remove (GTK_CONTAINER (align), gtk_bin_get_child (GTK_BIN (align)));
+
+ if (gtk_bin_get_child (GTK_BIN (handlebox)))
+ gtk_container_remove (GTK_CONTAINER (handlebox), gtk_bin_get_child (GTK_BIN (handlebox)));
+
+ if (show) {
+ gtk_container_add (GTK_CONTAINER (align), handlebox);
+ gtk_container_add (GTK_CONTAINER (handlebox), toolbar);
+ g_object_unref (handlebox);
+ } else {
+ gtk_container_add (GTK_CONTAINER (align), toolbar);
+ }
+
+ g_object_unref (toolbar);
+}
+
+#if !GTK_CHECK_VERSION (3, 10, 0)
+static void
+set_toolbar_style (AppearanceData *data, const char *value)
+{
+ static const GtkToolbarStyle gtk_toolbar_styles[] =
+ { GTK_TOOLBAR_BOTH, GTK_TOOLBAR_BOTH_HORIZ, GTK_TOOLBAR_ICONS, GTK_TOOLBAR_TEXT };
+
+ int enum_val = gtk_combo_box_get_active((GtkComboBox *)
+ appearance_capplet_get_widget (data, "toolbar_style_select"));
+
+ gtk_toolbar_set_style (GTK_TOOLBAR (appearance_capplet_get_widget (data, "toolbar_toolbar")),
+ gtk_toolbar_styles[enum_val]);
+}
+#endif
+
+static void
+set_have_icons (AppearanceData *data, gboolean value)
+{
+ static const char *menu_item_names[] = {
+ "menu_item_1",
+ "menu_item_2",
+ "menu_item_3",
+ "menu_item_4",
+ "menu_item_5",
+ "cut",
+ "copy",
+ "paste",
+ NULL
+ };
+
+ const char **name;
+
+ for (name = menu_item_names; *name != NULL; name++) {
+ GtkImageMenuItem *item = GTK_IMAGE_MENU_ITEM (appearance_capplet_get_widget (data, *name));
+ GtkWidget *image;
+
+ if (value) {
+ image = g_object_get_data (G_OBJECT (item), "image");
+ if (image) {
+ gtk_image_menu_item_set_image (item, image);
+ g_object_unref (image);
+ }
+ } else {
+ image = gtk_image_menu_item_get_image (item);
+ g_object_set_data (G_OBJECT (item), "image", image);
+ g_object_ref (image);
+ gtk_image_menu_item_set_image (item, NULL);
+ }
+ }
+}
+
+/** GConf Callbacks and Conversions **/
+
+#if !GTK_CHECK_VERSION (3, 10, 0)
+static gboolean
+toolbar_to_widget (GValue *value, GVariant *variant, gpointer user_data)
+{
+ const gchar *val = g_variant_get_string(variant, NULL);
+ gint i = 0;
+
+ if (g_strcmp0(val, "both-horiz") == 0 || g_strcmp0(val, "both_horiz") == 0)
+ i = 1;
+ else if (g_strcmp0(val, "icons") == 0)
+ i = 2;
+ else if (g_strcmp0(val, "text") == 0)
+ i = 3;
+
+ g_value_set_int(value, i);
+
+ return TRUE;
+}
+
+static GVariant *
+toolbar_from_widget (const GValue *value,
+ const GVariantType *expected_type,
+ gpointer user_data)
+{
+ static const char *gtk_toolbar_styles_str[] = {
+ "both", "both-horiz", "icons", "text" };
+
+ gint index = g_value_get_int(value);
+ return g_variant_new_string(gtk_toolbar_styles_str[index]);
+}
+
+static void
+toolbar_style_cb (GSettings *settings,
+ gchar *key,
+ AppearanceData *data)
+{
+ set_toolbar_style (data, g_settings_get_string (settings, key));
+}
+#endif
+
+static void
+menus_have_icons_cb (GSettings *settings,
+ gchar *key,
+ AppearanceData *data)
+{
+ set_have_icons (data, g_settings_get_boolean (settings, key));
+}
+
+static void
+toolbar_detachable_cb (GSettings *settings,
+ gchar *key,
+ AppearanceData *data)
+{
+ show_handlebar (data, g_settings_get_boolean (settings, key));
+}
+
+/** GUI Callbacks **/
+
+static gint
+button_press_block_cb (GtkWidget *toolbar,
+ GdkEvent *event,
+ gpointer data)
+{
+ return TRUE;
+}
+
+/** Public Functions **/
+
+void
+ui_init (AppearanceData *data)
+{
+ GtkWidget* widget;
+
+#if GTK_CHECK_VERSION (3, 10, 0)
+ GtkWidget* container = appearance_capplet_get_widget(data, "vbox24");
+
+ // Remove menu accels and toolbar style toggles for new GTK versions
+ gtk_container_remove((GtkContainer *) container,
+ appearance_capplet_get_widget(data, "menu_accel_toggle"));
+ gtk_container_remove((GtkContainer *) container,
+ appearance_capplet_get_widget(data, "hbox11"));
+#endif
+
+ widget = appearance_capplet_get_widget(data, "menu_icons_toggle");
+ g_settings_bind (data->interface_settings,
+ MENU_ICONS_KEY,
+ G_OBJECT (widget),
+ "active",
+ G_SETTINGS_BIND_DEFAULT);
+ g_signal_connect (data->interface_settings, "changed::" MENU_ICONS_KEY,
+ G_CALLBACK (menus_have_icons_cb), data);
+
+ set_have_icons (data,
+ g_settings_get_boolean (data->interface_settings,
+ MENU_ICONS_KEY));
+
+#if !GTK_CHECK_VERSION (3, 10, 0)
+ widget = appearance_capplet_get_widget(data, "menu_accel_toggle");
+ g_settings_bind (data->interface_settings,
+ ACCEL_CHANGE_KEY,
+ G_OBJECT (widget),
+ "active",
+ G_SETTINGS_BIND_DEFAULT);
+
+ widget = appearance_capplet_get_widget(data, "toolbar_style_select");
+ g_settings_bind_with_mapping (data->interface_settings,
+ TOOLBAR_STYLE_KEY,
+ G_OBJECT (widget),
+ "active",
+ G_SETTINGS_BIND_DEFAULT,
+ toolbar_to_widget,
+ toolbar_from_widget,
+ data,
+ NULL);
+
+ g_signal_connect (data->interface_settings, "changed::" TOOLBAR_STYLE_KEY,
+ (GCallback) toolbar_style_cb, data);
+
+ char* toolbar_style;
+
+ toolbar_style = g_settings_get_string
+ (data->interface_settings,
+ TOOLBAR_STYLE_KEY);
+ set_toolbar_style (data, toolbar_style);
+ g_free (toolbar_style);
+#endif
+
+ g_signal_connect (appearance_capplet_get_widget (data, "toolbar_handlebox"),
+ "button_press_event",
+ (GCallback) button_press_block_cb, NULL);
+
+ show_handlebar (data,
+ g_settings_get_boolean (data->interface_settings,
+ TOOLBAR_DETACHABLE_KEY));
+
+ /* no ui for detachable toolbars */
+ g_signal_connect (data->interface_settings,
+ "changed::" TOOLBAR_DETACHABLE_KEY, (GCallback) toolbar_detachable_cb, data);
+}
diff --git a/capplets/appearance/appearance-ui.h b/capplets/appearance/appearance-ui.h
new file mode 100644
index 00000000..5817a735
--- /dev/null
+++ b/capplets/appearance/appearance-ui.h
@@ -0,0 +1,21 @@
+/*
+ * Copyright (C) 2007 The GNOME Foundation
+ * Written by Jens Granseuer <[email protected]>
+ * All Rights Reserved
+ *
+ * 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 of the License, 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.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+void ui_init (AppearanceData *data);
diff --git a/capplets/appearance/appearance.h b/capplets/appearance/appearance.h
index 2091324c..37f58291 100644
--- a/capplets/appearance/appearance.h
+++ b/capplets/appearance/appearance.h
@@ -45,6 +45,10 @@
#define GTK_THEME_KEY "gtk-theme"
#define ICON_THEME_KEY "icon-theme"
#define COLOR_SCHEME_KEY "gtk-color-scheme"
+#define ACCEL_CHANGE_KEY "can-change-accels"
+#define MENU_ICONS_KEY "menus-have-icons"
+#define TOOLBAR_DETACHABLE_KEY "toolbar-detachable"
+#define TOOLBAR_STYLE_KEY "toolbar-style"
#define GTK_FONT_DEFAULT_VALUE "Sans 10"
#define LOCKDOWN_SCHEMA "org.mate.lockdown"
@@ -65,13 +69,11 @@
#define CURSOR_THEME_KEY "cursor-theme"
#define CURSOR_SIZE_KEY "cursor-size"
-#ifdef HAVE_XFT2
#define FONT_RENDER_SCHEMA "org.mate.font-rendering"
#define FONT_ANTIALIASING_KEY "antialiasing"
#define FONT_HINTING_KEY "hinting"
#define FONT_RGBA_ORDER_KEY "rgba-order"
#define FONT_DPI_KEY "dpi"
-#endif /* HAVE_XFT2 */
typedef struct {
GSettings* settings;
@@ -80,9 +82,7 @@ typedef struct {
GSettings* interface_settings;
GSettings* marco_settings;
GSettings* mouse_settings;
-#ifdef HAVE_XFT2
GSettings* font_settings;
-#endif /* HAVE_XFT2 */
GtkBuilder* ui;
MateDesktopThumbnailFactory* thumb_factory;
gulong screen_size_handler;
diff --git a/capplets/appearance/data/appearance.ui b/capplets/appearance/data/appearance.ui
index 5f117007..d2c9fdda 100644
--- a/capplets/appearance/data/appearance.ui
+++ b/capplets/appearance/data/appearance.ui
@@ -1549,6 +1549,370 @@
<property name="tab_fill">False</property>
</packing>
</child>
+ <child>
+ <object class="GtkVBox" id="interface_vbox">
+ <property name="visible">True</property>
+ <property name="border_width">12</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">18</property>
+ <child>
+ <object class="GtkVBox" id="vbox23">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label35">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Menus and Toolbars</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="GtkHBox" id="hbox10">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkLabel" id="label36">
+ <property name="visible">True</property>
+ <property name="label"> </property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox24">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkCheckButton" id="menu_icons_toggle">
+ <property name="label" translatable="yes">Show _icons in menus</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="active">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="GtkCheckButton" id="menu_accel_toggle">
+ <property name="label" translatable="yes">_Editable menu shortcut keys</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">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox11">
+ <property name="visible">True</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="label37">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Toolbar _button labels:</property>
+ <property name="use_underline">True</property>
+ <property name="justify">center</property>
+ <property name="mnemonic_widget">toolbar_style_select</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="toolbar_style_select">
+ <property name="visible">True</property>
+ <property name="model">toolbar_style_liststore</property>
+ <child>
+ <object class="GtkCellRendererText" id="cellrenderertext3"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </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">4</property>
+ </packing>
+ </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">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox25">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label38">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Preview</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="GtkHBox" id="hbox12">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkLabel" id="label39">
+ <property name="visible">True</property>
+ <property name="label"> </property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox26">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkMenuBar" id="menubar">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkMenuItem" id="File Menu">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_File</property>
+ <property name="use_underline">True</property>
+ <child type="submenu">
+ <object class="GtkMenu" id="File Menu_menu">
+ <child>
+ <object class="GtkImageMenuItem" id="menu_item_1">
+ <property name="label">gtk-new</property>
+ <property name="visible">True</property>
+ <property name="use_underline">True</property>
+ <property name="use-stock">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="menu_item_2">
+ <property name="label">gtk-open</property>
+ <property name="visible">True</property>
+ <property name="use_underline">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="menu_item_3">
+ <property name="label">gtk-save</property>
+ <property name="visible">True</property>
+ <property name="use_underline">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="separator1">
+ <property name="visible">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="menu_item_4">
+ <property name="label">gtk-print</property>
+ <property name="visible">True</property>
+ <property name="use_underline">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="separator2">
+ <property name="visible">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="menu_item_5">
+ <property name="label">gtk-quit</property>
+ <property name="visible">True</property>
+ <property name="use_underline">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="edit">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Edit</property>
+ <property name="use_underline">True</property>
+ <child type="submenu">
+ <object class="GtkMenu" id="edit1_menu">
+ <child>
+ <object class="GtkImageMenuItem" id="cut">
+ <property name="label">gtk-cut</property>
+ <property name="visible">True</property>
+ <property name="use_underline">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="copy">
+ <property name="label">gtk-copy</property>
+ <property name="visible">True</property>
+ <property name="use_underline">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="paste">
+ <property name="label">gtk-paste</property>
+ <property name="visible">True</property>
+ <property name="use_underline">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="toolbar_align">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkHandleBox" id="toolbar_handlebox">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkToolbar" id="toolbar_toolbar">
+ <property name="visible">True</property>
+ <property name="toolbar_style">both-horiz</property>
+ <child>
+ <object class="GtkToolButton" id="button2">
+ <property name="visible">True</property>
+ <property name="is_important">True</property>
+ <property name="stock_id">gtk-new</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolButton" id="button4">
+ <property name="visible">True</property>
+ <property name="stock_id">gtk-open</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolButton" id="save_button">
+ <property name="visible">True</property>
+ <property name="stock_id">gtk-save</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="label40">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="label" translatable="yes">Interface</property>
+ </object>
+ <packing>
+ <property name="position">3</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="position">1</property>
@@ -2455,7 +2819,7 @@
<object class="GtkTable" id="table3">
<property name="visible">True</property>
<property name="border_width">6</property>
- <property name="n_rows">3</property>
+ <property name="n_rows">4</property>
<property name="n_columns">2</property>
<property name="column_spacing">12</property>
<property name="row_spacing">6</property>
@@ -2542,6 +2906,24 @@
</packing>
</child>
<child>
+ <object class="GtkCheckButton" id="save_notification_checkbutton">
+ <property name="label" translatable="yes">Save _notification theme</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="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
<placeholder/>
</child>
</object>
diff --git a/capplets/appearance/theme-installer.c b/capplets/appearance/theme-installer.c
index 23c94f99..9630d98d 100644
--- a/capplets/appearance/theme-installer.c
+++ b/capplets/appearance/theme-installer.c
@@ -689,6 +689,8 @@ mate_theme_install (GFile *file,
return;
}
+ g_free (path);
+
base = g_file_get_basename (file);
if (g_str_has_suffix (base, ".tar.gz")
diff --git a/capplets/appearance/theme-save.c b/capplets/appearance/theme-save.c
index 64184444..81265b79 100644
--- a/capplets/appearance/theme-save.c
+++ b/capplets/appearance/theme-save.c
@@ -172,6 +172,7 @@ write_theme_to_disk (MateThemeMetaInfo *theme_info,
const gchar *theme_name,
const gchar *theme_description,
gboolean save_background,
+ gboolean save_notification,
GError **error)
{
gchar* dir;
@@ -237,7 +238,7 @@ write_theme_to_disk (MateThemeMetaInfo *theme_info,
g_free (str);
}
- if (theme_info->notification_theme_name) {
+ if (theme_info->notification_theme_name && save_notification) {
str = g_strdup_printf ("NotificationTheme=%s\n", theme_info->notification_theme_name);
g_output_stream_write (output, str, strlen (str), NULL, NULL);
g_free (str);
@@ -272,6 +273,7 @@ save_theme_to_disk (MateThemeMetaInfo *theme_info,
const gchar *theme_name,
const gchar *theme_description,
gboolean save_background,
+ gboolean save_notification,
GError **error)
{
if (!check_theme_name (theme_name, error))
@@ -280,7 +282,7 @@ save_theme_to_disk (MateThemeMetaInfo *theme_info,
if (!setup_directory_structure (theme_name, error))
return FALSE;
- if (!write_theme_to_disk (theme_info, theme_name, theme_description, save_background, error))
+ if (!write_theme_to_disk (theme_info, theme_name, theme_description, save_background, save_notification, error))
return FALSE;
return TRUE;
@@ -302,6 +304,7 @@ save_dialog_response (GtkWidget *save_dialog,
gchar *theme_description = NULL;
gchar *theme_name = NULL;
gboolean save_background;
+ gboolean save_notification;
GError *error = NULL;
entry = appearance_capplet_get_widget (data, "save_dialog_entry");
@@ -317,8 +320,10 @@ save_dialog_response (GtkWidget *save_dialog,
theme_info = (MateThemeMetaInfo *) g_object_get_data (G_OBJECT (save_dialog), "meta-theme-info");
save_background = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (
appearance_capplet_get_widget (data, "save_background_checkbutton")));
+ save_notification = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (
+ appearance_capplet_get_widget (data, "save_notification_checkbutton")));
- if (save_theme_to_disk (theme_info, theme_name, theme_description, save_background, &error)) {
+ if (save_theme_to_disk (theme_info, theme_name, theme_description, save_background, save_notification, &error)) {
/* remove the custom theme */
GtkTreeIter iter;
diff --git a/capplets/common/activate-settings-daemon.c b/capplets/common/activate-settings-daemon.c
index 794f1098..f82f0353 100644
--- a/capplets/common/activate-settings-daemon.c
+++ b/capplets/common/activate-settings-daemon.c
@@ -2,7 +2,7 @@
#include <config.h>
#endif
-#include <mate-settings-daemon/mate-settings-client.h>
+#include <mate-settings-client.h>
#include <gtk/gtk.h>
#include <glib/gi18n.h>
diff --git a/capplets/common/capplet-util.c b/capplets/common/capplet-util.c
index eb2017a2..2a66e955 100644
--- a/capplets/common/capplet-util.c
+++ b/capplets/common/capplet-util.c
@@ -190,9 +190,7 @@ capplet_init (GOptionContext *context,
#endif
if (context) {
-#if GLIB_CHECK_VERSION (2, 12, 0)
g_option_context_set_translation_domain (context, GETTEXT_PACKAGE);
-#endif
g_option_context_add_group (context, gtk_get_option_group (TRUE));
if (!g_option_context_parse (context, argc, argv, &err)) {
diff --git a/capplets/common/mate-theme-info.c b/capplets/common/mate-theme-info.c
index 4da1ab4f..a3dddece 100644
--- a/capplets/common/mate-theme-info.c
+++ b/capplets/common/mate-theme-info.c
@@ -637,11 +637,7 @@ read_current_cursor_font (void)
gchar *dir_name;
struct dirent *file_dirent;
- #if GLIB_CHECK_VERSION(2, 6, 0)
- dir_name = g_build_filename(g_get_user_config_dir(), "mate", "share", "cursor-fonts", NULL);
- #else // glib version < 2.6.0
- dir_name = g_build_filename(g_get_home_dir(), ".config", "mate", "share", "cursor-fonts", NULL);
- #endif
+ dir_name = g_build_filename(g_get_user_config_dir(), "mate", "share", "cursor-fonts", NULL);
if (! g_file_test (dir_name, G_FILE_TEST_EXISTS)) {
g_free (dir_name);
diff --git a/capplets/common/theme-thumbnail.c b/capplets/common/theme-thumbnail.c
index 397a009f..ea371482 100644
--- a/capplets/common/theme-thumbnail.c
+++ b/capplets/common/theme-thumbnail.c
@@ -116,7 +116,7 @@ static GdkPixmap* draw_window_on_pixbuf(GtkWidget* widget)
visual = gtk_widget_get_visual(widget);
#if !GTK_CHECK_VERSION (3, 0, 0)
- pixmap = gdk_pixmap_new(NULL, width, height, visual->depth);
+ pixmap = gdk_pixmap_new(NULL, width, height, gdk_visual_get_depth (visual));
gdk_drawable_set_colormap(GDK_DRAWABLE(pixmap), gtk_widget_get_colormap(widget));
#endif
diff --git a/capplets/display/display-capplet.ui b/capplets/display/display-capplet.ui
index fec38817..9887a410 100644
--- a/capplets/display/display-capplet.ui
+++ b/capplets/display/display-capplet.ui
@@ -1,19 +1,99 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk+" version="2.16"/>
<!-- interface-naming-policy toplevel-contextual -->
<object class="GtkDialog" id="dialog">
+ <property name="can_focus">False</property>
<property name="border_width">5</property>
<property name="title" translatable="yes">Monitor Preferences</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
<object class="GtkVBox" id="dialog-vbox1">
<property name="visible">True</property>
- <property name="orientation">vertical</property>
+ <property name="can_focus">False</property>
<property name="spacing">2</property>
+ <child internal-child="action_area">
+ <object class="GtkHButtonBox" id="dialog-action_area1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="helpbutton1">
+ <property name="label">gtk-help</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ <property name="secondary">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="make_default_button">
+ <property name="label" translatable="yes">Apply system-wide</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="tooltip_text" translatable="yes">Applies the current configuration for other MATE users on the computer. Note that this doesn't affect login screens or other desktop environments.</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="apply_button">
+ <property name="label">gtk-apply</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="button2">
+ <property name="label">gtk-close</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
<child>
<object class="GtkTable" id="table2">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="n_rows">2</property>
<property name="n_columns">2</property>
<property name="column_spacing">12</property>
@@ -21,22 +101,26 @@
<child>
<object class="GtkVBox" id="vbox3">
<property name="visible">True</property>
- <property name="orientation">vertical</property>
+ <property name="can_focus">False</property>
<property name="spacing">12</property>
<child>
<object class="GtkAlignment" id="align">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<child>
<placeholder/>
</child>
</object>
<packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkHBox" id="hbox1">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="spacing">12</property>
<child>
<object class="GtkCheckButton" id="clone_checkbox">
@@ -44,6 +128,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
</object>
@@ -59,6 +144,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
</object>
<packing>
@@ -80,10 +166,11 @@
<child>
<object class="GtkVBox" id="vbox4">
<property name="visible">True</property>
- <property name="orientation">vertical</property>
+ <property name="can_focus">False</property>
<child>
<object class="GtkLabel" id="label8">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Panel icon</property>
<attributes>
@@ -99,6 +186,7 @@
<child>
<object class="GtkAlignment" id="alignment2">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="left_padding">12</property>
<child>
<object class="GtkCheckButton" id="show_notification_icon">
@@ -106,6 +194,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
</object>
@@ -127,72 +216,79 @@
<child>
<object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
<child>
<object class="GtkTable" id="table1">
<property name="visible">True</property>
- <property name="n_rows">6</property>
+ <property name="can_focus">False</property>
+ <property name="n_rows">7</property>
<property name="n_columns">2</property>
<property name="column_spacing">12</property>
<property name="row_spacing">6</property>
<child>
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">_Resolution:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">resolution_combo</property>
</object>
<packing>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
<property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="y_options"/>
</packing>
</child>
<child>
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Re_fresh rate:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">refresh_combo</property>
</object>
<packing>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
<property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="y_options"/>
</packing>
</child>
<child>
<object class="GtkComboBox" id="resolution_combo">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="y_options"></property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="y_options"/>
</packing>
</child>
<child>
<object class="GtkComboBox" id="refresh_combo">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="y_options"></property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
+ <property name="y_options"/>
</packing>
</child>
<child>
<object class="GtkHBox" id="hbox2">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="spacing">12</property>
<child>
<object class="GtkRadioButton" id="monitor_on_radio">
@@ -200,6 +296,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
@@ -216,6 +313,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
<property name="group">monitor_on_radio</property>
@@ -231,15 +329,17 @@
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
- <property name="y_options"></property>
+ <property name="y_options"/>
</packing>
</child>
<child>
<object class="GtkEventBox" id="current_monitor_event_box">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<child>
<object class="GtkLabel" id="current_monitor_label">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Monitor</property>
<attributes>
@@ -250,27 +350,29 @@
</object>
<packing>
<property name="right_attach">2</property>
- <property name="y_options"></property>
+ <property name="y_options"/>
</packing>
</child>
<child>
<object class="GtkLabel" id="label5">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">R_otation:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">rotation_combo</property>
</object>
<packing>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
+ <property name="top_attach">5</property>
+ <property name="bottom_attach">6</property>
<property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="y_options"/>
</packing>
</child>
<child>
<object class="GtkComboBox" id="rotation_combo">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="model">liststore1</property>
<child>
<object class="GtkCellRendererText" id="cellrenderertext1"/>
@@ -282,9 +384,9 @@
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="y_options"></property>
+ <property name="top_attach">5</property>
+ <property name="bottom_attach">6</property>
+ <property name="y_options"/>
</packing>
</child>
<child>
@@ -292,19 +394,22 @@
<property name="label" translatable="yes">Include _panel</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">6</property>
+ <property name="bottom_attach">7</property>
<property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="y_options"/>
</packing>
</child>
<child>
<object class="GtkAlignment" id="alignment4">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<child>
<placeholder/>
</child>
@@ -314,8 +419,26 @@
<property name="right_attach">2</property>
<property name="top_attach">5</property>
<property name="bottom_attach">6</property>
- <property name="x_options"></property>
- <property name="y_options"></property>
+ <property name="x_options"/>
+ <property name="y_options"/>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="primary_button">
+ <property name="label" translatable="yes">Set as primary</property>
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="tooltip_text" translatable="yes">Sets the selected monitor as primary.</property>
+ <property name="use_action_appearance">False</property>
+ </object>
+ <packing>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
</packing>
</child>
</object>
@@ -324,86 +447,17 @@
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="x_options"></property>
+ <property name="x_options"/>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
</object>
<packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
- <child internal-child="action_area">
- <object class="GtkHButtonBox" id="dialog-action_area1">
- <property name="visible">True</property>
- <property name="layout_style">end</property>
- <child>
- <object class="GtkButton" id="helpbutton1">
- <property name="label">gtk-help</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="receives_default">False</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- <property name="secondary">True</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="make_default_button">
- <property name="label" translatable="yes">Make Default</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="apply_button">
- <property name="label">gtk-apply</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="receives_default">False</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="button2">
- <property name="label">gtk-close</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="receives_default">False</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">3</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="pack_type">end</property>
- <property name="position">0</property>
- </packing>
- </child>
</object>
</child>
<action-widgets>
diff --git a/capplets/display/mate-display-properties.desktop.in.in b/capplets/display/mate-display-properties.desktop.in.in
index 9031a275..324529fa 100644
--- a/capplets/display/mate-display-properties.desktop.in.in
+++ b/capplets/display/mate-display-properties.desktop.in.in
@@ -1,6 +1,6 @@
[Desktop Entry]
-_Name=Monitors
-_Comment=Change resolution and position of monitors
+_Name=Displays
+_Comment=Change resolution and position of monitors and projectors
Exec=mate-display-properties
Icon=mate-preferences-desktop-display
Terminal=false
diff --git a/capplets/display/scrollarea.c b/capplets/display/scrollarea.c
index 5dfd2e7f..711984a4 100644
--- a/capplets/display/scrollarea.c
+++ b/capplets/display/scrollarea.c
@@ -325,9 +325,14 @@ foo_scroll_area_class_init (FooScrollAreaClass *class)
paint),
NULL, NULL,
foo_marshal_VOID__POINTER_BOXED_POINTER,
- G_TYPE_NONE, 3,
+ G_TYPE_NONE,
+#if GTK_CHECK_VERSION (3, 0, 0)
+ 1,
+#else
+ 3,
G_TYPE_POINTER,
GDK_TYPE_RECTANGLE,
+#endif
G_TYPE_POINTER);
#if !GTK_CHECK_VERSION (3, 0, 0)
@@ -598,38 +603,18 @@ clip_to_region (cairo_t *cr, GdkRegion *region)
}
#endif
-#if !GTK_CHECK_VERSION (3, 0, 0)
-static void
-simple_draw_drawable (GdkDrawable *dst,
- GdkDrawable *src,
- int src_x,
- int src_y,
- int dst_x,
- int dst_y,
- int width,
- int height)
-{
- GdkGC *gc = gdk_gc_new (dst);
-
- gdk_draw_drawable (dst, gc, src, src_x, src_y, dst_x, dst_y, width, height);
-
- g_object_unref (gc);
-}
-#endif
-
static gboolean
#if GTK_CHECK_VERSION (3, 0, 0)
foo_scroll_area_draw (GtkWidget *widget,
- cairo_t *cr)
+ cairo_t *widget_cr)
#else
foo_scroll_area_expose (GtkWidget *widget,
GdkEventExpose *expose)
#endif
{
FooScrollArea *scroll_area = FOO_SCROLL_AREA (widget);
-#if !GTK_CHECK_VERSION (3, 0, 0)
cairo_t *cr;
- GdkGC *gc;
+#if !GTK_CHECK_VERSION (3, 0, 0)
GdkRectangle extents;
GdkWindow *window = gtk_widget_get_window (widget);
#endif
@@ -661,7 +646,7 @@ foo_scroll_area_expose (GtkWidget *widget,
/* Setup input areas */
clear_exposed_input_region (scroll_area, scroll_area->priv->update_region);
-
+
scroll_area->priv->current_input = g_new0 (InputRegion, 1);
scroll_area->priv->current_input->region = gdk_region_copy (scroll_area->priv->update_region);
scroll_area->priv->current_input->paths = NULL;
@@ -676,6 +661,8 @@ foo_scroll_area_expose (GtkWidget *widget,
cr = gdk_cairo_create (scroll_area->priv->pixmap);
translate_cairo_device (cr, -x_offset, -y_offset);
clip_to_region (cr, region);
+#else
+ cr = cairo_create (scroll_area->priv->surface);
#endif
initialize_background (widget, cr);
@@ -690,10 +677,8 @@ foo_scroll_area_expose (GtkWidget *widget,
g_signal_emit (widget, signals[PAINT], 0, cr, &extents, region);
#endif
-#if !GTK_CHECK_VERSION (3, 0, 0)
/* Destroy stuff */
cairo_destroy (cr);
-#endif
#if !GTK_CHECK_VERSION (3, 0, 0)
scroll_area->priv->expose_region = NULL;
@@ -702,19 +687,17 @@ foo_scroll_area_expose (GtkWidget *widget,
/* Finally draw the backing pixmap */
#if GTK_CHECK_VERSION (3, 0, 0)
- cairo_set_source_surface (cr, scroll_area->priv->surface, widget_allocation.x, widget_allocation.y);
- cairo_paint (cr);
+ cairo_set_source_surface (widget_cr, scroll_area->priv->surface, widget_allocation.x, widget_allocation.y);
+ cairo_paint (widget_cr);
#else
- gc = gdk_gc_new (window);
-
- gdk_gc_set_clip_region (gc, expose->region);
-
gtk_widget_get_allocation (widget, &widget_allocation);
- gdk_draw_drawable (window, gc, scroll_area->priv->pixmap,
- 0, 0, widget_allocation.x, widget_allocation.y,
- widget_allocation.width, widget_allocation.height);
- g_object_unref (gc);
+ cr = gdk_cairo_create (window);
+ gdk_cairo_set_source_pixmap (cr, scroll_area->priv->pixmap,
+ widget_allocation.x, widget_allocation.y);
+ gdk_cairo_region (cr, expose->region);
+ cairo_fill (cr);
+ cairo_destroy (cr);
#endif
gdk_region_destroy (region);
@@ -889,6 +872,7 @@ create_new_pixmap (GtkWidget *widget,
cairo_surface_t *new;
#else
GdkPixmap *new;
+ cairo_t *cr;
#endif
gtk_widget_get_allocation (widget, &widget_allocation);
@@ -913,15 +897,17 @@ create_new_pixmap (GtkWidget *widget,
* That might just work, actually. We need to make sure marco uses
* static gravity for the window before this will be useful.
*/
+
#if GTK_CHECK_VERSION (3, 0, 0)
cr = cairo_create (new);
cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
cairo_set_source_surface (cr, old, 0, 0);
- cairo_paint (cr);
- cairo_destroy (cr);
#else
- simple_draw_drawable (new, old, 0, 0, 0, 0, -1, -1);
+ cr = gdk_cairo_create (new);
+ gdk_cairo_set_source_pixmap (cr, old, 0, 0);
#endif
+ cairo_paint (cr);
+ cairo_destroy (cr);
return new;
}
@@ -1259,9 +1245,13 @@ foo_scroll_area_scroll (FooScrollArea *area,
if (gdk_rectangle_intersect (&allocation, &src_area, &move_area))
{
GdkRegion *move_region;
+ cairo_t *cr;
#if GTK_CHECK_VERSION (3, 0, 0)
- cairo_t *cr = cairo_create (area->priv->surface);
+ cr = cairo_create (area->priv->surface);
+#else
+ cr = gdk_cairo_create (area->priv->pixmap);
+#endif
/* Cairo doesn't allow self-copies, so we do this little trick instead:
* 1) Clip so the group size is small.
@@ -1271,7 +1261,11 @@ foo_scroll_area_scroll (FooScrollArea *area,
cairo_clip (cr);
cairo_push_group (cr);
+#if GTK_CHECK_VERSION (3, 0, 0)
cairo_set_source_surface (cr, area->priv->surface, dx, dy);
+#else
+ gdk_cairo_set_source_pixmap (cr, area->priv->pixmap, dx, dy);
+#endif
gdk_cairo_rectangle (cr, &move_area);
cairo_fill (cr);
@@ -1279,12 +1273,7 @@ foo_scroll_area_scroll (FooScrollArea *area,
cairo_paint (cr);
cairo_destroy (cr);
-#else
- simple_draw_drawable (area->priv->pixmap, area->priv->pixmap,
- move_area.x, move_area.y,
- move_area.x + dx, move_area.y + dy,
- move_area.width, move_area.height);
-#endif
+
gtk_widget_queue_draw (GTK_WIDGET (area));
move_region = gdk_region_rectangle (&move_area);
diff --git a/capplets/display/xrandr-capplet.c b/capplets/display/xrandr-capplet.c
index 7a2325c5..bc91fd32 100644
--- a/capplets/display/xrandr-capplet.c
+++ b/capplets/display/xrandr-capplet.c
@@ -49,7 +49,7 @@ struct App
MateRRScreen *screen;
MateRRConfig *current_configuration;
MateRRLabeler *labeler;
- MateOutputInfo *current_output;
+ MateRROutputInfo *current_output;
GtkWidget *dialog;
GtkWidget *current_monitor_event_box;
@@ -63,6 +63,7 @@ struct App
GtkWidget *panel_checkbox;
GtkWidget *clone_checkbox;
GtkWidget *show_icon_checkbox;
+ GtkWidget *primary_button;
/* We store the event timestamp when the Apply button is clicked */
GtkWidget *apply_button;
@@ -91,13 +92,13 @@ enum {
static void rebuild_gui (App *app);
static void on_clone_changed (GtkWidget *box, gpointer data);
static void on_rate_changed (GtkComboBox *box, gpointer data);
-static gboolean output_overlaps (MateOutputInfo *output, MateRRConfig *config);
+static gboolean output_overlaps (MateRROutputInfo *output, MateRRConfig *config);
static void select_current_output_from_dialog_position (App *app);
static void monitor_on_off_toggled_cb (GtkToggleButton *toggle, gpointer data);
-static void get_geometry (MateOutputInfo *output, int *w, int *h);
+static void get_geometry (MateRROutputInfo *output, int *w, int *h);
static void apply_configuration_returned_cb (DBusGProxy *proxy, DBusGProxyCall *call_id, void *data);
static gboolean get_clone_size (MateRRScreen *screen, int *width, int *height);
-static gboolean output_info_supports_mode (App *app, MateOutputInfo *info, int width, int height);
+static gboolean output_info_supports_mode (App *app, MateRROutputInfo *info, int width, int height);
static void
error_message (App *app, const char *primary_text, const char *secondary_text)
@@ -139,10 +140,10 @@ on_screen_changed (MateRRScreen *scr,
MateRRConfig *current;
App *app = data;
- current = mate_rr_config_new_current (app->screen);
+ current = mate_rr_config_new_current (app->screen, NULL);
if (app->current_configuration)
- mate_rr_config_free (app->current_configuration);
+ g_object_unref (app->current_configuration);
app->current_configuration = current;
app->current_output = NULL;
@@ -278,7 +279,7 @@ get_current_modes (App *app)
{
MateRROutput *output;
- if (app->current_configuration->clone)
+ if (mate_rr_config_get_clone (app->current_configuration))
{
return mate_rr_screen_list_clone_modes (app->screen);
}
@@ -287,8 +288,8 @@ get_current_modes (App *app)
if (!app->current_output)
return NULL;
- output = mate_rr_screen_get_output_by_name (
- app->screen, app->current_output->name);
+ output = mate_rr_screen_get_output_by_name (app->screen,
+ mate_rr_output_info_get_name (app->current_output));
if (!output)
return NULL;
@@ -317,20 +318,20 @@ rebuild_rotation_combo (App *app)
clear_combo (app->rotation_combo);
- gtk_widget_set_sensitive (
- app->rotation_combo, app->current_output && app->current_output->on);
+ gtk_widget_set_sensitive (app->rotation_combo,
+ app->current_output && mate_rr_output_info_is_active (app->current_output));
if (!app->current_output)
return;
- current = app->current_output->rotation;
+ current = mate_rr_output_info_get_rotation (app->current_output);
selection = NULL;
for (i = 0; i < G_N_ELEMENTS (rotations); ++i)
{
const RotationInfo *info = &(rotations[i]);
- app->current_output->rotation = info->rotation;
+ mate_rr_output_info_set_rotation (app->current_output, info->rotation);
/* NULL-GError --- FIXME: we should say why this rotation is not available! */
if (mate_rr_config_applicable (app->current_configuration, app->screen, NULL))
@@ -342,7 +343,7 @@ rebuild_rotation_combo (App *app)
}
}
- app->current_output->rotation = current;
+ mate_rr_output_info_set_rotation (app->current_output, current);
if (!(selection && combo_select (app->rotation_combo, selection)))
combo_select (app->rotation_combo, _("Normal"));
@@ -357,7 +358,6 @@ make_rate_string (int hz)
static void
rebuild_rate_combo (App *app)
{
- GHashTable *rates;
MateRRMode **modes;
int best;
int i;
@@ -365,27 +365,27 @@ rebuild_rate_combo (App *app)
clear_combo (app->refresh_combo);
gtk_widget_set_sensitive (
- app->refresh_combo, app->current_output && app->current_output->on);
+ app->refresh_combo, app->current_output && mate_rr_output_info_is_active (app->current_output));
if (!app->current_output
|| !(modes = get_current_modes (app)))
return;
- rates = g_hash_table_new_full (
- g_str_hash, g_str_equal, (GFreeFunc) g_free, NULL);
-
best = -1;
for (i = 0; modes[i] != NULL; ++i)
{
MateRRMode *mode = modes[i];
int width, height, rate;
+ int output_width, output_height;
+
+ mate_rr_output_info_get_geometry (app->current_output, NULL, NULL, &output_width, &output_height);
width = mate_rr_mode_get_width (mode);
height = mate_rr_mode_get_height (mode);
rate = mate_rr_mode_get_freq (mode);
- if (width == app->current_output->width &&
- height == app->current_output->height)
+ if (width == output_width &&
+ height == output_height)
{
add_key (app->refresh_combo,
idle_free (make_rate_string (rate)),
@@ -396,7 +396,7 @@ rebuild_rate_combo (App *app)
}
}
- if (!combo_select (app->refresh_combo, idle_free (make_rate_string (app->current_output->rate))))
+ if (!combo_select (app->refresh_combo, idle_free (make_rate_string (mate_rr_output_info_get_refresh_rate (app->current_output)))))
combo_select (app->refresh_combo, idle_free (make_rate_string (best)));
}
@@ -404,30 +404,17 @@ static int
count_active_outputs (App *app)
{
int i, count = 0;
+ MateRROutputInfo **outputs = mate_rr_config_get_outputs (app->current_configuration);
- for (i = 0; app->current_configuration->outputs[i] != NULL; ++i)
+ for (i = 0; outputs[i] != NULL; ++i)
{
- MateOutputInfo *output = app->current_configuration->outputs[i];
- if (output->on)
+ if (mate_rr_output_info_is_active (outputs[i]))
count++;
}
return count;
}
-#if 0
-static int
-count_all_outputs (MateRRConfig *config)
-{
- int i;
-
- for (i = 0; config->outputs[i] != NULL; i++)
- ;
-
- return i;
-}
-#endif
-
/* Computes whether "Mirror Screens" (clone mode) is supported based on these criteria:
*
* 1. There is an available size for cloning.
@@ -448,18 +435,17 @@ mirror_screens_is_supported (App *app)
if (have_clone_size) {
int i;
int num_outputs_with_clone_size;
+ MateRROutputInfo **outputs = mate_rr_config_get_outputs (app->current_configuration);
num_outputs_with_clone_size = 0;
- for (i = 0; app->current_configuration->outputs[i] != NULL; i++)
+ for (i = 0; outputs[i] != NULL; i++)
{
- MateOutputInfo *output = app->current_configuration->outputs[i];
-
/* We count the connected outputs that support the clone size. It
* doesn't matter if those outputs aren't actually On currently; we
* will turn them on in on_clone_changed().
*/
- if (output->connected && output_info_supports_mode (app, output, clone_width, clone_height))
+ if (mate_rr_output_info_is_connected (outputs[i]) && output_info_supports_mode (app, outputs[i], clone_width, clone_height))
num_outputs_with_clone_size++;
}
@@ -478,7 +464,7 @@ rebuild_mirror_screens (App *app)
g_signal_handlers_block_by_func (app->clone_checkbox, G_CALLBACK (on_clone_changed), app);
- mirror_is_active = app->current_configuration && app->current_configuration->clone;
+ mirror_is_active = app->current_configuration && mate_rr_config_get_clone (app->current_configuration);
/* If mirror_is_active, then it *must* be possible to turn mirroring off */
mirror_is_supported = mirror_is_active || mirror_screens_is_supported (app);
@@ -493,18 +479,26 @@ static void
rebuild_current_monitor_label (App *app)
{
char *str, *tmp;
+#if GTK_CHECK_VERSION (3, 0, 0)
+ GdkRGBA color;
+#else
GdkColor color;
+#endif
gboolean use_color;
if (app->current_output)
{
- if (app->current_configuration->clone)
+ if (mate_rr_config_get_clone (app->current_configuration))
tmp = g_strdup (_("Mirror Screens"));
else
- tmp = g_strdup_printf (_("Monitor: %s"), app->current_output->display_name);
+ tmp = g_strdup_printf (_("Monitor: %s"), mate_rr_output_info_get_display_name (app->current_output));
str = g_strdup_printf ("<b>%s</b>", tmp);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ mate_rr_labeler_get_rgba_for_output (app->labeler, app->current_output, &color);
+#else
mate_rr_labeler_get_color_for_output (app->labeler, app->current_output, &color);
+#endif
use_color = TRUE;
g_free (tmp);
}
@@ -519,6 +513,17 @@ rebuild_current_monitor_label (App *app)
if (use_color)
{
+#if GTK_CHECK_VERSION (3, 0, 0)
+ GdkRGBA black = { 0, 0, 0, 1.0 };
+
+ gtk_widget_override_background_color (app->current_monitor_event_box, gtk_widget_get_state_flags (app->current_monitor_event_box), &color);
+
+ /* Make the label explicitly black. We don't want it to follow the
+ * theme's colors, since the label is always shown against a light
+ * pastel background. See bgo#556050
+ */
+ gtk_widget_override_color (app->current_monitor_label, gtk_widget_get_state_flags (app->current_monitor_label), &black);
+#else
GdkColor black = { 0, 0, 0, 0 };
gtk_widget_modify_bg (app->current_monitor_event_box, gtk_widget_get_state (app->current_monitor_event_box), &color);
@@ -528,7 +533,9 @@ rebuild_current_monitor_label (App *app)
* pastel background. See bgo#556050
*/
gtk_widget_modify_fg (app->current_monitor_label, gtk_widget_get_state (app->current_monitor_label), &black);
+#endif
}
+#if !GTK_CHECK_VERSION (3, 0, 0)
else
{
/* Remove any modifications we did on the label's color */
@@ -537,6 +544,7 @@ rebuild_current_monitor_label (App *app)
reset_rc_style = gtk_rc_style_new ();
gtk_widget_modify_style (app->current_monitor_label, reset_rc_style); /* takes ownership of, and destroys, the rc style */
}
+#endif
gtk_event_box_set_visible_window (GTK_EVENT_BOX (app->current_monitor_event_box), use_color);
}
@@ -555,14 +563,14 @@ rebuild_on_off_radios (App *app)
on_active = FALSE;
off_active = FALSE;
- if (!app->current_configuration->clone && app->current_output)
+ if (!mate_rr_config_get_clone (app->current_configuration) && app->current_output)
{
- if (count_active_outputs (app) > 1 || !app->current_output->on)
+ if (count_active_outputs (app) > 1 || !mate_rr_output_info_is_active (app->current_output))
sensitive = TRUE;
else
sensitive = FALSE;
- on_active = app->current_output->on;
+ on_active = mate_rr_output_info_is_active (app->current_output);
off_active = !on_active;
}
@@ -611,19 +619,22 @@ rebuild_resolution_combo (App *app)
int i;
MateRRMode **modes;
const char *current;
+ int output_width, output_height;
clear_combo (app->resolution_combo);
if (!(modes = get_current_modes (app))
|| !app->current_output
- || !app->current_output->on)
+ || !mate_rr_output_info_is_active (app->current_output))
{
gtk_widget_set_sensitive (app->resolution_combo, FALSE);
return;
}
g_assert (app->current_output != NULL);
- g_assert (app->current_output->width != 0 && app->current_output->height != 0);
+
+ mate_rr_output_info_get_geometry (app->current_output, NULL, NULL, &output_width, &output_height);
+ g_assert (output_width != 0 && output_height != 0);
gtk_widget_set_sensitive (app->resolution_combo, TRUE);
@@ -639,7 +650,7 @@ rebuild_resolution_combo (App *app)
width, height, 0, -1);
}
- current = idle_free (make_resolution_string (app->current_output->width, app->current_output->height));
+ current = idle_free (make_resolution_string (output_width, output_height));
if (!combo_select (app->resolution_combo, current))
{
@@ -665,7 +676,7 @@ rebuild_gui (App *app)
sensitive = app->current_output ? TRUE : FALSE;
#if 0
- g_debug ("rebuild gui, is on: %d", app->current_output->on);
+ g_debug ("rebuild gui, is on: %d", mate_rr_output_info_is_active (app->current_output));
#endif
rebuild_mirror_screens (app);
@@ -676,10 +687,12 @@ rebuild_gui (App *app)
rebuild_rotation_combo (app);
#if 0
- g_debug ("sensitive: %d, on: %d", sensitive, app->current_output->on);
+ g_debug ("sensitive: %d, on: %d", sensitive, mate_rr_output_info_is_active (app->current_output));
#endif
gtk_widget_set_sensitive (app->panel_checkbox, sensitive);
+ gtk_widget_set_sensitive (app->primary_button, app->current_output && !mate_rr_output_info_get_primary(app->current_output));
+
app->ignore_gui_changes = FALSE;
}
@@ -728,7 +741,7 @@ on_rotation_changed (GtkComboBox *box, gpointer data)
return;
if (get_mode (app->rotation_combo, NULL, NULL, NULL, &rotation))
- app->current_output->rotation = rotation;
+ mate_rr_output_info_set_rotation (app->current_output, rotation);
foo_scroll_area_invalidate (FOO_SCROLL_AREA (app->area));
}
@@ -743,7 +756,7 @@ on_rate_changed (GtkComboBox *box, gpointer data)
return;
if (get_mode (app->refresh_combo, NULL, NULL, &rate, NULL))
- app->current_output->rate = rate;
+ rate = mate_rr_output_info_get_refresh_rate (app->current_output);
foo_scroll_area_invalidate (FOO_SCROLL_AREA (app->area));
}
@@ -753,11 +766,15 @@ select_resolution_for_current_output (App *app)
{
MateRRMode **modes;
int width, height;
+ int x, y;
+ mate_rr_output_info_get_geometry (app->current_output, &x, &y, NULL, NULL);
+
+ width = mate_rr_output_info_get_preferred_width (app->current_output);
+ height = mate_rr_output_info_get_preferred_height (app->current_output);
- if (app->current_output->pref_width != 0 && app->current_output->pref_height != 0)
+ if (width != 0 && height != 0)
{
- app->current_output->width = app->current_output->pref_width;
- app->current_output->height = app->current_output->pref_height;
+ mate_rr_output_info_set_geometry (app->current_output, x, y, width, height);
return;
}
@@ -767,8 +784,7 @@ select_resolution_for_current_output (App *app)
find_best_mode (modes, &width, &height);
- app->current_output->width = width;
- app->current_output->height = height;
+ mate_rr_output_info_set_geometry (app->current_output, x, y, width, height);
}
static void
@@ -793,7 +809,7 @@ monitor_on_off_toggled_cb (GtkToggleButton *toggle, gpointer data)
return;
}
- app->current_output->on = is_on;
+ mate_rr_output_info_set_active (app->current_output, is_on);
if (is_on)
select_resolution_for_current_output (app); /* The refresh rate will be picked in rebuild_rate_combo() */
@@ -803,7 +819,7 @@ monitor_on_off_toggled_cb (GtkToggleButton *toggle, gpointer data)
}
static void
-realign_outputs_after_resolution_change (App *app, MateOutputInfo *output_that_changed, int old_width, int old_height)
+realign_outputs_after_resolution_change (App *app, MateRROutputInfo *output_that_changed, int old_width, int old_height)
{
/* We find the outputs that were below or to the right of the output that
* changed, and realign them; we also do that for outputs that shared the
@@ -814,38 +830,45 @@ realign_outputs_after_resolution_change (App *app, MateOutputInfo *output_that_c
int i;
int old_right_edge, old_bottom_edge;
int dx, dy;
+ int x, y, width, height;
+ MateRROutputInfo **outputs;
g_assert (app->current_configuration != NULL);
- if (output_that_changed->width == old_width && output_that_changed->height == old_height)
+ mate_rr_output_info_get_geometry (output_that_changed, &x, &y, &width, &height);
+ if (width == old_width && height == old_height)
return;
- old_right_edge = output_that_changed->x + old_width;
- old_bottom_edge = output_that_changed->y + old_height;
+ old_right_edge = x + old_width;
+ old_bottom_edge = y + old_height;
- dx = output_that_changed->width - old_width;
- dy = output_that_changed->height - old_height;
+ dx = width - old_width;
+ dy = height - old_height;
- for (i = 0; app->current_configuration->outputs[i] != NULL; i++) {
- MateOutputInfo *output;
+ outputs = mate_rr_config_get_outputs (app->current_configuration);
+
+ for (i = 0; outputs[i] != NULL; i++)
+ {
+ int output_x, output_y;
int output_width, output_height;
- output = app->current_configuration->outputs[i];
+ if (outputs[i] == output_that_changed || mate_rr_output_info_is_connected (outputs[i]))
+ continue;
- if (output == output_that_changed || !output->connected)
- continue;
+ mate_rr_output_info_get_geometry (outputs[i], &output_x, &output_y, &output_width, &output_height);
+
+ if (output_x >= old_right_edge)
+ output_x += dx;
+ else if (output_x + output_width == old_right_edge)
+ output_x = x + width - output_width;
- get_geometry (output, &output_width, &output_height);
- if (output->x >= old_right_edge)
- output->x += dx;
- else if (output->x + output_width == old_right_edge)
- output->x = output_that_changed->x + output_that_changed->width - output_width;
+ if (output_y >= old_bottom_edge)
+ output_y += dy;
+ else if (output_y + output_height == old_bottom_edge)
+ output_y = y + height - output_height;
- if (output->y >= old_bottom_edge)
- output->y += dy;
- else if (output->y + output_height == old_bottom_edge)
- output->y = output_that_changed->y + output_that_changed->height - output_height;
+ mate_rr_output_info_set_geometry (outputs[i], output_x, output_y, output_width, output_height);
}
}
@@ -854,24 +877,23 @@ on_resolution_changed (GtkComboBox *box, gpointer data)
{
App *app = data;
int old_width, old_height;
+ int x, y;
int width;
int height;
if (!app->current_output)
return;
- old_width = app->current_output->width;
- old_height = app->current_output->height;
+ mate_rr_output_info_get_geometry (app->current_output, &x, &y, &old_width, &old_height);
if (get_mode (app->resolution_combo, &width, &height, NULL, NULL))
{
- app->current_output->width = width;
- app->current_output->height = height;
+ mate_rr_output_info_set_geometry (app->current_output, x, y, width, height);
if (width == 0 || height == 0)
- app->current_output->on = FALSE;
+ mate_rr_output_info_set_active (app->current_output, FALSE);
else
- app->current_output->on = TRUE;
+ mate_rr_output_info_set_active (app->current_output, TRUE);
}
realign_outputs_after_resolution_change (app, app->current_output, old_width, old_height);
@@ -887,6 +909,7 @@ lay_out_outputs_horizontally (App *app)
{
int i;
int x;
+ MateRROutputInfo **outputs;
/* Lay out all the monitors horizontally when "mirror screens" is turned
* off, to avoid having all of them overlapped initially. We put the
@@ -896,30 +919,29 @@ lay_out_outputs_horizontally (App *app)
x = 0;
/* First pass, all "on" outputs */
+ outputs = mate_rr_config_get_outputs (app->current_configuration);
- for (i = 0; app->current_configuration->outputs[i]; ++i)
+ for (i = 0; outputs[i]; ++i)
{
- MateOutputInfo *output;
-
- output = app->current_configuration->outputs[i];
- if (output->connected && output->on) {
- output->x = x;
- output->y = 0;
- x += output->width;
+ int width, height;
+ if (mate_rr_output_info_is_connected (outputs[i]) &&mate_rr_output_info_is_active (outputs[i]))
+ {
+ mate_rr_output_info_get_geometry (outputs[i], NULL, NULL, &width, &height);
+ mate_rr_output_info_set_geometry (outputs[i], x, 0, width, height);
+ x += width;
}
}
/* Second pass, all the black screens */
- for (i = 0; app->current_configuration->outputs[i]; ++i)
+ for (i = 0; outputs[i]; ++i)
{
- MateOutputInfo *output;
-
- output = app->current_configuration->outputs[i];
- if (!(output->connected && output->on)) {
- output->x = x;
- output->y = 0;
- x += output->width;
+ int width, height;
+ if (!(mate_rr_output_info_is_connected (outputs[i]) && mate_rr_output_info_is_active (outputs[i])))
+ {
+ mate_rr_output_info_get_geometry (outputs[i], NULL, NULL, &width, &height);
+ mate_rr_output_info_set_geometry (outputs[i], x, 0, width, height);
+ x += width;
}
}
@@ -964,16 +986,16 @@ get_clone_size (MateRRScreen *screen, int *width, int *height)
}
static gboolean
-output_info_supports_mode (App *app, MateOutputInfo *info, int width, int height)
+output_info_supports_mode (App *app, MateRROutputInfo *info, int width, int height)
{
MateRROutput *output;
MateRRMode **modes;
int i;
- if (!info->connected)
+ if (!mate_rr_output_info_is_connected (info))
return FALSE;
- output = mate_rr_screen_get_output_by_name (app->screen, info->name);
+ output = mate_rr_screen_get_output_by_name (app->screen, mate_rr_output_info_get_name (info));
if (!output)
return FALSE;
@@ -993,19 +1015,19 @@ on_clone_changed (GtkWidget *box, gpointer data)
{
App *app = data;
- app->current_configuration->clone =
- gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (app->clone_checkbox));
+ mate_rr_config_set_clone (app->current_configuration, gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (app->clone_checkbox)));
- if (app->current_configuration->clone)
+ if (mate_rr_config_get_clone (app->current_configuration))
{
int i;
int width, height;
+ MateRROutputInfo **outputs = mate_rr_config_get_outputs (app->current_configuration);
- for (i = 0; app->current_configuration->outputs[i]; ++i)
+ for (i = 0; outputs[i]; ++i)
{
- if (app->current_configuration->outputs[i]->connected)
+ if (mate_rr_output_info_is_connected(outputs[i]))
{
- app->current_output = app->current_configuration->outputs[i];
+ app->current_output = outputs[i];
break;
}
}
@@ -1017,11 +1039,12 @@ on_clone_changed (GtkWidget *box, gpointer data)
get_clone_size (app->screen, &width, &height);
- for (i = 0; app->current_configuration->outputs[i]; i++) {
- if (output_info_supports_mode (app, app->current_configuration->outputs[i], width, height)) {
- app->current_configuration->outputs[i]->on = TRUE;
- app->current_configuration->outputs[i]->width = width;
- app->current_configuration->outputs[i]->height = height;
+ for (i = 0; outputs[i]; i++) {
+ int x, y;
+ if (output_info_supports_mode (app, outputs[i], width, height)) {
+ mate_rr_output_info_set_active (outputs[i], TRUE);
+ mate_rr_output_info_get_geometry (outputs[i], &x, &y, NULL, NULL);
+ mate_rr_output_info_set_geometry (outputs[i], x, y, width, height);
}
}
}
@@ -1035,19 +1058,21 @@ on_clone_changed (GtkWidget *box, gpointer data)
}
static void
-get_geometry (MateOutputInfo *output, int *w, int *h)
+get_geometry (MateRROutputInfo *output, int *w, int *h)
{
- if (output->on)
+ MateRRRotation rotation;
+
+ if (mate_rr_output_info_is_active (output))
{
- *h = output->height;
- *w = output->width;
+ mate_rr_output_info_get_geometry (output, NULL, NULL, w, h);
}
else
{
- *h = output->pref_height;
- *w = output->pref_width;
+ *h = mate_rr_output_info_get_preferred_height (output);
+ *w = mate_rr_output_info_get_preferred_width (output);
}
- if ((output->rotation & MATE_RR_ROTATION_90) || (output->rotation & MATE_RR_ROTATION_270))
+ rotation = mate_rr_output_info_get_rotation (output);
+ if ((rotation & MATE_RR_ROTATION_90) || (rotation & MATE_RR_ROTATION_270))
{
int tmp;
tmp = *h;
@@ -1064,6 +1089,7 @@ list_connected_outputs (App *app, int *total_w, int *total_h)
{
int i, dummy;
GList *result = NULL;
+ MateRROutputInfo **outputs;
if (!total_w)
total_w = &dummy;
@@ -1072,17 +1098,17 @@ list_connected_outputs (App *app, int *total_w, int *total_h)
*total_w = 0;
*total_h = 0;
- for (i = 0; app->current_configuration->outputs[i] != NULL; ++i)
- {
- MateOutputInfo *output = app->current_configuration->outputs[i];
- if (output->connected)
+ outputs = mate_rr_config_get_outputs(app->current_configuration);
+ for (i = 0; outputs[i] != NULL; ++i)
+ {
+ if (mate_rr_output_info_is_connected (outputs[i]))
{
int w, h;
- result = g_list_prepend (result, output);
+ result = g_list_prepend (result, outputs[i]);
- get_geometry (output, &w, &h);
+ get_geometry (outputs[i], &w, &h);
*total_w += w;
*total_h += h;
@@ -1128,7 +1154,7 @@ compute_scale (App *app)
typedef struct Edge
{
- MateOutputInfo *output;
+ MateRROutputInfo *output;
int x1, y1;
int x2, y2;
} Edge;
@@ -1141,7 +1167,7 @@ typedef struct Snap
} Snap;
static void
-add_edge (MateOutputInfo *output, int x1, int y1, int x2, int y2, GArray *edges)
+add_edge (MateRROutputInfo *output, int x1, int y1, int x2, int y2, GArray *edges)
{
Edge e;
@@ -1155,13 +1181,11 @@ add_edge (MateOutputInfo *output, int x1, int y1, int x2, int y2, GArray *edges)
}
static void
-list_edges_for_output (MateOutputInfo *output, GArray *edges)
+list_edges_for_output (MateRROutputInfo *output, GArray *edges)
{
int x, y, w, h;
- x = output->x;
- y = output->y;
- get_geometry (output, &w, &h);
+ mate_rr_output_info_get_geometry (output, &x, &y, &w, &h);
/* Top, Bottom, Left, Right */
add_edge (output, x, y, x + w, y, edges);
@@ -1174,13 +1198,12 @@ static void
list_edges (MateRRConfig *config, GArray *edges)
{
int i;
+ MateRROutputInfo **outputs = mate_rr_config_get_outputs (config);
- for (i = 0; config->outputs[i]; ++i)
+ for (i = 0; outputs[i]; ++i)
{
- MateOutputInfo *output = config->outputs[i];
-
- if (output->connected)
- list_edges_for_output (output, edges);
+ if (mate_rr_output_info_is_connected (outputs[i]))
+ list_edges_for_output (outputs[i], edges);
}
}
@@ -1265,7 +1288,7 @@ add_edge_snaps (Edge *snapper, Edge *snappee, GArray *snaps)
}
static void
-list_snaps (MateOutputInfo *output, GArray *edges, GArray *snaps)
+list_snaps (MateRROutputInfo *output, GArray *edges, GArray *snaps)
{
int i;
@@ -1321,7 +1344,7 @@ edges_align (Edge *e1, Edge *e2)
}
static gboolean
-output_is_aligned (MateOutputInfo *output, GArray *edges)
+output_is_aligned (MateRROutputInfo *output, GArray *edges)
{
gboolean result = FALSE;
int i;
@@ -1358,35 +1381,28 @@ done:
}
static void
-get_output_rect (MateOutputInfo *output, GdkRectangle *rect)
+get_output_rect (MateRROutputInfo *output, GdkRectangle *rect)
{
- int w, h;
-
- get_geometry (output, &w, &h);
-
- rect->width = w;
- rect->height = h;
- rect->x = output->x;
- rect->y = output->y;
+ mate_rr_output_info_get_geometry (output, &rect->x, &rect->y, &rect->width, &rect->height);
}
static gboolean
-output_overlaps (MateOutputInfo *output, MateRRConfig *config)
+output_overlaps (MateRROutputInfo *output, MateRRConfig *config)
{
int i;
GdkRectangle output_rect;
+ MateRROutputInfo **outputs;
get_output_rect (output, &output_rect);
- for (i = 0; config->outputs[i]; ++i)
+ outputs = mate_rr_config_get_outputs (config);
+ for (i = 0; outputs[i]; ++i)
{
- MateOutputInfo *other = config->outputs[i];
-
- if (other != output && other->connected)
+ if (outputs[i] != output && mate_rr_output_info_is_connected (outputs[i]))
{
GdkRectangle other_rect;
- get_output_rect (other, &other_rect);
+ get_output_rect (outputs[i], &other_rect);
if (gdk_rectangle_intersect (&output_rect, &other_rect, NULL))
return TRUE;
}
@@ -1400,17 +1416,17 @@ mate_rr_config_is_aligned (MateRRConfig *config, GArray *edges)
{
int i;
gboolean result = TRUE;
+ MateRROutputInfo **outputs;
- for (i = 0; config->outputs[i]; ++i)
+ outputs = mate_rr_config_get_outputs(config);
+ for (i = 0; outputs[i]; ++i)
{
- MateOutputInfo *output = config->outputs[i];
-
- if (output->connected)
+ if (mate_rr_output_info_is_connected (outputs[i]))
{
- if (!output_is_aligned (output, edges))
+ if (!output_is_aligned (outputs[i], edges))
return FALSE;
- if (output_overlaps (output, config))
+ if (output_overlaps (outputs[i], config))
return FALSE;
}
}
@@ -1515,14 +1531,14 @@ on_output_event (FooScrollArea *area,
FooScrollAreaEvent *event,
gpointer data)
{
- MateOutputInfo *output = data;
+ MateRROutputInfo *output = data;
App *app = g_object_get_data (G_OBJECT (area), "app");
/* If the mouse is inside the outputs, set the cursor to "you can move me". See
* on_canvas_event() for where we reset the cursor to the default if it
* exits the outputs' area.
*/
- if (!app->current_configuration->clone && get_n_connected (app) > 1)
+ if (!mate_rr_config_get_clone (app->current_configuration) && get_n_connected (app) > 1)
set_cursor (GTK_WIDGET (area), GDK_FLEUR);
if (event->type == FOO_BUTTON_PRESS)
@@ -1534,17 +1550,20 @@ on_output_event (FooScrollArea *area,
rebuild_gui (app);
set_monitors_tooltip (app, TRUE);
- if (!app->current_configuration->clone && get_n_connected (app) > 1)
+ if (!mate_rr_config_get_clone (app->current_configuration) && get_n_connected (app) > 1)
{
+ int output_x, output_y;
+ mate_rr_output_info_get_geometry (output, &output_x, &output_y, NULL, NULL);
+
foo_scroll_area_begin_grab (area, on_output_event, data);
info = g_new0 (GrabInfo, 1);
info->grab_x = event->x;
info->grab_y = event->y;
- info->output_x = output->x;
- info->output_y = output->y;
+ info->output_x = output_x;
+ info->output_y = output_y;
- output->user_data = info;
+ g_object_set_data (G_OBJECT (output), "grab-info", info);
}
foo_scroll_area_invalidate (area);
@@ -1553,20 +1572,19 @@ on_output_event (FooScrollArea *area,
{
if (foo_scroll_area_is_grabbed (area))
{
- GrabInfo *info = output->user_data;
+ GrabInfo *info = g_object_get_data (G_OBJECT (output), "grab-info");
double scale = compute_scale (app);
int old_x, old_y;
+ int width, height;
int new_x, new_y;
int i;
GArray *edges, *snaps, *new_edges;
- old_x = output->x;
- old_y = output->y;
+ mate_rr_output_info_get_geometry (output, &old_x, &old_y, &width, &height);
new_x = info->output_x + (event->x - info->grab_x) / scale;
new_y = info->output_y + (event->y - info->grab_y) / scale;
- output->x = new_x;
- output->y = new_y;
+ mate_rr_output_info_set_geometry (output, new_x, new_y, width, height);
edges = g_array_new (TRUE, TRUE, sizeof (Edge));
snaps = g_array_new (TRUE, TRUE, sizeof (Snap));
@@ -1577,16 +1595,14 @@ on_output_event (FooScrollArea *area,
g_array_sort (snaps, compare_snaps);
- output->x = info->output_x;
- output->y = info->output_y;
+ mate_rr_output_info_set_geometry (output, new_x, new_y, width, height);
for (i = 0; i < snaps->len; ++i)
{
Snap *snap = &(g_array_index (snaps, Snap, i));
GArray *new_edges = g_array_new (TRUE, TRUE, sizeof (Edge));
- output->x = new_x + snap->dx;
- output->y = new_y + snap->dy;
+ mate_rr_output_info_set_geometry (output, new_x + snap->dx, new_y + snap->dy, width, height);
g_array_set_size (new_edges, 0);
list_edges (app->current_configuration, new_edges);
@@ -1598,8 +1614,7 @@ on_output_event (FooScrollArea *area,
}
else
{
- output->x = info->output_x;
- output->y = info->output_y;
+ mate_rr_output_info_set_geometry (output, info->output_x, info->output_y, width, height);
}
}
@@ -1612,8 +1627,8 @@ on_output_event (FooScrollArea *area,
foo_scroll_area_end_grab (area);
set_monitors_tooltip (app, FALSE);
- g_free (output->user_data);
- output->user_data = NULL;
+ g_free (g_object_get_data (G_OBJECT (output), "grab-info"));
+ g_object_set_data (G_OBJECT (output), "grab-info", NULL);
#if 0
g_debug ("new position: %d %d %d %d", output->x, output->y, output->width, output->height);
@@ -1639,22 +1654,27 @@ on_canvas_event (FooScrollArea *area,
static PangoLayout *
get_display_name (App *app,
- MateOutputInfo *output)
+ MateRROutputInfo *output)
{
- const char *text;
-
- if (app->current_configuration->clone) {
- /* Translators: this is the feature where what you see on your laptop's
- * screen is the same as your external monitor. Here, "Mirror" is being
- * used as an adjective, not as a verb. For example, the Spanish
- * translation could be "Pantallas en Espejo", *not* "Espejar Pantallas".
- */
- text = _("Mirror Screens");
- } else
- text = output->display_name;
+ char *text;
+ PangoLayout * layout;
- return gtk_widget_create_pango_layout (
- GTK_WIDGET (app->area), text);
+ if (mate_rr_config_get_clone (app->current_configuration)) {
+ /* Translators: this is the feature where what you see on your laptop's
+ * screen is the same as your external monitor. Here, "Mirror" is being
+ * used as an adjective, not as a verb. For example, the Spanish
+ * translation could be "Pantallas en Espejo", *not* "Espejar Pantallas".
+ */
+ text = _("Mirror Screens");
+ }
+ else {
+ text = g_strdup_printf ("<b>%s</b>\n<small>%s</small>", mate_rr_output_info_get_display_name (output), mate_rr_output_info_get_name (output));
+ }
+ layout = gtk_widget_create_pango_layout (GTK_WIDGET (app->area), text);
+ pango_layout_set_markup (layout, text, -1);
+ g_free (text);
+ pango_layout_set_alignment (layout, PANGO_ALIGN_CENTER);
+ return layout;
}
static void
@@ -1663,17 +1683,36 @@ paint_background (FooScrollArea *area,
{
GdkRectangle viewport;
GtkWidget *widget;
+#if GTK_CHECK_VERSION (3, 0, 0)
+ GtkStyleContext *widget_style;
+ GdkRGBA *base_color = NULL;
+ GdkRGBA dark_color;
+#else
GtkStyle *widget_style;
+#endif
widget = GTK_WIDGET (area);
foo_scroll_area_get_viewport (area, &viewport);
+
+#if GTK_CHECK_VERSION (3, 0, 0)
+ widget_style = gtk_widget_get_style_context (widget);
+#else
widget_style = gtk_widget_get_style (widget);
+#endif
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_style_context_get (widget_style, GTK_STATE_FLAG_SELECTED,
+ GTK_STYLE_PROPERTY_BACKGROUND_COLOR, &base_color,
+ NULL);
+ gdk_cairo_set_source_rgba(cr, base_color);
+ gdk_rgba_free (base_color);
+#else
cairo_set_source_rgb (cr,
widget_style->base[GTK_STATE_SELECTED].red / 65535.0,
widget_style->base[GTK_STATE_SELECTED].green / 65535.0,
widget_style->base[GTK_STATE_SELECTED].blue / 65535.0);
+#endif
cairo_rectangle (cr,
viewport.x, viewport.y,
@@ -1683,10 +1722,15 @@ paint_background (FooScrollArea *area,
foo_scroll_area_add_input_from_fill (area, cr, on_canvas_event, NULL);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ mate_desktop_gtk_style_get_dark_color (widget_style, GTK_STATE_FLAG_SELECTED, &dark_color);
+ gdk_cairo_set_source_rgba (cr, &dark_color);
+#else
cairo_set_source_rgb (cr,
widget_style->dark[GTK_STATE_SELECTED].red / 65535.0,
widget_style->dark[GTK_STATE_SELECTED].green / 65535.0,
widget_style->dark[GTK_STATE_SELECTED].blue / 65535.0);
+#endif
cairo_stroke (cr);
}
@@ -1697,13 +1741,19 @@ paint_output (App *app, cairo_t *cr, int i)
int w, h;
double scale = compute_scale (app);
double x, y;
+ int output_x, output_y;
+ MateRRRotation rotation;
int total_w, total_h;
GList *connected_outputs = list_connected_outputs (app, &total_w, &total_h);
- MateOutputInfo *output = g_list_nth (connected_outputs, i)->data;
+ MateRROutputInfo *output = g_list_nth_data (connected_outputs, i);
PangoLayout *layout = get_display_name (app, output);
PangoRectangle ink_extent, log_extent;
GdkRectangle viewport;
+#if GTK_CHECK_VERSION (3, 0, 0)
+ GdkRGBA output_color;
+#else
GdkColor output_color;
+#endif
double r, g, b;
double available_w;
double factor;
@@ -1722,8 +1772,9 @@ paint_output (App *app, cairo_t *cr, int i)
viewport.height -= 2 * MARGIN;
viewport.width -= 2 * MARGIN;
- x = output->x * scale + MARGIN + (viewport.width - total_w * scale) / 2.0;
- y = output->y * scale + MARGIN + (viewport.height - total_h * scale) / 2.0;
+ mate_rr_output_info_get_geometry (output, &output_x, &output_y, NULL, NULL);
+ x = output_x * scale + MARGIN + (viewport.width - total_w * scale) / 2.0;
+ y = output_y * scale + MARGIN + (viewport.height - total_h * scale) / 2.0;
#if 0
g_debug ("scaled: %f %f", x, y);
@@ -1733,18 +1784,17 @@ paint_output (App *app, cairo_t *cr, int i)
g_debug ("%f %f %f %f", x, y, w * scale + 0.5, h * scale + 0.5);
#endif
- cairo_save (cr);
-
cairo_translate (cr,
x + (w * scale + 0.5) / 2,
y + (h * scale + 0.5) / 2);
/* rotation is already applied in get_geometry */
- if (output->rotation & MATE_RR_REFLECT_X)
+ rotation = mate_rr_output_info_get_rotation (output);
+ if (rotation & MATE_RR_REFLECT_X)
cairo_scale (cr, -1, 1);
- if (output->rotation & MATE_RR_REFLECT_Y)
+ if (rotation & MATE_RR_REFLECT_Y)
cairo_scale (cr, 1, -1);
cairo_translate (cr,
@@ -1755,12 +1805,19 @@ paint_output (App *app, cairo_t *cr, int i)
cairo_rectangle (cr, x, y, w * scale + 0.5, h * scale + 0.5);
cairo_clip_preserve (cr);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ mate_rr_labeler_get_rgba_for_output (app->labeler, output, &output_color);
+ r = output_color.red;
+ g = output_color.green;
+ b = output_color.blue;
+#else
mate_rr_labeler_get_color_for_output (app->labeler, output, &output_color);
r = output_color.red / 65535.0;
g = output_color.green / 65535.0;
b = output_color.blue / 65535.0;
+#endif
- if (!output->on)
+ if (!mate_rr_output_info_is_active (output))
{
/* If the output is turned off, just darken the selected color */
r *= 0.2;
@@ -1791,7 +1848,7 @@ paint_output (App *app, cairo_t *cr, int i)
cairo_stroke (cr);
cairo_set_line_width (cr, 2);
- layout_set_font (layout, "Sans Bold 12");
+ layout_set_font (layout, "Sans 12");
pango_layout_get_pixel_extents (layout, &ink_extent, &log_extent);
available_w = w * scale + 0.5 - 6; /* Same as the inner rectangle's width, minus 1 pixel of padding on each side */
@@ -1806,7 +1863,7 @@ paint_output (App *app, cairo_t *cr, int i)
cairo_scale (cr, factor, factor);
- if (output->on)
+ if (mate_rr_output_info_is_active (output))
cairo_set_source_rgb (cr, 0.0, 0.0, 0.0);
else
cairo_set_source_rgb (cr, 1.0, 1.0, 1.0);
@@ -1818,12 +1875,19 @@ paint_output (App *app, cairo_t *cr, int i)
g_object_unref (layout);
}
+#if GTK_CHECK_VERSION (3, 0, 0)
+static void
+on_area_paint (FooScrollArea *area,
+ cairo_t *cr,
+ gpointer data)
+#else
static void
on_area_paint (FooScrollArea *area,
cairo_t *cr,
GdkRectangle *extent,
GdkRegion *region,
gpointer data)
+#endif
{
App *app = data;
double scale;
@@ -1846,7 +1910,7 @@ on_area_paint (FooScrollArea *area,
{
paint_output (app, cr, g_list_position (connected_outputs, list));
- if (app->current_configuration->clone)
+ if (mate_rr_config_get_clone (app->current_configuration))
break;
}
}
@@ -1889,19 +1953,19 @@ compute_virtual_size_for_configuration (MateRRConfig *config, int *ret_width, in
{
int i;
int width, height;
+ int output_x, output_y, output_width, output_height;
+ MateRROutputInfo **outputs;
width = height = 0;
- for (i = 0; config->outputs[i] != NULL; i++)
+ outputs = mate_rr_config_get_outputs (config);
+ for (i = 0; outputs[i] != NULL; i++)
{
- MateOutputInfo *output;
-
- output = config->outputs[i];
-
- if (output->on)
+ if (mate_rr_output_info_is_active (outputs[i]))
{
- width = MAX (width, output->x + output->width);
- height = MAX (height, output->y + output->height);
+ mate_rr_output_info_get_geometry (outputs[i], &output_x, &output_y, &output_width, &output_height);
+ width = MAX (width, output_x + output_width);
+ height = MAX (height, output_y + output_height);
}
}
@@ -2000,15 +2064,15 @@ ensure_current_configuration_is_saved (void)
* that there *will* be a backup file in the end.
*/
- rr_screen = mate_rr_screen_new (gdk_screen_get_default (), NULL, NULL, NULL); /* NULL-GError */
+ rr_screen = mate_rr_screen_new (gdk_screen_get_default (), NULL); /* NULL-GError */
if (!rr_screen)
return;
- rr_config = mate_rr_config_new_current (rr_screen);
+ rr_config = mate_rr_config_new_current (rr_screen, NULL);
mate_rr_config_save (rr_config, NULL); /* NULL-GError */
- mate_rr_config_free (rr_config);
- mate_rr_screen_destroy (rr_screen);
+ g_object_unref (rr_config);
+ g_object_unref (rr_screen);
}
/* Callback for dbus_g_proxy_begin_call() */
@@ -2102,29 +2166,6 @@ apply (App *app)
begin_version2_apply_configuration (app, gtk_widget_get_window (app->dialog), app->apply_button_clicked_timestamp);
}
-#if 0
-/* Returns whether the graphics driver doesn't advertise RANDR 1.2 features, and just 1.0 */
-static gboolean
-driver_is_randr_10 (MateRRConfig *config)
-{
- /* In the Xorg code, see xserver/randr/rrinfo.c:RRScanOldConfig(). It gets
- * called when the graphics driver doesn't support RANDR 1.2 yet, just 1.0.
- * In that case, the X server's base code (which supports RANDR 1.2) will
- * simulate having a single output called "default". For drivers that *do*
- * support RANDR 1.2, the separate outputs will be named differently, we
- * hope.
- *
- * This heuristic is courtesy of Dirk Mueller <[email protected]>
- *
- * FIXME: however, we don't even check for XRRQueryVersion() returning 1.2, neither
- * here nor in mate-desktop/libmatedesktop*.c. Do we need to check for that,
- * or is mate_rr_screen_new()'s return value sufficient?
- */
-
- return (count_all_outputs (config) == 1 && strcmp (config->outputs[0]->name, "default") == 0);
-}
-#endif
-
static void
on_detect_displays (GtkWidget *widget, gpointer data)
{
@@ -2140,6 +2181,24 @@ on_detect_displays (GtkWidget *widget, gpointer data)
}
}
+static void
+set_primary (GtkWidget *widget, gpointer data)
+{
+ App *app = data;
+ int i;
+ MateRROutputInfo **outputs;
+
+ if (!app->current_output)
+ return;
+
+ outputs = mate_rr_config_get_outputs (app->current_configuration);
+ for (i=0; outputs[i]!=NULL; i++) {
+ mate_rr_output_info_set_primary (outputs[i], outputs[i] == app->current_output);
+ }
+
+ gtk_widget_set_sensitive (app->primary_button, !mate_rr_output_info_get_primary(app->current_output));
+}
+
#define MSD_XRANDR_SCHEMA "org.mate.SettingsDaemon.plugins.xrandr"
#define SHOW_ICON_KEY "show-notification-icon"
#define DEFAULT_CONFIGURATION_FILE_KEY "default-configuration-file"
@@ -2154,37 +2213,38 @@ on_show_icon_toggled (GtkWidget *widget, gpointer data)
gtk_toggle_button_get_active (tb));
}
-static MateOutputInfo *
+static MateRROutputInfo *
get_nearest_output (MateRRConfig *configuration, int x, int y)
{
int i;
int nearest_index;
int nearest_dist;
+ MateRROutputInfo **outputs;
nearest_index = -1;
nearest_dist = G_MAXINT;
- for (i = 0; configuration->outputs[i] != NULL; i++)
+ outputs = mate_rr_config_get_outputs (configuration);
+ for (i = 0; outputs[i] != NULL; i++)
{
- MateOutputInfo *output;
int dist_x, dist_y;
+ int output_x, output_y, output_width, output_height;
- output = configuration->outputs[i];
-
- if (!(output->connected && output->on))
+ if (!(mate_rr_output_info_is_connected(outputs[i]) && mate_rr_output_info_is_active (outputs[i])))
continue;
- if (x < output->x)
- dist_x = output->x - x;
- else if (x >= output->x + output->width)
- dist_x = x - (output->x + output->width) + 1;
+ mate_rr_output_info_get_geometry (outputs[i], &output_x, &output_y, &output_width, &output_height);
+ if (x < output_x)
+ dist_x = output_x - x;
+ else if (x >= output_x + output_width)
+ dist_x = x - (output_x + output_width) + 1;
else
dist_x = 0;
- if (y < output->y)
- dist_y = output->y - y;
- else if (y >= output->y + output->height)
- dist_y = y - (output->y + output->height) + 1;
+ if (y < output_y)
+ dist_y = output_y - y;
+ else if (y >= output_y + output_height)
+ dist_y = y - (output_y + output_height) + 1;
else
dist_y = 0;
@@ -2196,7 +2256,7 @@ get_nearest_output (MateRRConfig *configuration, int x, int y)
}
if (nearest_index != -1)
- return configuration->outputs[nearest_index];
+ return outputs[nearest_index];
else
return NULL;
@@ -2205,13 +2265,14 @@ get_nearest_output (MateRRConfig *configuration, int x, int y)
/* Gets the output that contains the largest intersection with the window.
* Logic stolen from gdk_screen_get_monitor_at_window().
*/
-static MateOutputInfo *
+static MateRROutputInfo *
get_output_for_window (MateRRConfig *configuration, GdkWindow *window)
{
GdkRectangle win_rect;
int i;
int largest_area;
int largest_index;
+ MateRROutputInfo **outputs;
#if GTK_CHECK_VERSION (3, 0, 0)
gdk_window_get_geometry (window, &win_rect.x, &win_rect.y, &win_rect.width, &win_rect.height);
@@ -2223,19 +2284,14 @@ get_output_for_window (MateRRConfig *configuration, GdkWindow *window)
largest_area = 0;
largest_index = -1;
- for (i = 0; configuration->outputs[i] != NULL; i++)
+ outputs = mate_rr_config_get_outputs (configuration);
+ for (i = 0; outputs[i] != NULL; i++)
{
- MateOutputInfo *output;
GdkRectangle output_rect, intersection;
- output = configuration->outputs[i];
+ mate_rr_output_info_get_geometry (outputs[i], &output_rect.x, &output_rect.y, &output_rect.width, &output_rect.height);
- output_rect.x = output->x;
- output_rect.y = output->y;
- output_rect.width = output->width;
- output_rect.height = output->height;
-
- if (output->connected && gdk_rectangle_intersect (&win_rect, &output_rect, &intersection))
+ if (mate_rr_output_info_is_connected (outputs[i]) && gdk_rectangle_intersect (&win_rect, &output_rect, &intersection))
{
int area;
@@ -2249,7 +2305,7 @@ get_output_for_window (MateRRConfig *configuration, GdkWindow *window)
}
if (largest_index != -1)
- return configuration->outputs[largest_index];
+ return outputs[largest_index];
else
return get_nearest_output (configuration,
win_rect.x + win_rect.width / 2,
@@ -2422,8 +2478,8 @@ run_application (App *app)
return;
}
- app->screen = mate_rr_screen_new (gdk_screen_get_default (),
- on_screen_changed, app, &error);
+ app->screen = mate_rr_screen_new (gdk_screen_get_default (), &error);
+ g_signal_connect (app->screen, "changed", G_CALLBACK (on_screen_changed), app);
if (!app->screen)
{
error_message (NULL, _("Could not get screen information"), error->message);
@@ -2476,6 +2532,10 @@ run_application (App *app)
g_signal_connect (_gtk_builder_get_widget (builder, "detect_displays_button"),
"clicked", G_CALLBACK (on_detect_displays), app);
+ app->primary_button = _gtk_builder_get_widget (builder, "primary_button");
+
+ g_signal_connect (app->primary_button, "clicked", G_CALLBACK (set_primary), app);
+
app->show_icon_checkbox = _gtk_builder_get_widget (builder,
"show_notification_icon");
@@ -2553,7 +2613,7 @@ restart:
}
gtk_widget_destroy (app->dialog);
- mate_rr_screen_destroy (app->screen);
+ g_object_unref (app->screen);
g_object_unref (app->settings);
}
diff --git a/capplets/keybindings/eggaccelerators.c b/capplets/keybindings/eggaccelerators.c
index c81c567e..03ffca71 100644
--- a/capplets/keybindings/eggaccelerators.c
+++ b/capplets/keybindings/eggaccelerators.c
@@ -26,10 +26,6 @@
#include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>
-#if GTK_CHECK_VERSION (3, 0, 0)
-#include <gdk/gdkkeysyms-compat.h>
-#endif
-
enum {
EGG_MODMAP_ENTRY_SHIFT = 0,
EGG_MODMAP_ENTRY_LOCK = 1,
@@ -565,20 +561,20 @@ reload_modmap (GdkKeymap *keymap,
mask = 0;
for (j = 0; j < n_entries; ++j)
{
- if (keyvals[j] == GDK_Num_Lock)
+ if (keyvals[j] == GDK_KEY_Num_Lock)
mask |= EGG_VIRTUAL_NUM_LOCK_MASK;
- else if (keyvals[j] == GDK_Scroll_Lock)
+ else if (keyvals[j] == GDK_KEY_Scroll_Lock)
mask |= EGG_VIRTUAL_SCROLL_LOCK_MASK;
- else if (keyvals[j] == GDK_Meta_L ||
- keyvals[j] == GDK_Meta_R)
+ else if (keyvals[j] == GDK_KEY_Meta_L ||
+ keyvals[j] == GDK_KEY_Meta_R)
mask |= EGG_VIRTUAL_META_MASK;
- else if (keyvals[j] == GDK_Hyper_L ||
- keyvals[j] == GDK_Hyper_R)
+ else if (keyvals[j] == GDK_KEY_Hyper_L ||
+ keyvals[j] == GDK_KEY_Hyper_R)
mask |= EGG_VIRTUAL_HYPER_MASK;
- else if (keyvals[j] == GDK_Super_L ||
- keyvals[j] == GDK_Super_R)
+ else if (keyvals[j] == GDK_KEY_Super_L ||
+ keyvals[j] == GDK_KEY_Super_R)
mask |= EGG_VIRTUAL_SUPER_MASK;
- else if (keyvals[j] == GDK_Mode_switch)
+ else if (keyvals[j] == GDK_KEY_Mode_switch)
mask |= EGG_VIRTUAL_MODE_SWITCH_MASK;
}
diff --git a/capplets/keybindings/eggcellrendererkeys.c b/capplets/keybindings/eggcellrendererkeys.c
index 22ea7a79..11d89a39 100644
--- a/capplets/keybindings/eggcellrendererkeys.c
+++ b/capplets/keybindings/eggcellrendererkeys.c
@@ -3,9 +3,6 @@
#include <gtk/gtk.h>
#include <gdk/gdkx.h>
#include <gdk/gdkkeysyms.h>
-#if GTK_CHECK_VERSION (3, 0, 0)
-#include <gdk/gdkkeysyms-compat.h>
-#endif
#include "eggcellrendererkeys.h"
#include "eggaccelerators.h"
@@ -402,9 +399,9 @@ static gboolean grab_key_callback(GtkWidget* widget, GdkEventKey* event, void* d
upper = event->keyval;
accel_keyval = gdk_keyval_to_lower(upper);
- if (accel_keyval == GDK_ISO_Left_Tab)
+ if (accel_keyval == GDK_KEY_ISO_Left_Tab)
{
- accel_keyval = GDK_Tab;
+ accel_keyval = GDK_KEY_Tab;
}
/* Put shift back if it changed the case of the key, not otherwise. */
@@ -441,13 +438,13 @@ static gboolean grab_key_callback(GtkWidget* widget, GdkEventKey* event, void* d
g_assert_not_reached();
}
- if (accel_mods == 0 && accel_keyval == GDK_Escape)
+ if (accel_mods == 0 && accel_keyval == GDK_KEY_Escape)
{
goto out; /* cancel */
}
/* clear the accelerator on Backspace */
- if (accel_mods == 0 && accel_keyval == GDK_BackSpace)
+ if (accel_mods == 0 && accel_keyval == GDK_KEY_BackSpace)
{
cleared = TRUE;
goto out;
diff --git a/capplets/keybindings/mate-keybinding-properties.c b/capplets/keybindings/mate-keybinding-properties.c
index ae9bee96..ee3e45aa 100644
--- a/capplets/keybindings/mate-keybinding-properties.c
+++ b/capplets/keybindings/mate-keybinding-properties.c
@@ -12,9 +12,6 @@
#include <X11/Xatom.h>
#include <glib/gi18n.h>
#include <gdk/gdkkeysyms.h>
-#if GTK_CHECK_VERSION (3, 0, 0)
-#include <gdk/gdkkeysyms-compat.h>
-#endif
#include "wm-common.h"
#include "capplet-util.h"
@@ -1149,22 +1146,22 @@ static gboolean cb_check_for_uniqueness(GtkTreeModel* model, GtkTreePath* path,
static const guint forbidden_keyvals[] = {
/* Navigation keys */
- GDK_Home,
- GDK_Left,
- GDK_Up,
- GDK_Right,
- GDK_Down,
- GDK_Page_Up,
- GDK_Page_Down,
- GDK_End,
- GDK_Tab,
+ GDK_KEY_Home,
+ GDK_KEY_Left,
+ GDK_KEY_Up,
+ GDK_KEY_Right,
+ GDK_KEY_Down,
+ GDK_KEY_Page_Up,
+ GDK_KEY_Page_Down,
+ GDK_KEY_End,
+ GDK_KEY_Tab,
/* Return */
- GDK_KP_Enter,
- GDK_Return,
+ GDK_KEY_KP_Enter,
+ GDK_KEY_Return,
- GDK_space,
- GDK_Mode_switch
+ GDK_KEY_space,
+ GDK_KEY_Mode_switch
};
static gboolean keyval_is_forbidden(guint keyval)
@@ -1242,17 +1239,17 @@ static void accel_edited_callback(GtkCellRendererText* cell, const char* path_st
/* Check for unmodified keys */
if (tmp_key.mask == 0 && tmp_key.keycode != 0)
{
- if ((tmp_key.keyval >= GDK_a && tmp_key.keyval <= GDK_z)
- || (tmp_key.keyval >= GDK_A && tmp_key.keyval <= GDK_Z)
- || (tmp_key.keyval >= GDK_0 && tmp_key.keyval <= GDK_9)
- || (tmp_key.keyval >= GDK_kana_fullstop && tmp_key.keyval <= GDK_semivoicedsound)
- || (tmp_key.keyval >= GDK_Arabic_comma && tmp_key.keyval <= GDK_Arabic_sukun)
- || (tmp_key.keyval >= GDK_Serbian_dje && tmp_key.keyval <= GDK_Cyrillic_HARDSIGN)
- || (tmp_key.keyval >= GDK_Greek_ALPHAaccent && tmp_key.keyval <= GDK_Greek_omega)
- || (tmp_key.keyval >= GDK_hebrew_doublelowline && tmp_key.keyval <= GDK_hebrew_taf)
- || (tmp_key.keyval >= GDK_Thai_kokai && tmp_key.keyval <= GDK_Thai_lekkao)
- || (tmp_key.keyval >= GDK_Hangul && tmp_key.keyval <= GDK_Hangul_Special)
- || (tmp_key.keyval >= GDK_Hangul_Kiyeog && tmp_key.keyval <= GDK_Hangul_J_YeorinHieuh)
+ if ((tmp_key.keyval >= GDK_KEY_a && tmp_key.keyval <= GDK_KEY_z)
+ || (tmp_key.keyval >= GDK_KEY_A && tmp_key.keyval <= GDK_KEY_Z)
+ || (tmp_key.keyval >= GDK_KEY_0 && tmp_key.keyval <= GDK_KEY_9)
+ || (tmp_key.keyval >= GDK_KEY_kana_fullstop && tmp_key.keyval <= GDK_KEY_semivoicedsound)
+ || (tmp_key.keyval >= GDK_KEY_Arabic_comma && tmp_key.keyval <= GDK_KEY_Arabic_sukun)
+ || (tmp_key.keyval >= GDK_KEY_Serbian_dje && tmp_key.keyval <= GDK_KEY_Cyrillic_HARDSIGN)
+ || (tmp_key.keyval >= GDK_KEY_Greek_ALPHAaccent && tmp_key.keyval <= GDK_KEY_Greek_omega)
+ || (tmp_key.keyval >= GDK_KEY_hebrew_doublelowline && tmp_key.keyval <= GDK_KEY_hebrew_taf)
+ || (tmp_key.keyval >= GDK_KEY_Thai_kokai && tmp_key.keyval <= GDK_KEY_Thai_lekkao)
+ || (tmp_key.keyval >= GDK_KEY_Hangul && tmp_key.keyval <= GDK_KEY_Hangul_Special)
+ || (tmp_key.keyval >= GDK_KEY_Hangul_Kiyeog && tmp_key.keyval <= GDK_KEY_Hangul_J_YeorinHieuh)
|| keyval_is_forbidden (tmp_key.keyval))
{
diff --git a/capplets/keybindings/mate-keybinding.desktop.in.in b/capplets/keybindings/mate-keybinding.desktop.in.in
index 4fab8516..d154d342 100644
--- a/capplets/keybindings/mate-keybinding.desktop.in.in
+++ b/capplets/keybindings/mate-keybinding.desktop.in.in
@@ -6,6 +6,6 @@ Icon=preferences-desktop-keyboard-shortcuts
Terminal=false
Type=Application
StartupNotify=true
-Categories=GTK;Settings;
+Categories=GTK;Settings;HardwareSettings;
Keywords=mate-control-center;MATE;assign;keyboard;shortcuts;keybindings;
OnlyShowIn=MATE;
diff --git a/capplets/keyboard/mate-keyboard-properties-a11y.c b/capplets/keyboard/mate-keyboard-properties-a11y.c
index bd2d13e2..7a3b566e 100644
--- a/capplets/keyboard/mate-keyboard-properties-a11y.c
+++ b/capplets/keyboard/mate-keyboard-properties-a11y.c
@@ -121,7 +121,8 @@ static void
a11y_notifications_dialog_response_cb (GtkWidget *w, gint response)
{
if (response == GTK_RESPONSE_HELP) {
-
+ capplet_help (GTK_WINDOW (w),
+ "prefs-keyboard#goscustdesk-TBL-86");
}
else {
gtk_widget_destroy (w);
@@ -319,4 +320,19 @@ setup_a11y_tabs (GtkBuilder *dialog)
gtk_range_get_adjustment (GTK_RANGE (WID ("mousekeys_init_delay_slide"))),
"value",
G_SETTINGS_BIND_DEFAULT);
+
+#if !GTK_CHECK_VERSION (3, 0, 0)
+ const char *range_names[] = {
+ "slowkeys_delay_slide",
+ "bouncekeys_delay_slide",
+ "mousekeys_accel_time_slide",
+ "mousekeys_max_speed_slide",
+ "mousekeys_init_delay_slide"
+ };
+
+ int i;
+ for (i = 0; i < 5; ++i) {
+ gtk_range_set_update_policy (GTK_RANGE (WID (range_names[i])), GTK_UPDATE_DISCONTINUOUS);
+ }
+#endif
}
diff --git a/capplets/keyboard/mate-keyboard-properties-dialog.ui b/capplets/keyboard/mate-keyboard-properties-dialog.ui
index b82195ff..ea058c9a 100644
--- a/capplets/keyboard/mate-keyboard-properties-dialog.ui
+++ b/capplets/keyboard/mate-keyboard-properties-dialog.ui
@@ -421,7 +421,6 @@
<object class="GtkHScale" id="cursor_blink_time_scale">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="update_policy">discontinuous</property>
<property name="adjustment">adjustment3</property>
<property name="draw_value">False</property>
<child internal-child="accessible">
@@ -995,7 +994,6 @@ default settings</property>
<object class="GtkHScale" id="slowkeys_delay_slide">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="update_policy">discontinuous</property>
<property name="adjustment">adjustment4</property>
<property name="draw_value">False</property>
<child internal-child="accessible">
@@ -1147,7 +1145,6 @@ default settings</property>
<object class="GtkHScale" id="bouncekeys_delay_slide">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="update_policy">discontinuous</property>
<property name="adjustment">adjustment5</property>
<property name="draw_value">False</property>
<child internal-child="accessible">
@@ -1337,7 +1334,6 @@ default settings</property>
<object class="GtkHScale" id="mousekeys_accel_time_slide">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="update_policy">discontinuous</property>
<property name="adjustment">adjustment6</property>
<property name="draw_value">False</property>
<property name="value_pos">right</property>
@@ -1352,7 +1348,6 @@ default settings</property>
<object class="GtkHScale" id="mousekeys_max_speed_slide">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="update_policy">discontinuous</property>
<property name="adjustment">adjustment7</property>
<property name="digits">0</property>
<property name="draw_value">False</property>
@@ -1473,7 +1468,6 @@ default settings</property>
<object class="GtkHScale" id="mousekeys_init_delay_slide">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="update_policy">discontinuous</property>
<property name="adjustment">adjustment8</property>
<property name="digits">0</property>
<property name="draw_value">False</property>
diff --git a/capplets/keyboard/mate-keyboard-properties-layout-chooser.ui b/capplets/keyboard/mate-keyboard-properties-layout-chooser.ui
index 2de4c9b4..1df1fa7f 100644
--- a/capplets/keyboard/mate-keyboard-properties-layout-chooser.ui
+++ b/capplets/keyboard/mate-keyboard-properties-layout-chooser.ui
@@ -6,7 +6,7 @@
<property name="visible">True</property>
<property name="border_width">5</property>
<property name="title" translatable="yes">Choose a Layout</property>
- <property name="default_width">670</property>
+ <property name="default_width">900</property>
<property name="default_height">350</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
@@ -27,9 +27,9 @@
<child>
<object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
- <property name="top_padding">3</property>
- <property name="bottom_padding">3</property>
- <property name="left_padding">3</property>
+ <property name="top_padding">6</property>
+ <property name="bottom_padding">6</property>
+ <property name="left_padding">10</property>
<property name="right_padding">6</property>
<child>
<object class="GtkTable" id="table1">
@@ -107,10 +107,10 @@
<child>
<object class="GtkAlignment" id="alignment2">
<property name="visible">True</property>
- <property name="top_padding">3</property>
- <property name="bottom_padding">3</property>
- <property name="left_padding">3</property>
- <property name="right_padding">3</property>
+ <property name="top_padding">6</property>
+ <property name="bottom_padding">6</property>
+ <property name="left_padding">10</property>
+ <property name="right_padding">6</property>
<child>
<object class="GtkTable" id="table3">
<property name="visible">True</property>
@@ -200,6 +200,8 @@
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
+ <property name="width_request">900</property>
+ <property name="height_request">400</property>
<child>
<object class="GtkHBox" id="hbox1">
<property name="visible">True</property>
diff --git a/capplets/keyboard/mate-keyboard-properties-model-chooser.ui b/capplets/keyboard/mate-keyboard-properties-model-chooser.ui
index a89cfc93..07f4f685 100644
--- a/capplets/keyboard/mate-keyboard-properties-model-chooser.ui
+++ b/capplets/keyboard/mate-keyboard-properties-model-chooser.ui
@@ -8,7 +8,7 @@
<property name="title" translatable="yes">Choose a Keyboard Model</property>
<property name="modal">True</property>
<property name="default_width">450</property>
- <property name="default_height">400</property>
+ <property name="default_height">380</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
<object class="GtkVBox" id="dialog-vbox2">
@@ -40,6 +40,7 @@
<property name="can_focus">True</property>
<property name="hscrollbar_policy">automatic</property>
<property name="vscrollbar_policy">automatic</property>
+ <property name="height_request">130</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkTreeView" id="vendors_list">
@@ -70,9 +71,10 @@
<object class="GtkScrolledWindow" id="scrolledwindow3">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="hscrollbar_policy">automatic</property>
+ <property name="hscrollbar_policy">never</property>
<property name="vscrollbar_policy">automatic</property>
<property name="shadow_type">in</property>
+ <property name="height_request">130</property>
<child>
<object class="GtkTreeView" id="models_list">
<property name="visible">True</property>
diff --git a/capplets/keyboard/mate-keyboard-properties-options-dialog.ui b/capplets/keyboard/mate-keyboard-properties-options-dialog.ui
index 06914448..419004ec 100644
--- a/capplets/keyboard/mate-keyboard-properties-options-dialog.ui
+++ b/capplets/keyboard/mate-keyboard-properties-options-dialog.ui
@@ -24,6 +24,7 @@
<property name="hscrollbar_policy">automatic</property>
<property name="vscrollbar_policy">automatic</property>
<property name="shadow_type">out</property>
+ <property name="height_request">300</property>
<child>
<object class="GtkViewport" id="viewport1">
<property name="visible">True</property>
diff --git a/capplets/keyboard/mate-keyboard-properties-xkb.c b/capplets/keyboard/mate-keyboard-properties-xkb.c
index 4f795719..7ccc0273 100644
--- a/capplets/keyboard/mate-keyboard-properties-xkb.c
+++ b/capplets/keyboard/mate-keyboard-properties-xkb.c
@@ -61,10 +61,8 @@ set_model_text (GtkWidget * picker, gchar * value)
XklConfigItem *ci = xkl_config_item_new ();
char *model = NULL;
- if (value != NULL) {
+ if (value != NULL && value[0] != '\0') {
model = g_strdup(value);
- if (model != NULL && model[0] == '\0')
- model = NULL;
}
if (model == NULL) {
diff --git a/capplets/keyboard/mate-keyboard-properties-xkblt.c b/capplets/keyboard/mate-keyboard-properties-xkblt.c
index b23fd750..b6107306 100644
--- a/capplets/keyboard/mate-keyboard-properties-xkblt.c
+++ b/capplets/keyboard/mate-keyboard-properties-xkblt.c
@@ -359,7 +359,6 @@ show_selected_layout (GtkWidget * button, GtkBuilder * dialog)
char *descr = xkb_layout_description_utf8 (id);
GtkWidget *parent = WID ("keyboard_dialog");
GtkWidget *popup = matekbd_keyboard_drawing_new_dialog (idx, descr);
- gtk_widget_set_parent (popup, parent);
clear_xkb_elements_list (layouts_list);
g_free (descr);
}
diff --git a/capplets/keyboard/mate-keyboard-properties-xkbot.c b/capplets/keyboard/mate-keyboard-properties-xkbot.c
index ddf23115..5d4ee614 100644
--- a/capplets/keyboard/mate-keyboard-properties-xkbot.c
+++ b/capplets/keyboard/mate-keyboard-properties-xkbot.c
@@ -419,7 +419,7 @@ chooser_response_cb (GtkDialog * dialog, gint response, gpointer data)
switch (response) {
case GTK_RESPONSE_HELP:
capplet_help (GTK_WINDOW (dialog),
- "prefs-keyboard-layoutoptions");
+ "prefs-keyboard#prefs-keyboard-layoutoptions");
break;
case GTK_RESPONSE_CLOSE:{
/* just cleanup */
diff --git a/capplets/keyboard/mate-keyboard-properties.c b/capplets/keyboard/mate-keyboard-properties.c
index 894bd0ec..a5810e71 100644
--- a/capplets/keyboard/mate-keyboard-properties.c
+++ b/capplets/keyboard/mate-keyboard-properties.c
@@ -28,6 +28,7 @@
# include <config.h>
#endif
+#include <stdlib.h>
#include <gio/gio.h>
#include "capplet-util.h"
@@ -56,11 +57,16 @@ create_dialog (void)
GtkBuilder *dialog;
GtkSizeGroup *size_group;
GtkWidget *image;
+ GError *error = NULL;
+ static const gchar *uifile = MATECC_UI_DIR "/mate-keyboard-properties-dialog.ui";
dialog = gtk_builder_new ();
- gtk_builder_add_from_file (dialog, MATECC_UI_DIR
- "/mate-keyboard-properties-dialog.ui",
- NULL);
+ if (gtk_builder_add_from_file (dialog, uifile, &error) == 0) {
+ g_warning ("Could not load UI: %s", error->message);
+ g_error_free (error);
+ g_object_unref (dialog);
+ return NULL;
+ }
size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
gtk_size_group_add_widget (size_group, WID ("repeat_slow_label"));
@@ -180,6 +186,10 @@ setup_dialog (GtkBuilder * dialog)
gtk_notebook_remove_page (nb, tb_page);
}
+#if !GTK_CHECK_VERSION (3, 0, 0)
+ gtk_range_set_update_policy (GTK_RANGE (WID ("cursor_blink_time_scale")), GTK_UPDATE_DISCONTINUOUS);
+#endif
+
g_signal_connect (WID ("keyboard_dialog"), "response",
(GCallback) dialog_response, NULL);
@@ -234,6 +244,9 @@ main (int argc, char **argv)
typing_break_settings = g_settings_new (TYPING_BREAK_SCHEMA);
dialog = create_dialog ();
+ if (!dialog) /* Warning was already printed to console */
+ exit (EXIT_FAILURE);
+
setup_dialog (dialog);
if (switch_to_typing_break_page) {
gtk_notebook_set_current_page (GTK_NOTEBOOK
diff --git a/capplets/mouse/mate-mouse-properties.c b/capplets/mouse/mate-mouse-properties.c
index 38e17530..96c14185 100644
--- a/capplets/mouse/mate-mouse-properties.c
+++ b/capplets/mouse/mate-mouse-properties.c
@@ -48,10 +48,6 @@
#include <X11/Xcursor/Xcursor.h>
#endif
-#if GTK_CHECK_VERSION (3, 0, 0)
-#define GtkFunction GSourceFunc
-#endif
-
enum
{
DOUBLE_CLICK_TEST_OFF,
@@ -151,14 +147,14 @@ event_box_button_press_event (GtkWidget *widget,
double_click_state = DOUBLE_CLICK_TEST_MAYBE;
data.image = image;
data.timeout_id = &test_maybe_timeout_id;
- test_maybe_timeout_id = g_timeout_add (double_click_time, (GtkFunction) test_maybe_timeout, &data);
+ test_maybe_timeout_id = g_timeout_add (double_click_time, (GSourceFunc) test_maybe_timeout, &data);
break;
case DOUBLE_CLICK_TEST_MAYBE:
if (event->time - double_click_timestamp < double_click_time) {
double_click_state = DOUBLE_CLICK_TEST_ON;
data.image = image;
data.timeout_id = &test_on_timeout_id;
- test_on_timeout_id = g_timeout_add (2500, (GtkFunction) test_maybe_timeout, &data);
+ test_on_timeout_id = g_timeout_add (2500, (GSourceFunc) test_maybe_timeout, &data);
}
break;
case DOUBLE_CLICK_TEST_ON:
@@ -216,6 +212,8 @@ scrollmethod_gsettings_changed_event (GSettings *settings,
scroll_method == 2);
gtk_widget_set_sensitive (WID ("horiz_scroll_toggle"),
scroll_method != 0);
+ gtk_widget_set_sensitive (WID ("natural_scroll_toggle"),
+ scroll_method != 0);
}
static void
@@ -227,6 +225,9 @@ scrollmethod_clicked_event (GtkWidget *widget,
gtk_widget_set_sensitive (WID ("horiz_scroll_toggle"),
!gtk_toggle_button_get_active (disabled));
+ gtk_widget_set_sensitive (WID ("natural_scroll_toggle"),
+ !gtk_toggle_button_get_active (disabled));
+
GSList *radio_group;
int new_scroll_method;
int old_scroll_method = g_settings_get_int (touchpad_settings, "scroll-method");
@@ -351,6 +352,14 @@ find_synaptics (void)
return ret;
}
+static void
+comboxbox_changed_callback (GtkWidget *combobox, void *data)
+{
+ gint value = gtk_combo_box_get_active (GTK_COMBO_BOX (combobox));
+ gchar *key = (char *) data;
+ g_settings_set_int (touchpad_settings, key, value);
+}
+
/* Set up the property editors in the dialog. */
static void
setup_dialog (GtkBuilder *dialog)
@@ -409,9 +418,31 @@ setup_dialog (GtkBuilder *dialog)
g_settings_bind (touchpad_settings, "horiz-scroll-enabled",
WID ("horiz_scroll_toggle"), "active",
G_SETTINGS_BIND_DEFAULT);
+ g_settings_bind (touchpad_settings, "natural-scroll",
+ WID ("natural_scroll_toggle"), "active",
+ G_SETTINGS_BIND_DEFAULT);
scrollmethod_gsettings_changed_event (touchpad_settings, "scroll-method", dialog);
+ char * emulation_values[] = { _("Disabled"), _("Left button"), _("Middle button"), _("Right button") };
+
+ GtkWidget *two_click_comboxbox = gtk_combo_box_text_new ();
+ GtkWidget *three_click_comboxbox = gtk_combo_box_text_new ();
+ gtk_box_pack_start (GTK_BOX (WID ("hbox_two_finger_click")), two_click_comboxbox, FALSE, FALSE, 6);
+ gtk_box_pack_start (GTK_BOX (WID ("hbox_three_finger_click")), three_click_comboxbox, FALSE, FALSE, 6);
+ int i;
+ for (i=0; i<4; i++) {
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (two_click_comboxbox), emulation_values[i]);
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (three_click_comboxbox), emulation_values[i]);
+ }
+
+ gtk_combo_box_set_active (GTK_COMBO_BOX (two_click_comboxbox), g_settings_get_int (touchpad_settings, "two-finger-click"));
+ gtk_combo_box_set_active (GTK_COMBO_BOX (three_click_comboxbox), g_settings_get_int (touchpad_settings, "three-finger-click"));
+ gtk_widget_show (two_click_comboxbox);
+ gtk_widget_show (three_click_comboxbox);
+ g_signal_connect (two_click_comboxbox, "changed", G_CALLBACK (comboxbox_changed_callback), "two-finger-click");
+ g_signal_connect (three_click_comboxbox, "changed", G_CALLBACK (comboxbox_changed_callback), "three-finger-click");
+
radio = GTK_RADIO_BUTTON (WID ("scroll_disabled_radio"));
GSList *radio_group = gtk_radio_button_get_group (radio);
GSList *item = NULL;
diff --git a/capplets/mouse/mate-mouse-properties.ui b/capplets/mouse/mate-mouse-properties.ui
index d6ad245a..487961c5 100644
--- a/capplets/mouse/mate-mouse-properties.ui
+++ b/capplets/mouse/mate-mouse-properties.ui
@@ -1,72 +1,112 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<interface>
+ <requires lib="gtk+" version="2.16"/>
+ <!-- interface-naming-policy toplevel-contextual -->
<object class="GtkAdjustment" id="adjustment1">
- <property name="upper">10</property>
<property name="lower">1</property>
- <property name="page_increment">1</property>
- <property name="step_increment">1</property>
- <property name="page_size">0</property>
+ <property name="upper">10</property>
<property name="value">6</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">1</property>
</object>
<object class="GtkAdjustment" id="adjustment2">
- <property name="upper">10</property>
<property name="lower">1</property>
- <property name="page_increment">1</property>
- <property name="step_increment">1</property>
- <property name="page_size">0</property>
+ <property name="upper">10</property>
<property name="value">1</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">1</property>
</object>
<object class="GtkAdjustment" id="adjustment3">
- <property name="upper">10</property>
<property name="lower">1</property>
- <property name="page_increment">1</property>
- <property name="step_increment">1</property>
- <property name="page_size">0</property>
+ <property name="upper">10</property>
<property name="value">1</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">1</property>
</object>
<object class="GtkAdjustment" id="adjustment4">
- <property name="upper">1000</property>
<property name="lower">100</property>
- <property name="page_increment">100</property>
- <property name="step_increment">100</property>
- <property name="page_size">0</property>
+ <property name="upper">1000</property>
<property name="value">400</property>
+ <property name="step_increment">100</property>
+ <property name="page_increment">100</property>
</object>
<object class="GtkAdjustment" id="adjustment5">
- <property name="upper">3</property>
<property name="lower">0.5</property>
- <property name="page_increment">0.10000000000000001</property>
- <property name="step_increment">0.10000000000000001</property>
- <property name="page_size">0</property>
+ <property name="upper">3</property>
<property name="value">1.2</property>
+ <property name="step_increment">0.10000000000000001</property>
+ <property name="page_increment">0.10000000000000001</property>
</object>
<object class="GtkAdjustment" id="adjustment6">
- <property name="upper">3</property>
<property name="lower">0.20000000000000001</property>
- <property name="page_increment">0.10000000000000001</property>
- <property name="step_increment">0.10000000000000001</property>
- <property name="page_size">0</property>
+ <property name="upper">3</property>
<property name="value">1.2</property>
+ <property name="step_increment">0.10000000000000001</property>
+ <property name="page_increment">0.10000000000000001</property>
</object>
<object class="GtkAdjustment" id="adjustment7">
<property name="upper">30</property>
- <property name="lower">0</property>
- <property name="page_increment">1</property>
- <property name="step_increment">1</property>
- <property name="page_size">0</property>
<property name="value">15</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">1</property>
</object>
- <!-- interface-requires gtk+ 2.16 -->
- <!-- interface-naming-policy toplevel-contextual -->
<object class="GtkDialog" id="mouse_properties_dialog">
+ <property name="can_focus">False</property>
<property name="border_width">5</property>
<property name="title" translatable="yes">Mouse Preferences</property>
+ <property name="default_width">500</property>
+ <property name="default_height">550</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
<object class="GtkVBox" id="dialog-vbox1">
<property name="visible">True</property>
- <property name="orientation">vertical</property>
+ <property name="can_focus">False</property>
<property name="spacing">2</property>
+ <child internal-child="action_area">
+ <object class="GtkHButtonBox" id="dialog-action_area1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="helpbutton1">
+ <property name="label">gtk-help</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="closebutton1">
+ <property name="label">gtk-close</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_stock">True</property>
+ </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">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
<child>
<object class="GtkNotebook" id="prefs_widget">
<property name="visible">True</property>
@@ -75,18 +115,19 @@
<child>
<object class="GtkVBox" id="general_vbox">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="border_width">12</property>
- <property name="orientation">vertical</property>
<property name="spacing">18</property>
<child>
<object class="GtkVBox" id="orientation_vbox">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="orientation">vertical</property>
<child>
<object class="GtkLabel" id="label27">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Mouse Orientation</property>
@@ -95,20 +136,23 @@
</attributes>
</object>
<packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
<object class="GtkVBox" id="vbox29">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkRadioButton" id="right_handed_radio">
@@ -117,11 +161,14 @@
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
@@ -132,12 +179,15 @@
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
<property name="group">right_handed_radio</property>
</object>
<packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
@@ -145,23 +195,27 @@
</child>
</object>
<packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkVBox" id="locate_pointer_vbox">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="orientation">vertical</property>
<child>
<object class="GtkLabel" id="label5">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Locate Pointer</property>
@@ -170,12 +224,15 @@
</attributes>
</object>
<packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkAlignment" id="alignment4">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
@@ -186,29 +243,34 @@
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
</object>
</child>
</object>
<packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
+ <property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkVBox" id="pointer_speed_vbox">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="orientation">vertical</property>
<child>
<object class="GtkLabel" id="label29">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Pointer Speed</property>
@@ -217,18 +279,22 @@
</attributes>
</object>
<packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkAlignment" id="alignment5">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
<object class="GtkTable" id="table2">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="n_rows">2</property>
<property name="n_columns">3</property>
<property name="column_spacing">12</property>
@@ -236,6 +302,7 @@
<child>
<object class="GtkLabel" id="acceleration_label">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">_Acceleration:</property>
<property name="use_underline">True</property>
@@ -250,6 +317,7 @@
<child>
<object class="GtkLabel" id="sensitivity_label">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">_Sensitivity:</property>
<property name="use_underline">True</property>
@@ -266,21 +334,24 @@
<child>
<object class="GtkHBox" id="hbox1">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="acceleration_slow_label">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="xalign">1</property>
- <property comments="slow acceleration" name="label" translatable="yes">Slow</property>
+ <property name="label" translatable="yes" comments="slow acceleration">Slow</property>
<property name="justify">center</property>
<attributes>
<attribute name="style" value="italic"/>
- <attribute name="scale" value="0.83"/>
+ <attribute name="scale" value="0.82999999999999996"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
@@ -293,22 +364,26 @@
<property name="value_pos">right</property>
</object>
<packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="acceleration_fast_label">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="xalign">0</property>
- <property name="label" comments="fast acceleration" translatable="yes">Fast</property>
+ <property name="label" translatable="yes" comments="fast acceleration">Fast</property>
<property name="justify">center</property>
<attributes>
<attribute name="style" value="italic"/>
- <attribute name="scale" value="0.83"/>
+ <attribute name="scale" value="0.82999999999999996"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
+ <property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
@@ -321,21 +396,24 @@
<child>
<object class="GtkHBox" id="hbox3">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="sensitivity_low_label">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="xalign">1</property>
- <property comments="low sensitivity" name="label" translatable="yes">Low</property>
+ <property name="label" translatable="yes" comments="low sensitivity">Low</property>
<property name="justify">center</property>
<attributes>
<attribute name="style" value="italic"/>
- <attribute name="scale" value="0.83"/>
+ <attribute name="scale" value="0.82999999999999996"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
@@ -348,22 +426,26 @@
<property name="draw_value">False</property>
</object>
<packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="sensitivity_high_label">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="xalign">0</property>
- <property comments="high sensitivity" name="label" translatable="yes">High</property>
+ <property name="label" translatable="yes" comments="high sensitivity">High</property>
<property name="justify">center</property>
<attributes>
<attribute name="style" value="italic"/>
- <attribute name="scale" value="0.83"/>
+ <attribute name="scale" value="0.82999999999999996"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
+ <property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
@@ -379,23 +461,27 @@
</child>
</object>
<packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
+ <property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkVBox" id="dnd_vbox">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="orientation">vertical</property>
<child>
<object class="GtkLabel" id="label8">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Drag and Drop</property>
@@ -404,28 +490,33 @@
</attributes>
</object>
<packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkAlignment" id="alignment6">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
<object class="GtkVBox" id="vbox7">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
<object class="GtkHBox" id="cursor_hbox2">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="spacing">12</property>
<child>
<object class="GtkLabel" id="threshold_label">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Thr_eshold:</property>
<property name="use_underline">True</property>
@@ -441,16 +532,18 @@
<child>
<object class="GtkHBox" id="hbox9">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="threshold_small_label">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="xalign">1</property>
- <property comments="small threshold" name="label" translatable="yes">Small</property>
+ <property name="label" translatable="yes" comments="small threshold">Small</property>
<property name="justify">center</property>
<attributes>
<attribute name="style" value="italic"/>
- <attribute name="scale" value="0.83"/>
+ <attribute name="scale" value="0.82999999999999996"/>
</attributes>
</object>
<packing>
@@ -466,27 +559,27 @@
<property name="adjustment">adjustment3</property>
<property name="digits">0</property>
<property name="draw_value">False</property>
- <accessibility>
-
- </accessibility>
<child internal-child="accessible">
- <object class="AtkObject" id="a11y-drag_threshold_scale1">
+ <object class="AtkObject" id="drag_threshold_scale-atkobject">
<property name="AtkObject::accessible-description" translatable="yes">Cursor blinks speed</property>
</object>
</child>
</object>
<packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="threshold_large_label">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="xalign">0</property>
- <property comments="large threshold" name="label" translatable="yes">Large</property>
+ <property name="label" translatable="yes" comments="large threshold">Large</property>
<attributes>
<attribute name="style" value="italic"/>
- <attribute name="scale" value="0.83"/>
+ <attribute name="scale" value="0.82999999999999996"/>
</attributes>
</object>
<packing>
@@ -497,11 +590,15 @@
</child>
</object>
<packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
@@ -509,23 +606,27 @@
</child>
</object>
<packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
+ <property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkVBox" id="double_click_timeout_vbox">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="orientation">vertical</property>
<child>
<object class="GtkLabel" id="label31">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Double-Click Timeout</property>
@@ -534,28 +635,33 @@
</attributes>
</object>
<packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkAlignment" id="alignment7">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
<object class="GtkVBox" id="vbox32">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
<object class="GtkHBox" id="cursor_hbox4">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="spacing">12</property>
<child>
<object class="GtkLabel" id="timeout_label">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">_Timeout:</property>
<property name="use_underline">True</property>
@@ -571,15 +677,17 @@
<child>
<object class="GtkHBox" id="hbox21">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="timeout_short_label">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="xalign">1</property>
<property name="label" translatable="yes">Short</property>
<attributes>
<attribute name="style" value="italic"/>
- <attribute name="scale" value="0.83"/>
+ <attribute name="scale" value="0.82999999999999996"/>
</attributes>
</object>
<packing>
@@ -594,27 +702,27 @@
<property name="can_focus">True</property>
<property name="adjustment">adjustment4</property>
<property name="draw_value">False</property>
- <accessibility>
-
- </accessibility>
<child internal-child="accessible">
- <object class="AtkObject" id="a11y-delay_scale1">
+ <object class="AtkObject" id="delay_scale-atkobject">
<property name="AtkObject::accessible-description" translatable="yes">Cursor blinks speed</property>
</object>
</child>
</object>
<packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="timeout_long_label">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Long</property>
<attributes>
<attribute name="style" value="italic"/>
- <attribute name="scale" value="0.83"/>
+ <attribute name="scale" value="0.82999999999999996"/>
</attributes>
</object>
<packing>
@@ -625,23 +733,29 @@
</child>
</object>
<packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkHBox" id="hbox22">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="spacing">12</property>
<child>
<object class="GtkLabel" id="label33">
<property name="width_request">180</property>
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">To test your double-click settings, try to double-click on the light bulb.</property>
@@ -651,28 +765,36 @@
</attributes>
</object>
<packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkEventBox" id="double_click_eventbox">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="visible_window">False</property>
<child>
<object class="GtkImage" id="double_click_image">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="stock">gtk-missing-image</property>
</object>
</child>
</object>
<packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
@@ -680,12 +802,15 @@
</child>
</object>
<packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
+ <property name="fill">True</property>
<property name="position">4</property>
</packing>
</child>
@@ -694,6 +819,7 @@
<child type="tab">
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="label" translatable="yes">General</property>
<property name="justify">center</property>
</object>
@@ -704,19 +830,20 @@
<child>
<object class="GtkVBox" id="vbox3">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="border_width">12</property>
- <property name="orientation">vertical</property>
<property name="spacing">18</property>
<child>
<object class="GtkVBox" id="vbox15">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="label18">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
@@ -734,10 +861,12 @@
<child>
<object class="GtkHBox" id="hbox6">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<child>
<object class="GtkLabel" id="label19">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
@@ -756,11 +885,14 @@
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
@@ -774,10 +906,12 @@
<child>
<object class="GtkHBox" id="hbox11">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<child>
<object class="GtkLabel" id="label22">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
@@ -796,11 +930,14 @@
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
@@ -811,6 +948,116 @@
<property name="position">2</property>
</packing>
</child>
+ <child>
+ <object class="GtkHBox" id="hbox4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <child>
+ <object class="GtkLabel" id="label3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="label"> </property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox_two_finger_click">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label6">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Two-finger click emulation:</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox7">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <child>
+ <object class="GtkLabel" id="label7">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="label"> </property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox_three_finger_click">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label9">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Three-finger click emulation:</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">4</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="expand">False</property>
@@ -821,12 +1068,13 @@
<child>
<object class="GtkVBox" id="vbox19">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="label34">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
@@ -844,10 +1092,12 @@
<child>
<object class="GtkHBox" id="hbox15">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<child>
<object class="GtkLabel" id="label35">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
@@ -862,12 +1112,14 @@
<child>
<object class="GtkHBox" id="hbox23">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<child>
<object class="GtkRadioButton" id="scroll_disabled_radio">
<property name="label" translatable="yes">_Disabled</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
</object>
@@ -883,6 +1135,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
<property name="group">scroll_disabled_radio</property>
@@ -899,6 +1152,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
<property name="group">scroll_disabled_radio</property>
@@ -911,6 +1165,8 @@
</child>
</object>
<packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
@@ -922,12 +1178,58 @@
</packing>
</child>
<child>
+ <object class="GtkHBox" id="hbox2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <child>
+ <object class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="label"> </property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="natural_scroll_toggle">
+ <property name="label" translatable="yes">Enable n_atural scrolling</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkHBox" id="hbox16">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<child>
<object class="GtkLabel" id="label36">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
@@ -946,10 +1248,13 @@
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
@@ -957,7 +1262,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>
@@ -968,10 +1273,14 @@
</packing>
</child>
</object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
</child>
<child type="tab">
<object class="GtkLabel" id="label4">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
<property name="label" translatable="yes">Touchpad</property>
<property name="justify">center</property>
</object>
@@ -982,50 +1291,11 @@
</child>
</object>
<packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
- <child internal-child="action_area">
- <object class="GtkHButtonBox" id="dialog-action_area1">
- <property name="visible">True</property>
- <property name="layout_style">end</property>
- <child>
- <object class="GtkButton" id="helpbutton1">
- <property name="label">gtk-help</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="receives_default">False</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="closebutton1">
- <property name="label">gtk-close</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="receives_default">False</property>
- <property name="use_stock">True</property>
- </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="pack_type">end</property>
- <property name="position">0</property>
- </packing>
- </child>
</object>
</child>
<action-widgets>
diff --git a/capplets/network/mate-network-properties.c b/capplets/network/mate-network-properties.c
index d1eaa515..b64f5439 100644
--- a/capplets/network/mate-network-properties.c
+++ b/capplets/network/mate-network-properties.c
@@ -41,14 +41,14 @@
*/
/*
- * FIXME use enum from gsettings-desktop-schema
+ * use enum from gsettings-desktop-schema
* http://git.gnome.org/browse/gsettings-desktop-schemas/tree/headers/gdesktop-enums.h#n26
*/
-enum ProxyMode
+enum GDesktopProxyMode
{
- PROXYMODE_NONE,
- PROXYMODE_MANUAL,
- PROXYMODE_AUTO
+ G_DESKTOP_PROXY_MODE_NONE,
+ G_DESKTOP_PROXY_MODE_MANUAL,
+ G_DESKTOP_PROXY_MODE_AUTO
};
enum {
@@ -176,12 +176,13 @@ static void
cb_add_url (GtkButton *button, gpointer data)
{
GtkBuilder *builder = GTK_BUILDER (data);
- gchar *new_url = NULL;
- new_url = g_strdup (gtk_entry_get_text (GTK_ENTRY (gtk_builder_get_object (builder, "entry_url"))));
- if (strlen (new_url) == 0)
+ const gchar *entry_text = gtk_entry_get_text (GTK_ENTRY (gtk_builder_get_object (builder, "entry_url")));
+ if (entry_text == NULL || strlen (entry_text) == 0) {
return;
- ignore_hosts = g_slist_append(ignore_hosts, new_url);
+ }
+
+ ignore_hosts = g_slist_append(ignore_hosts, g_strdup (entry_text));
populate_listmodel(GTK_LIST_STORE(model), ignore_hosts);
gtk_entry_set_text(GTK_ENTRY (gtk_builder_get_object (builder,
"entry_url")), "");
@@ -318,16 +319,16 @@ proxy_mode_gsettings_changed (GSettings *settings,
{
int mode;
mode = g_settings_get_enum (settings, PROXY_MODE_KEY);
- if (mode == PROXYMODE_NONE)
+ if (mode == G_DESKTOP_PROXY_MODE_NONE)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (gtk_builder_get_object(builder, "none_radiobutton")), TRUE);
- else if (mode == PROXYMODE_AUTO)
+ else if (mode == G_DESKTOP_PROXY_MODE_AUTO)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (gtk_builder_get_object(builder, "auto_radiobutton")), TRUE);
- else if (mode == PROXYMODE_MANUAL)
+ else if (mode == G_DESKTOP_PROXY_MODE_MANUAL)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (gtk_builder_get_object(builder, "manual_radiobutton")), TRUE);
gtk_widget_set_sensitive (_gtk_builder_get_widget (builder, "manual_box"),
- mode == PROXYMODE_MANUAL);
+ mode == G_DESKTOP_PROXY_MODE_MANUAL);
gtk_widget_set_sensitive (_gtk_builder_get_widget (builder, "auto_box"),
- mode == PROXYMODE_AUTO);
+ mode == G_DESKTOP_PROXY_MODE_AUTO);
}
static void
diff --git a/capplets/network/mate-network-properties.desktop.in.in b/capplets/network/mate-network-properties.desktop.in.in
index f580b5d0..f6d135bf 100644
--- a/capplets/network/mate-network-properties.desktop.in.in
+++ b/capplets/network/mate-network-properties.desktop.in.in
@@ -6,6 +6,6 @@ Icon=mate-network-properties
Terminal=false
Type=Application
StartupNotify=true
-Categories=GTK;Settings;
+Categories=GTK;Settings;X-MATE-NetworkSettings;
Keywords=mate-control-center;MATE;network;http;socks;proxy;
OnlyShowIn=MATE;
diff --git a/capplets/windows/mate-window-properties.c b/capplets/windows/mate-window-properties.c
index 468ed595..00a6b029 100644
--- a/capplets/windows/mate-window-properties.c
+++ b/capplets/windows/mate-window-properties.c
@@ -523,6 +523,8 @@ main (int argc, char **argv)
G_CALLBACK (mouse_focus_toggled_callback), NULL);
g_signal_connect (marco_settings, "changed::" MARCO_FOCUS_KEY,
G_CALLBACK (mouse_focus_changed_callback), NULL);
+ /* Initialize the checkbox state appropriately */
+ mouse_focus_changed_callback(marco_settings, MARCO_FOCUS_KEY, NULL);
g_settings_bind (marco_settings,
MARCO_AUTORAISE_KEY,