[notification-daemon] don't use deprecated GtkMisc
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [notification-daemon] don't use deprecated GtkMisc
- Date: Mon, 24 Nov 2014 19:18:36 +0000 (UTC)
commit d45f682233e6066d0077b907759a6030759a177a
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Mon Nov 24 21:18:12 2014 +0200
don't use deprecated GtkMisc
configure.ac | 2 +-
src/nd-bubble.c | 11 +++++++----
src/nd-notification-box.c | 11 +++++++----
3 files changed, 15 insertions(+), 9 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 886cc76..df5f267 100644
--- a/configure.ac
+++ b/configure.ac
@@ -50,7 +50,7 @@ AC_DEFINE([GETTEXT_PACKAGE], [PACKAGE_TARNAME], [Define to the gettext package n
dnl ---------------------------------------------------------------------------
dnl Requirements for the daemon
dnl ---------------------------------------------------------------------------
-REQ_GTK_VERSION=3.8.0
+REQ_GTK_VERSION=3.15.2
REQ_GLIB_VERSION=2.27.0
REQ_LIBCANBERRA_GTK_VERSION=0.4
pkg_modules="
diff --git a/src/nd-bubble.c b/src/nd-bubble.c
index 17e0897..6c69fb1 100644
--- a/src/nd-bubble.c
+++ b/src/nd-bubble.c
@@ -632,7 +632,8 @@ nd_bubble_init (NdBubble *bubble)
bubble);
gtk_widget_show (bubble->priv->summary_label);
gtk_box_pack_start (GTK_BOX (vbox), bubble->priv->summary_label, TRUE, TRUE, 0);
- gtk_misc_set_alignment (GTK_MISC (bubble->priv->summary_label), 0, 0);
+ gtk_label_set_xalign (GTK_LABEL (bubble->priv->summary_label), 0.0);
+ gtk_label_set_yalign (GTK_LABEL (bubble->priv->summary_label), 0.0);
gtk_label_set_line_wrap (GTK_LABEL (bubble->priv->summary_label), TRUE);
gtk_label_set_line_wrap_mode (GTK_LABEL (bubble->priv->summary_label), PANGO_WRAP_WORD_CHAR);
@@ -655,7 +656,8 @@ nd_bubble_init (NdBubble *bubble)
bubble);
gtk_widget_show (bubble->priv->body_label);
gtk_box_pack_start (GTK_BOX (vbox), bubble->priv->body_label, TRUE, TRUE, 0);
- gtk_misc_set_alignment (GTK_MISC (bubble->priv->body_label), 0, 0);
+ gtk_label_set_xalign (GTK_LABEL (bubble->priv->body_label), 0.0);
+ gtk_label_set_yalign (GTK_LABEL (bubble->priv->body_label), 0.0);
gtk_label_set_line_wrap (GTK_LABEL (bubble->priv->body_label), TRUE);
gtk_label_set_line_wrap_mode (GTK_LABEL (bubble->priv->body_label), PANGO_WRAP_WORD_CHAR);
g_signal_connect (bubble->priv->body_label,
@@ -904,7 +906,8 @@ add_notification_action (NdBubble *bubble,
text);
gtk_widget_show (image);
gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
- gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0.5);
+ gtk_widget_set_halign (image, GTK_ALIGN_CENTER);
+ gtk_widget_set_valign (image, GTK_ALIGN_CENTER);
} else {
GtkWidget *label;
@@ -915,7 +918,7 @@ add_notification_action (NdBubble *bubble,
bubble);
gtk_widget_show (label);
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
- gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
+ gtk_label_set_xalign (GTK_LABEL (label), 0.0);
buf = g_strdup_printf ("<small>%s</small>", text);
gtk_label_set_markup (GTK_LABEL (label), buf);
g_free (buf);
diff --git a/src/nd-notification-box.c b/src/nd-notification-box.c
index 12267a9..b360946 100644
--- a/src/nd-notification-box.c
+++ b/src/nd-notification-box.c
@@ -143,14 +143,15 @@ create_notification_action (NdNotificationBox *box,
text);
gtk_widget_show (image);
gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
- gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0.5);
+ gtk_widget_set_halign (image, GTK_ALIGN_CENTER);
+ gtk_widget_set_valign (image, GTK_ALIGN_CENTER);
} else {
GtkWidget *label;
label = gtk_label_new (NULL);
gtk_widget_show (label);
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
- gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
+ gtk_label_set_xalign (GTK_LABEL (label), 0.0);
buf = g_strdup_printf ("<small>%s</small>", text);
gtk_label_set_markup (GTK_LABEL (label), buf);
g_free (buf);
@@ -334,7 +335,8 @@ nd_notification_box_init (NdNotificationBox *notification_box)
notification_box->priv->summary_label = gtk_label_new (NULL);
gtk_widget_show (notification_box->priv->summary_label);
gtk_box_pack_start (GTK_BOX (vbox), notification_box->priv->summary_label, TRUE, TRUE, 0);
- gtk_misc_set_alignment (GTK_MISC (notification_box->priv->summary_label), 0, 0);
+ gtk_label_set_xalign (GTK_LABEL (notification_box->priv->summary_label), 0.0);
+ gtk_label_set_yalign (GTK_LABEL (notification_box->priv->summary_label), 0.0);
gtk_label_set_line_wrap (GTK_LABEL (notification_box->priv->summary_label), TRUE);
gtk_label_set_line_wrap_mode (GTK_LABEL (notification_box->priv->summary_label),
PANGO_WRAP_WORD_CHAR);
@@ -353,7 +355,8 @@ nd_notification_box_init (NdNotificationBox *notification_box)
notification_box->priv->body_label = gtk_label_new (NULL);
gtk_widget_show (notification_box->priv->body_label);
gtk_box_pack_start (GTK_BOX (vbox), notification_box->priv->body_label, TRUE, TRUE, 0);
- gtk_misc_set_alignment (GTK_MISC (notification_box->priv->body_label), 0, 0);
+ gtk_label_set_xalign (GTK_LABEL (notification_box->priv->body_label), 0.0);
+ gtk_label_set_yalign (GTK_LABEL (notification_box->priv->body_label), 0.0);
gtk_label_set_line_wrap (GTK_LABEL (notification_box->priv->body_label), TRUE);
gtk_label_set_line_wrap_mode (GTK_LABEL (notification_box->priv->body_label), PANGO_WRAP_WORD_CHAR);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]