[GTK+3] fix deprecated usage of GtkMisc and don't set padding
default value of "margin" property is zero anywaymaster-1.22
parent
4ef8ebf3a3
commit
bc0ff5afa5
|
@ -117,7 +117,12 @@ terminal_info_bar_format_text (TerminalInfoBar *bar,
|
||||||
|
|
||||||
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
|
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
|
||||||
gtk_label_set_selectable (GTK_LABEL (label), TRUE);
|
gtk_label_set_selectable (GTK_LABEL (label), TRUE);
|
||||||
|
#if GTK_CHECK_VERSION (3, 0, 0)
|
||||||
|
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
|
||||||
|
gtk_label_set_yalign (GTK_LABEL (label), 0.0);
|
||||||
|
#else
|
||||||
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.0);
|
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.0);
|
||||||
|
#endif
|
||||||
|
|
||||||
gtk_box_pack_start (GTK_BOX (priv->content_box), label, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (priv->content_box), label, FALSE, FALSE, 0);
|
||||||
gtk_widget_show_all (priv->content_box);
|
gtk_widget_show_all (priv->content_box);
|
||||||
|
|
|
@ -136,8 +136,14 @@ terminal_tab_label_constructor (GType type,
|
||||||
gtk_box_set_spacing (GTK_BOX (hbox), SPACING);
|
gtk_box_set_spacing (GTK_BOX (hbox), SPACING);
|
||||||
|
|
||||||
priv->label = label = gtk_label_new (NULL);
|
priv->label = label = gtk_label_new (NULL);
|
||||||
|
|
||||||
|
#if GTK_CHECK_VERSION (3, 0, 0)
|
||||||
|
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
|
||||||
|
gtk_label_set_yalign (GTK_LABEL (label), 0.5);
|
||||||
|
#else
|
||||||
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
||||||
gtk_misc_set_padding (GTK_MISC (label), 0, 0);
|
gtk_misc_set_padding (GTK_MISC (label), 0, 0);
|
||||||
|
#endif
|
||||||
gtk_label_set_ellipsize (GTK_LABEL (label), PANGO_ELLIPSIZE_END);
|
gtk_label_set_ellipsize (GTK_LABEL (label), PANGO_ELLIPSIZE_END);
|
||||||
gtk_label_set_single_line_mode (GTK_LABEL (label), TRUE);
|
gtk_label_set_single_line_mode (GTK_LABEL (label), TRUE);
|
||||||
|
|
||||||
|
|
|
@ -3915,7 +3915,12 @@ terminal_set_title_callback (GtkAction *action,
|
||||||
gtk_box_pack_start (GTK_BOX (message_area), hbox, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (message_area), hbox, FALSE, FALSE, 0);
|
||||||
|
|
||||||
label = gtk_label_new_with_mnemonic (_("_Title:"));
|
label = gtk_label_new_with_mnemonic (_("_Title:"));
|
||||||
|
#if GTK_CHECK_VERSION (3, 0, 0)
|
||||||
|
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
|
||||||
|
gtk_label_set_yalign (GTK_LABEL (label), 0.5);
|
||||||
|
#else
|
||||||
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
||||||
|
#endif
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
|
||||||
|
|
||||||
entry = gtk_entry_new ();
|
entry = gtk_entry_new ();
|
||||||
|
|
Loading…
Reference in New Issue