Current notebook label
- From: "ken guess" <triorieel hotmail com>
- To: gtk-app-devel-list gnome org
- Subject: Current notebook label
- Date: Tue, 10 May 2005 23:23:41 -0400
Im new and have been trying to figur eout how to grab the label of the
current notebook on a "switch_page" signal. I want to use a label instead
of page number incase I decide to switch the tabs around.
report() is my function to show error messages. (repdia = REPort DIAlog)
my notebook is created with the label variable:label
should I be using different variable names for different tabs?
how can I get the current label text value?
thanx
code:
static void report (const gchar report[50])
{
GtkWidget *label;
GtkWidget *rep;
GtkWidget *repdia;
repdia = gtk_message_dialog_new (GTK_WINDOW (window),
(GtkDialogFlags)(GTK_DIALOG_MODAL |
GTK_DIALOG_DESTROY_WITH_PARENT),
GTK_MESSAGE_INFO,
GTK_BUTTONS_OK,
report);
gtk_dialog_run (GTK_DIALOG (repdia));
gtk_widget_destroy (repdia);
}
static void noteswitch( GtkNotebook *notebook,
GtkNotebookPage *page,
guint page_num,
gpointer user_data)
{
char grr[20];
int a=1,b=10,c;
//report(itoa(page_num,grr,b));
report(gtk_notebook_get_tab_label_text(notebook,
lookup_widget(GTK_WIDGET(page),"BITTORRENT")));
//text = gtk_notebook_get_menu_label_text(notebook, GTK_WIDGET(page));
//printf("Label: %s\n", text);
//gtk_label_new("BITTORRENT")
//report(gtk_label_get_label(gtk_notebook_get_menu_label_text(notebook,
(page)));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]