project: Adapt to GtkBox API changes

GtkBox provides a different API surface, such as gtk_box_append()
and gtk_box_prepend(), so switch to that.
This commit is contained in:
Georges Basile Stavracas Neto 2022-07-08 15:21:00 -03:00
parent 2d9b408a32
commit 631df4f1a5
4 changed files with 7 additions and 17 deletions

View File

@ -335,7 +335,7 @@ mct_carousel_add (GtkContainer *container,
}
gtk_widget_show_all (widget);
gtk_box_pack_start (GTK_BOX (self->last_box), widget, TRUE, FALSE, 10);
gtk_box_append (GTK_BOX (self->last_box), widget);
update_buttons_visibility (self);
}

View File

@ -49,13 +49,12 @@
</child>
<signal name="clicked" handler="mct_carousel_goto_previous_page" object="MctCarousel" swapped="no"/>
</object>
<packing>
<property name="pack_type">GTK_PACK_START</property>
</packing>
</child>
<child>
<object class="GtkButton" id="go_next_button">
<property name="valign">center</property>
<property name="halign">end</property>
<property name="hexpand">True</property>
<style>
<class name="circular"/>
</style>
@ -70,9 +69,6 @@
</child>
<signal name="clicked" handler="mct_carousel_goto_next_page" object="MctCarousel" swapped="no"/>
</object>
<packing>
<property name="pack_type">GTK_PACK_END</property>
</packing>
</child>
</object>
</child>

View File

@ -42,10 +42,6 @@
<relation name="controls">user_controls</relation>
</accessibility>
</object>
<packing>
<property name="fill">False</property>
<property name="expand">False</property>
</packing>
</child>
<child>
<object class="MctUserControls" id="user_controls">
@ -53,10 +49,8 @@
<property name="description">Its recommended that restrictions are set as part of an ongoing conversation with $name. Read guidance on what to consider.</property>
<property name="height-request">270</property>
<property name="dbus-connection">dbus_connection</property>
<property name="vexpand">True</property>
</object>
<packing>
<property name="expand">True</property>
</packing>
</child>
</object>
<packing>

View File

@ -411,7 +411,7 @@ create_carousel_entry (MctUserSelector *self,
widget = mct_user_image_new ();
mct_user_image_set_user (MCT_USER_IMAGE (widget), user);
gtk_box_pack_start (GTK_BOX (box), widget, FALSE, FALSE, 0);
gtk_box_append (GTK_BOX (box), widget);
label = g_strdup_printf ("<b>%s</b>",
get_real_or_user_name (user));
@ -419,7 +419,7 @@ create_carousel_entry (MctUserSelector *self,
gtk_label_set_use_markup (GTK_LABEL (widget), TRUE);
gtk_label_set_ellipsize (GTK_LABEL (widget), PANGO_ELLIPSIZE_END);
gtk_widget_set_margin_top (widget, 5);
gtk_box_pack_start (GTK_BOX (box), widget, FALSE, FALSE, 0);
gtk_box_append (GTK_BOX (box), widget);
g_free (label);
if (act_user_get_uid (user) == getuid ())
@ -431,7 +431,7 @@ create_carousel_entry (MctUserSelector *self,
gtk_label_set_use_markup (GTK_LABEL (widget), TRUE);
g_free (label);
gtk_box_pack_start (GTK_BOX (box), widget, FALSE, FALSE, 0);
gtk_box_append (GTK_BOX (box), widget);
gtk_style_context_add_class (gtk_widget_get_style_context (widget),
"dim-label");