# HG changeset patch # User Mikael Berthe # Date 1208703684 -7200 # Node ID f61ed2466f7c424dae35b65bfd813ac603948bfc # Parent f83a51eaa5edd789aea12ff4ead0b5b921365696 Minor style upgrade s/getprefixwidth/scr_getprefixwidth/ diff -r f83a51eaa5ed -r f61ed2466f7c mcabber/src/hbuf.c --- a/mcabber/src/hbuf.c Sun Apr 20 16:56:43 2008 +0200 +++ b/mcabber/src/hbuf.c Sun Apr 20 17:01:24 2008 +0200 @@ -439,7 +439,7 @@ return; } - prefixwidth = getprefixwidth(); + prefixwidth = scr_getprefixwidth(); prefixwidth = MIN(prefixwidth, sizeof pref); for (hbuf = g_list_first(hbuf); hbuf; hbuf = g_list_next(hbuf)) { diff -r f83a51eaa5ed -r f61ed2466f7c mcabber/src/screen.c --- a/mcabber/src/screen.c Sun Apr 20 16:56:43 2008 +0200 +++ b/mcabber/src/screen.c Sun Apr 20 17:01:24 2008 +0200 @@ -843,7 +843,7 @@ return spectimeprefixes[(n < 3 ? n : 0)]; } -guint getprefixwidth(void) +guint scr_getprefixwidth(void) { guint n = settings_opt_get_int("time_prefix"); return timepreflengths[(n < 3 ? n : 0)]; @@ -978,7 +978,7 @@ } else { // Load buddy history from file (if enabled) tmp->bd = g_new0(buffdata, 1); hlog_read_history(title, &tmp->bd->hbuf, - maxX - Roster_Width - getprefixwidth()); + maxX - Roster_Width - scr_getprefixwidth()); } id = g_strdup(title); @@ -1060,7 +1060,7 @@ int color; width = getmaxx(win_entry->win); - prefixwidth = getprefixwidth(); + prefixwidth = scr_getprefixwidth(); prefixwidth = MIN(prefixwidth, sizeof pref); // Should the window be empty? @@ -1327,7 +1327,7 @@ g_free(nicktmp); } hbuf_add_line(&win_entry->bd->hbuf, text_locale, timestamp, prefix_flags, - maxX - Roster_Width - getprefixwidth(), num_history_blocks, + maxX - Roster_Width - scr_getprefixwidth(), num_history_blocks, mucnicklen); g_free(text_locale); @@ -1533,7 +1533,7 @@ // Init prev_chatwidth; this variable will be used to prevent us // from rewrapping buffers when the width doesn't change. - prev_chatwidth = maxX - Roster_Width - getprefixwidth(); + prev_chatwidth = maxX - Roster_Width - scr_getprefixwidth(); // Wrap existing status buffer lines hbuf_rebuild(&statushbuf, prev_chatwidth); @@ -1587,7 +1587,7 @@ // Redo line wrapping wbp->bd->top = hbuf_previous_persistent(wbp->bd->top); - new_chatwidth = maxX - Roster_Width - getprefixwidth(); + new_chatwidth = maxX - Roster_Width - scr_getprefixwidth(); if (new_chatwidth != prev_chatwidth) hbuf_rebuild(&wbp->bd->hbuf, new_chatwidth); } @@ -1624,7 +1624,7 @@ resize_win_buffer(NULL, statusWindow, &dim); // Update prev_chatwidth, now that all buffers have been resized - prev_chatwidth = maxX - Roster_Width - getprefixwidth(); + prev_chatwidth = maxX - Roster_Width - scr_getprefixwidth(); // Refresh current buddy window if (chatmode) diff -r f83a51eaa5ed -r f61ed2466f7c mcabber/src/screen.h --- a/mcabber/src/screen.h Sun Apr 20 16:56:43 2008 +0200 +++ b/mcabber/src/screen.h Sun Apr 20 17:01:24 2008 +0200 @@ -130,7 +130,8 @@ const char *scr_get_multiline(void); const char *scr_get_multimode_subj(void); -void scr_line_prefix(hbb_line *line, char *prefix, guint preflen); +guint scr_getprefixwidth(void); +void scr_line_prefix(hbb_line *line, char *prefix, guint preflen); void scr_Beep(void);