[geary/wip/778728-split-composer: 6/13] Remove set_label_xalign workaround and uses of it.
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/wip/778728-split-composer: 6/13] Remove set_label_xalign workaround and uses of it.
- Date: Wed, 11 Oct 2017 17:16:32 +0000 (UTC)
commit c37465d0df78151725f8e564ebbbdb7d0dc8c09a
Author: Michael James Gratton <mike vee net>
Date: Wed Oct 4 17:41:26 2017 +1100
Remove set_label_xalign workaround and uses of it.
.../account-dialog-edit-alternate-emails-pane.vala | 2 +-
src/client/composer/spell-check-popover.vala | 2 +-
.../conversation-viewer/conversation-message.vala | 4 ++--
src/client/util/util-gtk.vala | 12 ------------
4 files changed, 4 insertions(+), 16 deletions(-)
---
diff --git a/src/client/accounts/account-dialog-edit-alternate-emails-pane.vala
b/src/client/accounts/account-dialog-edit-alternate-emails-pane.vala
index c558650..2f9de01 100644
--- a/src/client/accounts/account-dialog-edit-alternate-emails-pane.vala
+++ b/src/client/accounts/account-dialog-edit-alternate-emails-pane.vala
@@ -14,7 +14,7 @@ public class AccountDialogEditAlternateEmailsPane : AccountDialogPane {
label = "<b>%s</b>".printf(Geary.HTML.escape_markup(mailbox.get_full_address()));
use_markup = true;
ellipsize = Pango.EllipsizeMode.END;
- GtkUtil.set_label_xalign(this, 0.0f);
+ set_halign(Gtk.Align.START);
}
}
diff --git a/src/client/composer/spell-check-popover.vala b/src/client/composer/spell-check-popover.vala
index 0cc5221..e83fd4c 100644
--- a/src/client/composer/spell-check-popover.vala
+++ b/src/client/composer/spell-check-popover.vala
@@ -66,7 +66,7 @@ public class SpellCheckPopover {
if (country_name != null)
label_text += " (" + country_name + ")";
Gtk.Label label = new Gtk.Label(label_text);
- GtkUtil.set_label_xalign(label, 0.0f);
+ label.set_halign(Gtk.Align.START);
label.set_size_request(-1, 24);
box.pack_start(label, false, false);
diff --git a/src/client/conversation-viewer/conversation-message.vala
b/src/client/conversation-viewer/conversation-message.vala
index 5de36c5..fd16bc7 100644
--- a/src/client/conversation-viewer/conversation-message.vala
+++ b/src/client/conversation-viewer/conversation-message.vala
@@ -62,7 +62,7 @@ public class ConversationMessage : Gtk.Grid {
Gtk.Label primary = new Gtk.Label(null);
primary.ellipsize = Pango.EllipsizeMode.END;
- GtkUtil.set_label_xalign(primary, 0.0f);
+ primary.set_halign(Gtk.Align.START);
primary.get_style_context().add_class(PRIMARY_CLASS);
if (type == Type.FROM) {
primary.get_style_context().add_class(FROM_CLASS);
@@ -74,7 +74,7 @@ public class ConversationMessage : Gtk.Grid {
Gtk.Label secondary = new Gtk.Label(null);
secondary.ellipsize = Pango.EllipsizeMode.END;
- GtkUtil.set_label_xalign(secondary, 0.0f);
+ secondary.set_halign(Gtk.Align.START);
secondary.get_style_context().add_class(Gtk.STYLE_CLASS_DIM_LABEL);
secondary.set_text(address.address);
address_parts.add(secondary);
diff --git a/src/client/util/util-gtk.vala b/src/client/util/util-gtk.vala
index 8c7107c..84fcabe 100644
--- a/src/client/util/util-gtk.vala
+++ b/src/client/util/util-gtk.vala
@@ -109,18 +109,6 @@ void set_source_color_from_string(Cairo.Context ctx, string spec) {
}
/**
- * Set xalign property on Gtk.Label in a compatible way.
- *
- * GtkMisc is being deprecated in GTK+ 3 and the "xalign" property has been moved to GtkLabel. This
- * causes compatibility problems with newer versions of Vala generating code that won't link with
- * older versions of GTK+. This is a convenience method until Geary requires GTK+ 3.16 as its
- * minimum GTK+ version.
- */
-public void set_label_xalign(Gtk.Label label, float xalign) {
- label.set("xalign", xalign);
-}
-
-/**
* Returns whether the close button is at the end of the headerbar.
*/
bool close_button_at_end() {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]