From c0bddf1331ada3bb817811ae4b92b2d95299fee2 Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Fri, 24 Jul 2020 00:40:20 +0200 Subject: Some refactoring to avoid warnings --- src/idobasicmenuitem.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'src/idobasicmenuitem.c') diff --git a/src/idobasicmenuitem.c b/src/idobasicmenuitem.c index cf57e7c..ab3ce87 100644 --- a/src/idobasicmenuitem.c +++ b/src/idobasicmenuitem.c @@ -4,16 +4,16 @@ * Authors: * Charles Kerr * - * This program is free software: you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 3, as published + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranties of - * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranties of + * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along + * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ @@ -230,11 +230,14 @@ ido_basic_menu_item_init (IdoBasicMenuItem *self) IdoBasicMenuItemPrivate *p = ido_basic_menu_item_get_instance_private(self); p->image = gtk_image_new (); - gtk_misc_set_alignment(GTK_MISC(p->image), 0.0, 0.0); + gtk_widget_set_halign(p->image, GTK_ALIGN_START); + gtk_widget_set_valign(p->image, GTK_ALIGN_START); p->label = gtk_label_new (""); - gtk_misc_set_alignment (GTK_MISC(p->label), 0.0, 0.5); + gtk_widget_set_halign(p->label, GTK_ALIGN_START); + gtk_widget_set_valign(p->label, GTK_ALIGN_CENTER); p->secondary_label = gtk_label_new (""); - gtk_misc_set_alignment (GTK_MISC(p->secondary_label), 1.0, 0.5); + gtk_widget_set_halign(p->secondary_label, GTK_ALIGN_END); + gtk_widget_set_valign(p->secondary_label, GTK_ALIGN_CENTER); w = gtk_grid_new (); grid = GTK_GRID (w); -- cgit v1.2.3