comparison pidgin/gtksmiley.c @ 27315:0af18d18de0d

Set the correct default response in the smiley edit window so it gets the highlight and all the other stuff that goes along with it.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Fri, 03 Jul 2009 02:10:53 +0000
parents 5dcee348bc22
children 13d0a8097a94
comparison
equal deleted inserted replaced
27314:5dcee348bc22 27315:0af18d18de0d
403 NULL); 403 NULL);
404 s->parent = window; 404 s->parent = window;
405 405
406 gtk_container_set_border_width(GTK_CONTAINER(window), PIDGIN_HIG_BORDER); 406 gtk_container_set_border_width(GTK_CONTAINER(window), PIDGIN_HIG_BORDER);
407 407
408 gtk_dialog_set_default_response(GTK_DIALOG(window), GTK_RESPONSE_ACCEPT);
408 g_signal_connect(window, "response", G_CALLBACK(do_add_select_cb), s); 409 g_signal_connect(window, "response", G_CALLBACK(do_add_select_cb), s);
409 410
410 /* The vbox */ 411 /* The vbox */
411 vbox = gtk_vbox_new(FALSE, PIDGIN_HIG_BORDER); 412 vbox = gtk_vbox_new(FALSE, PIDGIN_HIG_BORDER);
412 gtk_container_add(GTK_CONTAINER(GTK_DIALOG(window)->vbox), vbox); 413 gtk_container_add(GTK_CONTAINER(GTK_DIALOG(window)->vbox), vbox);
460 s->entry_len = strlen(shortcut); 461 s->entry_len = strlen(shortcut);
461 } 462 }
462 else 463 else
463 gtk_dialog_set_response_sensitive(GTK_DIALOG(window), GTK_RESPONSE_ACCEPT, FALSE); 464 gtk_dialog_set_response_sensitive(GTK_DIALOG(window), GTK_RESPONSE_ACCEPT, FALSE);
464 465
465 g_signal_connect(s->smile, "activate", G_CALLBACK(do_add), s);
466 /* gtk_entry_get_text_length is 2.14+, so we'll just keep track ourselves */ 466 /* gtk_entry_get_text_length is 2.14+, so we'll just keep track ourselves */
467 g_signal_connect(G_OBJECT(s->smile), "insert-text", G_CALLBACK(smiley_name_insert_cb), s); 467 g_signal_connect(G_OBJECT(s->smile), "insert-text", G_CALLBACK(smiley_name_insert_cb), s);
468 g_signal_connect(G_OBJECT(s->smile), "delete-text", G_CALLBACK(smiley_name_delete_cb), s); 468 g_signal_connect(G_OBJECT(s->smile), "delete-text", G_CALLBACK(smiley_name_delete_cb), s);
469 469
470 gtk_box_pack_end(GTK_BOX(hbox), s->smile, FALSE, FALSE, 0); 470 gtk_box_pack_end(GTK_BOX(hbox), s->smile, FALSE, FALSE, 0);