Mercurial > pidgin
comparison src/dialogs.c @ 3790:12b29552f1d7
[gaim-migrate @ 3930]
Better than cheddar, it's i18n input...
committer: Tailor Script <tailor@pidgin.im>
| author | Rob Flynn <gaim@robflynn.com> |
|---|---|
| date | Wed, 23 Oct 2002 00:12:49 +0000 |
| parents | 4c9356a5231c |
| children | 7469dcf5ada5 |
comparison
equal
deleted
inserted
replaced
| 3789:fb519383a058 | 3790:12b29552f1d7 |
|---|---|
| 2842 | 2842 |
| 2843 urltext = gtk_entry_get_text(GTK_ENTRY(b->url)); | 2843 urltext = gtk_entry_get_text(GTK_ENTRY(b->url)); |
| 2844 showtext = gtk_entry_get_text(GTK_ENTRY(b->text)); | 2844 showtext = gtk_entry_get_text(GTK_ENTRY(b->text)); |
| 2845 | 2845 |
| 2846 g_snprintf(open_tag, 2048, "<A HREF=\"%s\">%s", urltext, showtext); | 2846 g_snprintf(open_tag, 2048, "<A HREF=\"%s\">%s", urltext, showtext); |
| 2847 surround(b->entry, open_tag, "</A>"); | 2847 /* FIXME surround(b, open_tag, "</A>");*/ |
| 2848 | 2848 |
| 2849 g_free(open_tag); | 2849 g_free(open_tag); |
| 2850 destroy_dialog(NULL, b->window); | 2850 destroy_dialog(NULL, b->window); |
| 2851 } | 2851 } |
| 2852 | 2852 |
| 2925 gtk_container_border_width(GTK_CONTAINER(c->link_dialog), 10); | 2925 gtk_container_border_width(GTK_CONTAINER(c->link_dialog), 10); |
| 2926 gtk_window_set_title(GTK_WINDOW(c->link_dialog), _("Gaim - Add URL")); | 2926 gtk_window_set_title(GTK_WINDOW(c->link_dialog), _("Gaim - Add URL")); |
| 2927 gtk_window_set_focus(GTK_WINDOW(c->link_dialog), b->url); | 2927 gtk_window_set_focus(GTK_WINDOW(c->link_dialog), b->url); |
| 2928 b->window = c->link_dialog; | 2928 b->window = c->link_dialog; |
| 2929 b->toggle = linky; | 2929 b->toggle = linky; |
| 2930 b->entry = c->entry; | 2930 /* FIXME b->entry_view = c->entry_view;*/ |
| 2931 gtk_widget_realize(c->link_dialog); | 2931 gtk_widget_realize(c->link_dialog); |
| 2932 | 2932 |
| 2933 } | 2933 } |
| 2934 | 2934 |
| 2935 gtk_widget_show(c->link_dialog); | 2935 gtk_widget_show(c->link_dialog); |
| 2987 | 2987 |
| 2988 c->fgcol = text_color; | 2988 c->fgcol = text_color; |
| 2989 c->hasfg = 1; | 2989 c->hasfg = 1; |
| 2990 g_snprintf(open_tag, 23, "<FONT COLOR=\"#%02X%02X%02X\">", text_color.red, text_color.green, | 2990 g_snprintf(open_tag, 23, "<FONT COLOR=\"#%02X%02X%02X\">", text_color.red, text_color.green, |
| 2991 text_color.blue); | 2991 text_color.blue); |
| 2992 surround(c->entry, open_tag, "</FONT>"); | 2992 surround(c, open_tag, "</FONT>"); |
| 2993 debug_printf("#%02X%02X%02X\n", text_color.red, text_color.green, text_color.blue); | 2993 debug_printf("#%02X%02X%02X\n", text_color.red, text_color.green, text_color.blue); |
| 2994 g_free(open_tag); | 2994 g_free(open_tag); |
| 2995 cancel_fgcolor(NULL, c); | 2995 cancel_fgcolor(NULL, c); |
| 2996 } | 2996 } |
| 2997 | 2997 |
| 3014 | 3014 |
| 3015 c->bgcol = text_color; | 3015 c->bgcol = text_color; |
| 3016 c->hasbg = 1; | 3016 c->hasbg = 1; |
| 3017 g_snprintf(open_tag, 25, "<BODY BGCOLOR=\"#%02X%02X%02X\">", text_color.red, text_color.green, | 3017 g_snprintf(open_tag, 25, "<BODY BGCOLOR=\"#%02X%02X%02X\">", text_color.red, text_color.green, |
| 3018 text_color.blue); | 3018 text_color.blue); |
| 3019 surround(c->entry, open_tag, "</BODY>"); | 3019 surround(c, open_tag, "</BODY>"); |
| 3020 debug_printf("#%02X%02X%02X\n", text_color.red, text_color.green, text_color.blue); | 3020 debug_printf("#%02X%02X%02X\n", text_color.red, text_color.green, text_color.blue); |
| 3021 g_free(open_tag); | 3021 g_free(open_tag); |
| 3022 cancel_bgcolor(NULL, c); | 3022 cancel_bgcolor(NULL, c); |
| 3023 } | 3023 } |
| 3024 | 3024 |
| 3560 return; | 3560 return; |
| 3561 } | 3561 } |
| 3562 | 3562 |
| 3563 void insert_smiley_text(GtkWidget *widget, struct conversation *c) | 3563 void insert_smiley_text(GtkWidget *widget, struct conversation *c) |
| 3564 { | 3564 { |
| 3565 char *smiley_text; | 3565 gtk_text_buffer_insert_at_cursor(c->entry_buffer, |
| 3566 | 3566 current_smiley, -1); |
| 3567 smiley_text = strdup(current_smiley); | |
| 3568 | |
| 3569 /* surround(c->entry, smiley_text, ""); */ | |
| 3570 | |
| 3571 if (GTK_OLD_EDITABLE(c->entry)->has_selection) { | |
| 3572 int finish = GTK_OLD_EDITABLE(c->entry)->selection_end_pos; | |
| 3573 gtk_editable_insert_text(GTK_EDITABLE(c->entry), | |
| 3574 smiley_text, strlen(smiley_text), &finish); | |
| 3575 } else { | |
| 3576 int pos = GTK_OLD_EDITABLE(c->entry)->current_pos; | |
| 3577 gtk_editable_insert_text(GTK_EDITABLE(c->entry), smiley_text, strlen(smiley_text), &pos); | |
| 3578 } | |
| 3579 | |
| 3580 g_free(smiley_text); | |
| 3581 | |
| 3582 close_smiley_dialog(NULL, c); | 3567 close_smiley_dialog(NULL, c); |
| 3583 | |
| 3584 return; | |
| 3585 } | 3568 } |
| 3586 | 3569 |
| 3587 static void toolbar_add_smiley(struct conversation *c, GtkWidget *bar, char **xpm, GtkWidget *win, | 3570 static void toolbar_add_smiley(struct conversation *c, GtkWidget *bar, char **xpm, GtkWidget *win, |
| 3588 char *face) | 3571 char *face) |
| 3589 { | 3572 { |
