unsubscribe



----- Original Message -----
From: <gtk-app-devel-list-request gnome org>
To: <gtk-app-devel-list gnome org>
Sent: Tuesday, April 03, 2001 11:05 AM
Subject: gtk-app-devel-list digest, Vol 1 #406 - 10 msgs


Send gtk-app-devel-list mailing list submissions to
gtk-app-devel-list gnome org

To subscribe or unsubscribe via the World Wide Web, visit
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
or, via email, send a message with subject or body 'help' to
gtk-app-devel-list-request gnome org

You can reach the person managing the list at
gtk-app-devel-list-admin gnome org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of gtk-app-devel-list digest..."


Today's Topics:

  1. trouble in destroying gtk_text_buffer (tktext-port) (Lecomte Jean
=?iso-8859-1?q?Fran=E7ois?=)
  2. Glade X Pixmaps (Dpetrini genius org br)
  3. Re: Glade X Pixmaps (Dpetrini genius org br)
  4. Re: GtkText vs GtkTextView (Havoc Pennington)
  5. Re: trouble in destroying gtk_text_buffer (tktext-port) (Havoc
Pennington)
  6. Transparent Window Focus (Al Morgan)
  7. question about gdk_imlib_save_image (godsatan)
  8. how do you copy and paste things other than text using selections
(rob)
  9. Gtk Lo Gafet (GLG), Open Application Builder for the GTK (Olivier
Singla)
  10. Panel bg-image? (Janus N. =?ISO-8859-1?Q?T=F8ndering?=)

--__--__--

Message: 1
To: gtk-app-devel-list gnome org
Subject: trouble in destroying gtk_text_buffer (tktext-port)
From: jflecomte idealx com (Lecomte Jean =?iso-8859-1?q?Fran=E7ois?=)
Date: 02 Apr 2001 19:14:37 +0200


Hi there,

I build a gnome canvas where i put a lot of=20
gtk_text_buffer in it, applying some tag on it...

Here is relevant part of the code, which is called many times :

      /*Create a gtk_text_buffer */
      curText =3D gtk_text_buffer_new(NULL) ;
      gtk_object_ref(GTK_OBJECT(curText));

      /*insert text in it*/=20=20
      gtk_text_buffer_get_iter_at_char(curText, &iter, 0);
      gtk_text_buffer_insert(curText, &iter, content, -1);

      /*Create a tag for this comment*/
      tag =3D gtk_text_buffer_create_tag(curText, "comment");
      gtk_object_ref(GTK_OBJECT(tag));

      /*Set tag specifications*/=20=20=20=20=20=20=20=20
      gdk_color_parse(item_color[0], &gdkColor);
      gtk_object_set(GTK_OBJECT(tag),
     "foreground_gdk", &gdkColor,
     "font", comment_font,
     NULL);
=20=20=20=20=20=20
      /*apply tag to buffer*/
      gtk_text_buffer_get_bounds (curText, &start, &end );
      gtk_text_buffer_apply_tag(curText, "comment", &start, &end);
=20=20=20=20=20=20
       /*Create an tktext canvas with this buffer*/
      item =3D gnome_canvas_item_new(group,
   gnome_canvas_tktext_get_type(),
   "x", (gdouble)DEPTHTAB,=20
   "y", ypos,
   NULL);

      gnome_canvas_item_show(item);
      gnome_canvas_tktext_set_buffer(GNOME_CANVAS_TKTEXT(item), curText);


But when i'm trying to destroy the main application, i obtain the
following=
 :

Gdk-CRITICAL **: file gdkfont.c: line 219 (gdk_font_unref): assertion
`priv=
ate->ref_count > 0' failed.
GLib-CRITICAL **: file gcache.c: line 160 (g_cache_remove): assertion
`node=
 !=3D NULL' failed.


Any idea where i forget something !

Thanks.
--=20
--=20
J-Fran=E7ois LECOMTE                      IDEALX S.A.S.
D=E9veloppeur                             15-17, av. de S=E9gur
01.44.42.00.00                          F-75007 PARIS
06.67.65.95.09                          http://IDEALX.com/


--__--__--

Message: 2
From: Dpetrini genius org br
Subject: Glade X Pixmaps
To: gtk-app-devel-list gnome org
Date: Mon, 2 Apr 2001 13:17:34 -0300

Helllo all,

There is something that is happenig with my version of Glade (0.5.11
obtained from the sources) that I think it is very strange.
When I place a pixmap, the widget pixmap, I choose a diretory, usually
pixmaps inside my application dir (i,e. project1).
But I compile the code with make, make install and when I try to execut=
e it
shows mw the following..

**WARNING**` Could=B4t find pixmap file` project1/file.xpm

It tries to find the pixmap in a diretory that don=B4t exists and I hav=
e
never configured anywhere in the Glade environment or sources codes.

Glade automatically put the =B4project1/file.xpm=B4  in the interface.c=
 file in
order to create the pixmap.

Question ..
How can I change this? Because I can=B4t say the place of my pixmaps an=
d a
entire program is not working due to it.
If I edit the source of interface.c Glade overrides it the nest time I =
save
inside Glade.

Thank you very much for your help.

Daniel Petrini
Genius Instituto de Tecnologia
Manaus - AM
Tel. +55 92 614 6570
Cel. +55 92 9123 8532=




--__--__--

Message: 3
From: Dpetrini genius org br
Subject: Re: Glade X Pixmaps
To: gtk-app-devel-list gnome org
Date: Mon, 2 Apr 2001 17:40:05 -0300





Hello all,

I=B4ll answer my own question

The program was configured to run with gnome support.
I take off Gnome support and it worked out.

If in the future I ever try to run a Gnome program I post this question=

again..

Sorry for your waste of time.

Sds,

Daniel Petrini
Genius Instituto de Tecnologia
Manaus - AM
Tel. +55 92 614 6570
Cel. +55 92 9123 8532


                                                                       =
                                            =20
                    Dpetrini genius org br                             =
                                            =20
                    Sent by:                        To:     gtk-app-dev=
el-list gnome org                           =20
                    gtk-app-devel-list-admin        cc:                =
                                            =20
                    @gnome.org                      Subject:     Glade =
X Pixmaps                                   =20
                                                                       =
                                            =20
                                                                       =
                                            =20
                    04/02/01 02:47 PM                                  =
                                            =20
                                                                       =
                                            =20
                                                                       =
                                            =20




Helllo all,

There is something that is happenig with my version of Glade (0.5.11
obtained from the sources) that I think it is very strange.
When I place a pixmap, the widget pixmap, I choose a diretory, usually
pixmaps inside my application dir (i,e. project1).
But I compile the code with make, make install and when I try to execut=
e it
shows mw the following..

**WARNING**` Could=B4t find pixmap file` project1/file.xpm

It tries to find the pixmap in a diretory that don=B4t exists and I hav=
e
never configured anywhere in the Glade environment or sources codes.

Glade automatically put the =B4project1/file.xpm=B4  in the interface.c=
 file in
order to create the pixmap.

Question ..
How can I change this? Because I can=B4t say the place of my pixmaps an=
d a
entire program is not working due to it.
If I edit the source of interface.c Glade overrides it the nest time I =
save
inside Glade.

Thank you very much for your help.

Daniel Petrini
Genius Instituto de Tecnologia
Manaus - AM
Tel. +55 92 614 6570
Cel. +55 92 9123 8532


_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list




=




--__--__--

Message: 4
To: January Weiner 3 <jweiner1 ix urz uni-heidelberg de>
Cc: gtk-app-devel-list gnome org
Subject: Re: GtkText vs GtkTextView
From: Havoc Pennington <hp redhat com>
Date: 02 Apr 2001 21:51:07 -0400


January Weiner 3 <jweiner1 ix urz uni-heidelberg de> writes:
Hello,

"Dugas, Alan" <alan dugas analog com> writes:
Does anyone know if the new GtkTextView will be more efficient at
working
with large amounts of text than Gtktext?

Yes, it is more efficient. (with some more memory use to save CPU
time.)

Erm, `the new GtkTextView' -- does it mean it comes with gtk 2.x? And if
yes, do you know of any workarounds for 1.2? My program is supposed to
work
on DNA sequences, which, as you may be aware of, are sometimes quite
huge.
Still, editing large sequences will probably happen not very often, and
I
wouldn't like to break compatibility -- most systems ship with gtk 1.2.
Any
ideas? Right now even a small 1MB text file is already sometimes a
problem :-(


There are various replacement text widgets available, such as
GtkExText.

Havoc


--__--__--

Message: 5
To: jflecomte idealx com (Lecomte Jean =?iso-8859-1?q?Fran=E7ois?=)
Cc: gtk-app-devel-list gnome org
Subject: Re: trouble in destroying gtk_text_buffer (tktext-port)
From: Havoc Pennington <hp redhat com>
Date: 02 Apr 2001 21:56:13 -0400


Hi,

Both tktext-port and the canvas item are pretty
unmaintained/unfinished, you should be willing to hack on them if
you're using them. They'll need some debugging. Lots of fixes in the
main GTK version of the text widget that aren't in the tktext-port module.

Havoc


--__--__--

Message: 6
Date: Tue, 03 Apr 2001 00:27:45 -0700
From: Al Morgan <almorgan pdxlinux org>
To: gtk-app-devel-list gnome org
Subject: Transparent Window Focus

I've written a test program to teach myself gtk.  A red block appears on
the screen, 50 pixels square.  If the user moves the mouse over it, the
block will attach itself to the mouse, and when you move the mouse, the
block will follow it.  The problem is, the window focus only applies to
the red block, although the window is resized to the entire screen.
Also, if you move the mouse fast enough, it the block will detach itself
from the mouse.  (It can be reattached by moving the mouse over it
again).

I want to be able to define which areas of the window are 'focusable',
the way I can define transparency with a mask.  And I'd also, more
importantly, I'd like to fix the 'detaching' problem.

Thanks.

The source for the program follows:

#include <gtk/gtk.h>

static GdkBitmap *mask;
static GdkColor white, black; // white = opaque, black = clear
static GdkColor red;
static int x, y;
static GdkGC *gc, *maskgc;
static GdkPixmap *mask;
static GtkWidget *canvas;
static GtkWidget *window;
static int xsize, ysize;


void expose_handler(GtkWidget *widget, gpointer data) {
        gc = gdk_gc_new(widget->window);
        gdk_gc_set_foreground(gc, &red);
        gdk_draw_rectangle(widget->window, gc, TRUE, x - 25, y - 25, 50,
50);

        gdk_gc_set_foreground(maskgc, &black);
        gdk_draw_rectangle(mask, maskgc, TRUE, 0, 0, xsize, ysize);

        gdk_gc_set_foreground(maskgc, &white);
        gdk_draw_rectangle(mask, maskgc, TRUE, x - 25, y - 25, 50, 50);

        gtk_widget_shape_combine_mask(window, mask, 0, 0);


        g_print("expose handler\n");
}

gint motion_notify_event(GtkWidget *widget, GdkEventMotion *event) {
        GdkModifierType state;
        int x1, y1;

        gdk_window_get_pointer(event->window, &x1, &y1, &state);
        x = x1;
        y = y1;

        g_print("motion notify event\n");

        expose_handler(widget, NULL);
}

int main(int argc, char *argv[]) {
        gtk_init(&argc, &argv);

        xsize = gdk_screen_width();
        ysize = gdk_screen_height();

        x = y = 200;

        window = gtk_window_new(GTK_WINDOW_POPUP);
        gtk_window_set_default_size(GTK_WINDOW(window),
gdk_screen_width(), gdk_screen_height());
        gtk_container_set_border_width(GTK_CONTAINER(window), 0);

        gdk_color_parse("white", &white);
        gdk_color_alloc(gtk_widget_get_colormap(window), &white);

        gdk_color_parse("black", &black);
        gdk_color_alloc(gtk_widget_get_colormap(window), &black);

        gdk_color_parse("red", &red);
        gdk_color_alloc(gtk_widget_get_colormap(window), &red);

        canvas = gtk_drawing_area_new();
        gtk_drawing_area_size(GTK_DRAWING_AREA(canvas), xsize, ysize);
        gtk_widget_show(canvas);
        gtk_container_add(GTK_CONTAINER(window), canvas);
        gtk_signal_connect(GTK_OBJECT(canvas), "expose_event",
GTK_SIGNAL_FUNC(expose_handler), NULL);
        gtk_signal_connect(GTK_OBJECT(canvas), "motion_notify_event",
GTK_SIGNAL_FUNC(motion_notify_event), NULL);

        gtk_widget_set_events (canvas, GDK_EXPOSURE_MASK
                                            | GDK_LEAVE_NOTIFY_MASK
                                            | GDK_BUTTON_PRESS_MASK
                                            | GDK_POINTER_MOTION_MASK
                                            |
GDK_POINTER_MOTION_HINT_MASK);

        mask = gdk_pixmap_new(window->window, xsize, ysize, 1);

        maskgc = gdk_gc_new(mask);
        gc = gdk_gc_new(canvas->window);

        gdk_gc_set_foreground(maskgc, &black);
        gdk_draw_rectangle(mask, maskgc, TRUE, 0, 0, xsize, ysize);

        gdk_gc_set_foreground(maskgc, &white);
        gdk_draw_rectangle(mask, maskgc, TRUE, x - 25, y - 25, 50, 50);

        gtk_widget_shape_combine_mask(window, mask, 0, 0);

        gtk_widget_show(window);

        gtk_main();
}




--__--__--

Message: 7
From: "godsatan" <godsatan kimo com tw>
To: <gtk-app-devel-list gnome org>
Subject: question about gdk_imlib_save_image
Date: Tue, 3 Apr 2001 18:03:56 +0800
boundary="----=_NextPart_000_003B_01C0BC68.736E4100"

This is a multi-part message in MIME format.

------=_NextPart_000_003B_01C0BC68.736E4100
Content-Type: text/plain;
charset="big5"
Content-Transfer-Encoding: quoted-printable

Dear Sirs,
I have read the dicusssion about saving pixmap to a file in the maillist =
of gtk.
And I also read the imlib programmer guides .
Now I am trying to use this function when I click the button.
Here is the problem: pixmap is saved to file successfully(file is really =
existing), but i can't see anything related to my pixmap when i open =
this file.
Could anyone please help me figure the bugs out?
=20
Best Regards,=20
Calvin Chen


brief code as follow:
*************************************************************************=
*********
void button_clicked(GtkWidget *button, GtkWidget *window)
{
    GdkPixmap *strmap =3D NULL;
   GdkImlibImage *image =3D NULL;

   strmap =3D gtk_object_get_data(GTK_OBJECT(window), "pixmap");    =
/*pixmap is created in main and set to window*/
   image =3D gdk_imlib_create_image_from_drawable(strmap, NULL, 0, 0, =
400, 200);
   gdk_imlib_save_image(image, "test.xpm", NULL);
   /* I have tried gdk_imlib_save_image_to_*(), but it didn't work =
either. */
}

------=_NextPart_000_003B_01C0BC68.736E4100
Content-Type: text/html;
charset="big5"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Dbig5" http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2722.2800" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3D=B7s=B2=D3=A9=FA=C5=E9>
<DIV><FONT face=3D=B7s=B2=D3=A9=FA=C5=E9 size=3D4>Dear =
Sirs,</FONT></DIV>
<DIV><FONT face=3D=B7s=B2=D3=A9=FA=C5=E9 size=3D4>I have read the =
dicusssion about saving pixmap to a=20
file in the maillist of gtk.</FONT></DIV>
<DIV><FONT face=3D=B7s=B2=D3=A9=FA=C5=E9 size=3D4>And I also read the =
imlib programmer guides=20
.</FONT></DIV>
<DIV><FONT face=3D=B7s=B2=D3=A9=FA=C5=E9 size=3D4>Now I am trying to use =
this function when I click=20
the button.</FONT></DIV>
<DIV><FONT face=3D=B7s=B2=D3=A9=FA=C5=E9 size=3D4>Here is the problem: =
pixmap is saved to file=20
successfully(file is really existing), but i can't see anything related =
to my=20
pixmap when i open this file.</FONT></DIV>
<DIV><FONT face=3D=B7s=B2=D3=A9=FA=C5=E9 size=3D4>Could anyone please =
help me figure the bugs=20
out?</FONT></DIV>
<DIV><FONT face=3D=B7s=B2=D3=A9=FA=C5=E9></FONT><FONT =
size=3D4>&nbsp;</FONT></DIV>
<DIV><FONT face=3D=B7s=B2=D3=A9=FA=C5=E9 size=3D4>Best Regards, =
</FONT></DIV>
<DIV><FONT face=3D=B7s=B2=D3=A9=FA=C5=E9 size=3D4>Calvin =
Chen</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3D=B7s=B2=D3=A9=FA=C5=E9 size=3D4>brief code as =
follow:</FONT></DIV>
<DIV><FONT face=3D=B7s=B2=D3=A9=FA=C5=E9=20
size=3D4>****************************************************************=
******************</FONT></DIV>
<DIV><FONT face=3D=B7s=B2=D3=A9=FA=C5=E9 size=3D4>void =
button_clicked(GtkWidget *button, GtkWidget=20
*window)</FONT></DIV>
<DIV><FONT face=3D=B7s=B2=D3=A9=FA=C5=E9 size=3D4>{</FONT></DIV>
<DIV><FONT face=3D=B7s=B2=D3=A9=FA=C5=E9 size=3D4>&nbsp;&nbsp;&nbsp; =
GdkPixmap *strmap =3D=20
NULL;</FONT></DIV>
<DIV><FONT face=3D=B7s=B2=D3=A9=FA=C5=E9 =
size=3D4>&nbsp;&nbsp;&nbsp;GdkImlibImage *image =3D=20
NULL;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3D=B7s=B2=D3=A9=FA=C5=E9 =
size=3D4>&nbsp;&nbsp;&nbsp;strmap =3D=20
gtk_object_get_data(GTK_OBJECT(window), "pixmap");&nbsp;&nbsp;&nbsp; =
/*pixmap is=20
created in main and set to window*/</FONT></DIV>
<DIV><FONT face=3D=B7s=B2=D3=A9=FA=C5=E9 size=3D4>&nbsp;&nbsp; image =3D =

gdk_imlib_create_image_from_drawable(strmap, NULL, 0, 0, 400, =
200);</FONT></DIV>
<DIV><FONT face=3D=B7s=B2=D3=A9=FA=C5=E9 size=3D4>&nbsp;&nbsp; =
gdk_imlib_save_image(image, "test.xpm",=20
NULL);</FONT></DIV>
<DIV><FONT face=3D=B7s=B2=D3=A9=FA=C5=E9 size=3D4>&nbsp;&nbsp;&nbsp;/* I =
have tried=20
gdk_imlib_save_image_to_*(), but it didn't work either. */</FONT></DIV>
<DIV><FONT face=3D=B7s=B2=D3=A9=FA=C5=E9 =
size=3D4>}</FONT></DIV></FONT></DIV></BODY></HTML>

------=_NextPart_000_003B_01C0BC68.736E4100--



--__--__--

Message: 8
Date: Tue, 3 Apr 2001 12:53:50 +0100
From: rob <mailingLists pangolin org uk>
To: gtk list <gtk-app-devel-list gnome org>
Subject: how do you copy and paste things other than text using selections
Reply-To: mailingLists pangolin org uk

hi

I'm trying to copy and paste gdom nodes using selections but can't figure
out how I use gtk_selection_data_set for anything other than a string.
Any help greatly apreciated.

rob



--__--__--

Message: 9
From: "Olivier Singla" <omsingla qnx com>
To: <gtk-app-devel-list gnome org>
Subject: Gtk Lo Gafet (GLG), Open Application Builder for the GTK
Date: Tue, 3 Apr 2001 09:43:25 -0400
charset="iso-8859-1"

Hi All,

I am currently working on an Application Builder for the GTK.
Still in the early development stage, but usable (at least for me ;-)
I am interested in any feedback.

You can download the latest sources from the next pages:
http://staff.qnx.com/~omsingla/glg/glg.htm

I have compiled and run successfully GLG under the next
Operating Systems:
- QNX 6
- FreeeBSD 4.2
- Linux RedHat 7.0

Cheers,
Olivier Singla
lo_gafet yahoo com



--__--__--

Message: 10
Subject: Panel bg-image?
From: Janus "N." =?ISO-8859-1?Q?T=F8ndering?= <j nus person dk>
To: gtk-app-devel-list gnome org
Date: 03 Apr 2001 15:59:09 -0100

Dear Sirs,

I am fairly new to GTK+ and GNOME programming and I wonder how to get
the background.image of the panel (if any) set in the Panel-properties.
The filename will do but GdkPixbuf or map is preferred.

Thank you,
Janus N. Tøndering

BTW: Is this the right list to ask this question? If not, sorry for the
inconvinience.




--__--__--

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


End of gtk-app-devel-list
Digest_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]