[gtk+/wip/matthiasc/gdk-settings: 7/12] gtk: Stop handling settings events



commit 2926669a9bbf42eb2c9e15570afbb63fd5091c58
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Oct 30 09:34:45 2017 -0400

    gtk: Stop handling settings events
    
    We don't need this anymore, now that we use the ::setting-changed
    signal.

 gtk/gtkmain.c            |    7 -------
 gtk/gtksettings.c        |   23 -----------------------
 gtk/gtksettingsprivate.h |    1 -
 gtk/gtkwidget.c          |    1 -
 4 files changed, 0 insertions(+), 32 deletions(-)
---
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index e9894a5..ae46512 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -1613,12 +1613,6 @@ gtk_main_do_event (GdkEvent *event)
   GdkDevice *device;
   GList *tmp_list;
 
-  if (event->type == GDK_SETTING)
-    {
-      _gtk_settings_handle_event (event);
-      return;
-    }
-
   if (event->type == GDK_OWNER_CHANGE)
     {
       _gtk_clipboard_handle_event (&event->owner_change);
@@ -1845,7 +1839,6 @@ gtk_main_do_event (GdkEvent *event)
     case GDK_DROP_START:
       _gtk_drag_dest_handle_event (event_widget, event);
       break;
-    case GDK_SETTING:
     case GDK_OWNER_CHANGE:
     case GDK_EVENT_LAST:
     default:
diff --git a/gtk/gtksettings.c b/gtk/gtksettings.c
index fdf7b57..818c8b4 100644
--- a/gtk/gtksettings.c
+++ b/gtk/gtksettings.c
@@ -2035,29 +2035,6 @@ gtk_rc_property_parse_border (const GParamSpec *pspec,
   return success;
 }
 
-void
-_gtk_settings_handle_event (GdkEvent *event)
-{
-  GdkScreen *screen;
-  GtkSettings *settings;
-  GParamSpec *pspec;
-  const char *name;
-
-  screen = gdk_window_get_screen (gdk_event_get_window (event));
-  settings = gtk_settings_get_for_screen (screen);
-
-  if (!gdk_event_get_setting (event, &name))
-    return;
-
-  pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (settings), name);
-
-  if (!pspec)
-    return;
-
-  if (settings_update_xsetting (settings, pspec, TRUE))
-    g_object_notify_by_pspec (G_OBJECT (settings), pspec);
-}
-
 static void
 reset_rc_values_foreach (GQuark   key_id,
                          gpointer data,
diff --git a/gtk/gtksettingsprivate.h b/gtk/gtksettingsprivate.h
index aaa06b6..df70bab 100644
--- a/gtk/gtksettingsprivate.h
+++ b/gtk/gtksettingsprivate.h
@@ -31,7 +31,6 @@ void                _gtk_settings_set_property_value_from_rc (GtkSettings
                                                               const GtkSettingsValue *svalue);
 void                _gtk_settings_reset_rc_values            (GtkSettings            *settings);
 
-void                _gtk_settings_handle_event               (GdkEvent               *event);
 GtkRcPropertyParser _gtk_rc_property_parser_from_type        (GType                   type);
 gboolean            _gtk_settings_parse_convert              (GtkRcPropertyParser     parser,
                                                               const GValue           *src_value,
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 5efeb80..1b4c55c 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -6808,7 +6808,6 @@ gtk_widget_emit_event_signals (GtkWidget      *widget,
         case GDK_DROP_START:
         case GDK_DROP_FINISHED:
         case GDK_CLIENT_EVENT:
-        case GDK_SETTING:
         case GDK_OWNER_CHANGE:
         case GDK_DAMAGE:
         case GDK_EVENT_LAST:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]