Re: DGSEAL_ENABLE: replace direct addressing in statusbar

2010-07-03 Thread Nader Morshed
Oh, woops, just glanced at the documentation, well, I guess you could leave it 
with the ->label for now, and once 3.0 comes, switch over as both the method 
and GSEAL stuff will be in place at that point. You could always write the code 
for the transition now and add a preprocessor check like so:

#if GLIB_CHECK_VERSION(3, 0, 0)
// new code which gets the box's child
#else
// old code you pasted in the mail
#endif

On Sun, 04 Jul 2010 06:57:48 +0100
Carlos Pereira  wrote:

> On 07/04/10 06:17, Nader Morshed wrote:
> > statusbar = gtk_statusbar_new ();
> > label = gtk_statusbar_get_message_area (GTK_STATUSBAR (statusbar));
> > gtk_misc_set_alignment (GTK_MISC (label), 0.5, 0.5);
> >
> Thanks Nader, I believe you are in the right path (although the 
> documentation actually says this returns a box, not a label):
> 
> http://library.gnome.org/devel/gtk/stable/GtkStatusbar.html#gtk-statusbar-get-message-area
> 
> Anyway this has been added in Gtk 2.20, I am still running 2.18.3, lots 
> of users also, it might be better to wait...
> 
> Thanks!
> Carlos
> ___
> gtk-app-devel-list mailing list
> gtk-app-devel-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


-- 
Nader Morshed 
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: DGSEAL_ENABLE: replace direct addressing in statusbar

2010-07-03 Thread Carlos Pereira

On 07/04/10 06:17, Nader Morshed wrote:

statusbar = gtk_statusbar_new ();
label = gtk_statusbar_get_message_area (GTK_STATUSBAR (statusbar));
gtk_misc_set_alignment (GTK_MISC (label), 0.5, 0.5);
   
Thanks Nader, I believe you are in the right path (although the 
documentation actually says this returns a box, not a label):


http://library.gnome.org/devel/gtk/stable/GtkStatusbar.html#gtk-statusbar-get-message-area

Anyway this has been added in Gtk 2.20, I am still running 2.18.3, lots 
of users also, it might be better to wait...


Thanks!
Carlos
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: DGSEAL_ENABLE: replace direct addressing in statusbar

2010-07-03 Thread Nader Morshed
I believe you'd want to use gtk_statusbar_get_message_area:

statusbar = gtk_statusbar_new ();
label = gtk_statusbar_get_message_area (GTK_STATUSBAR (statusbar));
gtk_misc_set_alignment (GTK_MISC (label), 0.5, 0.5);

On Sun, 04 Jul 2010 06:09:09 +0100
Carlos Pereira  wrote:

> Hi,
> How can I rewrite the following code, to be GTK 3.0 ready (without
> addressing directly the label, forbidden by the -DGSEAL_ENABLE mechanism)?
> 
> statusbar = gtk_statusbar_new ();
> gtk_misc_set_alignment (GTK_MISC (GTK_STATUSBAR (statusbar)->label), 
> 0.5, 0.5);
> 
> Cheers,
> Carlos
> ___
> gtk-app-devel-list mailing list
> gtk-app-devel-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


-- 
Nader Morshed 
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


DGSEAL_ENABLE: replace direct addressing in statusbar

2010-07-03 Thread Carlos Pereira

Hi,
How can I rewrite the following code, to be GTK 3.0 ready (without
addressing directly the label, forbidden by the -DGSEAL_ENABLE mechanism)?

statusbar = gtk_statusbar_new ();
gtk_misc_set_alignment (GTK_MISC (GTK_STATUSBAR (statusbar)->label), 
0.5, 0.5);


Cheers,
Carlos
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Brainy person needed for scrolling canvas problem!

2010-07-03 Thread John Emmas

On 3 Jul 2010, at 15:33, John Emmas wrote:

> 
> I downloaded the Scribble example but interestingly, it seems to have been 
> written for an older version of gtk/gdk.  It uses some gdk types (e.g. 
> GdkDeviceInfo) which seem to be missing from gtk-2.0 but which look as though 
> they used to be present in gtk-1.2.
> 
> I guess I could temporarily rename my gtk-2.0 include folders to make gtk-2.0 
> inaccessible to the compiler but I'm curious to know if there's a better way 
> to revert to the older version?
> 

Actually, it's slightly simpler than I thought.  The Scribble project has two 
source files (scribble.c and scribble-xinput.c).  Further investigation reveals 
that they actually compile to two different executables (At first, I thought 
they were both part of the same project which would have been worrying - 
because scribble.c needs gtk-2.0, whereas scribble-xinput.c needs gtk-1.2).
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Brainy person needed for scrolling canvas problem!

2010-07-03 Thread John Emmas

On 3 Jul 2010, at 09:43, jcup...@gmail.com wrote:

> 
> You'd link to the configure event to build the offscreen pixmap. The
> scribble example in the tutorial uses pixmaps to improve drawing:
> 

I downloaded the Scribble example but interestingly, it seems to have been 
written for an older version of gtk/gdk.  It uses some gdk types (e.g. 
GdkDeviceInfo) which seem to be missing from gtk-2.0 but which look as though 
they used to be present in gtk-1.2.

I guess I could temporarily rename my gtk-2.0 include folders to make gtk-2.0 
inaccessible to the compiler but I'm curious to know if there's a better way to 
revert to the older version?

John
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Brainy person needed for scrolling canvas problem!

2010-07-03 Thread jcupitt
On 2 July 2010 18:12, John Emmas  wrote:
> Thanks for the suggestion John.  Can I assume that you're referring to the 
> functionality of gdk-pixbuf?  It didn't occur to me to look there, though I 
> suppose it's the most obvious place to find a solution.  I'd been looking for 
> layering API's or blitting API's within gtk :-(

Sorry, I meant pixmaps, not pixbufs.

http://library.gnome.org/devel/gdk/stable/gdk-Bitmaps-and-Pixmaps.html

Pixmaps are held on the server side (whereas pixbufs are client-side).
They are offscreen drawables and, on most systems, are very quick
because the GPU can move them about.

You'd link to the configure event to build the offscreen pixmap. The
scribble example in the tutorial uses pixmaps to improve drawing:

http://library.gnome.org/devel/gtk-tutorial/stable/c2422.html

John
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list