comparison src/audacious/genevent.c @ 2954:cfb04f784a84 trunk

user g_strdup_printf instead of fixed-size gchar array
author Tomasz Mon <desowin@gmail.com>
date Sun, 01 Jul 2007 16:37:52 +0200
parents 1a59a0ced6a8
children 6d4b7b739232
comparison
equal deleted inserted replaced
2953:80b6fc3f4d29 2954:cfb04f784a84
87 number_set_number(mainwin_10sec_num, (timeleft / 10) % 6); 87 number_set_number(mainwin_10sec_num, (timeleft / 10) % 6);
88 number_set_number(mainwin_sec_num, timeleft % 10); 88 number_set_number(mainwin_sec_num, timeleft % 10);
89 } 89 }
90 90
91 if (mainwin_sposition != NULL && !mainwin_sposition->hs_pressed) { 91 if (mainwin_sposition != NULL && !mainwin_sposition->hs_pressed) {
92 gchar time_str[5]; 92 gchar *time_str;
93 93
94 g_snprintf(time_str, sizeof(time_str), "%2.2d", timeleft / 60); 94 time_str = g_strdup_printf("%2.2d", timeleft / 60);
95 ui_skinned_textbox_set_text(mainwin_stime_min, time_str); 95 ui_skinned_textbox_set_text(mainwin_stime_min, time_str);
96 96
97 g_snprintf(time_str, sizeof(time_str), "%2.2d", timeleft % 60); 97 time_str = g_strdup_printf("%2.2d", timeleft % 60);
98 ui_skinned_textbox_set_text(mainwin_stime_sec, time_str); 98 ui_skinned_textbox_set_text(mainwin_stime_sec, time_str);
99 } 99 }
100 100
101 playlistwin_set_time(timeleft * 1000, 0, TIMER_ELAPSED); 101 playlistwin_set_time(timeleft * 1000, 0, TIMER_ELAPSED);
102 } 102 }