comparison src/conversation.c @ 1250:b5783215b245

[gaim-migrate @ 1260] decklin's clean up of the account editor, much needed. indent -kr -i8 -l105 -ncs -cp7 -npcs -T GtkWidget -T gpointer -T AppletCallbackFunc -T GtkFunction -T gaim_plugin_remove -T name -T FILE -T gchar -T user_opts -T GdkEvent -T GtkObject ... did about.c, aim.c, away.c, browser.c, buddy_chat.c, gaimrc.c, html.c, idle.c, multi.c. Need to do buddy.c, conversation.c, dialogs.c, oscar.c, perl.c, plugins.c, prefs.c, proxy.c, prpl.c, rvous.c, server.c, sound.c, toc.c, util.c. not doing gtkhtml.c because it's a piece of crap anyway, or *ticker.c because they're syd's. got rid of debug_buff, just debug_printf now. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Wed, 13 Dec 2000 20:18:35 +0000
parents eaa0e2f5ace4
children 8342d3aab1f1
comparison
equal deleted inserted replaced
1249:3e44de27622d 1250:b5783215b245
337 337
338 int close_callback(GtkWidget *widget, struct conversation *c) 338 int close_callback(GtkWidget *widget, struct conversation *c)
339 { 339 {
340 if (c->is_chat && (widget == c->close)) { 340 if (c->is_chat && (widget == c->close)) {
341 GtkWidget *tmp = c->window; 341 GtkWidget *tmp = c->window;
342 debug_print("chat clicked close button\n"); 342 debug_printf("chat clicked close button\n");
343 c->window = NULL; 343 c->window = NULL;
344 gtk_widget_destroy(tmp); 344 gtk_widget_destroy(tmp);
345 return FALSE; 345 return FALSE;
346 } 346 }
347 347
348 debug_print("conversation close callback\n"); 348 debug_printf("conversation close callback\n");
349 349
350 if (general_options & OPT_GEN_CHECK_SPELLING) 350 if (general_options & OPT_GEN_CHECK_SPELLING)
351 gtkspell_detach(GTK_TEXT(c->entry)); 351 gtkspell_detach(GTK_TEXT(c->entry));
352 352
353 if (c->window) 353 if (c->window)
422 } 422 }
423 423
424 void add_callback(GtkWidget *widget, struct conversation *c) 424 void add_callback(GtkWidget *widget, struct conversation *c)
425 { 425 {
426 if (c->gc && find_buddy(c->gc, c->name) != NULL) { 426 if (c->gc && find_buddy(c->gc, c->name) != NULL) {
427 sprintf(debug_buff,_("Removing '%s' from buddylist.\n"), c->name); 427 debug_printf(_("Removing '%s' from buddylist.\n"), c->name);
428 debug_print(debug_buff);
429 remove_buddy(c->gc, find_group_by_buddy(c->gc, c->name), find_buddy(c->gc, c->name)); 428 remove_buddy(c->gc, find_group_by_buddy(c->gc, c->name), find_buddy(c->gc, c->name));
430 build_edit_tree(); 429 build_edit_tree();
431 update_convo_add_button(c); 430 update_convo_add_button(c);
432 } 431 }
433 else 432 else
898 int pos; 897 int pos;
899 if (invert_tags(entry, pre, post, 1)) 898 if (invert_tags(entry, pre, post, 1))
900 return; 899 return;
901 s = gtk_editable_get_chars(GTK_EDITABLE(entry), 0, -1); 900 s = gtk_editable_get_chars(GTK_EDITABLE(entry), 0, -1);
902 pos = GTK_EDITABLE(entry)->current_pos; 901 pos = GTK_EDITABLE(entry)->current_pos;
903 sprintf(debug_buff, _("Currently at %d, "), pos); 902 debug_printf(_("Currently at %d, "), pos);
904 debug_print(debug_buff);
905 s2= strstr(&s[pos], post); 903 s2= strstr(&s[pos], post);
906 if (s2) { 904 if (s2) {
907 pos = s2 - s + strlen(post); 905 pos = s2 - s + strlen(post);
908 } else { 906 } else {
909 gtk_editable_insert_text(GTK_EDITABLE(entry), post, strlen(post), &pos); 907 gtk_editable_insert_text(GTK_EDITABLE(entry), post, strlen(post), &pos);
910 } 908 }
911 g_free(s); 909 g_free(s);
912 sprintf(debug_buff, _("Setting position to %d\n"), pos); 910 debug_printf(_("Setting position to %d\n"), pos);
913 debug_print(debug_buff);
914 gtk_editable_set_position(GTK_EDITABLE(entry), pos); 911 gtk_editable_set_position(GTK_EDITABLE(entry), pos);
915 gtk_widget_grab_focus(entry); 912 gtk_widget_grab_focus(entry);
916 } 913 }
917 914
918 void toggle_fg_color(GtkWidget *color, struct conversation *c) 915 void toggle_fg_color(GtkWidget *color, struct conversation *c)