src/dialogs.c

changeset 7062
26abb8b189ce
parent 7060
717cbeb22b6d
child 7063
4bfe512a4b8c
--- a/src/dialogs.c	Tue Sep 30 05:58:48 2003 +0000
+++ b/src/dialogs.c	Tue Sep 30 06:43:17 2003 +0000
@@ -121,26 +121,6 @@
 
 } GaimGtkBlockData;
 
-static GSList *info_dlgs = NULL;
-
-static struct info_dlg *find_info_dlg(GaimConnection *gc, const char *who)
-{
-	GSList *i = info_dlgs;
-	while (i) {
-		struct info_dlg *d = i->data;
-		i = i->next;
-		if (d->gc != gc)
-			continue;
-		if (d->who == NULL)
-			continue;
-		if (!who)
-			continue;
-		if (!gaim_utf8_strcasecmp(normalize(who), d->who))
-			return d;
-	}
-	return NULL;
-}
-
 struct set_info_dlg {
 	GtkWidget *window;
 	GtkWidget *menu;
@@ -1217,115 +1197,6 @@
 	gtk_widget_show_all(b->window);
 }
 
-/*------------------------------------------------------------------------*/
-/*  The dialog for the info requests                                      */
-/*------------------------------------------------------------------------*/
-
-static void info_dlg_free(GtkWidget *b, struct info_dlg *d)
-{
-	if (g_slist_find(info_dlgs, d))
-		info_dlgs = g_slist_remove(info_dlgs, d);
-	g_free(d->who);
-	g_free(d);
-}
-
-/* if away is 0, show regardless and try to get away message
- *            1, don't show if regular info isn't shown
- *            2, show regardless but don't try to get away message
- *
- * i wish this were my client. if i were i wouldn't have to deal with this shit.
- */
-void g_show_info_text(GaimConnection *gc, const char *who, int away, const char *info, ...)
-{
-	GtkWidget *ok;
-	GtkWidget *label;
-	GtkWidget *text;
-	GtkWidget *bbox;
-	GtkWidget *sw;
-	gint options = 0;
-	gchar *linkifyinated;
-	va_list ap;
-	char *more_info;
-
-	struct info_dlg *b = find_info_dlg(gc, who);
-	if (!b && (away == 1))
-		return;
-	if (!b) {
-		b = g_new0(struct info_dlg, 1);
-		b->gc = gc;
-		b->who = who ? g_strdup(normalize(who)) : NULL;
-		info_dlgs = g_slist_append(info_dlgs, b);
-
-		GAIM_DIALOG(b->window);
-		gtk_window_set_title(GTK_WINDOW(b->window), "Gaim");
-		gtk_window_set_role(GTK_WINDOW(b->window), "get_info");
-		gtk_container_set_border_width(GTK_CONTAINER(b->window), 5);
-		gtk_widget_realize(GTK_WIDGET(b->window));
-		g_signal_connect(G_OBJECT(b->window), "destroy", G_CALLBACK(info_dlg_free), b);
-
-		bbox = gtk_vbox_new(FALSE, 5);
-		gtk_container_add(GTK_CONTAINER(b->window), bbox);
-
-		label = gtk_label_new(_("Below are the results of your search: "));
-		gtk_box_pack_start(GTK_BOX(bbox), label, FALSE, FALSE, 0);
-
-		sw = gtk_scrolled_window_new(NULL, NULL);
-		gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
-		gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_IN);
-		gtk_box_pack_start(GTK_BOX(bbox), sw, TRUE, TRUE, 0);
-
-		text = gtk_imhtml_new(NULL, NULL);
-		b->text = text;
-		gtk_container_add(GTK_CONTAINER(sw), text);
-		gtk_widget_set_size_request(sw, 300, 250);
-		gaim_setup_imhtml(text);
-
-		ok = gaim_pixbuf_button_from_stock(_("OK"), GTK_STOCK_OK, GAIM_BUTTON_HORIZONTAL);
-		g_signal_connect_swapped(G_OBJECT(ok), "clicked", G_CALLBACK(gtk_widget_destroy),
-					  G_OBJECT(b->window));
-		gtk_box_pack_start(GTK_BOX(bbox), ok, FALSE, FALSE, 0);
-
-		gtk_widget_show_all(b->window);
-	}
-
-	if (gaim_prefs_get_bool("/gaim/gtk/conversations/ignore_colors"))
-		options ^= GTK_IMHTML_NO_COLOURS;
-
-	if (gaim_prefs_get_bool("/gaim/gtk/conversations/ignore_fonts"))
-		options ^= GTK_IMHTML_NO_FONTS;
-
-	if (gaim_prefs_get_bool("/gaim/gtk/conversations/ignore_font_sizes"))
-		options ^= GTK_IMHTML_NO_SIZES;
-
-	options ^= GTK_IMHTML_NO_COMMENTS;
-	options ^= GTK_IMHTML_NO_TITLE;
-	options ^= GTK_IMHTML_NO_NEWLINE;
-	options ^= GTK_IMHTML_NO_SCROLL;
-
-	if (gaim_prefs_get_bool("/gaim/gtk/conversations/show_urls_as_links")) {
-		linkifyinated = linkify_text(info);
-		gtk_imhtml_append_text(GTK_IMHTML(b->text), linkifyinated, options);
-		g_free(linkifyinated);
-	} else
-		gtk_imhtml_append_text(GTK_IMHTML(b->text), info, options);
-
-	va_start(ap, info);
-	while ((more_info = va_arg(ap, char *)) != NULL) {
-		if (gaim_prefs_get_bool("/gaim/gtk/conversations/show_urls_as_links")) {
-			linkifyinated = linkify_text(more_info);
-			gtk_imhtml_append_text(GTK_IMHTML(b->text), linkifyinated, options);
-			g_free(linkifyinated);
-		} else
-			gtk_imhtml_append_text(GTK_IMHTML(b->text), more_info, options);
-	}
-	va_end(ap);
-
-	if (away)
-		info_dlgs = g_slist_remove(info_dlgs, b);
-	else
-		serv_get_away(gc, who);
-}
-
 
 /*------------------------------------------------------------------------*/
 /*  Functions Called To Add A Log                                          */

mercurial