Re: gtk-app-devel-list digest, Vol 1 #1950 - 2 msgs



Hi,

Am doing a project in c with gtk.
can anyone there help me on

how to load a file into gtk window.
like a html file on the disk into a window tt we can get by clicking a button ?
and is there an way to load time changing ( adding ) files like log files to load into a gtk window or using 
a c program ???

and how can we add an url link to a button in gtk ?

also can anyone tell me which book i need to follow to do gtk programming ?

Aman Hardikar M
cybergeek2k rediffmail com


On Sun, 21 Mar 2004 gtk-app-devel-list-request gnome org wrote :
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. GIOChannels, yet again (Zoran Rilak)
   2. label width (Paul Pogonyshev)

--__--__--

Message: 1
Subject: GIOChannels, yet again
From: Zoran Rilak <bruce tesla rcub bg ac yu>
Reply-To: bruce tesla rcub bg ac yu
To: GTK+ application development list <gtk-app-devel-list gnome org>
Date: Sun, 21 Mar 2004 09:19:42 +0100

Greetings developers,

I'm having trouble with GIOChannels (again).  At some point in my code
the channel gets open:

/* code */
void channel_open (...)
{
  mIOch = g_io_channel_unix_new (filedes);
  g_io_channel_set_encoding (mIOch, NULL, NULL);
  g_io_channel_set_buffered (mIOch, FALSE);
  g_io_channel_set_close_on_unref (mIOch, TRUE);

  g_io_add_watch (mIOch,
                  G_IO_IN|G_IO_PRI,
                  modem_GIOHandler,
                  <user_data>);
}
/* */

Later, the same channel is closed:

/* code */
void
channel_close (...)
{
  g_io_channel_shutdown (mIOch, FALSE, NULL);
  g_io_channel_unref (mIOch);
  mIOch = NULL;
}
/* */

Everything works O.K. for the first time channel gets open.  But after
closing it, at some point I need to reopen the channel, do some more
work, then close it again.  When I open the channel and try to read some
bytes, I get the following error

/* stderr */
GLib-CRITICAL **: file giochannel.c: line 1748
(g_io_channel_read_chars): assertion `channel->is_readable' failed
/* */

what's baffling me is the fact that just one line above the offending
g_io_channel_read_chars() I add a g_io_channel_get_flags() to refresh
the cache and then check if it's readable (it is), but the reading
function keeps screaming about channel not being readable.  What could
be the cause of this?

(I read from a character special device which is nicely opened and
closed when channel gets open and closed, respectively.)

Best
Zoran



--__--__--

Message: 2
From: Paul Pogonyshev <pogonyshev gmx net>
To: gtk-app-devel-list gnome org
Subject: label width
Date: Sun, 21 Mar 2004 17:55:48 +0200

Is there any good way (i.e. one that does not involve
hardwired pixel values) of specifying width of a line-
wrapping GtkLabel?  Something like "it should be
approximately 45 characters wide".

Paul


--__--__--

_______________________________________________
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




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