summaryrefslogtreecommitdiff
path: root/src/themes
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2015-05-22 21:13:01 +0200
committerStefano Karapetsas <[email protected]>2015-06-17 22:19:23 +0200
commitc8717310ca41b783f71c55ead7e57dcd9dc5625e (patch)
tree44defa8fa9032d06c762cc31833e1527f7376518 /src/themes
parent62e14a1cdf3836da8c3ebfde39f5239a5dec4753 (diff)
downloadmate-notification-daemon-c8717310ca41b783f71c55ead7e57dcd9dc5625e.tar.bz2
mate-notification-daemon-c8717310ca41b783f71c55ead7e57dcd9dc5625e.tar.xz
GTK3: Fix positioning notifications with long text
Closes https://github.com/mate-desktop/mate-notification-daemon/pull/52
Diffstat (limited to 'src/themes')
-rw-r--r--src/themes/coco/coco-theme.c6
-rw-r--r--src/themes/nodoka/nodoka-theme.c6
-rw-r--r--src/themes/slider/theme.c6
-rw-r--r--src/themes/standard/theme.c6
4 files changed, 24 insertions, 0 deletions
diff --git a/src/themes/coco/coco-theme.c b/src/themes/coco/coco-theme.c
index 584c3a6..389fc9f 100644
--- a/src/themes/coco/coco-theme.c
+++ b/src/themes/coco/coco-theme.c
@@ -471,6 +471,9 @@ create_notification(UrlClickedCb url_clicked)
gtk_box_pack_start(GTK_BOX(vbox), windata->summary_label, FALSE, FALSE, 0);
gtk_misc_set_alignment(GTK_MISC(windata->summary_label), 0, 0);
gtk_label_set_line_wrap(GTK_LABEL(windata->summary_label), TRUE);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_label_set_line_wrap_mode (GTK_LABEL (windata->summary_label), PANGO_WRAP_WORD_CHAR);
+#endif
atkobj = gtk_widget_get_accessible(windata->summary_label);
atk_object_set_description(atkobj, "Notification summary text.");
@@ -479,6 +482,9 @@ create_notification(UrlClickedCb url_clicked)
gtk_box_pack_start(GTK_BOX(vbox), windata->body_label, FALSE, FALSE, 0);
gtk_misc_set_alignment(GTK_MISC(windata->body_label), 0, 0);
gtk_label_set_line_wrap(GTK_LABEL(windata->body_label), TRUE);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_label_set_line_wrap_mode (GTK_LABEL (windata->body_label), PANGO_WRAP_WORD_CHAR);
+#endif
g_signal_connect(G_OBJECT(windata->body_label), "activate-link",
G_CALLBACK(activate_link), windata);
diff --git a/src/themes/nodoka/nodoka-theme.c b/src/themes/nodoka/nodoka-theme.c
index 3d2a597..5b6c309 100644
--- a/src/themes/nodoka/nodoka-theme.c
+++ b/src/themes/nodoka/nodoka-theme.c
@@ -822,6 +822,9 @@ create_notification(UrlClickedCb url_clicked)
gtk_box_pack_start(GTK_BOX(hbox), windata->summary_label, TRUE, TRUE, 0);
gtk_misc_set_alignment(GTK_MISC(windata->summary_label), 0, 0);
gtk_label_set_line_wrap(GTK_LABEL(windata->summary_label), TRUE);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_label_set_line_wrap_mode (GTK_LABEL (windata->summary_label), PANGO_WRAP_WORD_CHAR);
+#endif
atkobj = gtk_widget_get_accessible(windata->summary_label);
atk_object_set_description(atkobj, "Notification summary text.");
@@ -868,6 +871,9 @@ create_notification(UrlClickedCb url_clicked)
gtk_box_pack_start(GTK_BOX(vbox), windata->body_label, TRUE, TRUE, 0);
gtk_misc_set_alignment(GTK_MISC(windata->body_label), 0, 0);
gtk_label_set_line_wrap(GTK_LABEL(windata->body_label), TRUE);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_label_set_line_wrap_mode (GTK_LABEL (windata->body_label), PANGO_WRAP_WORD_CHAR);
+#endif
g_signal_connect(G_OBJECT(windata->body_label), "activate-link",
G_CALLBACK(activate_link), windata);
diff --git a/src/themes/slider/theme.c b/src/themes/slider/theme.c
index 7335760..c0a4a8c 100644
--- a/src/themes/slider/theme.c
+++ b/src/themes/slider/theme.c
@@ -671,6 +671,9 @@ GtkWindow* create_notification(UrlClickedCb url_clicked)
gtk_box_pack_start(GTK_BOX(vbox), windata->summary_label, TRUE, TRUE, 0);
gtk_misc_set_alignment(GTK_MISC(windata->summary_label), 0, 0);
gtk_label_set_line_wrap(GTK_LABEL(windata->summary_label), TRUE);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_label_set_line_wrap_mode (GTK_LABEL (windata->summary_label), PANGO_WRAP_WORD_CHAR);
+#endif
atkobj = gtk_widget_get_accessible(windata->summary_label);
atk_object_set_description(atkobj, "Notification summary text.");
@@ -694,6 +697,9 @@ GtkWindow* create_notification(UrlClickedCb url_clicked)
gtk_box_pack_start(GTK_BOX(vbox), windata->body_label, TRUE, TRUE, 0);
gtk_misc_set_alignment(GTK_MISC(windata->body_label), 0, 0);
gtk_label_set_line_wrap(GTK_LABEL(windata->body_label), TRUE);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_label_set_line_wrap_mode (GTK_LABEL (windata->body_label), PANGO_WRAP_WORD_CHAR);
+#endif
g_signal_connect_swapped(G_OBJECT(windata->body_label), "activate-link", G_CALLBACK(windata->url_clicked), win);
atkobj = gtk_widget_get_accessible(windata->body_label);
diff --git a/src/themes/standard/theme.c b/src/themes/standard/theme.c
index f68d2b9..295c241 100644
--- a/src/themes/standard/theme.c
+++ b/src/themes/standard/theme.c
@@ -718,6 +718,9 @@ GtkWindow* create_notification(UrlClickedCb url_clicked)
gtk_box_pack_start(GTK_BOX(hbox), windata->summary_label, TRUE, TRUE, 0);
gtk_misc_set_alignment(GTK_MISC(windata->summary_label), 0, 0);
gtk_label_set_line_wrap(GTK_LABEL(windata->summary_label), TRUE);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_label_set_line_wrap_mode (GTK_LABEL (windata->summary_label), PANGO_WRAP_WORD_CHAR);
+#endif
atkobj = gtk_widget_get_accessible(windata->summary_label);
atk_object_set_description(atkobj, "Notification summary text.");
@@ -770,6 +773,9 @@ GtkWindow* create_notification(UrlClickedCb url_clicked)
gtk_box_pack_start(GTK_BOX(vbox), windata->body_label, TRUE, TRUE, 0);
gtk_misc_set_alignment(GTK_MISC(windata->body_label), 0, 0);
gtk_label_set_line_wrap(GTK_LABEL(windata->body_label), TRUE);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_label_set_line_wrap_mode (GTK_LABEL (windata->body_label), PANGO_WRAP_WORD_CHAR);
+#endif
g_signal_connect(G_OBJECT(windata->body_label), "activate-link", G_CALLBACK(activate_link), windata);
atkobj = gtk_widget_get_accessible(windata->body_label);