[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: etemplate/inc class.uietemplate_gtk.inc.php,1.6,
From: |
Ralf Becker <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: etemplate/inc class.uietemplate_gtk.inc.php,1.6,1.7 |
Date: |
Fri, 07 Jun 2002 17:26:41 -0400 |
Update of /cvsroot/phpgroupware/etemplate/inc
In directory subversions:/tmp/cvs-serv5416
Modified Files:
class.uietemplate_gtk.inc.php
Log Message:
added image fieldtype to gtk ui
Index: class.uietemplate_gtk.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/etemplate/inc/class.uietemplate_gtk.inc.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** class.uietemplate_gtk.inc.php 5 Jun 2002 21:36:30 -0000 1.6
--- class.uietemplate_gtk.inc.php 7 Jun 2002 21:26:38 -0000 1.7
***************
*** 415,418 ****
--- 415,429 ----
}
+ function draw_image($area, $event, $pixbuf)
+ {
+ $pixbuf->render_to_drawable($area->window,
+
$area->style->fg_gc[GTK_STATE_NORMAL],
+
$event->area->x, $event->area->y,
+
$event->area->x, $event->area->y,
+
$event->area->width, $event->area->height,
+
GDK_RGB_DITHER_NORMAL,
+
$event->area->x, $event->area->y);
+ }
+
/*!
@function show_cell
***************
*** 689,698 ****
$html .=
$this->sbox->getAccount($form_name.'[]',$value,2,$type,0+$cell['size'],$options);
break;
! case 'image':
! $image =
$this->html->image(substr($this->name,0,strpos($this->name,'.')),
!
$cell['label'],lang($cell['help']),'BORDER=0');
! $html .= $name == '' ? $image :
$this->html->a_href($image,$name);
break;
! */ default:
//$html .= '<i>unknown type</i>';
$widget = &new GtkLabel('unknown type:
'.$cell['type']);
--- 700,723 ----
$html .=
$this->sbox->getAccount($form_name.'[]',$value,2,$type,0+$cell['size'],$options);
break;
! */ case 'image':
! if (!($path =
$GLOBALS['phpgw']->common->image(substr($this->name,0,strpos($this->name,'.')),$cell['label'])))
! $path = $cell['label'];
// name may already contain absolut path
! if
(!isset($GLOBALS['phpgw_info']['etemplate']['pixbufs'][$path]))
! {
!
$GLOBALS['phpgw_info']['etemplate']['pixbufs'][$path] =
GdkPixbuf::new_from_file('../..'.$path);
! }
! $pixbuf =
&$GLOBALS['phpgw_info']['etemplate']['pixbufs'][$path];
! if ($pixbuf)
! {
! $widget = &new GtkDrawingArea();
!
$widget->size($pixbuf->get_width(),$pixbuf->get_height());
!
$widget->connect('expose_event',array('etemplate','draw_image'),$pixbuf);
! }
! else
! {
! echo "Can't load image '$path'";
! }
break;
! default:
//$html .= '<i>unknown type</i>';
$widget = &new GtkLabel('unknown type:
'.$cell['type']);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: etemplate/inc class.uietemplate_gtk.inc.php,1.6,1.7,
Ralf Becker <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: etemplate/inc class.sbox2.inc.php,1.3,1.4 class.uietemplate.inc.php,1.8,1.9
- Next by Date:
[Phpgroupware-cvs] CVS: etemplate/inc class.uietemplate_gtk.inc.php,1.7,1.8
- Previous by thread:
[Phpgroupware-cvs] CVS: etemplate/inc class.sbox2.inc.php,1.3,1.4 class.uietemplate.inc.php,1.8,1.9
- Next by thread:
[Phpgroupware-cvs] CVS: etemplate/inc class.uietemplate_gtk.inc.php,1.7,1.8
- Index(es):