[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Ayttm-commits] CVS: ayttm/src/gtk about.c,NONE,1.1 about.h,NONE,1.1
From: |
Colin Leroy <address@hidden> |
Subject: |
[Ayttm-commits] CVS: ayttm/src/gtk about.c,NONE,1.1 about.h,NONE,1.1 |
Date: |
Tue, 28 Jan 2003 05:33:17 -0500 |
Update of /cvsroot/ayttm/ayttm/src/gtk
In directory subversions:/tmp/cvs-serv17146/gtk
Added Files:
about.c about.h
Log Message:
forgot these :(
--- NEW FILE: about.c ---
/*
* Ayttm
*
* Copyright (C) 1999, Torrey Searle <address@hidden>
*
* This program 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.
*
* 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 General Public License for more details.
*
* You should have received a copy of the GNU 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 "intl.h"
#include "dialog.h"
#include "pixmaps/ayttmlogo.xpm"
/* info about a developer */
typedef struct
{
const char *name;
const char *email;
const char *role;
} tDevInfo;
/* Ayttm developers */
#define AYTTM_TEAM_SIZE (3)
static tDevInfo sAyttmDevTeam[AYTTM_TEAM_SIZE] =
{
{"Colin Leroy", "<address@hidden>", "Lead Developer"},
{"Andy S. Maloney", "<address@hidden>", "Code Monkey"},
{"Philip S. Tellis", "<address@hidden>", "Yahoo!"},
};
/* Everybuddy developers */
#define EVERYBUDDY_TEAM_SIZE (9)
static tDevInfo sEverybuddyDevTeam[EVERYBUDDY_TEAM_SIZE] =
{
{"Torrey Searle", "<address@hidden>", "Creator"},
{"Ben Rigas", "<address@hidden>", "Web Design & GUI Devel"},
{"Jared Peterson", "<address@hidden>", "GUI Devel"},
{"Alex Wheeler", "<address@hidden>", "Jabber Devel & Much More :)"},
{"Robert Lazzurs", "<address@hidden>", "Maintainer"},
{"Meredydd", "<address@hidden>", "MSN Devel"},
{"Erik Inge Bolso", "<address@hidden>", "IRC Devel"},
{"Colin Leroy", "<address@hidden>", "Various hacks, i18n, Ayttm fork"},
{"Philip Tellis", "<address@hidden>", "Yahoo Devel"}
};
/* the one and only about window */
static GtkWidget *sAboutWindow = NULL;
/*
Functions
*/
static void destroy_about()
{
if ( sAboutWindow != NULL )
gtk_widget_destroy( sAboutWindow );
sAboutWindow = NULL;
}
static GtkTable *sMakeDeveloperTable( int inNumDevelopers, const tDevInfo
*inDevInfo )
{
GtkTable *table = GTK_TABLE( gtk_table_new( inNumDevelopers, 3,
FALSE ) );
GtkLabel *label = NULL;
int i = 0;
for (i = 0; i < inNumDevelopers; i++)
{
label = GTK_LABEL( gtk_label_new( inDevInfo[i].name ) );
gtk_misc_set_alignment( GTK_MISC( label ), 0.0, 0.5 );
gtk_widget_show( GTK_WIDGET(label ) );
gtk_table_attach( table, GTK_WIDGET( label ), 0, 1, i, i+1,
GTK_FILL, GTK_FILL, 10, 0 );
label = GTK_LABEL( gtk_label_new( inDevInfo[i].email ) );
gtk_misc_set_alignment( GTK_MISC( label ), 0.0, 0.5 );
gtk_widget_show( GTK_WIDGET( label ) );
gtk_table_attach( table, GTK_WIDGET( label ), 1, 2, i, i+1,
GTK_FILL, GTK_FILL, 10, 0 );
label = GTK_LABEL( gtk_label_new( inDevInfo[i].role ) );
gtk_misc_set_alignment( GTK_MISC( label ), 0.0, 0.5 );
gtk_widget_show( GTK_WIDGET( label ) );
gtk_table_attach(table, GTK_WIDGET( label ), 2, 3, i, i+1,
GTK_FILL, GTK_FILL, 10, 0 );
}
gtk_widget_show( GTK_WIDGET( table ) );
return( table );
}
void show_about(void *useless, void *null)
{
GtkWidget *logo = NULL;
GtkWidget *ok = NULL;
GtkLabel *label = NULL;
GtkTable *table = NULL;
GtkWidget *separator = NULL;
GtkBox *vbox = NULL;
GtkStyle *style = NULL;
GdkPixmap *pm = NULL;
GdkBitmap *bm = NULL;
const char *versionStr = "Ayttm " VERSION "-" RELEASE "\n"
__DATE__;
if ( sAboutWindow != NULL )
{
gtk_widget_show(sAboutWindow);
return;
}
/* create the window and set some attributes */
sAboutWindow = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_widget_realize(sAboutWindow);
gtk_window_set_position(GTK_WINDOW(sAboutWindow), GTK_WIN_POS_MOUSE);
gtk_window_set_policy( GTK_WINDOW(sAboutWindow), FALSE, FALSE, TRUE );
gtk_window_set_title(GTK_WINDOW(sAboutWindow), _("About Ayttm"));
eb_icon(sAboutWindow->window);
gtk_container_border_width(GTK_CONTAINER(sAboutWindow), 5);
vbox = GTK_BOX(gtk_vbox_new(FALSE, 0));
gtk_widget_show(GTK_WIDGET(vbox));
/* logo */
style = gtk_widget_get_style(sAboutWindow);
pm = gdk_pixmap_create_from_xpm_d(sAboutWindow->window, &bm,
&style->bg[GTK_STATE_NORMAL], (gchar **)ayttmlogo_xpm);
logo = gtk_pixmap_new(pm, bm);
gtk_box_pack_start(vbox, logo, TRUE, TRUE, 5);
gtk_widget_show(logo);
/* version */
label = GTK_LABEL(gtk_label_new( versionStr ));
gtk_widget_show( GTK_WIDGET(label) );
gtk_box_pack_start(vbox, GTK_WIDGET(label), TRUE, TRUE, 5);
/* separator */
separator = gtk_hseparator_new();
gtk_widget_show( separator );
gtk_box_pack_start(vbox, separator, TRUE, TRUE, 5);
/* text */
label = GTK_LABEL(gtk_label_new( _("Ayttm is brought to you by:") ));
gtk_label_set_justify( label, GTK_JUSTIFY_LEFT );
gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5);
gtk_widget_show( GTK_WIDGET(label) );
gtk_box_pack_start(vbox, GTK_WIDGET(label), TRUE, TRUE, 5);
/* list of Ayttm developers */
table = sMakeDeveloperTable( AYTTM_TEAM_SIZE, sAyttmDevTeam );
gtk_box_pack_start(vbox, GTK_WIDGET(table), TRUE, TRUE, 5);
/* separator */
separator = gtk_hseparator_new();
gtk_widget_show( separator );
gtk_box_pack_start(vbox, separator, TRUE, TRUE, 5);
/* text */
label = GTK_LABEL(gtk_label_new( _("Ayttm is based on Everybuddy 0.4.3
which was brought to you by:") ));
gtk_label_set_justify( label, GTK_JUSTIFY_LEFT );
gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5);
gtk_widget_show( GTK_WIDGET(label) );
gtk_box_pack_start(vbox, GTK_WIDGET(label), TRUE, TRUE, 5);
/* list of Everybuddy developers */
table = sMakeDeveloperTable( EVERYBUDDY_TEAM_SIZE, sEverybuddyDevTeam );
gtk_box_pack_start(vbox, GTK_WIDGET(table), TRUE, TRUE, 5);
/* close button */
ok = gtk_button_new_with_label(_("Close"));
gtk_signal_connect_object(GTK_OBJECT(ok), "clicked",
GTK_SIGNAL_FUNC(destroy_about),
GTK_OBJECT(sAboutWindow));
gtk_box_pack_start(vbox, ok, TRUE, FALSE, 0);
GTK_WIDGET_SET_FLAGS(ok, GTK_CAN_DEFAULT);
gtk_widget_grab_default(ok);
gtk_widget_show(ok);
gtk_signal_connect_object(GTK_OBJECT(sAboutWindow), "destroy",
GTK_SIGNAL_FUNC(destroy_about),
GTK_OBJECT(sAboutWindow));
gtk_container_add(GTK_CONTAINER(sAboutWindow), GTK_WIDGET(vbox));
gtk_widget_show(sAboutWindow);
gtk_widget_grab_focus(ok);
}
--- NEW FILE: about.h ---
/*
* Ayttm
*
* Copyright (C) 1999, Torrey Searle <address@hidden>
*
* This program 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.
*
* 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 General Public License for more details.
*
* You should have received a copy of the GNU 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
*
*/
void show_about(void *useless, void *null);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Ayttm-commits] CVS: ayttm/src/gtk about.c,NONE,1.1 about.h,NONE,1.1,
Colin Leroy <address@hidden> <=
- Prev by Date:
[Ayttm-commits] CVS: ayttm/src chat_window.c,1.38,1.39 chat_window.h,1.8,1.9 crash.c,1.11,1.12
- Next by Date:
[Ayttm-commits] CVS: ayttm/src chat_room.c,1.41,1.42 llist.c,1.7,1.8 service.c,1.11,1.12 util.c,1.29,1.30
- Previous by thread:
[Ayttm-commits] CVS: ayttm/src chat_window.c,1.38,1.39 chat_window.h,1.8,1.9 crash.c,1.11,1.12
- Next by thread:
[Ayttm-commits] CVS: ayttm/src chat_room.c,1.41,1.42 llist.c,1.7,1.8 service.c,1.11,1.12 util.c,1.29,1.30
- Index(es):