diff src/dialogs.c @ 6372:9dd4bb3cf1df

[gaim-migrate @ 6877] Moved some utility functions out of dialogs.c and into gtkutils.c. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Tue, 05 Aug 2003 11:08:40 +0000
parents 8f94cce8faa5
children e9974608b319
line wrap: on
line diff
--- a/src/dialogs.c	Tue Aug 05 10:55:04 2003 +0000
+++ b/src/dialogs.c	Tue Aug 05 11:08:40 2003 +0000
@@ -25,7 +25,6 @@
 #include "multi.h"
 #include "notify.h"
 #include "prefs.h"
-#include "privacy.h"
 #include "prpl.h"
 #include "request.h"
 #include "status.h"
@@ -3496,100 +3495,3 @@
 					   _("OK"), G_CALLBACK(do_rename_group),
 					   _("Cancel"), NULL, g);
 }
-
-GtkWidget *gaim_pixbuf_toolbar_button_from_stock(char *icon)
-{
-	GtkWidget *button, *image,  *bbox;
-
-	button = gtk_toggle_button_new();
-	gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE);
-
-	bbox = gtk_vbox_new(FALSE, 0);
-
-	gtk_container_add (GTK_CONTAINER(button), bbox);
-
-	image = gtk_image_new_from_stock(icon, GTK_ICON_SIZE_MENU);
-	gtk_box_pack_start(GTK_BOX(bbox), image, FALSE, FALSE, 0);
-
-	gtk_widget_show_all(bbox);
-	return button;
-}
-
-GtkWidget *
-gaim_pixbuf_button_from_stock(const char *text, const char *icon,
-							  GaimButtonOrientation style)
-{
-	GtkWidget *button, *image, *label, *bbox, *ibox, *lbox;
-	button = gtk_button_new();
-
-	if (style == GAIM_BUTTON_HORIZONTAL) {
-			bbox = gtk_hbox_new(FALSE, 5);
-			ibox = gtk_hbox_new(FALSE, 0);
-			lbox = gtk_hbox_new(FALSE, 0);
-	} else {
-			bbox = gtk_vbox_new(FALSE, 5);
-			ibox = gtk_vbox_new(FALSE, 0);
-			lbox = gtk_vbox_new(FALSE, 0);
-	}
-
-	gtk_container_add (GTK_CONTAINER(button), bbox);
-
-	gtk_box_pack_start_defaults(GTK_BOX(bbox), ibox);
-	gtk_box_pack_start_defaults(GTK_BOX(bbox), lbox);
-
-	if (icon) {
-		image = gtk_image_new_from_stock(icon, GTK_ICON_SIZE_BUTTON);
-		gtk_box_pack_end(GTK_BOX(ibox), image, FALSE, FALSE, 0);
-	}
-
-	if (text) {
-		label = gtk_label_new(NULL);
-		gtk_label_set_text_with_mnemonic(GTK_LABEL(label), text);
-		gtk_label_set_mnemonic_widget(GTK_LABEL(label), button);
-		gtk_box_pack_start(GTK_BOX(lbox), label, FALSE, FALSE, 0);
-	}
-
-	gtk_widget_show_all(bbox);
-	return button;
-}
-
-GtkWidget *gaim_pixbuf_button(char *text, char *iconfile, GaimButtonOrientation style)
-{
-	GtkWidget *button, *image, *label, *bbox, *ibox, *lbox;
-	button = gtk_button_new();
-
-	if (style == GAIM_BUTTON_HORIZONTAL) {
-			bbox = gtk_hbox_new(FALSE, 5);
-			ibox = gtk_hbox_new(FALSE, 0);
-			lbox = gtk_hbox_new(FALSE, 0);
-	} else {
-			bbox = gtk_vbox_new(FALSE, 5);
-			ibox = gtk_vbox_new(FALSE, 0);
-			lbox = gtk_vbox_new(FALSE, 0);
-	}
-
-	gtk_container_add (GTK_CONTAINER(button), bbox);
-
-	gtk_box_pack_start_defaults(GTK_BOX(bbox), ibox);
-	gtk_box_pack_start_defaults(GTK_BOX(bbox), lbox);
-
-	if (iconfile) {
-		char *filename;
-		filename = g_build_filename (DATADIR, "pixmaps", "gaim", "buttons", iconfile, NULL);
-		gaim_debug(GAIM_DEBUG_MISC, "gaim_pixbuf_button",
-				   "Loading: %s\n", filename);
-		image = gtk_image_new_from_file(filename);
-		gtk_box_pack_end(GTK_BOX(ibox), image, FALSE, FALSE, 0);
-		g_free(filename);
-	}
-
-	if (text) {
-		label = gtk_label_new(NULL);
-		gtk_label_set_text_with_mnemonic(GTK_LABEL(label), text);
-		gtk_label_set_mnemonic_widget(GTK_LABEL(label), button);
-		gtk_box_pack_start(GTK_BOX(lbox), label, FALSE, FALSE, 0);
-	}
-
-	gtk_widget_show_all(bbox);
-	return button;
-}