1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
|
From 376432b8061956d40e957fb64924e488e0837a1a Mon Sep 17 00:00:00 2001
From: Alistair Buxton <a.j.buxton@gmail.com>
Date: Mon, 21 Mar 2016 23:36:05 +0000
Subject: [PATCH 3/3] Do not manually update the view theme.
The view property is bound directly to the g_setting, so it will
be updated autoatically whenever that changes. The action group
updates the g_setting so we don't need to manually propagate the
setting.
---
mousepad/mousepad-window.c | 34 ----------------------------------
1 file changed, 34 deletions(-)
--- a/mousepad/mousepad-window.c
+++ b/mousepad/mousepad-window.c
@@ -711,29 +711,6 @@ mousepad_window_create_languages_menu (M
-static void
-mousepad_window_action_group_style_scheme_changed (MousepadWindow *window,
- GParamSpec *pspec,
- MousepadActionGroup *group)
-{
- GtkSourceStyleScheme *scheme;
- const gchar *scheme_id;
- gint npages, i;
-
- /* get the new active language */
- scheme = mousepad_action_group_get_active_style_scheme (group);
- scheme_id = gtk_source_style_scheme_get_id (scheme);
-
- /* update the color scheme on all the documents */
- npages = gtk_notebook_get_n_pages (GTK_NOTEBOOK (window->notebook));
- for (i = 0; i < npages; i++)
- {
- MousepadDocument *document;
-
- document = MOUSEPAD_DOCUMENT (gtk_notebook_get_nth_page (GTK_NOTEBOOK (window->notebook), i));
- mousepad_view_set_color_scheme (document->textview, scheme_id);
- }
-}
@@ -752,12 +729,6 @@ mousepad_window_create_style_schemes_men
gtk_widget_show_all (menu);
gtk_widget_show (item);
- /* watch for activations of the style schemes actions */
- g_signal_connect_object (window->action_group,
- "notify::active-style-scheme",
- G_CALLBACK (mousepad_window_action_group_style_scheme_changed),
- window,
- G_CONNECT_SWAPPED);
}
|