From: Christian H. <ch...@us...> - 2003-06-21 07:59:56
|
Update of /cvsroot/gaim/gaim/src In directory sc8-pr-cvs1:/tmp/cvs-serv5864 Modified Files: prpl.c ui.h Log Message: Removed an old function that hasn't been used in a long time. Hurray code unbloat! Index: prpl.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/prpl.c,v retrieving revision 1.117 retrieving revision 1.118 diff -u -d -r1.117 -r1.118 --- prpl.c 14 Jun 2003 23:21:00 -0000 1.117 +++ prpl.c 21 Jun 2003 07:59:53 -0000 1.118 @@ -410,114 +410,3 @@ _("Cancel"), G_CALLBACK(dont_add)); } -static GtkWidget *regdlg = NULL; -static GtkWidget *reg_list = NULL; -static GtkWidget *reg_area = NULL; -static GtkWidget *reg_reg = NULL; - -static void delete_regdlg() -{ - GtkWidget *tmp = regdlg; - regdlg = NULL; - if (tmp) - gtk_widget_destroy(tmp); -} - -static void reset_reg_dlg() -{ - GList *P = gaim_plugins_get_protocols(); - - if (!regdlg) - return; - - while (GTK_BOX(reg_list)->children) - gtk_container_remove(GTK_CONTAINER(reg_list), - ((GtkBoxChild *)GTK_BOX(reg_list)->children->data)->widget); - - while (GTK_BOX(reg_area)->children) - gtk_container_remove(GTK_CONTAINER(reg_area), - ((GtkBoxChild *)GTK_BOX(reg_area)->children->data)->widget); - - while (P) { - GaimPlugin *p = P->data; - - if (GAIM_PLUGIN_PROTOCOL_INFO(p)->register_user) - break; - - P = P->next; - } - - if (!P) { - GtkWidget *no = gtk_label_new(_("You do not currently have any protocols available" - " that are able to register new accounts.")); - gtk_box_pack_start(GTK_BOX(reg_area), no, FALSE, FALSE, 5); - gtk_widget_show(no); - - gtk_widget_set_sensitive(reg_reg, FALSE); - - return; - } - - gtk_widget_set_sensitive(reg_reg, TRUE); - - while (P) { /* we can safely ignore all the previous ones */ - GaimPlugin *p = P->data; - P = P->next; - - if (GAIM_PLUGIN_PROTOCOL_INFO(p)->register_user) - continue; - - /* do stuff */ - } -} - -void register_dialog() -{ - /* this is just one big hack */ - GtkWidget *vbox; - GtkWidget *frame; - GtkWidget *hbox; - GtkWidget *close; - - if (regdlg) { - gdk_window_raise(regdlg->window); - return; - } - - regdlg = gtk_window_new(GTK_WINDOW_TOPLEVEL); - gtk_window_set_title(GTK_WINDOW(regdlg), _("Gaim - Registration")); - gtk_window_set_role(GTK_WINDOW(regdlg), "register"); - gtk_widget_realize(regdlg); - g_signal_connect(G_OBJECT(regdlg), "destroy", - G_CALLBACK(delete_regdlg), NULL); - - vbox = gtk_vbox_new(FALSE, 5); - gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); - gtk_container_add(GTK_CONTAINER(regdlg), vbox); - - reg_list = gtk_hbox_new(FALSE, 5); - gtk_box_pack_start(GTK_BOX(vbox), reg_list, FALSE, FALSE, 5); - - frame = gtk_frame_new(_("Registration Information")); - gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 5); - - reg_area = gtk_hbox_new(FALSE, 5); - gtk_container_add(GTK_CONTAINER(frame), reg_area); - - hbox = gtk_hbox_new(FALSE, 5); - gtk_box_pack_end(GTK_BOX(vbox), hbox, FALSE, FALSE, 5); - - close = gaim_pixbuf_button_from_stock(_("Close"), GTK_STOCK_CLOSE, GAIM_BUTTON_HORIZONTAL); - gtk_box_pack_end(GTK_BOX(hbox), close, FALSE, FALSE, 5); - g_signal_connect(G_OBJECT(close), "clicked", - G_CALLBACK(delete_regdlg), NULL); - - reg_reg = gaim_pixbuf_button_from_stock(_("Register"), GTK_STOCK_JUMP_TO, GAIM_BUTTON_HORIZONTAL); - gtk_box_pack_end(GTK_BOX(hbox), reg_reg, FALSE, FALSE, 5); - - /* fuck me */ - reset_reg_dlg(); - - gtk_widget_show_all(regdlg); -} - Index: ui.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/ui.h,v retrieving revision 1.121 retrieving revision 1.122 diff -u -d -r1.121 -r1.122 --- ui.h 14 Jun 2003 23:21:01 -0000 1.121 +++ ui.h 21 Jun 2003 07:59:53 -0000 1.122 @@ -239,9 +239,6 @@ extern void destroy_fontsel(GtkWidget *w, gpointer d); extern void join_chat(); -/* Functions in prpl.c */ -extern void register_dialog(); - /* Functions in server.c */ /* server.c is in desperate need need of a split */ extern int find_queue_total_by_name(char *); |