comparison src/gtkconv.c @ 5133:9f40039a027f

[gaim-migrate @ 5496] fix compile on solaris by not doing things the hard way show date in timestamp for offline messages committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Mon, 14 Apr 2003 22:37:04 +0000
parents 34a9f0d3fc83
children d0182ae31ab8
comparison
equal deleted inserted replaced
5132:494b6b6a6ffa 5133:9f40039a027f
1178 1178
1179 show_im_dialog(); 1179 show_im_dialog();
1180 } 1180 }
1181 else if (event->keyval == 'z') { 1181 else if (event->keyval == 'z') {
1182 g_signal_stop_emission_by_name(G_OBJECT(entry), "key_press_event"); 1182 g_signal_stop_emission_by_name(G_OBJECT(entry), "key_press_event");
1183 1183
1184 #ifndef _WIN32 1184 gtk_window_iconify(GTK_WINDOW(gtkwin->window));
1185 XIconifyWindow(GDK_DISPLAY(),
1186 GDK_WINDOW_XWINDOW(gtkwin->window->window),
1187 ((_XPrivDisplay)GDK_DISPLAY())->default_screen);
1188 #endif
1189 } 1185 }
1190 else if (event->keyval == '[') { 1186 else if (event->keyval == '[') {
1191 gaim_window_switch_conversation(win, 1187 gaim_window_switch_conversation(win,
1192 gaim_conversation_get_index(conv) - 1); 1188 gaim_conversation_get_index(conv) - 1);
1193 1189
3921 length = strlen(message) + 1; 3917 length = strlen(message) + 1;
3922 3918
3923 gtkconv = GAIM_GTK_CONVERSATION(conv); 3919 gtkconv = GAIM_GTK_CONVERSATION(conv);
3924 gc = gaim_conversation_get_gc(conv); 3920 gc = gaim_conversation_get_gc(conv);
3925 3921
3926 strftime(mdate, sizeof(mdate), "%H:%M:%S", localtime(&mtime)); 3922 if(time(NULL) > mtime + 20*60) /* show date if older than 20 minutes */
3923 strftime(mdate, sizeof(mdate), "%Y-%m-%d %H:%M:%S", localtime(&mtime));
3924 else
3925 strftime(mdate, sizeof(mdate), "%H:%M:%S", localtime(&mtime));
3927 3926
3928 if(gc) 3927 if(gc)
3929 sml_attrib = g_strdup_printf("sml=\"%s\"", gc->prpl->name); 3928 sml_attrib = g_strdup_printf("sml=\"%s\"", gc->prpl->name);
3930 3929
3931 gtk_font_options ^= GTK_IMHTML_NO_COMMENTS; 3930 gtk_font_options ^= GTK_IMHTML_NO_COMMENTS;