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

📄 about.c

📁 AirFart监听 802.11流量
💻 C
字号:
/*   This file is part of AirFart.   AirFart is free software; you can redistribute it and/or modify   it under the terms of the GNU General Public License as published by   the Free Software Foundation; either version 2 of the License, or   (at your option) any later version.   AirFart 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 General Public License for more details.   You should have received a copy of the GNU General Public License   along with AirFart; if not, write to the Free Software   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA*/#include <string.h>#include <stdio.h>#include <stdlib.h>#include <time.h>#include <gtk/gtk.h>#include "airfart.h"static GtkWidget *about = NULL;void destroy_about(){	if (about)		gtk_widget_destroy(about);	about = NULL;}void show_about(GtkWidget *w, void *data){	GtkWidget *vbox;	GtkWidget *frame;	GtkWidget *fbox;	GtkWidget *hbox;	GtkWidget *button;	GtkWidget *text;	GtkWidget *sw;	GtkWidget *logo;	char abouttitle[45];		if (!about) { 		about = gtk_window_new(GTK_WINDOW_TOPLEVEL);		gtk_window_set_default_size(GTK_WINDOW(about), 350, -1);		g_snprintf(abouttitle, sizeof(abouttitle), "About Airfart v%s", VERSION);		gtk_window_set_title(GTK_WINDOW(about), abouttitle);		gtk_window_set_role(GTK_WINDOW(about), "about");		gtk_window_set_policy(GTK_WINDOW(about), FALSE, TRUE, TRUE);		gtk_widget_realize(about);		vbox = gtk_vbox_new(FALSE, 5);		gtk_container_set_border_width(GTK_CONTAINER(vbox), 5);		gtk_container_add(GTK_CONTAINER(about), vbox);		gtk_widget_show(vbox);		frame = gtk_frame_new("Airfart v" VERSION);		gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 0);		gtk_widget_show(frame);		fbox = gtk_vbox_new(FALSE, 5);		gtk_container_set_border_width(GTK_CONTAINER(fbox), 5);		gtk_container_add(GTK_CONTAINER(frame), fbox);		gtk_widget_show(fbox);		sw = gtk_scrolled_window_new(NULL, NULL);		gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw),				GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);		gtk_box_pack_start(GTK_BOX(fbox), sw, TRUE, TRUE, 0);		text = gtk_label_new ("<b>About</b>\n\tAirFart is a wireless tool created to detect wireless devices, detect their signal strengths, and present them to the user in an easy-to-understand fashion. It is written in C/C++ with a GTK front end. Airfart supports all wireless network cards supported by the linux-wlan-ng Prism2 driver. \n\n<b>Original Authors:</b>\nDave Smith &lt;davidsmith@byu.net&gt;\nEvan McNabb &lt;emcnabb@cs.byu.edu&gt;\nKendee Jones &lt;&gt;\n\n<b>Other Developers:</b>\nMichael Golden &lt;naugrim@email.byu.edu&gt;\n");		gtk_label_set_use_markup (GTK_LABEL(text), TRUE);		gtk_label_set_justify (GTK_LABEL (text), GTK_JUSTIFY_FILL);		gtk_label_set_line_wrap (GTK_LABEL (text), TRUE);		gtk_container_add(GTK_CONTAINER(sw), text);		gtk_widget_set_size_request(sw, 350, 250);				gtk_adjustment_set_value(gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(sw)), 0);		gtk_widget_show(text);		gtk_widget_show(sw);		/* Close Button */		hbox = gtk_hbox_new(FALSE, 5);		gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0);		gtk_widget_show(hbox);		button = gtk_button_new_with_label("Close");		gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0);		gtk_signal_connect_object(GTK_OBJECT(button), "clicked",					  GTK_SIGNAL_FUNC(destroy_about), GTK_OBJECT(about));		gtk_signal_connect(GTK_OBJECT(about), "destroy",					   GTK_SIGNAL_FUNC(destroy_about), GTK_OBJECT(about));		gtk_widget_show(button);				gtk_widget_show(button);	}	gtk_widget_show(about);	gtk_window_present(GTK_WINDOW(about));}

⌨️ 快捷键说明

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