rpms/metacity/F-12 fresh-tooltips.patch, 1.2, 1.3 metacity.spec, 1.207, 1.208

Matthias Clasen mclasen at fedoraproject.org
Wed Oct 28 19:40:02 UTC 2009


Author: mclasen

Update of /cvs/pkgs/rpms/metacity/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv25823

Modified Files:
	fresh-tooltips.patch metacity.spec 
Log Message:
even sharper


fresh-tooltips.patch:
 fixedtip.c |  260 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 243 insertions(+), 17 deletions(-)

Index: fresh-tooltips.patch
===================================================================
RCS file: /cvs/pkgs/rpms/metacity/F-12/fresh-tooltips.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- fresh-tooltips.patch	28 Oct 2009 16:39:33 -0000	1.2
+++ fresh-tooltips.patch	28 Oct 2009 19:40:01 -0000	1.3
@@ -1,7 +1,7 @@
 diff -up metacity-2.28.0/src/ui/fixedtip.c.fresh-tooltips metacity-2.28.0/src/ui/fixedtip.c
---- metacity-2.28.0/src/ui/fixedtip.c.fresh-tooltips	2009-10-28 12:23:19.134105834 -0400
-+++ metacity-2.28.0/src/ui/fixedtip.c	2009-10-28 12:30:04.565110123 -0400
-@@ -50,33 +50,195 @@ static int screen_right_edge = 0;
+--- metacity-2.28.0/src/ui/fixedtip.c.fresh-tooltips	2009-10-28 12:32:09.098105658 -0400
++++ metacity-2.28.0/src/ui/fixedtip.c	2009-10-28 15:33:52.419756065 -0400
+@@ -50,33 +50,237 @@ static int screen_right_edge = 0;
   */
  static int screen_bottom_edge = 0;
  
@@ -103,6 +103,15 @@ diff -up metacity-2.28.0/src/ui/fixedtip
 +  cairo_t *cr;
 +  gint width, height;
 +  gint radius;
++  gboolean new_style;
++
++  gtk_widget_style_get (window, "new-tooltip-style", &new_style, NULL);
++
++  if (!new_style)
++    {
++      gtk_widget_shape_combine_mask (window, NULL, 0, 0);
++      return;
++    }
 +
 +  gtk_window_get_size (GTK_WINDOW (window), &width, &height);
 +
@@ -146,25 +155,44 @@ diff -up metacity-2.28.0/src/ui/fixedtip
 +  cairo_t         *context;
 +  cairo_surface_t *surface;
 +  cairo_t         *cr;
++  gboolean new_style;
 +
-+  context = gdk_cairo_create (window->window);
++  gtk_widget_style_get (window, "new-tooltip-style", &new_style, NULL);
 +
-+  cairo_set_operator (context, CAIRO_OPERATOR_SOURCE);
-+  surface = cairo_surface_create_similar (cairo_get_target (context),
-+                                          CAIRO_CONTENT_COLOR_ALPHA,
-+                                          window->allocation.width,
-+                                          window->allocation.height);
-+  cr = cairo_create (surface);
-+
-+  fill_background (window, cr);
++  if (new_style)
++    {
++      context = gdk_cairo_create (window->window);
 +
-+  cairo_destroy (cr);
-+  cairo_set_source_surface (context, surface, 0, 0);
-+  cairo_paint (context);
-+  cairo_surface_destroy (surface);
-+  cairo_destroy (context);
++      cairo_set_operator (context, CAIRO_OPERATOR_SOURCE);
++      surface = cairo_surface_create_similar (cairo_get_target (context),
++                                              CAIRO_CONTENT_COLOR_ALPHA,
++                                              window->allocation.width,
++                                              window->allocation.height);
++      cr = cairo_create (surface);
++
++      fill_background (window, cr);
++
++      cairo_destroy (cr);
++      cairo_set_source_surface (context, surface, 0, 0);
++      cairo_paint (context);
++      cairo_surface_destroy (surface);
++      cairo_destroy (context);
 +
-+  update_shape (window);
++      update_shape (window);
++    }
++  else
++    {
++      gtk_paint_flat_box (window->style,
++                          window->window,
++                          GTK_STATE_NORMAL,
++                          GTK_SHADOW_OUT,
++                          NULL,
++                          window,
++                          "tooltip",
++                          0, 0,
++                          window->allocation.width,
++                          window->allocation.height);
++    }
  
    return FALSE;
  }
@@ -183,6 +211,20 @@ diff -up metacity-2.28.0/src/ui/fixedtip
 +}
 +#endif
 +
++static void
++on_style_set (GtkWidget *widget, GtkStyle *prev)
++{
++  GtkWidget *alignment;
++
++  alignment = gtk_bin_get_child (GTK_BIN (widget));
++  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment),
++                             widget->style->ythickness,
++                             widget->style->ythickness,
++                             widget->style->xthickness,
++                             widget->style->xthickness);
++  gtk_widget_queue_draw (widget);
++}
++
  void
  meta_fixed_tip_show (Display *xdisplay, int screen_number,
                       int root_x, int root_y,
@@ -206,7 +248,7 @@ diff -up metacity-2.28.0/src/ui/fixedtip
  
          gdk_screen = gdk_display_get_screen (gdk_display_get_default (),
                                               screen_number);
-@@ -86,22 +248,41 @@ meta_fixed_tip_show (Display *xdisplay, 
+@@ -86,25 +290,47 @@ meta_fixed_tip_show (Display *xdisplay, 
  	gdk_screen_get_monitor_geometry (gdk_screen, mon_num, &monitor);
  	screen_right_edge = monitor.x + monitor.width;
  	screen_bottom_edge = monitor.y + monitor.height;
@@ -256,3 +298,9 @@ diff -up metacity-2.28.0/src/ui/fixedtip
  
        g_signal_connect (tip, "destroy",
  			G_CALLBACK (gtk_widget_destroyed), &tip);
++
++      g_signal_connect_swapped (tip, "style-set",
++                                G_CALLBACK (on_style_set), NULL);
+     }
+ 
+   gtk_label_set_markup (GTK_LABEL (label), markup_text);


Index: metacity.spec
===================================================================
RCS file: /cvs/pkgs/rpms/metacity/F-12/metacity.spec,v
retrieving revision 1.207
retrieving revision 1.208
diff -u -p -r1.207 -r1.208
--- metacity.spec	28 Oct 2009 16:39:33 -0000	1.207
+++ metacity.spec	28 Oct 2009 19:40:01 -0000	1.208
@@ -1,7 +1,7 @@
 Summary: Unobtrusive window manager
 Name: metacity
 Version: 2.28.0
-Release: 5%{?dist}
+Release: 6%{?dist}
 URL: http://download.gnome.org/sources/metacity/
 Source0: http://download.gnome.org/sources/metacity/2.28/metacity-%{version}.tar.bz2
 # http://bugzilla.gnome.org/show_bug.cgi?id=558723
@@ -194,7 +194,7 @@ fi
 %{_mandir}/man1/metacity-window-demo.1.gz
 
 %changelog
-* Wed Oct 28 2009 Matthias Clasen <mclasen at redhat.cm> - 2.28.0-5
+* Wed Oct 28 2009 Matthias Clasen <mclasen at redhat.cm> - 2.28.0-6
 - Make tooltips look sharper
 
 * Wed Oct 21 2009 Matthias Clasen <mclasen at redhat.cm> - 2.28.0-4




More information about the fedora-extras-commits mailing list