|
From: Cesar P. T. <or...@us...> - 2001-05-17 19:55:54
|
Update of /cvsroot/acdo//acdo/src/gui
In directory usw-pr-cvs1:/tmp/cvs-serv9801
Modified Files:
navegador_pkg-callbacks.adb
Log Message:
navegador completo.
Index: navegador_pkg-callbacks.adb
===================================================================
RCS file: /cvsroot/acdo//acdo/src/gui/Attic/navegador_pkg-callbacks.adb,v
retrieving revision 2.3
retrieving revision 2.4
diff -C2 -r2.3 -r2.4
*** navegador_pkg-callbacks.adb 2001/05/17 19:39:46 2.3
--- navegador_pkg-callbacks.adb 2001/05/17 19:55:52 2.4
***************
*** 3,6 ****
--- 3,8 ----
--Autores: María Bazús, César Pérez, Marta Tolosa
--Fecha: 5 Mayo 2001
+ --Modificado por: Óscar Bonilla y César Pérez
+ --Fecha modificación: 17 Mayo 2001
--Fichero: navegador_pkg-callbacks.adb
--Proyecto: ACDO
***************
*** 13,17 ****
with Gtk.Accel_Group; use Gtk.Accel_Group;
with Gtk.Object; use Gtk.Object;
- with Gtk.Gentry; use Gtk.Gentry;
with Gtk.Enums; use Gtk.Enums;
with Gtk.Style; use Gtk.Style;
--- 15,18 ----
***************
*** 24,29 ****
with Gtk.GEntry; use Gtk.GEntry;
with navegador_pkg; use navegador_pkg;
-
package body Navegador_Pkg.Callbacks is
--- 25,34 ----
with Gtk.GEntry; use Gtk.GEntry;
with navegador_pkg; use navegador_pkg;
+ with gdk.font; use gdk.font;
+ with gdk.color; use gdk.color;
+ with gtk.text;
+ with ada.strings.fixed; use ada.strings.fixed;
+ with navegador_pkg.completar_lista; use navegador_pkg.completar_lista;
package body Navegador_Pkg.Callbacks is
***************
*** 52,56 ****
is
item: tpitem_access;
- glIdentificador : integer;
begin
item := new tpitem(VOLUMEN);
--- 57,60 ----
***************
*** 62,70 ****
modoAgregar := MODIFICAR;
-- mostramos los datos de la lista en la ventana de agregar.
! Set_Text (agregar.Titulo, Get_Text (Navegador.Lista, nFila, 3)); -- FIXME: solo texto hasta los dos puntos
Set_Text (agregar.Fecha, Get_Text (Navegador.Lista, nFila, 5));
Set_Text (agregar.Tema, Get_Text (Navegador.Lista, nFila, 6));
Set_Text (agregar.Codigo, Get_Text (Navegador.Lista, nFila, 2));
! --Set_Text (agregar.Descripcion, Get_Text (Navegador.Lista, nFila, 7));
Set_Text (agregar.Medio, Get_Text (Navegador.Lista, nFila, 8));
glIdentificador := integer'value (Get_Text (Navegador.Lista, nFila, 0));
--- 66,75 ----
modoAgregar := MODIFICAR;
-- mostramos los datos de la lista en la ventana de agregar.
! Set_Text (agregar.Titulo, head(Get_Text (Navegador.Lista, nFila, 3), index(Get_text(navegador.lista, nfila, 3), ":")));
Set_Text (agregar.Fecha, Get_Text (Navegador.Lista, nFila, 5));
Set_Text (agregar.Tema, Get_Text (Navegador.Lista, nFila, 6));
Set_Text (agregar.Codigo, Get_Text (Navegador.Lista, nFila, 2));
! gtk.text.Insert (agregar.descripcion, Gdk.Font.Null_Font, Gdk.Color.Null_color, Gdk.Color.Null_Color, Get_text(Navegador.Lista, nFila, 7), -1);
!
Set_Text (agregar.Medio, Get_Text (Navegador.Lista, nFila, 8));
glIdentificador := integer'value (Get_Text (Navegador.Lista, nFila, 0));
***************
*** 82,94 ****
begin
-- FIXME: Chapuza, V debería ser una constante definida en algún lugar
- <<<<<<< navegador_pkg-callbacks.adb
- -- if get_text (Navegador.Lista) = "V" then
- =======
if get_text (Navegador.Lista, nFila, 1) = "V" then
- >>>>>>> 2.1
item := new tpitem(VOLUMEN);
item.identificador := integer'value (get_text(Navegador.Lista, nFila, 0));
borrar (item.all);
! --end if;
end On_Borrar_Clicked;
--- 87,95 ----
begin
-- FIXME: Chapuza, V debería ser una constante definida en algún lugar
if get_text (Navegador.Lista, nFila, 1) = "V" then
item := new tpitem(VOLUMEN);
item.identificador := integer'value (get_text(Navegador.Lista, nFila, 0));
borrar (item.all);
! end if;
end On_Borrar_Clicked;
***************
*** 129,137 ****
evento : Gdk_Event := To_Event (Params, 1);
boton: guint;
- <<<<<<< navegador_pkg-callbacks.adb
- tipo: Gdk.Types.Gdk_Event_Type;
- =======
tipo: gdk.Types.Gdk_Event_Type;
! >>>>>>> 2.1
begin
boton := Get_Button (evento);
--- 130,136 ----
evento : Gdk_Event := To_Event (Params, 1);
boton: guint;
tipo: gdk.Types.Gdk_Event_Type;
! fin : boolean := FALSE;
! item : tpItem_access;
begin
boton := Get_Button (evento);
***************
*** 139,143 ****
if tipo = gdk_2Button_press then
if not desde_buscar then -- preparamos la ventana para directorios,
! -- volúmenes y ficheros
desde_buscar := false;
Set_Column_Visibility (Navegador.Lista, 1, true);
--- 138,142 ----
if tipo = gdk_2Button_press then
if not desde_buscar then -- preparamos la ventana para directorios,
! -- volúmenes y ficheros
desde_buscar := false;
Set_Column_Visibility (Navegador.Lista, 1, true);
***************
*** 150,156 ****
Set_Column_Title (Navegador.Lista, 3, -("Ruta"));
end if;
- -- FIXME
-- coger datos de la lista, buscar y llamar al procedimiento
-- que actualize la lista
end if;
return True; -- si false le pasa el evento al padre de este widget
--- 149,159 ----
Set_Column_Title (Navegador.Lista, 3, -("Ruta"));
end if;
-- coger datos de la lista, buscar y llamar al procedimiento
-- que actualize la lista
+ recuperar (item, fin);
+ while not fin loop
+ rellenar_lista(item.all);
+ recuperar(item, fin);
+ end loop;
end if;
return True; -- si false le pasa el evento al padre de este widget
|