Mercurial > pidgin.yaz
comparison src/gtkutils.c @ 7988:d9e831876c28
[gaim-migrate @ 8665]
Here's my best attempt to rip WYSIWYG editing out of gaim, kicking and
screaming all the way.
We'll be releasing 0.75 in the very near future, once the translators are
alerted, and any bugs from this dissection show themselves.
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Sun, 04 Jan 2004 06:59:09 +0000 |
parents | 1b8261f374ea |
children | fa6395637e2c |
comparison
equal
deleted
inserted
replaced
7987:fc6b362f9c26 | 7988:d9e831876c28 |
---|---|
238 | 238 |
239 void | 239 void |
240 gaim_gtk_set_font_face(GaimGtkConversation *gtkconv, | 240 gaim_gtk_set_font_face(GaimGtkConversation *gtkconv, |
241 const char *font) | 241 const char *font) |
242 { | 242 { |
243 char *pre_fontface; | |
244 | |
243 if (gtkconv == NULL || font == NULL) | 245 if (gtkconv == NULL || font == NULL) |
244 return; | 246 return; |
245 | 247 |
246 strncpy(gtkconv->fontface, | 248 strncpy(gtkconv->fontface, |
247 (font && *font ? font : DEFAULT_FONT_FACE), | 249 (font && *font ? font : DEFAULT_FONT_FACE), |
248 sizeof(gtkconv->fontface)); | 250 sizeof(gtkconv->fontface)); |
249 | 251 |
250 gtkconv->has_font = TRUE; | 252 gtkconv->has_font = TRUE; |
251 | 253 |
252 gtk_imhtml_toggle_fontface(GTK_IMHTML(gtkconv->entry), gtkconv->fontface); | 254 pre_fontface = g_strconcat("<FONT FACE=\"", gtkconv->fontface, "\">", NULL); |
255 gaim_gtk_surround(gtkconv, pre_fontface, "</FONT>"); | |
253 | 256 |
254 gtk_widget_grab_focus(gtkconv->entry); | 257 gtk_widget_grab_focus(gtkconv->entry); |
255 | 258 |
259 g_free(pre_fontface); | |
256 } | 260 } |
257 | 261 |
258 static int | 262 static int |
259 des_save_icon(GtkObject *obj, GdkEvent *e, | 263 des_save_icon(GtkObject *obj, GdkEvent *e, |
260 GaimGtkConversation *gtkconv) | 264 GaimGtkConversation *gtkconv) |