/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* test-minicard-label.c * * Copyright (C) 2000 Helix Code, Inc. * Author: Chris Lahey * * 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, 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. */ #include "config.h" #include #include "e-minicard-label.h" /* This is a horrible thing to do, but it is just a test. */ GnomeCanvasItem *label; GnomeCanvasItem *rect; static void destroy_callback(GtkWidget *app, gpointer data) { exit(0); } static void allocate_callback(GtkWidget *canvas, GtkAllocation *allocation, gpointer data) { gnome_canvas_set_scroll_region(GNOME_CANVAS( canvas ), 0, 0, allocation->width, allocation->height ); gnome_canvas_item_set( label, "width", (double) allocation->width, "height", (double) allocation->height, NULL ); gnome_canvas_item_set( rect, "x2", (double) allocation->width, "y2", (double) allocation->height, NULL ); } static void about_callback( GtkWidget *widget, gpointer data ) { const gchar *authors[] = { "Christopher James Lahey ", NULL }; GtkWidget *about = gnome_about_new ( _( "Minicard Label Test" ), VERSION, _( "Copyright (C) 2000, Helix Code, Inc." ), authors, _( "This should test the minicard label canvas item" ), NULL); gtk_widget_show (about); } static void button_press_callback( GtkWidget *widget, gpointer data ) { gnome_canvas_item_grab_focus( label ); } int main( int argc, char *argv[] ) { GtkWidget *app; GtkWidget *canvas; /* bindtextdomain (PACKAGE, GNOMELOCALEDIR); textdomain (PACKAGE);*/ gnome_init( "Minicard Label Test", VERSION, argc, argv); app = gnome_app_new("Minicard Label Test", NULL); canvas = gnome_canvas_new(); rect = gnome_canvas_item_new( gnome_canvas_root( GNOME_CANVAS( canvas ) ), gnome_canvas_rect_get_type(), "x1", (double) 0, "y1", (double) 0, "x2", (double) 100, "y2", (double) 100, "fill_color", "white", NULL ); label = gnome_canvas_item_new( gnome_canvas_root( GNOME_CANVAS( canvas ) ), e_minicard_label_get_type(), "x", (double) 0, "y", (double) 0, "width", (double) 100, "height", (double) 100, "fieldname", "Full Name:", "field", "Christopher James Lahey", NULL ); gnome_canvas_set_scroll_region ( GNOME_CANVAS( canvas ), 0, 0, 100, 100 ); gnome_app_set_contents( GNOME_APP( app ), canvas ); /* Connect the signals */ gtk_signal_connect( GTK_OBJECT( app ), "destroy", GTK_SIGNAL_FUNC( destroy_callback ), ( gpointer ) app ); gtk_signal_connect( GTK_OBJECT( canvas ), "size_allocate", GTK_SIGNAL_FUNC( allocate_callback ), ( gpointer ) app ); gtk_signal_connect( GTK_OBJECT( canvas ), "button_press_event", GTK_SIGNAL_FUNC( button_press_callback ), ( gpointer ) app ); gtk_widget_show_all( app ); gtk_main(); /* Not reached. */ return 0; } es/ini-1.3.8 FreeBSD GNOME current development ports (https://github.com/freebsd/freebsd-ports-gnome)
aboutsummaryrefslogtreecommitdiffstats
Commit message (Expand)AuthorAgeFilesLines
* Upgrade to 3.7p3.max2004-07-122-5/+4
* SIZEify (maintainer timeout)trevor2004-03-311-0/+1
* Typo fix.max2004-02-171-2/+2
* RcNG'ize the startup script (and bump the port revision).max2004-02-164-34/+56
* Update to 3.7p1max2004-02-134-14/+23
* Reverse the MANLANG arguments to workaround a bug in make(1). This ismarcus2004-01-201-1/+1
* Add chmoddic.1 to MAN1 which was missing in previous commit,max2003-10-151-1/+2
* Upgrade to 3.6p4.sumikawa2003-10-153-5/+5
* Clear moonlight beckons.ade2003-03-072-1/+1
* Add missing files and directorieskris2003-02-221-0/+6
* Upgrade to 3.6p3.max2003-02-067-181/+95
* Ah, my slippery fingers, portversion should be 3.6p1 instead.max2002-12-021-1/+1
* Upgrade to 3.6p1, which contains security fixes.max2002-12-023-21/+20
* Correctly handle wchar.max2002-11-202-11/+24
* Cannaserver now has the -u option which allow you to specify who shouldmax2002-11-144-61/+5
* The LinkFileList hack, introduced in Rev 1.7.max2002-11-141-16/+0
* Ooops, forgot to 'cvs rm' this when upgrading to 3.6.max2002-11-121-20/+0
* Upgrade to 3.6.max2002-11-1210-169/+60
* Fix build on -currentkris2002-10-261-0/+26
* Add back files/patch-af which should never be removed. This patch takes care...max2002-08-082-1/+23
* Oops, I meant to bump the PORTREVISION with the previous commit sincemax2002-05-161-1/+1
* - Canna doesn't use /var/run any longer.max2002-05-163-22/+23
* - Make this compile with imake 4.2.0, in which the LinkFileListknu2002-04-023-3/+75
* Remove the dependency to imake since this is now taken care ofmax2002-02-161-7/+1
* Uncomment BUILD_DEPENDS to xmkmf which was accidentally commented out in 1.44.max2002-01-211-1/+1
* Bump the PORTREVISION to reflect recent changes before the release.max2002-01-211-1/+1
* Properly include bsd.port.pre.mk before the reference toknu2002-01-201-2/+4
* Urgent fix before the freeze: Add the dependency on devel/imake ifknu2002-01-201-0/+4
* Typo fix in MLINKS.max2002-01-151-2/+2
* One more correction to the dictionary.max2002-01-131-0/+11
* A patch to correct an error in the dictionary.max2002-01-111-0/+11
* Adjust post-install and pkg-plist so that all necessary directoriesmax2001-11-212-9/+12
* Correct the problem which caused server/main.c to be uncompilable.max2001-11-212-1/+2
* Make dic/ideo/pubdic/pod.c compilable on -current.max2001-11-211-0/+20
* Remove unnecessary line (which has already been commented out).max2001-11-211-1/+0
* Tweaks to make it usable on -current.max2001-11-204-3/+70
* Oops, PORTVERSION had an extraneous `.'.max2001-11-181-1/+1