Changing label text via idle fn...



-----BEGIN PGP SIGNED MESSAGE-----

What I'd like to do is something similar to the opening 'title/credits
box' of Photoshop... show some text and/or graphics, and put a
one-line note of what is going on while initializing (this could even
become something we all could use...).

But I've run into two problems:

 1. I've simply put a gtk_label_set(LABEL,TEXT) into the idle proc
    (inside a switch which handles the init steps). Only to discover
    that the display of the label gets updated when I leave the idle
    fn... even worse, gtk_label_set() CLEARS the rect of the
    label... without putting anything in.

    I've remedied this by adding a static flag var to the idle fn,
    setting it to FALSE initially, and putting the gtk_label_set() and
    the CODE of the init step inside

       if (!label_updated)
       {
         gtk_label_set(...);
         label_updated = TRUE;
       }
       else
       {
         CODE
         label_updated = FALSE;
       }

    This changes the text, leaves the idle fn, (text gets drawn
    outside), and then execs the CODE. Kludgy, but it definitely
    works.

 2. But now I've run into the next problem: the text the label is set
    to initially (upon creation), is never seen on screen. Neither is
    the first text set (in the first init step in the switch above...)

    How can I wait for the label to be seen on screen? I tried an 'if
    (!GTK_WIDGET_DRAWABLE(label))', and _MAPPED and _VISIBLE, but
    nothing works...

If anyone knows anything (and I guess a lot of you do)... let me know.

Bye, J

PS: I'd looove to put the project this should be a part of on the
Web... only it's already 100K+ .tar.gz'd, and I don't have enough
webspace (tried Geocities... browser crashed. Have Tripod... not
enough space. Any ideas? Recommendations?)

- -- 
Juergen A. Erhard (that ue is actually \"u (TeX) or ü (HTML/SGML))
eMail: jae@laden.ilk.de                             |
snailMail: Belfortstr. 6; 76133 Karlsruhe; GERMANY  |  pros do it for money,
phone: +49 721 27326                                |  amateurs out of love.
WWW: http://members.tripod.com/~Juergen_Erhard/     |

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia
Charset: noconv
Comment: Processed by Mailcrypt 3.4, an Emacs/PGP interface

iQEVAwUBM5YE8wIG66LugGzRAQEDTAf/SgiRlVKAaAB1a/7iOtW47aiZa4YS8JCc
9+S8F9yezBY8tp30kqOorh3pYtbUmWo8RmSuOhbKvFhedbDjhpIVAQe88Kvi47EP
FRAw3oEiTPYCi0jIbTW1emnKnWU5g1as3MubbhvxZ0ZWp7ksQXt08PL7r9v9vMZv
hXUnMzF5gEe7SpSFAoqJIB7S254tR7F2WvWRtU0YY9MBYQo1oxGxH83+O41WDV+J
Adg28URzZU1UdfG7UYOOWJtHBEHMEWNUrVTXptMPL1cEa90gxpBw7jgjvInoEpmx
cf0GJy5wUVOUPmqF2rBbTsyqYtQy+f/0VaWscZIPsywR/giw1IXk2w==
=HDpn
-----END PGP SIGNATURE-----



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