41 lines
2.5 KiB
Text
41 lines
2.5 KiB
Text
Index: src/notification.c
|
|
--- src/notification.c.orig
|
|
+++ src/notification.c
|
|
@@ -60,7 +60,7 @@ void notification_print(const struct notification *n)
|
|
printf("\ticon_id: '%s'\n", n->icon_id);
|
|
printf("\tdesktop_entry: '%s'\n", n->desktop_entry ? n->desktop_entry : "");
|
|
printf("\tcategory: %s\n", n->category);
|
|
- printf("\ttimeout: %ld\n", n->timeout/1000);
|
|
+ printf("\ttimeout: %lld\n", (long long)n->timeout/1000);
|
|
printf("\turgency: %s\n", notification_urgency_to_string(n->urgency));
|
|
printf("\ttransient: %d\n", n->transient);
|
|
printf("\tformatted: '%s'\n", n->msg);
|
|
@@ -140,8 +140,8 @@ void notification_run_script(struct notification *n)
|
|
// Set environment variables
|
|
gchar *n_id_str = g_strdup_printf("%i", n->id);
|
|
gchar *n_progress_str = g_strdup_printf("%i", n->progress);
|
|
- gchar *n_timeout_str = g_strdup_printf("%li", n->timeout/1000);
|
|
- gchar *n_timestamp_str = g_strdup_printf("%li", n->timestamp / 1000);
|
|
+ gchar *n_timeout_str = g_strdup_printf("%lli", (long long)n->timeout/1000);
|
|
+ gchar *n_timestamp_str = g_strdup_printf("%lli", (long long)n->timestamp / 1000);
|
|
safe_setenv("DUNST_APP_NAME", appname);
|
|
safe_setenv("DUNST_SUMMARY", summary);
|
|
safe_setenv("DUNST_BODY", body);
|
|
@@ -684,14 +684,14 @@ void notification_update_text_to_render(struct notific
|
|
char *new_buf;
|
|
if (hours > 0) {
|
|
new_buf =
|
|
- g_strdup_printf("%s (%ldh %ldm %lds old)", buf, hours,
|
|
+ g_strdup_printf("%s (%lldh %lldm %llds old)", buf, hours,
|
|
minutes, seconds);
|
|
} else if (minutes > 0) {
|
|
new_buf =
|
|
- g_strdup_printf("%s (%ldm %lds old)", buf, minutes,
|
|
+ g_strdup_printf("%s (%lldm %llds old)", buf, minutes,
|
|
seconds);
|
|
} else {
|
|
- new_buf = g_strdup_printf("%s (%lds old)", buf, seconds);
|
|
+ new_buf = g_strdup_printf("%s (%llds old)", buf, seconds);
|
|
}
|
|
|
|
g_free(buf);
|