I have global variable maxflow in my gui.c file. I am using GtkAssistant for multiple windows. On page[5] ,I want to print this value.
Here is portion of my code:
typedef struct {
GtkWidget *widget;
gint index;
const gchar *title;
GtkAssistantPageType type;
gboolean complete;
} PageInfo;
PageInfo page[6] = {
{NULL, -1, "Introduction", GTK_ASSISTANT_PAGE_INTRO, TRUE},
{NULL, -1, "Projects", GTK_ASSISTANT_PAGE_CONTENT, TRUE},
{NULL, -1, "Profit For Projects", GTK_ASSISTANT_PAGE_CONTENT, TRUE},
{NULL, -1, "Prerequisites For Projects", GTK_ASSISTANT_PAGE_CONTENT, TRUE},
{NULL, -1, "Click the Button", GTK_ASSISTANT_PAGE_PROGRESS, FALSE},
{NULL, -1, "Confirmation", GTK_ASSISTANT_PAGE_CONFIRM, TRUE},
};
page[5].widget = gtk_label_new("OUTPUT\n" "it is time to leave!");
This is not continuous code first part is structure, then definition of pages,then I have just shown what I am doing on page[5].
Now I want to display this text and value of a global variable on my window,
can any one suggest changes instead of gtk_label_new() what should I use to accomplish my task.
I am very new to gtk.
You could create a string with the value of
maxflowusingg_snprintforsnprintfor such function and pass that togtk_label_new. You could try something on these lines:Hope this helps!