[Xfce4-commits] [apps/mousepad] 03/04: Do not manually update the view theme.

noreply at xfce.org noreply at xfce.org
Tue Aug 15 04:11:12 CEST 2017


This is an automated email from the git hooks/post-receive script.

m   b   r   u   s   h       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository apps/mousepad.

commit dce63e6bd1bdad1238640c30e970d563c233dd26
Author: Alistair Buxton <a.j.buxton at gmail.com>
Date:   Mon Mar 21 23:36:05 2016 +0000

    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(-)

diff --git a/mousepad/mousepad-window.c b/mousepad/mousepad-window.c
index adae7cd..a3fda7a 100644
--- a/mousepad/mousepad-window.c
+++ b/mousepad/mousepad-window.c
@@ -712,33 +712,6 @@ mousepad_window_create_languages_menu (MousepadWindow *window)
 
 
 static void
-mousepad_window_action_group_style_scheme_changed (MousepadWindow      *window,
-                                                   GParamSpec          *pspec,
-                                                   MousepadActionGroup *group)
-{
-  GtkSourceStyleScheme *scheme;
-  const gchar          *scheme_id = NULL;
-  gint                  npages, i;
-
-  /* get the new active language */
-  scheme = mousepad_action_group_get_active_style_scheme (group);
-  if (scheme != NULL)
-    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);
-    }
-}
-
-
-
-static void
 mousepad_window_create_style_schemes_menu (MousepadWindow *window)
 {
   GtkWidget           *menu, *item;
@@ -752,13 +725,6 @@ mousepad_window_create_style_schemes_menu (MousepadWindow *window)
   gtk_menu_item_set_submenu (GTK_MENU_ITEM (item), menu);
   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);
 }
 
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list