comparison gtk3/dw.c @ 789:8fe51d916b36

Reenabled the set-focus code that was disabled due to combobox issues. Figured out that the replacement for gtk_label_get() is gtk_label_get_text() even though not documented.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Tue, 22 Mar 2011 05:07:39 +0000
parents f8f4f72d6462
children 1822c8a71936
comparison
equal deleted inserted replaced
788:f8f4f72d6462 789:8fe51d916b36
8496 { 8496 {
8497 child = gtk_notebook_get_nth_page(GTK_NOTEBOOK(handle), z); 8497 child = gtk_notebook_get_nth_page(GTK_NOTEBOOK(handle), z);
8498 if(child == pagearray[pageid]) 8498 if(child == pagearray[pageid])
8499 { 8499 {
8500 oldlabel = gtk_notebook_get_tab_label(GTK_NOTEBOOK(handle), child); 8500 oldlabel = gtk_notebook_get_tab_label(GTK_NOTEBOOK(handle), child);
8501 #if 0 /* TODO: gtk_label_get is deprecated with no replacement */
8502 if(oldlabel) 8501 if(oldlabel)
8503 gtk_label_get(GTK_LABEL(oldlabel), &text); 8502 text = gtk_label_get_text(GTK_LABEL(oldlabel));
8504 #endif
8505 gtk_notebook_remove_page(GTK_NOTEBOOK(handle), z); 8503 gtk_notebook_remove_page(GTK_NOTEBOOK(handle), z);
8506 realpage = z; 8504 realpage = z;
8507 break; 8505 break;
8508 } 8506 }
8509 } 8507 }
10367 sigid = _set_signal_handler(thiswindow, window, sigfunc, data, _column_click_event); 10365 sigid = _set_signal_handler(thiswindow, window, sigfunc, data, _column_click_event);
10368 g_object_set_data(G_OBJECT(thiswindow), "_dw_column_click_id", GINT_TO_POINTER(sigid+1)); 10366 g_object_set_data(G_OBJECT(thiswindow), "_dw_column_click_id", GINT_TO_POINTER(sigid+1));
10369 DW_MUTEX_UNLOCK; 10367 DW_MUTEX_UNLOCK;
10370 return; 10368 return;
10371 } 10369 }
10372 #if 0
10373 else if (strcmp(signame, DW_SIGNAL_SET_FOCUS) == 0) 10370 else if (strcmp(signame, DW_SIGNAL_SET_FOCUS) == 0)
10374 { 10371 {
10375 thisname = "focus-in-event"; 10372 thisname = "focus-in-event";
10376 if (GTK_IS_COMBO_BOX(thiswindow)) 10373 if (GTK_IS_COMBO_BOX(thiswindow))
10377 thiswindow = GTK_COMBO_BOX(thiswindow)->entry; 10374 thiswindow = gtk_bin_get_child(GTK_BIN(thiswindow));
10378 } 10375 }
10376 #if 0
10379 else if (strcmp(signame, DW_SIGNAL_LOSE_FOCUS) == 0) 10377 else if (strcmp(signame, DW_SIGNAL_LOSE_FOCUS) == 0)
10380 { 10378 {
10381 thisname = "focus-out-event"; 10379 thisname = "focus-out-event";
10382 if(GTK_IS_COMBO_BOX(thiswindow)) 10380 if(GTK_IS_COMBO_BOX(thiswindow))
10383 thiswindow = GTK_COMBO_BOX(thiswindow)->entry; 10381 thiswindow = GTK_COMBO_BOX(thiswindow)->entry;