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

📄 gefaxoption.c

📁 收发传真
💻 C
字号:
/* gefax: (gefax is a easy frontend for efax. With efax you can send faxesover your modem to someone else.) Copyright (C) 2000 Rainer Wiener <rainer@konqui.de>This program is free software; you can redistribute it and/ormodify it under the terms of the GNU Public License as published bythe Free Software Foundation; either version 2 of the License, or (atyour option) any later version.This program is distibuted in the hope that it will be useful, butWITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNUGeneral Public Licence for more details.You should have received a copy of the GNU General Public Licencealong with this program; if not, write to the Free SoftwareFoundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.*/#include <gtk/gtk.h>#include <stdio.h>#include "gefaxoption.h"#include "gefaxerror.h"#include "gefaxentry.h"#include <getopt.h>#include <stdlib.h>#include <string.h>extern GtkWidget *window3, *faxfrom5, *from4, *filew, *viewfile;extern GString *faxnr, *filenam, *to1, *from1, *faxfrom1, *file10;void optionsave(GtkWidget *widget, gpointer data){  FILE *f;  GString *gefax_options;  gtk_entry_set_text(GTK_ENTRY(faxfrom5), faxfrom1->str);  gtk_entry_set_text(GTK_ENTRY(from4),from1->str);    gefax_options = getOptionsPath();  f = fopen(gefax_options->str,"w");  fprintf(f,"%s\n", faxfrom1->str);  fprintf(f,"%s\n", from1->str);  fclose(f);  g_string_free(gefax_options, TRUE);  gtk_widget_destroy(window3);}void Options(GtkWidget *widget, gpointer data){  GtkWidget *obutton2, *obutton1, *olabel1, *olabel2, *tabelle2, *ofrom, *ofaxfrom;  window3 = gtk_window_new(GTK_WINDOW_TOPLEVEL);  gtk_widget_set_usize(GTK_WIDGET (window3), 370, 200);  gtk_window_set_title(GTK_WINDOW(window3), "Option");  gtk_container_border_width(GTK_CONTAINER(window3), 10);  tabelle2 = gtk_table_new(100, 10, TRUE);  gtk_container_add(GTK_CONTAINER(window3), tabelle2);      olabel1 = gtk_label_new("Your FAX-Nr.: ");  ofaxfrom = gtk_entry_new_with_max_length(200);  olabel2 = gtk_label_new("Your full name:  ");  ofrom = gtk_entry_new_with_max_length(200);    obutton1 = gtk_button_new_with_label("OK");    obutton2 = gtk_button_new_with_label("Cancel");  gtk_table_attach_defaults(GTK_TABLE(tabelle2), olabel1,   0,  4,  10,  25);  gtk_table_attach_defaults(GTK_TABLE(tabelle2), ofaxfrom,  4, 15,  10,  25);  gtk_table_attach_defaults(GTK_TABLE(tabelle2), olabel2,   0,  4,  26,  38);  gtk_table_attach_defaults(GTK_TABLE(tabelle2), ofrom,     4, 15,  26,  38);  gtk_table_attach_defaults(GTK_TABLE(tabelle2), obutton1,  2,  6,  75,  95);  gtk_table_attach_defaults(GTK_TABLE(tabelle2), obutton2, 10, 14,  75,  95);  gtk_signal_connect (GTK_OBJECT (obutton2), "clicked",		      GTK_SIGNAL_FUNC(close3), NULL);    gtk_signal_connect (GTK_OBJECT (obutton1), "clicked",		      GTK_SIGNAL_FUNC(optionsave), NULL);    gtk_signal_connect (GTK_OBJECT (ofaxfrom), "changed",		      GTK_SIGNAL_FUNC(faxfrom), NULL);    gtk_signal_connect (GTK_OBJECT (ofrom), "changed",		      GTK_SIGNAL_FUNC(from2), NULL);  gtk_entry_set_text(GTK_ENTRY(ofaxfrom), faxfrom1->str);   gtk_entry_set_text(GTK_ENTRY(ofrom), from1->str);  gtk_widget_show_all(window3);}

⌨️ 快捷键说明

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