changeset 146:99248fb977c2

[gaim-migrate @ 156] Started adding support for changing user passwords. committer: Tailor Script <tailor@pidgin.im>
author Rob Flynn <gaim@robflynn.com>
date Fri, 21 Apr 2000 08:07:26 +0000
parents 41bd1cd48571
children ec301cfcaebf
files src/buddy.c src/dialogs.c src/gaim.h
diffstat 3 files changed, 55 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/buddy.c	Fri Apr 21 01:25:44 2000 +0000
+++ b/src/buddy.c	Fri Apr 21 08:07:26 2000 +0000
@@ -1719,7 +1719,10 @@
 	gtk_menu_append(GTK_MENU(setmenu), menuitem);
 	gtk_signal_connect(GTK_OBJECT(menuitem), "activate", GTK_SIGNAL_FUNC(show_set_dir), NULL);	
 	gtk_widget_show(menuitem);
-
+	menuitem = gtk_menu_item_new_with_label("Change Password");
+	gtk_menu_append(GTK_MENU(setmenu), menuitem);
+	gtk_signal_connect(GTK_OBJECT(menuitem), "activate", GTK_SIGNAL_FUNC(show_change_passwd), NULL);
+	gtk_widget_show(menuitem);
 	gaim_seperator(menu);
 
         gaim_new_item(menu, "Preferences", GTK_SIGNAL_FUNC(show_prefs));
--- a/src/dialogs.c	Fri Apr 21 01:25:44 2000 +0000
+++ b/src/dialogs.c	Fri Apr 21 08:07:26 2000 +0000
@@ -140,6 +140,14 @@
 	GtkWidget *entry;
 };
 
+struct passwddlg {
+	GtkWidget *window;
+	GtkWidget *ok;
+	GtkWidget *cancel;
+	GtkWidget *original;
+	GtkWidget *new1;
+	GtkWidget *new2;
+};
 
 /*------------------------------------------------------------------------*/
 /*  Function to Send an Email                                             */
@@ -1035,6 +1043,47 @@
 	gtk_widget_show(b->window);	
 }
 
+void show_change_passwd()
+{
+	GtkWidget *hbox;
+	GtkWidget *label;
+	GtkWidget *vbox;
+	struct passwddlg *b = g_new0(struct passwddlg, 1);
+
+	b->window = gtk_window_new(GTK_WINDOW_DIALOG);
+	dialogwindows = g_list_prepend(dialogwindows, b->window);
+	b->cancel = gtk_button_new_with_label("Cancel");
+	b->ok = gtk_button_new_with_label("Ok");
+
+	vbox = gtk_vbox_new(FALSE, 10);
+	label = gtk_label_new("Changing Password");
+	gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 10);
+	gtk_widget_show(label);
+
+	hbox = gtk_hbox_new(FALSE, 10);
+	label = gtk_label_new("Original Password");
+	gtk_widget_show(label);
+	gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 10);
+
+	b->original = gtk_entry_new();
+	gtk_box_pack_start(GTK_BOX(hbox), b->original, FALSE, FALSE, 10);
+
+	gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 10);
+	gtk_widget_show(hbox);
+
+
+        label = gtk_label_new("Got sleepy, Will add the rest later.");
+        gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 10);
+        gtk_widget_show(label);
+	
+	gtk_container_add(GTK_CONTAINER(b->window), vbox);
+	gtk_widget_show(vbox);
+	gtk_widget_show(b->original);
+	aol_icon(b->window->window);
+	gtk_widget_realize(b->window);
+	gtk_widget_show(b->window);
+}
+
 void show_set_info()
 {
 	GtkWidget *bot;
--- a/src/gaim.h	Fri Apr 21 01:25:44 2000 +0000
+++ b/src/gaim.h	Fri Apr 21 08:07:26 2000 +0000
@@ -296,7 +296,7 @@
 #define TYPE_SIGNOFF   4
 #define TYPE_KEEPALIVE 5
 
-#define REVISION "gaim:$Revision: 152 $"
+#define REVISION "gaim:$Revision: 156 $"
 #define FLAPON "FLAPON\r\n\r\n"
 
 #define ROAST "Tic/Toc"
@@ -610,7 +610,7 @@
 extern void create_away_mess(GtkWidget *, void *);
 extern void show_ee_dialog(int);
 extern void show_add_link(GtkWidget *, GtkWidget *);
-
+extern void show_change_passwd();
 
 /* Functions in browser.c */
 extern void open_url(GtkWidget *, char *);