From 3a3edab374fd71708d35dcf0c1df05e479dde34b Mon Sep 17 00:00:00 2001 From: Sascha Kruse Date: Wed, 20 Feb 2013 10:30:54 +0100 Subject: [PATCH] cleanup win_* function names --- dunst.c | 20 ++++++++++++-------- dunst.h | 2 -- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/dunst.c b/dunst.c index 25f5858..2346611 100644 --- a/dunst.c +++ b/dunst.c @@ -108,6 +108,12 @@ int notification_cmp_data(const void *a, const void *b, void *data); void notification_run_script(notification *n); int notification_close(notification * n, int reason); +/* window */ +void win_draw(void); +void win_hide(void); +void win_show(void); + + /* misc funtions */ void check_timeouts(void); char *fix_markup(char *str); @@ -117,8 +123,6 @@ bool is_idle(void); void setup(void); void update_screen_info(); void usage(int exit_status); -void draw_win(void); -void hide_win(void); void move_all_to_history(void); void print_version(void); char *extract_urls(const char *str); @@ -913,7 +917,7 @@ void free_render_texts(GSList *texts) { } -void draw_win(void) +void win_draw(void) { update_screen_info(); @@ -1458,14 +1462,14 @@ void update(void) /* move messages from notification_queue to displayed_notifications */ update_lists(); if (displayed->length > 0 && ! visible) { - map_win(); + win_show(); } if (displayed->length == 0 && visible) { - hide_win(); + win_hide(); } if (visible && (force_redraw || time(NULL) - last_redraw > 0)) { - draw_win(); + win_draw(); force_redraw = false; last_redraw = time(NULL); } @@ -1500,7 +1504,7 @@ gboolean run(void *data) return true; } -void hide_win() +void win_hide() { ungrab_key(&close_ks); ungrab_key(&close_all_ks); @@ -1702,7 +1706,7 @@ void setup(void) grab_key(&history_ks); } -void map_win(void) +void win_show(void) { /* window is already mapped or there's nothing to show */ if (visible || g_queue_is_empty(displayed)) { diff --git a/dunst.h b/dunst.h index c7bf012..4aa211c 100644 --- a/dunst.h +++ b/dunst.h @@ -101,9 +101,7 @@ extern int verbosity; /* return id of notification */ int notification_init(notification * n, int id); -int notification_close(notification * n, int reason); int notification_close_by_id(int id, int reason); -void map_win(void); gboolean run(void *data); void wake_up(void);