Mercurial > pidgin.yaz
comparison src/dialogs.c @ 3781:c2394f352015
[gaim-migrate @ 3921]
Whoops.
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Tue, 22 Oct 2002 00:32:47 +0000 |
parents | b8d0eeb9e748 |
children | 4c9356a5231c |
comparison
equal
deleted
inserted
replaced
3780:b8d0eeb9e748 | 3781:c2394f352015 |
---|---|
2839 | 2839 |
2840 urltext = gtk_entry_get_text(GTK_ENTRY(b->url)); | 2840 urltext = gtk_entry_get_text(GTK_ENTRY(b->url)); |
2841 showtext = gtk_entry_get_text(GTK_ENTRY(b->text)); | 2841 showtext = gtk_entry_get_text(GTK_ENTRY(b->text)); |
2842 | 2842 |
2843 g_snprintf(open_tag, 2048, "<A HREF=\"%s\">%s", urltext, showtext); | 2843 g_snprintf(open_tag, 2048, "<A HREF=\"%s\">%s", urltext, showtext); |
2844 /* FIXME surround(b, open_tag, "</A>");*/ | 2844 surround(b->entry, open_tag, "</A>"); |
2845 | 2845 |
2846 g_free(open_tag); | 2846 g_free(open_tag); |
2847 destroy_dialog(NULL, b->window); | 2847 destroy_dialog(NULL, b->window); |
2848 } | 2848 } |
2849 | 2849 |
2922 gtk_container_border_width(GTK_CONTAINER(c->link_dialog), 10); | 2922 gtk_container_border_width(GTK_CONTAINER(c->link_dialog), 10); |
2923 gtk_window_set_title(GTK_WINDOW(c->link_dialog), _("Gaim - Add URL")); | 2923 gtk_window_set_title(GTK_WINDOW(c->link_dialog), _("Gaim - Add URL")); |
2924 gtk_window_set_focus(GTK_WINDOW(c->link_dialog), b->url); | 2924 gtk_window_set_focus(GTK_WINDOW(c->link_dialog), b->url); |
2925 b->window = c->link_dialog; | 2925 b->window = c->link_dialog; |
2926 b->toggle = linky; | 2926 b->toggle = linky; |
2927 /* FIXME b->entry_view = c->entry_view;*/ | 2927 b->entry = c->entry; |
2928 gtk_widget_realize(c->link_dialog); | 2928 gtk_widget_realize(c->link_dialog); |
2929 | 2929 |
2930 } | 2930 } |
2931 | 2931 |
2932 gtk_widget_show(c->link_dialog); | 2932 gtk_widget_show(c->link_dialog); |
2984 | 2984 |
2985 c->fgcol = text_color; | 2985 c->fgcol = text_color; |
2986 c->hasfg = 1; | 2986 c->hasfg = 1; |
2987 g_snprintf(open_tag, 23, "<FONT COLOR=\"#%02X%02X%02X\">", text_color.red, text_color.green, | 2987 g_snprintf(open_tag, 23, "<FONT COLOR=\"#%02X%02X%02X\">", text_color.red, text_color.green, |
2988 text_color.blue); | 2988 text_color.blue); |
2989 surround(c, open_tag, "</FONT>"); | 2989 surround(c->entry, open_tag, "</FONT>"); |
2990 debug_printf("#%02X%02X%02X\n", text_color.red, text_color.green, text_color.blue); | 2990 debug_printf("#%02X%02X%02X\n", text_color.red, text_color.green, text_color.blue); |
2991 g_free(open_tag); | 2991 g_free(open_tag); |
2992 cancel_fgcolor(NULL, c); | 2992 cancel_fgcolor(NULL, c); |
2993 } | 2993 } |
2994 | 2994 |
3011 | 3011 |
3012 c->bgcol = text_color; | 3012 c->bgcol = text_color; |
3013 c->hasbg = 1; | 3013 c->hasbg = 1; |
3014 g_snprintf(open_tag, 25, "<BODY BGCOLOR=\"#%02X%02X%02X\">", text_color.red, text_color.green, | 3014 g_snprintf(open_tag, 25, "<BODY BGCOLOR=\"#%02X%02X%02X\">", text_color.red, text_color.green, |
3015 text_color.blue); | 3015 text_color.blue); |
3016 surround(c, open_tag, "</BODY>"); | 3016 surround(c->entry, open_tag, "</BODY>"); |
3017 debug_printf("#%02X%02X%02X\n", text_color.red, text_color.green, text_color.blue); | 3017 debug_printf("#%02X%02X%02X\n", text_color.red, text_color.green, text_color.blue); |
3018 g_free(open_tag); | 3018 g_free(open_tag); |
3019 cancel_bgcolor(NULL, c); | 3019 cancel_bgcolor(NULL, c); |
3020 } | 3020 } |
3021 | 3021 |
3557 return; | 3557 return; |
3558 } | 3558 } |
3559 | 3559 |
3560 void insert_smiley_text(GtkWidget *widget, struct conversation *c) | 3560 void insert_smiley_text(GtkWidget *widget, struct conversation *c) |
3561 { | 3561 { |
3562 gtk_text_buffer_insert_at_cursor(c->entry_buffer, | 3562 char *smiley_text; |
3563 current_smiley, -1); | 3563 |
3564 smiley_text = strdup(current_smiley); | |
3565 | |
3566 /* surround(c->entry, smiley_text, ""); */ | |
3567 | |
3568 if (GTK_OLD_EDITABLE(c->entry)->has_selection) { | |
3569 int finish = GTK_OLD_EDITABLE(c->entry)->selection_end_pos; | |
3570 gtk_editable_insert_text(GTK_EDITABLE(c->entry), | |
3571 smiley_text, strlen(smiley_text), &finish); | |
3572 } else { | |
3573 int pos = GTK_OLD_EDITABLE(c->entry)->current_pos; | |
3574 gtk_editable_insert_text(GTK_EDITABLE(c->entry), smiley_text, strlen(smiley_text), &pos); | |
3575 } | |
3576 | |
3577 g_free(smiley_text); | |
3578 | |
3564 close_smiley_dialog(NULL, c); | 3579 close_smiley_dialog(NULL, c); |
3580 | |
3581 return; | |
3565 } | 3582 } |
3566 | 3583 |
3567 static void toolbar_add_smiley(struct conversation *c, GtkWidget *bar, char **xpm, GtkWidget *win, | 3584 static void toolbar_add_smiley(struct conversation *c, GtkWidget *bar, char **xpm, GtkWidget *win, |
3568 char *face) | 3585 char *face) |
3569 { | 3586 { |