#include #include ENameWestern *name; GtkWidget *full; GtkWidget *prefix; GtkWidget *first; GtkWidget *middle; GtkWidget *nick; GtkWidget *last; GtkWidget *suffix; static void fill_entries (void) { #define SET(a,b) (gtk_entry_set_text (GTK_ENTRY (a), (b) == NULL ? "" : (b))) SET(prefix, name->prefix); SET(first, name->first); SET(middle, name->middle); SET(nick, name->nick); SET(last, name->last); SET(suffix, name->suffix); } static void full_changed_cb (GtkEntry *fulle) { e_name_western_free (name); name = e_name_western_parse (gtk_entry_get_text (fulle)); fill_entries (); } static void create_window (void) { GtkWidget *app; GtkTable *table; GtkWidget *prefix_label; GtkWidget *first_label; GtkWidget *middle_label; GtkWidget *nick_label; GtkWidget *last_label; GtkWidget *suffix_label; app = gnome_app_new ("test", "Evolution Western Name Parser"); table = GTK_TABLE (gtk_table_new (3, 6, FALSE)); full = gtk_entry_new (); prefix = gtk_entry_new (); first = gtk_entry_new (); middle = gtk_entry_new (); nick = gtk_entry_new (); last = gtk_entry_new (); suffix = gtk_entry_new (); gtk_widget_set_usize (prefix, 100, 0); gtk_widget_set_usize (first, 100, 0); gtk_widget_set_usize (middle, 100, 0); gtk_widget_set_usize (nick, 100, 0); gtk_widget_set_usize (last, 100, 0); gtk_widget_set_usize (suffix, 100, 0); gtk_table_attach (table, full, 0, 6, 0, 1, GTK_EXPAND | GTK_FILL, 0, 0, 0); gtk_table_attach (table, prefix, 0, 1, 1, 2, GTK_EXPAND | GTK_FILL | GTK_SHRINK, 0, 0, 0); gtk_table_attach (table, first, 1, 2, 1, 2, GTK_EXPAND | GTK_FILL | GTK_SHRINK, 0, 0, 0); gtk_table_attach (table, middle, 2, 3, 1, 2, GTK_EXPAND | GTK_FILL | GTK_SHRINK, 0, 0, 0); gtk_table_attach (table, nick, 3, 4, 1, 2, GTK_EXPAND | GTK_FILL | GTK_SHRINK, 0, 0, 0); gtk_table_attach (table, last, 4, 5, 1, 2, GTK_EXPAND | GTK_FILL | GTK_SHRINK, 0, 0, 0); gtk_table_attach (table, suffix, 5, 6, 1, 2, GTK_EXPAND | GTK_FILL | GTK_SHRINK, 0, 0, 0); prefix_label = gtk_label_new ("Prefix"); first_label = gtk_label_new ("First"); middle_label = gtk_label_new ("Middle"); nick_label = gtk_label_new ("Nick"); last_label = gtk_label_new ("Last"); suffix_label = gtk_label_new ("Suffix"); gtk_table_attach (table, prefix_label, 0, 1, 2, 3, GTK_SHRINK, 0, 0, 0); gtk_table_attach (table, first_label, 1, 2, 2, 3, GTK_SHRINK, 0, 0, 0); gtk_table_attach (table, middle_label, 2, 3, 2, 3, GTK_SHRINK, 0, 0, 0); gtk_table_attach (table, nick_label, 3, 4, 2, 3, GTK_SHRINK, 0, 0, 0); gtk_table_attach (table, last_label, 4, 5, 2, 3, GTK_SHRINK, 0, 0, 0); gtk_table_attach (table, suffix_label, 5, 6, 2, 3, GTK_SHRINK, 0, 0, 0); gnome_app_set_contents (GNOME_APP (app), GTK_WIDGET (table)); gtk_widget_show_all (app); gtk_entry_set_text (GTK_ENTRY (full), "The Honorable Doctor van Jacobsen, Albert Roderick \"The Clenched Fist\" Jr, MD, PhD, Esquire"); name = e_name_western_parse ("The Honorable Doctor van Jacobsen, Albert Roderick \"The Clenched Fist\" Jr, MD, PhD, Esquire"); fill_entries (); gtk_signal_connect (GTK_OBJECT (full), "changed", full_changed_cb, NULL); } int main (int argc, char **argv) { gnome_init ("Test EName", "Test EName", argc, argv); create_window (); gtk_main (); return 0; } on> FreeBSD GNOME current development ports (https://github.com/freebsd/freebsd-ports-gnome)
aboutsummaryrefslogtreecommitdiffstats
Commit message (Expand)AuthorAgeFilesLines
* Disable Quicktime codec instead of marking it FORBIDDEN if WITH_QUICKTIMEahze2007-03-131-10/+9
* - Add failed quicktime sourcesmiwi2007-01-241-0/+6
* - Update CODEC_MPLAYER_VERSION to 1.0rc1. It solve a problem with the previousacm2006-12-051-2/+2
* - Update to 2006-10-22miwi2006-12-052-13/+6
* Fix plist when the REALPLAYER option is not selected.shaun2006-11-222-3/+7
* - Add the REALPLAYER and QUICKTIME(off) OPTIONS. If QUICKTIME OPTION is off,acm2006-10-073-41/+65
* Mark win32-codecs as FORBIDDEN. The quicktime browser plugin couldremko2006-09-141-0/+1
* Reset inactive maintainer who has not responded to email.linimon2006-09-051-1/+1
* - Update all codec to all-20060611mnag2006-08-213-7/+8
* Update to 20060501erwin2006-06-043-6/+8
* Update win32-codecs to 20050412edwin2006-01-073-9/+36
* Add the RealPlayer win32 codecsjylefort2005-05-083-3/+18
* Update to 3.1.0.p5,1.lofi2005-02-063-10/+14
* [patch] multimedia/win32-codecs doesn't install when not rootedwin2004-12-161-1/+1
* The last update broke the QT codec.lofi2004-07-302-4/+4
* Update to 2.0.99 and make fetcheable again.erwin2004-07-153-32/+32
* BROKEN: Unfetchablekris2004-07-111-0/+2
* SIZEify (maintainer timeout)trevor2004-03-311-0/+5
* - Add files to pkg-plist missed on win32codecs.tar.bz2 distinfo update two we...pav2003-11-192-0/+9
* The checksum of win32codecs.tar.bz2 has changed.ru2003-11-041-1/+1
* Additions to win32-codecsedwin2003-09-033-5/+10
* Bump PORTEPOCH.adamw2003-08-041-0/+1
* Update to 2.0.90.adamw2003-08-043-94/+108
* o Sync MASTER_SITES to changes in MPlayer distribution sites listedlioux2003-03-313-15/+19
* De-pkg-comment.knu2003-02-212-1/+1
* o PORTVERSION change:lioux2003-01-113-12/+44
* Fix mastersites: ftp servers should use the ftp-protocol.edwin2002-12-281-2/+2
* After repo copy from graphics category, update all appropriatelioux2002-11-281-1/+1
* Update maintainer emaillioux2002-11-241-1/+1
* Update to w32codec 0.90pre7.nork2002-11-243-14/+26
* o Update both avifile's (011002) and mplayer's (0.60) codecslioux2002-01-183-20/+33
* update mplayer codecs to 0.50; therefore, update port to 010122.1.0.50lioux2001-10-163-2/+12
* o add the codecs from mplayer-codecs, this port will hold all win32lioux2001-10-013-5/+40
* o update MASTER_SITESlioux2001-09-262-2/+2
* Initial revision of this port. It will now have a history of its own. :)lioux2001-02-1310-245/+18
* update to 0.53.4.sf2001-01-292-2/+2
* update to 0.53.3.sf2001-01-274-21/+37
* fix typo.sf2001-01-222-2/+2
* Massive style enforcement - use ^I instead of spaces for variables identation.sobomax2001-01-171-3/+3
* Revert changes that enabled usage of mp3 lame shared library. Duelioux2001-01-081-16/+2
* 1) Add audio/lame as a LIB_DEPENDSlioux2001-01-071-1/+16
* 1) Update to version 0.53.1lioux2001-01-079-63/+140
* Update to version 0.50.lioux2000-10-203-2/+27
* Fixed pkg-message typo.lioux2000-10-191-1/+1
* Forgot to add pkg-message. My 1st cvs add. :)lioux2000-10-111-0/+11
* Update to version 0.49lioux2000-10-098-386/+102