[gimp/gtk3-port: 242/242] foo



commit 9c6fb871fb06e54177fe507605482d80c42e7391
Author: Michael Natterer <mitch gimp org>
Date:   Wed Feb 23 08:11:46 2011 +0100

    foo

 app/display/gimpdisplayshell-grab.c        |   86 ++++++++++++++++++++--------
 app/display/gimpdisplayshell-tool-events.c |    7 ++
 app/display/gimpdisplayshell.c             |   26 +++++---
 app/display/gimpdisplayshell.h             |    4 +-
 app/display/gimpstatusbar.c                |    2 +
 app/tools/gimppainttool.c                  |    4 +
 app/tools/gimptexttool-editor.c            |    9 +--
 app/widgets/gimpdevices.c                  |   83 +++++++++++++++++++++++++++
 app/widgets/gimpdevices.h                  |    4 +
 app/widgets/gimpdock.c                     |   39 ++++++++----
 app/widgets/gimpdockbook.c                 |    7 ++-
 libgimpwidgets/gimpcolornotebook.c         |    2 +
 plug-ins/Makefile.am                       |   12 ++--
 plug-ins/common/Makefile.am                |    6 +-
 plug-ins/common/filter-pack.c              |   11 ++--
 15 files changed, 233 insertions(+), 69 deletions(-)
---
diff --git a/app/display/gimpdisplayshell-grab.c b/app/display/gimpdisplayshell-grab.c
index a9dc48f..75baf8a 100644
--- a/app/display/gimpdisplayshell-grab.c
+++ b/app/display/gimpdisplayshell-grab.c
@@ -27,30 +27,63 @@
 #include "gimpdisplayshell-grab.h"
 
 
+static GdkDevice *
+get_associated_keyboard (GdkDevice *device)
+{
+  switch (gdk_device_get_device_type (device))
+    {
+    case GDK_DEVICE_TYPE_SLAVE:
+      device = gdk_device_get_associated_device (device);
+      break;
+
+    case GDK_DEVICE_TYPE_FLOATING:
+      {
+        GdkDisplay       *display = gdk_device_get_display (device);
+        GdkDeviceManager *manager = gdk_display_get_device_manager (display);
+
+        device = gdk_device_manager_get_client_pointer (manager);
+      }
+      break;
+
+    default:
+      break;
+    }
+
+  if (gdk_device_get_source (device) != GDK_SOURCE_KEYBOARD)
+    device = gdk_device_get_associated_device (device);
+
+  return device;
+}
+
 gboolean
 gimp_display_shell_pointer_grab (GimpDisplayShell *shell,
                                  GdkEvent         *event,
                                  GdkEventMask      event_mask)
 {
-  GdkGrabStatus status;
+  GdkDevice     *device;
+  GdkGrabStatus  status;
 
   g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
   g_return_val_if_fail (event != NULL, FALSE);
-  g_return_val_if_fail (shell->pointer_grabbed == FALSE, FALSE);
+  g_return_val_if_fail (shell->grab_pointer == NULL, FALSE);
+
+  device = gdk_event_get_device (event);
 
-  status = gdk_pointer_grab (gtk_widget_get_window (shell->canvas),
-                             FALSE, event_mask, NULL, NULL,
-                             gdk_event_get_time (event));
+  status = gdk_device_grab (device,
+                            gtk_widget_get_window (shell->canvas),
+                            GDK_OWNERSHIP_APPLICATION,
+                            FALSE, event_mask, NULL,
+                            gdk_event_get_time (event));
 
   if (status == GDK_GRAB_SUCCESS)
     {
-      shell->pointer_grabbed = TRUE;
+      shell->grab_pointer = device;
 
       return TRUE;
     }
 
-  g_printerr ("%s: gdk_pointer_grab failed with status %d\n",
-              G_STRFUNC, status);
+  g_printerr ("%s: gdk_device_grab(%s) failed with status %d\n",
+              G_STRFUNC, gdk_device_get_name (device), status);
 
   return FALSE;
 }
@@ -61,37 +94,42 @@ gimp_display_shell_pointer_ungrab (GimpDisplayShell *shell,
 {
   g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
   g_return_if_fail (event != NULL);
-  g_return_if_fail (shell->pointer_grabbed == TRUE);
+  g_return_if_fail (shell->grab_pointer != NULL);
 
-  gdk_display_pointer_ungrab (gtk_widget_get_display (shell->canvas),
-                              gdk_event_get_time (event));
+  gdk_device_ungrab (shell->grab_pointer,
+                     gdk_event_get_time (event));
 
-  shell->pointer_grabbed = FALSE;
+  shell->grab_pointer = NULL;
 }
 
 gboolean
 gimp_display_shell_keyboard_grab (GimpDisplayShell *shell,
                                   GdkEvent         *event)
 {
-  GdkGrabStatus status;
+  GdkDevice     *device;
+  GdkGrabStatus  status;
 
   g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
   g_return_val_if_fail (event != NULL, FALSE);
-  g_return_val_if_fail (shell->keyboard_grabbed == FALSE, FALSE);
+  g_return_val_if_fail (shell->grab_keyboard == NULL, FALSE);
+
+  device = get_associated_keyboard (gdk_event_get_device (event));
 
-  status = gdk_keyboard_grab (gtk_widget_get_window (shell->canvas),
-                              FALSE,
-                              gdk_event_get_time (event));
+  status = gdk_device_grab (device,
+                            gtk_widget_get_window (shell->canvas),
+                            GDK_OWNERSHIP_APPLICATION,
+                            FALSE, GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK,
+                            NULL, gdk_event_get_time (event));
 
   if (status == GDK_GRAB_SUCCESS)
     {
-      shell->keyboard_grabbed = TRUE;
+      shell->grab_keyboard = device;
 
       return TRUE;
     }
 
-  g_printerr ("%s: gdk_keyboard_grab failed with status %d\n",
-              G_STRFUNC, status);
+  g_printerr ("%s: gdk_device_grab(%s) failed with status %d\n",
+              G_STRFUNC, gdk_device_get_name (device), status);
 
   return FALSE;
 }
@@ -102,10 +140,10 @@ gimp_display_shell_keyboard_ungrab (GimpDisplayShell *shell,
 {
   g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
   g_return_if_fail (event != NULL);
-  g_return_if_fail (shell->keyboard_grabbed == TRUE);
+  g_return_if_fail (shell->grab_keyboard != NULL);
 
-  gdk_display_keyboard_ungrab (gtk_widget_get_display (shell->canvas),
-                               gdk_event_get_time (event));
+  gdk_device_ungrab (shell->grab_keyboard,
+                     gdk_event_get_time (event));
 
-  shell->keyboard_grabbed = FALSE;
+  shell->grab_keyboard = NULL;
 }
diff --git a/app/display/gimpdisplayshell-tool-events.c b/app/display/gimpdisplayshell-tool-events.c
index 01e2769..2677802 100644
--- a/app/display/gimpdisplayshell-tool-events.c
+++ b/app/display/gimpdisplayshell-tool-events.c
@@ -443,6 +443,10 @@ gimp_display_shell_canvas_tool_events (GtkWidget        *canvas,
         GdkEventMask    event_mask;
         GimpTool       *active_tool;
 
+        /*  if we already got a grab from another pointer, bail out  */
+        if (shell->grab_pointer)
+          return TRUE;
+
         /*  focus the widget if it isn't; if the toplevel window
          *  already has focus, this will generate a FOCUS_IN on the
          *  canvas immediately, therefore we do this before logging
@@ -700,6 +704,9 @@ gimp_display_shell_canvas_tool_events (GtkWidget        *canvas,
           case 1:
             state &= ~GDK_BUTTON1_MASK;
 
+            if (gdk_event_get_device (event) != shell->grab_pointer)
+              return TRUE;
+
             if (! shell->space_pressed && ! shell->space_release_pending)
               gimp_display_shell_keyboard_ungrab (shell, event);
 
diff --git a/app/display/gimpdisplayshell.c b/app/display/gimpdisplayshell.c
index 4118deb..f1d73a0 100644
--- a/app/display/gimpdisplayshell.c
+++ b/app/display/gimpdisplayshell.c
@@ -172,14 +172,6 @@ G_DEFINE_TYPE_WITH_CODE (GimpDisplayShell, gimp_display_shell,
 static guint display_shell_signals[LAST_SIGNAL] = { 0 };
 
 
-static const gchar display_rc_style[] =
-  "style \"check-button-style\"\n"
-  "{\n"
-  "  GtkToggleButton::child-displacement-x = 0\n"
-  "  GtkToggleButton::child-displacement-y = 0\n"
-  "}\n"
-  "widget \"*\" style \"check-button-style\"";
-
 static void
 gimp_display_shell_class_init (GimpDisplayShellClass *klass)
 {
@@ -261,8 +253,6 @@ gimp_display_shell_class_init (GimpDisplayShellClass *klass)
                                    g_param_spec_object ("icon", NULL, NULL,
                                                         GDK_TYPE_PIXBUF,
                                                         GIMP_PARAM_READWRITE));
-
-  gtk_rc_parse_string (display_rc_style);
 }
 
 static void
@@ -274,9 +264,25 @@ gimp_color_managed_iface_init (GimpColorManagedInterface *iface)
 static void
 gimp_display_shell_init (GimpDisplayShell *shell)
 {
+  GtkCssProvider *css;
+  const gchar    *str;
+
   gtk_orientable_set_orientation (GTK_ORIENTABLE (shell),
                                   GTK_ORIENTATION_VERTICAL);
 
+  str =
+    "GimpDisplayShell GtkCheckButton {\n"
+    "    -GtkButton-child-displacement-x: 0;\n"
+    "    -GtkButton-child-displacement-y: 0;\n"
+    "}\n";
+
+  css = gtk_css_provider_new ();
+  gtk_css_provider_load_from_data (css, str, -1, NULL);
+  gtk_style_context_add_provider (gtk_widget_get_style_context (GTK_WIDGET (shell)),
+                                  GTK_STYLE_PROVIDER (css),
+                                  GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
+  g_object_unref (css);
+
   shell->options            = g_object_new (GIMP_TYPE_DISPLAY_OPTIONS, NULL);
   shell->fullscreen_options = g_object_new (GIMP_TYPE_DISPLAY_OPTIONS_FULLSCREEN, NULL);
   shell->no_image_options   = g_object_new (GIMP_TYPE_DISPLAY_OPTIONS_NO_IMAGE, NULL);
diff --git a/app/display/gimpdisplayshell.h b/app/display/gimpdisplayshell.h
index 1f89087..70a86a2 100644
--- a/app/display/gimpdisplayshell.h
+++ b/app/display/gimpdisplayshell.h
@@ -184,8 +184,8 @@ struct _GimpDisplayShell
   gboolean           size_allocate_from_configure_event;
 
   /*  the state of gimp_display_shell_tool_events()  */
-  gboolean           pointer_grabbed;
-  gboolean           keyboard_grabbed;
+  GdkDevice         *grab_pointer;
+  GdkDevice         *grab_keyboard;
 
   gboolean           space_pressed;
   gboolean           space_release_pending;
diff --git a/app/display/gimpstatusbar.c b/app/display/gimpstatusbar.c
index 97f6169..2c9cc37 100644
--- a/app/display/gimpstatusbar.c
+++ b/app/display/gimpstatusbar.c
@@ -231,8 +231,10 @@ gimp_statusbar_init (GimpStatusbar *statusbar)
                           statusbar);
 
   statusbar->progressbar = g_object_new (GTK_TYPE_PROGRESS_BAR,
+#if 0
                                          "text-xalign", 0.0,
                                          "text-yalign", 0.5,
+#endif
                                          "ellipsize",   PANGO_ELLIPSIZE_END,
                                          NULL);
   gtk_box_pack_start (GTK_BOX (hbox), statusbar->progressbar, TRUE, TRUE, 0);
diff --git a/app/tools/gimppainttool.c b/app/tools/gimppainttool.c
index 2ac7fd1..dde9cdf 100644
--- a/app/tools/gimppainttool.c
+++ b/app/tools/gimppainttool.c
@@ -473,6 +473,8 @@ gimp_paint_tool_modifier_key (GimpTool        *tool,
               if (gimp_draw_tool_is_active (draw_tool))
                 gimp_draw_tool_stop (draw_tool);
 
+              g_printerr ("%s: enabling color tool\n", G_STRFUNC);
+
               gimp_color_tool_enable (GIMP_COLOR_TOOL (tool),
                                       GIMP_COLOR_OPTIONS (info->tool_options));
 
@@ -499,6 +501,8 @@ gimp_paint_tool_modifier_key (GimpTool        *tool,
         {
           if (gimp_color_tool_is_enabled (GIMP_COLOR_TOOL (tool)))
             {
+              g_printerr ("%s: disabling color tool\n", G_STRFUNC);
+
               gimp_tool_pop_status (tool, display);
               gimp_color_tool_disable (GIMP_COLOR_TOOL (tool));
             }
diff --git a/app/tools/gimptexttool-editor.c b/app/tools/gimptexttool-editor.c
index b81a525..e776691 100644
--- a/app/tools/gimptexttool-editor.c
+++ b/app/tools/gimptexttool-editor.c
@@ -1260,7 +1260,6 @@ gimp_text_tool_im_preedit_start (GtkIMContext *context,
 {
   GimpTool         *tool  = GIMP_TOOL (text_tool);
   GimpDisplayShell *shell = gimp_display_get_shell (tool->display);
-  GtkStyle         *style = gtk_widget_get_style (shell->canvas);
   GtkWidget        *frame;
   GtkWidget        *ebox;
   PangoRectangle    cursor_rect = { 0, };
@@ -1291,14 +1290,14 @@ gimp_text_tool_im_preedit_start (GtkIMContext *context,
   gtk_widget_show (frame);
 
   ebox = gtk_event_box_new ();
-  gtk_widget_modify_bg (ebox, GTK_STATE_NORMAL,
-                        &style->base[GTK_STATE_NORMAL]);
+  gtk_style_context_add_class (gtk_widget_get_style_context (ebox),
+                               GTK_STYLE_CLASS_ENTRY);
   gtk_container_add (GTK_CONTAINER (frame), ebox);
   gtk_widget_show (ebox);
 
   text_tool->preedit_label = gtk_label_new (NULL);
-  gtk_widget_modify_bg (text_tool->preedit_label, GTK_STATE_NORMAL,
-                        &style->text[GTK_STATE_NORMAL]);
+  gtk_style_context_add_class (gtk_widget_get_style_context (text_tool->preedit_label),
+                               GTK_STYLE_CLASS_ENTRY);
   gtk_misc_set_padding (GTK_MISC (text_tool->preedit_label), 2, 2);
   gtk_container_add (GTK_CONTAINER (ebox), text_tool->preedit_label);
   gtk_widget_show (text_tool->preedit_label);
diff --git a/app/widgets/gimpdevices.c b/app/widgets/gimpdevices.c
index c0fff83..ffe8ee2 100644
--- a/app/widgets/gimpdevices.c
+++ b/app/widgets/gimpdevices.c
@@ -313,6 +313,81 @@ gimp_devices_get_current (Gimp *gimp)
   return manager->current_device;
 }
 
+GdkDevice *
+gimp_devices_get_from_event (Gimp       *gimp,
+                             GdkEvent   *event,
+                             GdkDevice **grab_device)
+{
+  GdkDevice *device;
+
+  g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
+  g_return_val_if_fail (event != NULL, NULL);
+
+  device = gdk_event_get_source_device (event);
+
+  /*  initialize the default grab device to the event's source device,
+   *  rather than doing that explicitly in almost all cases below
+   */
+  if (grab_device)
+    *grab_device = device;
+
+  if (gdk_device_get_source (device) == GDK_SOURCE_KEYBOARD)
+    {
+      switch (gdk_device_get_device_type (device))
+        {
+        case GDK_DEVICE_TYPE_MASTER:
+          /*  this cannot happen at all  */
+          g_return_val_if_reached (device);
+
+        case GDK_DEVICE_TYPE_SLAVE:
+          /*  it makes no sense for us to distinguigh between
+           *  different slave keyboards, so just always treat all
+           */
+
+        case GDK_DEVICE_TYPE_FLOATING:
+          /*  we have no way of explicitly enabling floating
+           *  keyboards, so we cannot get their events
+           */
+          g_return_val_if_reached (device);
+       }
+    }
+  else
+    {
+      switch (gdk_device_get_device_type (device))
+        {
+        case GDK_DEVICE_TYPE_MASTER:
+          /*  this can only happen for synthesized events which have
+           *  no actual source, we have no choice but returning the
+           *  master device
+           */
+          return device;
+
+        case GDK_DEVICE_TYPE_SLAVE:
+          /*  this is the tricky part: we do want to distingiugh slave
+           *  devices, but only if we actually enabled them ourselves
+           *  explicitely (like the pens of a tablet); however we
+           *  usually don't enable the different incarnations of the
+           *  mouse itself (like touchpad, trackpoint, usb mouse
+           *  etc.), so for these return their respective master so
+           *  its settings are used
+           */
+          {
+            GimpDeviceInfo *device_info;
+
+            device_info = gimp_device_info_get_by_device (device);
+          }
+
+        case GDK_DEVICE_TYPE_FLOATING:
+          /*  we only get events for floating devices which have
+           *  enabled ourselves, so return the floating device
+           */
+          return device;
+        }
+    }
+
+  g_return_val_if_reached (device);
+}
+
 void
 gimp_devices_add_widget (Gimp      *gimp,
                          GtkWidget *widget)
@@ -564,6 +639,14 @@ gimp_devices_select_device (GimpDeviceManager *manager,
                                 GIMP_DEVICE_INFO_CONTEXT_MASK);
   gimp_context_set_parent (GIMP_CONTEXT (info), user_context);
 
+  g_printerr ("%s: current device: %s\n", G_STRFUNC,
+              gimp_object_get_name (info));
+
+#if 0
+  if (! strcmp ("Virtual core pointer", gimp_object_get_name (info)))
+    G_BREAKPOINT ();
+#endif
+
   if (manager->change_notify)
     manager->change_notify (manager->gimp);
 }
diff --git a/app/widgets/gimpdevices.h b/app/widgets/gimpdevices.h
index b07b8c6..7310da4 100644
--- a/app/widgets/gimpdevices.h
+++ b/app/widgets/gimpdevices.h
@@ -36,6 +36,10 @@ gboolean         gimp_devices_clear          (Gimp                   *gimp,
 GimpContainer  * gimp_devices_get_list       (Gimp                   *gimp);
 GimpDeviceInfo * gimp_devices_get_current    (Gimp                   *gimp);
 
+GdkDevice      * gimp_devices_get_from_event (Gimp                   *gimp,
+                                              GdkEvent               *event,
+                                              GdkDevice             **grab_device);
+
 void             gimp_devices_add_widget     (Gimp                   *gimp,
                                               GtkWidget              *widget);
 
diff --git a/app/widgets/gimpdock.c b/app/widgets/gimpdock.c
index 0aebc13..ee76251 100644
--- a/app/widgets/gimpdock.c
+++ b/app/widgets/gimpdock.c
@@ -67,6 +67,7 @@ struct _GimpDockPrivate
   GList             *dockbooks;
 
   gint               ID;
+  GtkCssProvider    *css_provider;
 };
 
 
@@ -172,7 +173,7 @@ gimp_dock_init (GimpDock *dock)
   dock->p = G_TYPE_INSTANCE_GET_PRIVATE (dock,
                                          GIMP_TYPE_DOCK,
                                          GimpDockPrivate);
-  dock->p->ID             = dock_ID++;
+  dock->p->ID = dock_ID++;
 
   name = g_strdup_printf ("gimp-internal-dock-%d", dock->p->ID);
   gtk_widget_set_name (GTK_WIDGET (dock), name);
@@ -203,6 +204,12 @@ gimp_dock_dispose (GObject *object)
   while (dock->p->dockbooks)
     gimp_dock_remove_book (dock, GIMP_DOCKBOOK (dock->p->dockbooks->data));
 
+  if (dock->p->css_provider)
+    {
+      g_object_unref (dock->p->css_provider);
+      dock->p->css_provider = NULL;
+    }
+
   G_OBJECT_CLASS (parent_class)->dispose (object);
 }
 
@@ -224,7 +231,7 @@ gimp_dock_style_updated (GtkWidget *widget)
       PangoFontDescription *font_desc;
       gint                  font_size;
       gchar                *font_str;
-      gchar                *rc_string;
+      gchar                *css_string;
 
       context = gtk_widget_get_pango_context (widget);
       font_desc = pango_context_get_font_description (context);
@@ -237,20 +244,26 @@ gimp_dock_style_updated (GtkWidget *widget)
       font_str = pango_font_description_to_string (font_desc);
       pango_font_description_free (font_desc);
 
-      rc_string =
-        g_strdup_printf ("style \"gimp-dock-style\""
-                         "{"
-                         "  font_name = \"%s\""
-                         "}"
-                         "widget \"*.gimp-internal-dock-%d.*\" style \"gimp-dock-style\"",
-                         font_str,
-                         dock->p->ID);
+      css_string = g_strdup_printf ("#gimp-internal-dock-%d {\n"
+                                    "  font: %s;\n"
+                                    "}",
+                                    dock->p->ID,
+                                    font_str);
       g_free (font_str);
 
-      gtk_rc_parse_string (rc_string);
-      g_free (rc_string);
+      if (! dock->p->css_provider)
+        {
+          dock->p->css_provider = gtk_css_provider_new ();
+          gtk_style_context_add_provider (gtk_widget_get_style_context (widget),
+                                          GTK_STYLE_PROVIDER (dock->p->css_provider),
+                                          GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
+        }
+
+      gtk_css_provider_load_from_data (dock->p->css_provider,
+                                       css_string, -1, NULL);
+      g_free (css_string);
 
-      gtk_widget_reset_rc_styles (widget);
+      gtk_widget_reset_style (widget);
     }
 }
 
diff --git a/app/widgets/gimpdockbook.c b/app/widgets/gimpdockbook.c
index 8f1c397..737e6ae 100644
--- a/app/widgets/gimpdockbook.c
+++ b/app/widgets/gimpdockbook.c
@@ -22,6 +22,7 @@
 
 #include <string.h>
 
+#undef GTK_DISABLE_DEPRECATED
 #include <gtk/gtk.h>
 
 #include "libgimpwidgets/gimpwidgets.h"
@@ -366,9 +367,11 @@ gimp_dockbook_style_set (GtkWidget *widget,
                         "tab-border", &tab_border,
                         NULL);
 
+#if 0
   g_object_set (widget,
                 "tab-border", tab_border,
                 NULL);
+#endif
 
   gimp_dockbook_recreate_tab_widgets (GIMP_DOCKBOOK (widget),
                                       FALSE /*only_auto*/);
@@ -780,7 +783,7 @@ gimp_dockbook_update_automatic_tab_style (GimpDockbook *dockbook)
   GimpTabStyle  tab_style           = 0;
   int           i                   = 0;
   gint          available_space     = 0;
-  guint         tab_hborder         = 0;
+  guint         tab_hborder         = 2;
   gint          xthickness          = 0;
   gint          tab_curvature       = 0;
   gint          focus_width         = 0;
@@ -790,9 +793,11 @@ gimp_dockbook_update_automatic_tab_style (GimpDockbook *dockbook)
   gint          action_widget_size  = 0;
 
   xthickness = gtk_widget_get_style (widget)->xthickness;
+#if 0
   g_object_get (widget,
                 "tab-hborder", &tab_hborder,
                 NULL);
+#endif
   gtk_widget_style_get (widget,
                         "tab-curvature",    &tab_curvature,
                         "focus-line-width", &focus_width,
diff --git a/libgimpwidgets/gimpcolornotebook.c b/libgimpwidgets/gimpcolornotebook.c
index 5c31fd2..370035a 100644
--- a/libgimpwidgets/gimpcolornotebook.c
+++ b/libgimpwidgets/gimpcolornotebook.c
@@ -219,9 +219,11 @@ gimp_color_notebook_style_updated (GtkWidget *widget)
                         "tab-icon_size", &icon_size,
                         NULL);
 
+#if 0
   g_object_set (private->notebook,
                 "tab-border", tab_border,
                 NULL);
+#endif
 
   for (list = private->selectors; list; list = g_list_next (list))
     {
diff --git a/plug-ins/Makefile.am b/plug-ins/Makefile.am
index 9f256ca..d29a0f7 100644
--- a/plug-ins/Makefile.am
+++ b/plug-ins/Makefile.am
@@ -54,7 +54,7 @@ endif
 
 SUBDIRS = \
 	$(script_fu)		\
-	$(pygimp)		\
+##	$(pygimp)		\
 	color-rotate		\
 	file-bmp		\
 	file-faxg3		\
@@ -68,13 +68,13 @@ SUBDIRS = \
 	$(file_xjt)		\
 	flame			\
 	fractal-explorer	\
-	gfig			\
-	gimpressionist		\
+##	gfig			\
+##	gimpressionist		\
 	gradient-flare		\
 	help			\
-	$(help_browser)		\
-	ifs-compose		\
-	imagemap		\
+##	$(help_browser)		\
+##	ifs-compose		\
+##	imagemap		\
 	lighting		\
 	map-object		\
 	maze			\
diff --git a/plug-ins/common/Makefile.am b/plug-ins/common/Makefile.am
index bb8d0d2..1ea3f08 100644
--- a/plug-ins/common/Makefile.am
+++ b/plug-ins/common/Makefile.am
@@ -46,7 +46,7 @@ libexec_PROGRAMS = \
 	alien-map \
 	align-layers \
 	animation-optimize \
-	animation-play \
+##	animation-play \
 	antialias \
 	apply-canvas \
 	blinds \
@@ -75,7 +75,7 @@ libexec_PROGRAMS = \
 	crop-auto \
 	crop-zealous \
 	cubism \
-	curve-bend \
+##	curve-bend \
 	decompose \
 	deinterlace \
 	depth-merge \
@@ -162,7 +162,7 @@ libexec_PROGRAMS = \
 	ripple \
 	rotate \
 	sample-colorize \
-	$(SCREENSHOT) \
+##	$(SCREENSHOT) \
 	semi-flatten \
 	sharpen \
 	shift \
diff --git a/plug-ins/common/filter-pack.c b/plug-ins/common/filter-pack.c
index 8532a25..869eb42 100644
--- a/plug-ins/common/filter-pack.c
+++ b/plug-ins/common/filter-pack.c
@@ -1439,11 +1439,12 @@ fp_advanced_dialog (GtkWidget *parent)
 }
 
 static void
-slider_erase (GdkWindow *window,
+slider_erase (GtkWidget *widget,
               int        xpos)
 {
-  gdk_window_clear_area (window, MARGIN + xpos - (RANGE_HEIGHT - 1) / 2, 0,
-                         RANGE_HEIGHT, RANGE_HEIGHT);
+  gtk_widget_queue_draw_area (widget,
+                              MARGIN + xpos - (RANGE_HEIGHT - 1) / 2, 0,
+                              RANGE_HEIGHT, RANGE_HEIGHT);
 }
 
 static void
@@ -1526,7 +1527,7 @@ fp_range_change_events (GtkWidget *widget,
           else
             new = &fpvals.offset;
 
-          slider_erase (gtk_widget_get_window (AW.aliasing_graph), *new);
+          slider_erase (AW.aliasing_graph, *new);
           *new = bevent->x;
         }
 
@@ -1547,7 +1548,7 @@ fp_range_change_events (GtkWidget *widget,
 
       if (x >= 0 && x < 256)
         {
-          slider_erase (gtk_widget_get_window (AW.aliasing_graph), *new);
+          slider_erase (AW.aliasing_graph, *new);
           *new = x;
           draw_it (NULL);
           fp_range_preview_spill (AW.range_preview, fpvals.value_by);



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