[Xfce4-commits] [xfce/xfwm4] 20/32: poswin: remove deprecations
noreply at xfce.org
noreply at xfce.org
Tue Dec 5 09:22:06 CET 2017
This is an automated email from the git hooks/post-receive script.
o l i v i e r p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository xfce/xfwm4.
commit af1d55ebeab6bbead9c76d40b04679c9e966855a
Author: Viktor Odintsev <zakhams at gmail.com>
Date: Tue Jul 4 01:20:01 2017 +0300
poswin: remove deprecations
---
src/poswin.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/src/poswin.c b/src/poswin.c
index a7de33a..79f3816 100644
--- a/src/poswin.c
+++ b/src/poswin.c
@@ -74,6 +74,7 @@ poswinCreate (GdkScreen *gscr)
{
Poswin *poswin;
GtkWidget *frame;
+ GtkCssProvider *provider;
poswin = g_object_new (poswin_widget_get_type(), "type", GTK_WINDOW_POPUP, NULL);
@@ -87,8 +88,16 @@ poswinCreate (GdkScreen *gscr)
gtk_container_add (GTK_CONTAINER (poswin), frame);
poswin->label = gtk_label_new ("");
- gtk_misc_set_alignment (GTK_MISC (poswin->label), 0.5, 0.5);
- gtk_misc_set_padding (GTK_MISC (poswin->label), 3, 3);
+ gtk_label_set_xalign (GTK_LABEL (poswin->label), 0.5);
+ gtk_label_set_yalign (GTK_LABEL (poswin->label), 0.5);
+
+ provider = gtk_css_provider_new ();
+ gtk_css_provider_load_from_data (provider, "label { padding: 3px; }", -1, NULL);
+ gtk_style_context_add_provider (gtk_widget_get_style_context (poswin->label),
+ GTK_STYLE_PROVIDER (provider),
+ GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
+ g_object_unref (provider);
+
gtk_widget_show (poswin->label);
gtk_container_add(GTK_CONTAINER(frame), poswin->label);
gtk_widget_show_all (frame);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list