Mercurial > pidgin
comparison src/gtkconv.c @ 4398:a8249a5250b6
[gaim-migrate @ 4667]
Made use of the new GAIM_IS_GTK_WINDOW() and GAIM_IS_GTK_CONVERSATION()
macros.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Wed, 22 Jan 2003 23:46:59 +0000 |
parents | ce3a0eba91ef |
children | 0521eec12c33 |
comparison
equal
deleted
inserted
replaced
4397:ce3a0eba91ef | 4398:a8249a5250b6 |
---|---|
4198 | 4198 |
4199 for (cl = gaim_get_conversations(); cl != NULL; cl = cl->next) { | 4199 for (cl = gaim_get_conversations(); cl != NULL; cl = cl->next) { |
4200 | 4200 |
4201 conv = (struct gaim_conversation *)cl->data; | 4201 conv = (struct gaim_conversation *)cl->data; |
4202 | 4202 |
4203 if (gaim_conversation_get_ops(conv) != gaim_get_gtk_conversation_ops()) | 4203 if (!GAIM_IS_GTK_CONVERSATION(conv)) |
4204 continue; | 4204 continue; |
4205 | 4205 |
4206 gtkconv = GAIM_GTK_CONVERSATION(conv); | 4206 gtkconv = GAIM_GTK_CONVERSATION(conv); |
4207 | 4207 |
4208 gtk_imhtml_show_smileys(GTK_IMHTML(gtkconv->imhtml), | 4208 gtk_imhtml_show_smileys(GTK_IMHTML(gtkconv->imhtml), |
4219 | 4219 |
4220 for (cl = gaim_get_conversations(); cl != NULL; cl = cl->next) { | 4220 for (cl = gaim_get_conversations(); cl != NULL; cl = cl->next) { |
4221 | 4221 |
4222 conv = (struct gaim_conversation *)cl->data; | 4222 conv = (struct gaim_conversation *)cl->data; |
4223 | 4223 |
4224 if (gaim_conversation_get_ops(conv) != gaim_get_gtk_conversation_ops()) | 4224 if (!GAIM_IS_GTK_CONVERSATION(conv)) |
4225 continue; | 4225 continue; |
4226 | 4226 |
4227 gtkconv = GAIM_GTK_CONVERSATION(conv); | 4227 gtkconv = GAIM_GTK_CONVERSATION(conv); |
4228 | 4228 |
4229 gtk_imhtml_show_comments(GTK_IMHTML(gtkconv->imhtml), | 4229 gtk_imhtml_show_comments(GTK_IMHTML(gtkconv->imhtml), |
4242 | 4242 |
4243 for (cl = gaim_get_conversations(); cl != NULL; cl = cl->next) { | 4243 for (cl = gaim_get_conversations(); cl != NULL; cl = cl->next) { |
4244 | 4244 |
4245 conv = (struct gaim_conversation *)cl->data; | 4245 conv = (struct gaim_conversation *)cl->data; |
4246 | 4246 |
4247 if (gaim_conversation_get_ops(conv) != gaim_get_gtk_conversation_ops()) | 4247 if (!GAIM_IS_GTK_CONVERSATION(conv)) |
4248 continue; | 4248 continue; |
4249 | 4249 |
4250 gtkconv = GAIM_GTK_CONVERSATION(conv); | 4250 gtkconv = GAIM_GTK_CONVERSATION(conv); |
4251 | 4251 |
4252 if (convo_options & OPT_CONVO_CHECK_SPELLING) | 4252 if (convo_options & OPT_CONVO_CHECK_SPELLING) |
4333 start_anim(GtkObject *obj, struct gaim_conversation *conv) | 4333 start_anim(GtkObject *obj, struct gaim_conversation *conv) |
4334 { | 4334 { |
4335 struct gaim_gtk_conversation *gtkconv; | 4335 struct gaim_gtk_conversation *gtkconv; |
4336 int delay; | 4336 int delay; |
4337 | 4337 |
4338 if (gaim_conversation_get_ops(conv) != gaim_get_gtk_conversation_ops()) | 4338 if (!GAIM_IS_GTK_CONVERSATION(conv)) |
4339 return; | 4339 return; |
4340 | 4340 |
4341 gtkconv = GAIM_GTK_CONVERSATION(conv); | 4341 gtkconv = GAIM_GTK_CONVERSATION(conv); |
4342 | 4342 |
4343 delay = gdk_pixbuf_animation_iter_get_delay_time(gtkconv->u.im->iter) / 10; | 4343 delay = gdk_pixbuf_animation_iter_get_delay_time(gtkconv->u.im->iter) / 10; |
4350 static void | 4350 static void |
4351 stop_anim(GtkObject *obj, struct gaim_conversation *conv) | 4351 stop_anim(GtkObject *obj, struct gaim_conversation *conv) |
4352 { | 4352 { |
4353 struct gaim_gtk_conversation *gtkconv; | 4353 struct gaim_gtk_conversation *gtkconv; |
4354 | 4354 |
4355 if (gaim_conversation_get_ops(conv) != gaim_get_gtk_conversation_ops()) | 4355 if (!GAIM_IS_GTK_CONVERSATION(conv)) |
4356 return; | 4356 return; |
4357 | 4357 |
4358 gtkconv = GAIM_GTK_CONVERSATION(conv); | 4358 gtkconv = GAIM_GTK_CONVERSATION(conv); |
4359 | 4359 |
4360 if (gtkconv->u.im->icon_timer != 0) | 4360 if (gtkconv->u.im->icon_timer != 0) |
4437 GdkPixbuf *scale; | 4437 GdkPixbuf *scale; |
4438 GdkPixmap *pm; | 4438 GdkPixmap *pm; |
4439 GdkBitmap *bm; | 4439 GdkBitmap *bm; |
4440 int sf = 0; | 4440 int sf = 0; |
4441 | 4441 |
4442 if (conv == NULL || | 4442 if (conv == NULL || !GAIM_IS_GTK_CONVERSATION(conv) || |
4443 gaim_conversation_get_ops(conv) != gaim_get_gtk_conversation_ops() || | |
4444 gaim_conversation_get_type(conv) != GAIM_CONV_IM) { | 4443 gaim_conversation_get_type(conv) != GAIM_CONV_IM) { |
4445 | 4444 |
4446 return; | 4445 return; |
4447 } | 4446 } |
4448 | 4447 |
4573 struct gaim_gtk_conversation *gtkconv; | 4572 struct gaim_gtk_conversation *gtkconv; |
4574 | 4573 |
4575 for (l = gaim_get_ims(); l != NULL; l = l->next) { | 4574 for (l = gaim_get_ims(); l != NULL; l = l->next) { |
4576 conv = (struct gaim_conversation *)l->data; | 4575 conv = (struct gaim_conversation *)l->data; |
4577 | 4576 |
4578 if (gaim_conversation_get_ops(conv) != | 4577 if (!GAIM_IS_GTK_CONVERSATION(conv)) |
4579 gaim_get_gtk_conversation_ops()) | |
4580 continue; | 4578 continue; |
4581 | 4579 |
4582 gtkconv = GAIM_GTK_CONVERSATION(conv); | 4580 gtkconv = GAIM_GTK_CONVERSATION(conv); |
4583 | 4581 |
4584 if (gtkconv->toolbar.bold != NULL) | 4582 if (gtkconv->toolbar.bold != NULL) |
4608 : ((im_options & OPT_IM_BR_TAB) ? GTK_POS_BOTTOM : GTK_POS_TOP)); | 4606 : ((im_options & OPT_IM_BR_TAB) ? GTK_POS_BOTTOM : GTK_POS_TOP)); |
4609 | 4607 |
4610 for (l = gaim_get_windows(); l != NULL; l = l->next) { | 4608 for (l = gaim_get_windows(); l != NULL; l = l->next) { |
4611 win = (struct gaim_window *)l->data; | 4609 win = (struct gaim_window *)l->data; |
4612 | 4610 |
4613 if (gaim_window_get_ops(win) != gaim_get_gtk_window_ops()) | 4611 if (!GAIM_IS_GTK_WINDOW(win)) |
4614 continue; | 4612 continue; |
4615 | 4613 |
4616 gtkwin = GAIM_GTK_WINDOW(win); | 4614 gtkwin = GAIM_GTK_WINDOW(win); |
4617 | 4615 |
4618 gtk_notebook_set_tab_pos(GTK_NOTEBOOK(gtkwin->notebook), pos); | 4616 gtk_notebook_set_tab_pos(GTK_NOTEBOOK(gtkwin->notebook), pos); |
4639 conv = (struct gaim_conversation *)bcs->data; | 4637 conv = (struct gaim_conversation *)bcs->data; |
4640 | 4638 |
4641 if (gaim_conversation_get_type(conv) != GAIM_CONV_CHAT) | 4639 if (gaim_conversation_get_type(conv) != GAIM_CONV_CHAT) |
4642 continue; | 4640 continue; |
4643 | 4641 |
4644 if (gaim_conversation_get_ops(conv) != | 4642 if (!GAIM_IS_GTK_CONVERSATION(conv)) |
4645 gaim_get_gtk_conversation_ops()) | |
4646 continue; | 4643 continue; |
4647 | 4644 |
4648 gtkconv = GAIM_GTK_CONVERSATION(conv); | 4645 gtkconv = GAIM_GTK_CONVERSATION(conv); |
4649 gtkwin = GAIM_GTK_WINDOW(gaim_conversation_get_window(conv)); | 4646 gtkwin = GAIM_GTK_WINDOW(gaim_conversation_get_window(conv)); |
4650 parent = gtk_widget_get_parent(gtkconv->send); | 4647 parent = gtk_widget_get_parent(gtkconv->send); |
4698 struct gaim_window *win; | 4695 struct gaim_window *win; |
4699 struct gaim_gtk_window *gtkwin = NULL; | 4696 struct gaim_gtk_window *gtkwin = NULL; |
4700 struct gaim_gtk_conversation *gtkconv; | 4697 struct gaim_gtk_conversation *gtkconv; |
4701 struct gaim_connection *gc; | 4698 struct gaim_connection *gc; |
4702 | 4699 |
4703 if (gaim_conversation_get_ops(conv) != gaim_get_gtk_conversation_ops()) | 4700 if (!GAIM_IS_GTK_CONVERSATION(conv)) |
4704 return; | 4701 return; |
4705 | 4702 |
4706 gc = gaim_conversation_get_gc(conv); | 4703 gc = gaim_conversation_get_gc(conv); |
4707 win = gaim_conversation_get_window(conv); | 4704 win = gaim_conversation_get_window(conv); |
4708 gtkconv = GAIM_GTK_CONVERSATION(conv); | 4705 gtkconv = GAIM_GTK_CONVERSATION(conv); |
4793 gdkwin = gdk_window_get_toplevel(gdkwin); | 4790 gdkwin = gdk_window_get_toplevel(gdkwin); |
4794 | 4791 |
4795 for (l = gaim_get_windows(); l != NULL; l = l->next) { | 4792 for (l = gaim_get_windows(); l != NULL; l = l->next) { |
4796 win = (struct gaim_window *)l->data; | 4793 win = (struct gaim_window *)l->data; |
4797 | 4794 |
4798 if (gaim_window_get_ops(win) != gaim_get_gtk_window_ops()) | 4795 if (!GAIM_IS_GTK_WINDOW(win)) |
4799 continue; | 4796 continue; |
4800 | 4797 |
4801 gtkwin = GAIM_GTK_WINDOW(win); | 4798 gtkwin = GAIM_GTK_WINDOW(win); |
4802 | 4799 |
4803 if (gdkwin == gtkwin->window->window) | 4800 if (gdkwin == gtkwin->window->window) |
4816 GtkNotebook *notebook; | 4813 GtkNotebook *notebook; |
4817 GtkWidget *tab; | 4814 GtkWidget *tab; |
4818 gint i, page_num = 0; | 4815 gint i, page_num = 0; |
4819 gboolean first_visible = TRUE; | 4816 gboolean first_visible = TRUE; |
4820 | 4817 |
4821 if (gaim_window_get_ops(win) != gaim_get_gtk_window_ops()) | 4818 if (!GAIM_IS_GTK_WINDOW(win)) |
4822 return -1; | 4819 return -1; |
4823 | 4820 |
4824 gtkwin = GAIM_GTK_WINDOW(win); | 4821 gtkwin = GAIM_GTK_WINDOW(win); |
4825 notebook = GTK_NOTEBOOK(gtkwin->notebook); | 4822 notebook = GTK_NOTEBOOK(gtkwin->notebook); |
4826 | 4823 |
4883 gint nb_x, nb_y, x_rel, y_rel; | 4880 gint nb_x, nb_y, x_rel, y_rel; |
4884 GtkNotebook *notebook; | 4881 GtkNotebook *notebook; |
4885 GtkWidget *tab; | 4882 GtkWidget *tab; |
4886 gint i, page_num = 0; | 4883 gint i, page_num = 0; |
4887 | 4884 |
4888 if (gaim_window_get_ops(win) != gaim_get_gtk_window_ops()) | 4885 if (!GAIM_IS_GTK_WINDOW(win)) |
4889 return -1; | 4886 return -1; |
4890 | 4887 |
4891 gtkwin = GAIM_GTK_WINDOW(win); | 4888 gtkwin = GAIM_GTK_WINDOW(win); |
4892 notebook = GTK_NOTEBOOK(gtkwin->notebook); | 4889 notebook = GTK_NOTEBOOK(gtkwin->notebook); |
4893 | 4890 |