[Glade-users] RE: The best way to use Glade generated code : suggestions to new bies from a newbie

If you newbies haven't read this tutorial, do so now!!



-----Original Message-----
From: Zoran Rilak [mailto:wayward tirion test net]
Sent: February 23, 2004 7:40 PM
Cc: glade-users lists ximian com; GTK Development List
Subject: Re: The best way to use Glade generated code : suggestions to
newbies from a newbie

On Sun, 22 Feb 2004, Manish Chakravarty wrote:

Hi Manish & fellow newbies, greetings to pros,

Just discovered a method which takes care of all those 
variabe problems in
Glade and makes coding hassle free:

  I'm a Glade/GTK newbie as well. If I understand the problem you're
referring to, then perhaps what I did in my gppp code will 
provide some

1) Get Glade to generate all its code.
2) Write a widget_util.h & widget_util.c (or similar) with

#include "support.h"

GtkWidget *preferences = NULL;

GtkWidget *
get_preferences_window (void)
  if (preferences == NULL)
    return (preferences = create_preferences_window ());
    return preferences;

and some utility functions such as

set_widget_blah (GtkWidget *widget, const gchar *control)
  GtkWidget *w = lookup_widget (widget, control);
  if (w != NULL)
    gtk_set_widget_blah (w);
    g_warning ("not setting blah of unknown widget: %s", control);

Am I off the mark here?

By the way, I make extensive use of "lookup_widget" function 
and find it
to be most attractive means of manipulating widgets.

Wayward Bruce - Yet Another Kind of Bruces
bruce tesla rcub bg ac yu
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org

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