summaryrefslogtreecommitdiff
path: root/src/themes
diff options
context:
space:
mode:
Diffstat (limited to 'src/themes')
-rw-r--r--src/themes/coco/coco-theme.c8
-rw-r--r--src/themes/nodoka/nodoka-theme.c14
-rw-r--r--src/themes/slider/theme.c8
-rw-r--r--src/themes/standard/theme.c4
4 files changed, 21 insertions, 13 deletions
diff --git a/src/themes/coco/coco-theme.c b/src/themes/coco/coco-theme.c
index 856eebd..44a2077 100644
--- a/src/themes/coco/coco-theme.c
+++ b/src/themes/coco/coco-theme.c
@@ -103,7 +103,7 @@ void notification_tick(GtkWindow *nw, glong remaining);
#define DEFAULT_ARROW_HEIGHT 14
#define DEFAULT_ARROW_WIDTH 22
#define DEFAULT_ARROW_SKEW -6
-#define BACKGROUND_OPACITY 0.90
+#define BACKGROUND_OPACITY 0.9
#define GRADIENT_CENTER 0.7
/* Support Nodoka Functions */
@@ -140,7 +140,7 @@ nodoka_rounded_rectangle (cairo_t * cr,
static void
fill_background(GtkWidget *widget, WindowData *windata, cairo_t *cr)
{
- float alpha;
+ double alpha;
if (windata->composited)
alpha = BACKGROUND_OPACITY;
else
@@ -490,6 +490,7 @@ void
set_notification_text(GtkWindow *nw, const char *summary, const char *body)
{
char *str;
+ size_t str_len;
char *quoted;
WindowData *windata = g_object_get_data(G_OBJECT(nw), "windata");
g_assert(windata != NULL);
@@ -507,7 +508,8 @@ set_notification_text(GtkWindow *nw, const char *summary, const char *body)
xmlInitParser();
str = g_strconcat ("<markup>", "<span color=\"#EAEAEA\">", body, "</span>", "</markup>", NULL);
/* parse notification body */
- doc = xmlReadMemory(str, strlen (str), "noname.xml", NULL, 0);
+ str_len = strlen (str);
+ doc = xmlReadMemory(str, (int) str_len, "noname.xml", NULL, 0);
g_free (str);
if (doc != NULL) {
xmlXPathContextPtr xpathCtx;
diff --git a/src/themes/nodoka/nodoka-theme.c b/src/themes/nodoka/nodoka-theme.c
index 65fd67f..b0ba049 100644
--- a/src/themes/nodoka/nodoka-theme.c
+++ b/src/themes/nodoka/nodoka-theme.c
@@ -322,12 +322,12 @@ nodoka_rounded_rectangle_with_arrow (cairo_t * cr,
cairo_rectangle_int_t rect;
rect.x = 0;
- rect.width = w;
+ rect.width = (int)w;
if (arrow_up)
rect.y = 0 + DEFAULT_ARROW_HEIGHT;
else
rect.y = 0;
- rect.height = h - DEFAULT_ARROW_HEIGHT;
+ rect.height = (int)(h - DEFAULT_ARROW_HEIGHT);
cairo_move_to (cr, rect.x + radius, rect.y);
@@ -369,7 +369,7 @@ nodoka_rounded_rectangle_with_arrow (cairo_t * cr,
static void
fill_background(GtkWidget *widget, WindowData *windata, cairo_t *cr)
{
- float alpha;
+ double alpha;
if (windata->composited)
alpha = BACKGROUND_OPACITY;
else
@@ -405,7 +405,7 @@ draw_stripe(GtkWidget *widget, WindowData *windata, cairo_t *cr)
GdkRGBA center_color;
GdkRGBA bottom_color;
- float alpha;
+ double alpha;
if (windata->composited)
alpha = BACKGROUND_OPACITY;
else
@@ -475,7 +475,7 @@ draw_stripe(GtkWidget *widget, WindowData *windata, cairo_t *cr)
static void
draw_border(GtkWidget *widget, WindowData *windata, cairo_t *cr)
{
- float alpha;
+ double alpha;
if (windata->composited)
alpha = BACKGROUND_OPACITY;
else
@@ -876,6 +876,7 @@ void
set_notification_text(GtkWindow *nw, const char *summary, const char *body)
{
char *str;
+ size_t str_len;
char* quoted;
WindowData *windata = g_object_get_data(G_OBJECT(nw), "windata");
g_assert(windata != NULL);
@@ -892,7 +893,8 @@ set_notification_text(GtkWindow *nw, const char *summary, const char *body)
xmlInitParser();
str = g_strconcat ("<markup>", "<span color=\"#000000\">", body, "</span>", "</markup>", NULL);
/* parse notification body */
- doc = xmlReadMemory(str, strlen (str), "noname.xml", NULL, 0);
+ str_len = strlen (str);
+ doc = xmlReadMemory(str, (int) str_len, "noname.xml", NULL, 0);
g_free (str);
if (doc != NULL) {
xmlXPathContextPtr xpathCtx;
diff --git a/src/themes/slider/theme.c b/src/themes/slider/theme.c
index 438049b..8676520 100644
--- a/src/themes/slider/theme.c
+++ b/src/themes/slider/theme.c
@@ -495,6 +495,7 @@ void notification_tick(GtkWindow* nw, glong remaining)
void set_notification_text(GtkWindow* nw, const char* summary, const char* body)
{
char* str;
+ size_t str_len;
char* quoted;
GtkRequisition req;
WindowData* windata;
@@ -516,7 +517,8 @@ void set_notification_text(GtkWindow* nw, const char* summary, const char* body)
xmlInitParser();
str = g_strconcat ("<markup>", body, "</markup>", NULL);
/* parse notification body */
- doc = xmlReadMemory(str, strlen (str), "noname.xml", NULL, 0);
+ str_len = strlen (str);
+ doc = xmlReadMemory(str, (int) str_len, "noname.xml", NULL, 0);
g_free (str);
if (doc != NULL) {
xmlXPathContextPtr xpathCtx;
@@ -613,8 +615,8 @@ static GdkPixbuf* scale_pixbuf(GdkPixbuf* pixbuf, int max_width, int max_height,
int scale_x;
int scale_y;
- scale_x = (int) (pw * scale_factor);
- scale_y = (int) (ph * scale_factor);
+ scale_x = (int) (((float) pw) * scale_factor);
+ scale_y = (int) (((float) ph) * scale_factor);
return gdk_pixbuf_scale_simple(pixbuf, scale_x, scale_y, GDK_INTERP_BILINEAR);
}
diff --git a/src/themes/standard/theme.c b/src/themes/standard/theme.c
index 4ab72de..1b553e6 100644
--- a/src/themes/standard/theme.c
+++ b/src/themes/standard/theme.c
@@ -845,6 +845,7 @@ void notification_tick(GtkWindow* nw, glong remaining)
void set_notification_text(GtkWindow* nw, const char* summary, const char* body)
{
char* str;
+ size_t str_len;
char* quoted;
GtkRequisition req;
WindowData* windata;
@@ -864,7 +865,8 @@ void set_notification_text(GtkWindow* nw, const char* summary, const char* body)
xmlInitParser();
str = g_strconcat ("<markup>", body, "</markup>", NULL);
/* parse notification body */
- doc = xmlReadMemory(str, strlen (str), "noname.xml", NULL, 0);
+ str_len = strlen (str);
+ doc = xmlReadMemory(str, (int) str_len, "noname.xml", NULL, 0);
g_free (str);
if (doc != NULL) {
xmlXPathContextPtr xpathCtx;