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



commit ab2313684578a8da2227d0f79969c55f2182bd10
Author: Michael Natterer <mitch gimp org>
Date:   Fri Mar 18 23:00:22 2011 +0100

    foo

 app/display/gimpdisplayshell.c     |   26 ++++++++++++++---------
 app/display/gimpstatusbar.c        |    2 +
 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 ++--
 7 files changed, 61 insertions(+), 33 deletions(-)
---
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/gimpstatusbar.c b/app/display/gimpstatusbar.c
index 6b42263..700bce9 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/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 \



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