⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dialogs.c

📁 一个功能全面的电子邮件客户端
💻 C
📖 第 1 页 / 共 5 页
字号:
/* TradeClient <http://tradeclient.sourceforge.net> * $Id: dialogs.c,v 1.46 2001/03/20 22:19:33 ttabner Exp $ * * Copyright (C) 1999-2000 Bynari Inc. * Copyright (C) 2001 Project TradeClient * * LGPL * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Library General Public License as published by * the Free Software Foundation; either version 2 of the License, or (at * your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library * General Public License for more details. * * You should have received a copy of the GNU Library General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */#include "puma.h"GtkWidget* create_enter_password (PopAccount *pop) {  GtkWidget *enter_password;  GtkWidget *dialog_vbox1;  GtkWidget *frame1;  GtkWidget *vbox1;  GtkWidget *label1;  GtkWidget *entry1;  GtkWidget *dialog_action_area1;  GtkWidget *hbox1;  GtkWidget *button1;  GtkWidget *button2;  char *label ;  insert_warning( _("New password will take effect next time mail is checked.\n") ) ;  label = (char *)calloc(strlen(_("Please enter password for account "))+strlen(pop->name)+1, sizeof(char)) ;  snprintf (label, strlen(_("Please enter password for account "))+strlen(pop->name)+1, _("Please enter password for account %s"), pop->name);  enter_password = gtk_dialog_new ();  gtk_object_set_data (GTK_OBJECT (enter_password), "enter_password", enter_password);  gtk_window_set_title (GTK_WINDOW (enter_password), _("Enter Password"));  gtk_window_set_policy (GTK_WINDOW (enter_password), TRUE, TRUE, FALSE);	gtk_widget_set_uposition (enter_password, 280, 215);  dialog_vbox1 = GTK_DIALOG (enter_password)->vbox;  gtk_object_set_data (GTK_OBJECT (enter_password), "dialog_vbox1", dialog_vbox1);  gtk_widget_show (dialog_vbox1);  frame1 = gtk_frame_new (_("Password Incorrect or Undefined"));  gtk_widget_ref (frame1);  gtk_object_set_data_full (GTK_OBJECT (enter_password), "frame1", frame1,                            (GtkDestroyNotify) gtk_widget_unref);  gtk_widget_show (frame1);  gtk_box_pack_start (GTK_BOX (dialog_vbox1), frame1, TRUE, TRUE, 0);  gtk_container_set_border_width (GTK_CONTAINER (frame1), 2);  vbox1 = gtk_vbox_new (FALSE, 0);  gtk_widget_ref (vbox1);  gtk_object_set_data_full (GTK_OBJECT (enter_password), "vbox1", vbox1,                            (GtkDestroyNotify) gtk_widget_unref);  gtk_widget_show (vbox1);  gtk_container_add (GTK_CONTAINER (frame1), vbox1);  gtk_container_set_border_width (GTK_CONTAINER (vbox1), 2);  label1 = gtk_label_new (label);  gtk_widget_ref (label1);  gtk_object_set_data_full (GTK_OBJECT (enter_password), "label1", label1,                            (GtkDestroyNotify) gtk_widget_unref);  gtk_widget_show (label1);  gtk_box_pack_start (GTK_BOX (vbox1), label1, TRUE, TRUE, 0);  entry1 = gtk_entry_new ();  gtk_widget_ref (entry1);  gtk_object_set_data_full (GTK_OBJECT (enter_password), "entry1", entry1,                            (GtkDestroyNotify) gtk_widget_unref);  gtk_widget_show (entry1);  gtk_box_pack_start (GTK_BOX (vbox1), entry1, TRUE, TRUE, 0);	gtk_entry_set_visibility (GTK_ENTRY(entry1), FALSE);	  dialog_action_area1 = GTK_DIALOG (enter_password)->action_area;  gtk_object_set_data (GTK_OBJECT (enter_password), "dialog_action_area1", dialog_action_area1);  gtk_widget_show (dialog_action_area1);  gtk_container_set_border_width (GTK_CONTAINER (dialog_action_area1), 10);  hbox1 = gtk_hbox_new (FALSE, 0);  gtk_widget_ref (hbox1);  gtk_object_set_data_full (GTK_OBJECT (enter_password), "hbox1", hbox1,                            (GtkDestroyNotify) gtk_widget_unref);  gtk_widget_show (hbox1);  gtk_box_pack_start (GTK_BOX (dialog_action_area1), hbox1, TRUE, TRUE, 0);  button1 = gtk_button_new_with_label (_("Ok"));  gtk_widget_ref (button1);  gtk_object_set_data_full (GTK_OBJECT (enter_password), "button1", button1,                            (GtkDestroyNotify) gtk_widget_unref);  gtk_widget_show (button1);  gtk_box_pack_start (GTK_BOX (hbox1), button1, TRUE, TRUE, 0);  GTK_WIDGET_SET_FLAGS (button1, GTK_CAN_DEFAULT);  button2 = gtk_button_new_with_label (_("Cancel"));  gtk_widget_ref (button2);  gtk_object_set_data_full (GTK_OBJECT (enter_password), "button2", button2,                            (GtkDestroyNotify) gtk_widget_unref);  gtk_widget_show (button2);  gtk_box_pack_start (GTK_BOX (hbox1), button2, TRUE, TRUE, 0);	gtk_signal_connect (GTK_OBJECT (button1), "clicked", 											GTK_SIGNAL_FUNC (accept_new_password_dialog), (gpointer)pop);	gtk_signal_connect (GTK_OBJECT (button2), "clicked",											GTK_SIGNAL_FUNC (destroy_new_password_dialog), (gpointer)pop);	gtk_signal_connect (GTK_OBJECT (enter_password), "delete_event",											GTK_SIGNAL_FUNC (destroy_new_password_dialog), (gpointer)pop);  gtk_widget_grab_focus (button1);  gtk_widget_grab_default (button1);  return enter_password;}GtkWidget* create_about_box (void) {  GtkWidget *about_box;  GtkWidget *dialog_vbox1;  GtkWidget *frame1;  GtkWidget *hbox1;  GtkWidget *vbox1;  GtkWidget *pixmap1;  GtkWidget *hseparator1;  GtkWidget *label2;  GtkWidget *hseparator2;  GtkWidget *label3;  GtkWidget *scrolledwindow1;  GtkWidget *text1;  GtkWidget *dialog_action_area1;  GtkWidget *close_button;  about_box = gtk_dialog_new ();  gtk_widget_set_name (about_box, "about_box");  gtk_object_set_data (GTK_OBJECT (about_box), "about_box", about_box);  gtk_window_set_title (GTK_WINDOW (about_box), _("About TradeClient"));  gtk_window_set_default_size (GTK_WINDOW (about_box), 620, -1);  gtk_window_set_policy (GTK_WINDOW (about_box), TRUE, TRUE, TRUE);  dialog_vbox1 = GTK_DIALOG (about_box)->vbox;  gtk_widget_set_name (dialog_vbox1, "dialog_vbox1");  gtk_object_set_data (GTK_OBJECT (about_box), "dialog_vbox1", dialog_vbox1);  gtk_widget_show (dialog_vbox1);  frame1 = gtk_frame_new (NULL);  gtk_widget_set_name (frame1, "frame1");  gtk_widget_ref (frame1);  gtk_object_set_data_full (GTK_OBJECT (about_box), "frame1", frame1,                            (GtkDestroyNotify) gtk_widget_unref);  gtk_widget_show (frame1);  gtk_box_pack_start (GTK_BOX (dialog_vbox1), frame1, TRUE, TRUE, 0);  gtk_container_set_border_width (GTK_CONTAINER (frame1), 2);  hbox1 = gtk_hbox_new (FALSE, 0);  gtk_widget_set_name (hbox1, "hbox1");  gtk_widget_ref (hbox1);  gtk_object_set_data_full (GTK_OBJECT (about_box), "hbox1", hbox1,                            (GtkDestroyNotify) gtk_widget_unref);  gtk_widget_show (hbox1);  gtk_container_add (GTK_CONTAINER (frame1), hbox1);  gtk_container_set_border_width (GTK_CONTAINER (hbox1), 2);  vbox1 = gtk_vbox_new (FALSE, 5);  gtk_widget_set_name (vbox1, "vbox1");  gtk_widget_ref (vbox1);  gtk_object_set_data_full (GTK_OBJECT (about_box), "vbox1", vbox1,                            (GtkDestroyNotify) gtk_widget_unref);  gtk_widget_show (vbox1);  gtk_box_pack_start (GTK_BOX (hbox1), vbox1, FALSE, TRUE, 0);  pixmap1 = pixmap_widget_create (vbox1, PIXMAP_BYNARI);  gtk_widget_set_name (pixmap1, "pixmap1");  gtk_widget_ref (pixmap1);  gtk_object_set_data_full (GTK_OBJECT (about_box), "pixmap1", pixmap1,                            (GtkDestroyNotify) gtk_widget_unref);  gtk_widget_show (pixmap1);  gtk_box_pack_start (GTK_BOX (vbox1), pixmap1, FALSE, FALSE, 0);  gtk_misc_set_padding (GTK_MISC (pixmap1), 0, 4);  hseparator1 = gtk_hseparator_new ();  gtk_widget_set_name (hseparator1, "hseparator1");  gtk_widget_ref (hseparator1);  gtk_object_set_data_full (GTK_OBJECT (about_box), "hseparator1", hseparator1,                            (GtkDestroyNotify) gtk_widget_unref);  gtk_widget_show (hseparator1);  gtk_box_pack_start (GTK_BOX (vbox1), hseparator1, FALSE, FALSE, 0);  label2 = gtk_label_new ("Copyright (C) 1999-2001 Bynari Inc.\nCopyright (C) 2001 Project TradeClient");  gtk_widget_set_name (label2, "label2");  gtk_widget_ref (label2);  gtk_object_set_data_full (GTK_OBJECT (about_box), "label2", label2,                            (GtkDestroyNotify) gtk_widget_unref);  gtk_widget_show (label2);  gtk_box_pack_start (GTK_BOX (vbox1), label2, FALSE, FALSE, 0);  hseparator2 = gtk_hseparator_new ();  gtk_widget_set_name (hseparator2, "hseparator2");  gtk_widget_ref (hseparator2);  gtk_object_set_data_full (GTK_OBJECT (about_box), "hseparator2", hseparator2,                            (GtkDestroyNotify) gtk_widget_unref);  gtk_widget_show (hseparator2);  gtk_box_pack_start (GTK_BOX (vbox1), hseparator2, FALSE, FALSE, 0);  label3 = gtk_label_new ("\nhttp://tradeclient.sourceforge.net\n\nMaintainer: Trey Tabner\nFounder: Tom Adelstein\n\nVisit our website for more information\nabout TradeClient and to learn about\nbecoming a developer for this project!\n");  gtk_widget_set_name (label3, "label4");  gtk_widget_ref (label3);  gtk_object_set_data_full (GTK_OBJECT (about_box), "label3", label3,                            (GtkDestroyNotify) gtk_widget_unref);  gtk_widget_show (label3);  gtk_box_pack_start (GTK_BOX (vbox1), label3, FALSE, FALSE, 0);  scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL);  gtk_widget_set_name (scrolledwindow1, "scrolledwindow1");  gtk_widget_ref (scrolledwindow1);  gtk_object_set_data_full (GTK_OBJECT (about_box), "scrolledwindow1", scrolledwindow1,                            (GtkDestroyNotify) gtk_widget_unref);  gtk_widget_show (scrolledwindow1);  gtk_box_pack_start (GTK_BOX (hbox1), scrolledwindow1, TRUE, TRUE, 0);  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow1), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);  text1 = gtk_text_new (NULL, NULL);  gtk_widget_set_name (text1, "text1");  gtk_widget_ref (text1);  gtk_object_set_data_full (GTK_OBJECT (about_box), "text1", text1,                            (GtkDestroyNotify) gtk_widget_unref);  gtk_widget_show (text1);  gtk_container_add (GTK_CONTAINER (scrolledwindow1), text1);  gtk_widget_realize (text1);  gtk_text_insert (GTK_TEXT (text1), NULL, NULL, NULL,                   "		  GNU LIBRARY GENERAL PUBLIC LICENSE		       Version 2, June 1991 Copyright (C) 1991 Free Software Foundation, Inc.    		    59 Temple Place, Suite 330, Boston, MA  02111-1307  USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.[This is the first released version of the library GPL.  It is numbered 2 because it goes with version 2 of the ordinary GPL.]			    Preamble  The licenses for most software are designed to take away yourfreedom to share and change it.  By contrast, the GNU General PublicLicenses are intended to guarantee your freedom to share and changefree software--to make sure the software is free for all its users.  This license, the Library General Public License, applies to somespecially designated Free Software Foundation software, and to anyother libraries whose authors decide to use it.  You can use it foryour libraries, too.  When we speak of free software, we are referring to freedom, notprice.  Our General Public Licenses are designed to make sure that youhave the freedom to distribute copies of free software (and charge forthis service if you wish), that you receive source code or can get itif you want it, that you can change the software or use pieces of itin new free programs; and that you know you can do these things.  To protect your rights, we need to make restrictions that forbidanyone to deny you these rights or to ask you to surrender the rights.These restrictions translate to certain responsibilities for you ifyou distribute copies of the library, or if you modify it.  For example, if you distribute copies of the library, whether gratisor for a fee, you must give the recipients all the rights that we gaveyou.  You must make sure that they, too, receive or can get the sourcecode.  If you link a program with the library, you must providecomplete object files to the recipients so that they can relink themwith the library, after making changes to the library and recompilingit.  And you must show them these terms so they know their rights.  Our method of protecting your rights has two steps: (1) copyrightthe library, and (2) offer you this license which gives you legalpermission to copy, distribute and/or modify the library.  Also, for each distributor's protection, we want to make certain

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -