[Xfce4-commits] [panel-plugins/xfce4-places-plugin] 14/30: Replace deprecated GtkMisc

noreply at xfce.org noreply at xfce.org
Mon Apr 22 12:08:05 CEST 2019


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

b   l   u   e   s   a   b   r   e       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-places-plugin.

commit b46dd74e79c7982814ae072f3209bbe064c67e11
Author: Sean Davis <smd.seandavis at gmail.com>
Date:   Sat Apr 20 11:16:12 2019 -0400

    Replace deprecated GtkMisc
---
 panel-plugin/button.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/panel-plugin/button.c b/panel-plugin/button.c
index 8ae36cd..6a8e3f4 100644
--- a/panel-plugin/button.c
+++ b/panel-plugin/button.c
@@ -346,7 +346,8 @@ places_button_resize_image(PlacesButton *self, gint new_size)
     else
             gtk_image_set_from_pixbuf(GTK_IMAGE(self->image), icon);
 
-    gtk_misc_set_alignment (GTK_MISC (self->image), 0.5, 0.5);
+    gtk_widget_set_halign (GTK_WIDGET (self->image), GTK_ALIGN_CENTER);
+    gtk_widget_set_valign (GTK_WIDGET (self->image), GTK_ALIGN_CENTER);
     gtk_widget_show(self->image);
     g_object_unref(G_OBJECT(icon));
 }
@@ -393,12 +394,14 @@ places_button_resize_label(PlacesButton *self,
     if (vertical)
       {
         gtk_label_set_angle (GTK_LABEL (self->label), -90);
-        gtk_misc_set_alignment (GTK_MISC (self->label), 0.5, 0.0);
+        gtk_widget_set_halign (GTK_WIDGET (self->image), GTK_ALIGN_CENTER);
+        gtk_widget_set_valign (GTK_WIDGET (self->image), GTK_ALIGN_START);
       }
     else
       {
         gtk_label_set_angle (GTK_LABEL (self->label), 0);
-        gtk_misc_set_alignment (GTK_MISC (self->label), 0.0, 0.5);
+        gtk_widget_set_halign (GTK_WIDGET (self->image), GTK_ALIGN_START);
+        gtk_widget_set_valign (GTK_WIDGET (self->image), GTK_ALIGN_CENTER);
       }
     gtk_widget_show(self->label);
 }

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


More information about the Xfce4-commits mailing list