[Xfce4-commits] [apps/xfce4-notifyd] 01/01: Fix theming for callback button in notifications (Bug #12841)
noreply at xfce.org
noreply at xfce.org
Wed Sep 14 09:46:40 CEST 2016
This is an automated email from the git hooks/post-receive script.
ochosi pushed a commit to branch master
in repository apps/xfce4-notifyd.
commit 47d331198b6d16c076313a2808470d7b904fd6ed
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Mon Sep 12 18:17:14 2016 +0200
Fix theming for callback button in notifications (Bug #12841)
---
xfce4-notifyd/xfce-notify-daemon.c | 5 +++--
xfce4-notifyd/xfce-notify-window.c | 14 ++++++++++----
xfce4-notifyd/xfce-notify-window.h | 6 ++++--
3 files changed, 17 insertions(+), 8 deletions(-)
diff --git a/xfce4-notifyd/xfce-notify-daemon.c b/xfce4-notifyd/xfce-notify-daemon.c
index 38f9332..6307490 100644
--- a/xfce4-notifyd/xfce-notify-daemon.c
+++ b/xfce4-notifyd/xfce-notify-daemon.c
@@ -1110,7 +1110,7 @@ static gboolean notify_notify (XfceNotifyGBus *skeleton,
xfce_notify_window_set_icon_name(window, app_icon);
xfce_notify_window_set_summary(window, summary);
xfce_notify_window_set_body(window, body);
- xfce_notify_window_set_actions(window, actions);
+ xfce_notify_window_set_actions(window, actions, xndaemon->css_provider);
xfce_notify_window_set_expire_timeout(window, expire_timeout);
xfce_notify_window_set_opacity(window, xndaemon->initial_opacity);
@@ -1119,7 +1119,8 @@ static gboolean notify_notify (XfceNotifyGBus *skeleton,
window = XFCE_NOTIFY_WINDOW(xfce_notify_window_new_with_actions(summary, body,
app_icon,
expire_timeout,
- actions));
+ actions,
+ xndaemon->css_provider));
xfce_notify_window_set_opacity(window, xndaemon->initial_opacity);
OUT_id = xfce_notify_daemon_generate_id(xndaemon);
diff --git a/xfce4-notifyd/xfce-notify-window.c b/xfce4-notifyd/xfce-notify-window.c
index 6ed3d7e..eb2cccf 100644
--- a/xfce4-notifyd/xfce-notify-window.c
+++ b/xfce4-notifyd/xfce-notify-window.c
@@ -656,7 +656,7 @@ elem_to_string(gconstpointer elem_p)
GtkWidget *
xfce_notify_window_new(void)
{
- return xfce_notify_window_new_with_actions(NULL, NULL, NULL, -1, NULL);
+ return xfce_notify_window_new_with_actions(NULL, NULL, NULL, -1, NULL, NULL);
}
GtkWidget *
@@ -668,6 +668,7 @@ xfce_notify_window_new_full(const gchar *summary,
return xfce_notify_window_new_with_actions(summary, body,
icon_name,
expire_timeout,
+ NULL,
NULL);
}
@@ -676,7 +677,8 @@ xfce_notify_window_new_with_actions(const gchar *summary,
const gchar *body,
const gchar *icon_name,
gint expire_timeout,
- const gchar **actions)
+ const gchar **actions,
+ GtkCssProvider *css_provider)
{
XfceNotifyWindow *window;
@@ -687,7 +689,7 @@ xfce_notify_window_new_with_actions(const gchar *summary,
xfce_notify_window_set_body(window, body);
xfce_notify_window_set_icon_name(window, icon_name);
xfce_notify_window_set_expire_timeout(window, expire_timeout);
- xfce_notify_window_set_actions(window, actions);
+ xfce_notify_window_set_actions(window, actions, css_provider);
return GTK_WIDGET(window);
}
@@ -896,7 +898,8 @@ xfce_notify_window_set_expire_timeout(XfceNotifyWindow *window,
void
xfce_notify_window_set_actions(XfceNotifyWindow *window,
- const gchar **actions)
+ const gchar **actions,
+ GtkCssProvider *css_provider)
{
gint i;
GList *children, *l;
@@ -943,6 +946,9 @@ xfce_notify_window_set_actions(XfceNotifyWindow *window,
gtk_label_set_use_markup(GTK_LABEL(lbl), TRUE);
gtk_widget_show(lbl);
gtk_container_add(GTK_CONTAINER(btn), lbl);
+ gtk_style_context_add_provider (gtk_widget_get_style_context (btn),
+ GTK_STYLE_PROVIDER (css_provider),
+ GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
g_free(cur_button_text_escaped);
}
diff --git a/xfce4-notifyd/xfce-notify-window.h b/xfce4-notifyd/xfce-notify-window.h
index 6a7ae99..452baec 100644
--- a/xfce4-notifyd/xfce-notify-window.h
+++ b/xfce4-notifyd/xfce-notify-window.h
@@ -52,7 +52,8 @@ GtkWidget *xfce_notify_window_new_with_actions(const gchar *summary,
const gchar *body,
const gchar *icon_name,
gint expire_timeout,
- const gchar **actions);
+ const gchar **actions,
+ GtkCssProvider *css_provider);
void xfce_notify_window_set_summary(XfceNotifyWindow *window,
const gchar *summary);
@@ -80,7 +81,8 @@ void xfce_notify_window_set_expire_timeout(XfceNotifyWindow *window,
gint expire_timeout);
void xfce_notify_window_set_actions(XfceNotifyWindow *window,
- const gchar **actions);
+ const gchar **actions,
+ GtkCssProvider *css_provider);
void xfce_notify_window_set_fade_transparent(XfceNotifyWindow *window,
gboolean fade_transparent);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list