g_object_set_data



void
on_button1_clicked (GtkButton       *button,
                 gpointer         user_data)
{
	GtkWidget *tmp;
  GtkWidget *colorselectiondialog1;
	tmp = lookup_widget ((GtkWidget *)button, "window1");
colorselectiondialog1 = create_colorselectiondialog1 (); g_object_set_data ((GObject *)colorselectiondialog1, "main_window", tmp);
  gtk_widget_show (colorselectiondialog1);
}

void
on_colorselectiondialog_ok_button1_clicked (GtkButton *button, gpointer user_data)
{
	GtkWidget *window;
window = (GtkWidget *) g_object_get_data ((GObject *) button, "main_window");
	gtk_window_set_title ((GtkWindow *)window, "my title");
}

** Gtk-CRITICAL **: file gtkwindow.c: line 822 (gtk_window_set_title): assertion `GTK_IS_WINDOW (window)' failed

how do i fix my code above ? so i can change main_window title from colorselection dialog ?
===================================================================================
Selama Bulan Suci Ramadhan, ikuti Netkuis Ramadhan, Lomba Design E-Card, Opini Berhadiah hanya di www.plasa.com
===================================================================================



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