[Xfce4-commits] [panel-plugins/xfce4-xkb-plugin] 01/01: Remove useless code from xkb-cairo.c

noreply at xfce.org noreply at xfce.org
Tue Jun 13 03:58:17 CEST 2017


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

n   i   n   e   t   l   s       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 panel-plugins/xfce4-xkb-plugin.

commit da94977f2ebe74de24897d3d346516a0a33cb64d
Author: Viktor Odintsev <zakhams at gmail.com>
Date:   Tue Jun 13 04:56:19 2017 +0300

    Remove useless code from xkb-cairo.c
---
 panel-plugin/xkb-cairo.c | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/panel-plugin/xkb-cairo.c b/panel-plugin/xkb-cairo.c
index 29ad324..dee4abb 100644
--- a/panel-plugin/xkb-cairo.c
+++ b/panel-plugin/xkb-cairo.c
@@ -160,15 +160,12 @@ xkb_cairo_draw_label (cairo_t *cr,
     DBG ("actual width/height: %d/%d; markers: %d",
          actual_width, actual_height, variant_markers_count);
 
-    layout = pango_cairo_create_layout (cr);
     normalized_group_name = xkb_util_normalize_group_name (group_name, FALSE);
 
     if (!normalized_group_name)
-    {
-        g_object_unref (layout);
-        g_free (normalized_group_name);
         return;
-    }
+
+    layout = pango_cairo_create_layout (cr);
 
     pango_layout_set_text (layout, normalized_group_name, -1);
 
@@ -253,15 +250,12 @@ xkb_cairo_draw_label_system (cairo_t *cr,
     DBG ("actual width/height: %d/%d; markers: %d",
          actual_width, actual_height, variant_markers_count);
 
-    layout = pango_cairo_create_layout (cr);
     normalized_group_name = xkb_util_normalize_group_name (group_name, TRUE);
 
     if (!normalized_group_name)
-    {
-        g_object_unref (layout);
-        g_free (normalized_group_name);
         return;
-    }
+
+    layout = pango_cairo_create_layout (cr);
 
     pango_layout_set_text (layout, normalized_group_name, -1);
     pango_layout_set_font_description (layout, desc);

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


More information about the Xfce4-commits mailing list