00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifdef HAVE_CONFIG_H
00023 # include <config.h>
00024 #endif
00025
00026 #include "intl.h"
00027 #include <string.h>
00028 #include <stdio.h>
00029 #include <stdlib.h>
00030
00031 #include "about.h"
00032 #include "dialog.h"
00033
00034 #include "pixmaps/yattmlogo.xpm"
00035
00036
00037
00038
00039
00040
00041 static char * About_Caption;
00042
00043
00044
00045
00046
00047
00048
00049
00050 static Dev_Member Dev_Team [] =
00051 {
00052 {"Torrey Searle", "<tsearle@antihe.ro>", "Creator"},
00053 {"Ben Rigas", "<ben@flygroup.org>", "Web Design & GUI Devel"},
00054 {"Jared Peterson", "<jared@tgflinux.com>", "GUI Devel"},
00055 {"Alex Wheeler", "<awheeler@speakeasy.org>", "Jabber Devel & Much More :)"},
00056 {"Robert Lazzurs", "<lazzurs@lazzurs.myftp.org>", "Maintainer"},
00057 {"Meredydd", "<m_luff@mail.wincoll.ac.uk>", "MSN Devel"},
00058 {"Erik Inge Bolsų", "<knan@mo.himolde.no>", "IRC Devel"},
00059 {"Colin Leroy", "<colin@colino.net>", "Various hacks, i18n, Yattm fork"},
00060 {"Philip Tellis", "<philip.tellis@iname.com>", "Yahoo Devel"},
00061 };
00062 static const unsigned int Dev_Team_Size = 9;
00063
00064
00065
00066
00067
00068
00069 static GtkWidget *aboutbox = NULL;
00070
00071 static void destroy_about()
00072 {
00073 if (aboutbox)
00074 gtk_widget_destroy(aboutbox);
00075 aboutbox = NULL;
00076 }
00077
00078 void show_about(GtkWidget *w, void *null)
00079 {
00080 GtkWidget *logo;
00081 GtkWidget *ok;
00082 GtkWidget *label;
00083 GtkWidget *table;
00084 GtkWidget *vbox;
00085 GtkStyle *style;
00086 GdkPixmap *pm;
00087 GdkBitmap *bm;
00088 char abouttitle[45];
00089 unsigned int i;
00090 About_Caption =
00091 _("Yattm is designed to become a Universal Instant Messaging client designed \nto seamlessly integrate all existing Instant Messaging clients and provide a \nsingle consistent user interface. \n \nYattm is a fork of Everybuddy, which was brought to you by\nthe heart-felt contributions of the following:");
00092 ;
00093
00094 if (aboutbox) {
00095 gtk_widget_show(aboutbox);
00096 return;
00097 }
00098
00099 aboutbox = gtk_window_new(GTK_WINDOW_TOPLEVEL);
00100 gtk_window_set_position(GTK_WINDOW(aboutbox), GTK_WIN_POS_MOUSE);
00101 gtk_widget_realize(aboutbox);
00102
00103 vbox = gtk_vbox_new(FALSE, 0);
00104
00105 style = gtk_widget_get_style(aboutbox);
00106 pm = gdk_pixmap_create_from_xpm_d(aboutbox->window, &bm,
00107 &style->bg[GTK_STATE_NORMAL], (gchar **)yattmlogo_xpm);
00108 logo = gtk_pixmap_new(pm, bm);
00109 gtk_box_pack_start(GTK_BOX(vbox), logo, TRUE, TRUE, 5);
00110 gtk_widget_show(logo);
00111
00112 label = gtk_label_new(About_Caption);
00113
00114 gtk_box_pack_start(GTK_BOX(vbox), label, TRUE, TRUE, 5);
00115
00116 table = gtk_table_new (Dev_Team_Size, 3, FALSE);
00117 for (i = 0; i < Dev_Team_Size; i++) {
00118 GtkWidget * l;
00119 l = gtk_label_new (Dev_Team [i].Name);
00120 gtk_table_attach ((GtkTable *)table, l, 0, 1, i, i+1,
00121 GTK_EXPAND, GTK_EXPAND, 10, 0);
00122 gtk_widget_show(l);
00123
00124 l = gtk_label_new (Dev_Team [i].Email);
00125 gtk_table_attach ((GtkTable *)table, l, 1, 2, i, i+1,
00126 GTK_EXPAND, GTK_EXPAND, 10, 0);
00127 gtk_widget_show(l);
00128
00129 l = gtk_label_new (Dev_Team [i].Pos);
00130 gtk_table_attach ((GtkTable *)table, l, 2, 3, i, i+1,
00131 GTK_EXPAND, GTK_EXPAND, 10, 0);
00132 gtk_widget_show(l);
00133 }
00134 gtk_box_pack_start(GTK_BOX(vbox), table, TRUE, TRUE, 5);
00135
00136 ok = gtk_button_new_with_label(_("Close"));
00137 gtk_signal_connect_object(GTK_OBJECT(ok), "clicked",
00138 GTK_SIGNAL_FUNC(destroy_about), GTK_OBJECT(aboutbox));
00139
00140 gtk_box_pack_start(GTK_BOX(vbox), ok, TRUE, FALSE, 0);
00141 GTK_WIDGET_SET_FLAGS(ok, GTK_CAN_DEFAULT);
00142 gtk_widget_grab_default(ok);
00143 gtk_widget_show(ok);
00144
00145 gtk_signal_connect_object(GTK_OBJECT(aboutbox), "destroy",
00146 GTK_SIGNAL_FUNC(destroy_about), GTK_OBJECT(aboutbox));
00147
00148 gtk_widget_show(label);
00149 gtk_widget_show(table);
00150 gtk_widget_show(vbox);
00151
00152 g_snprintf(abouttitle, sizeof(abouttitle), _("About Yattm %s"), VERSION);
00153 gtk_window_set_title(GTK_WINDOW(aboutbox), abouttitle);
00154 eb_icon(aboutbox->window);
00155 gtk_container_border_width(GTK_CONTAINER(aboutbox), 2);
00156 gtk_container_add(GTK_CONTAINER(aboutbox), vbox);
00157 gtk_widget_show(aboutbox);
00158 }
00159