/[pspp]/psppire/gtk_sheet/gtksheet.c
ViewVC logotype

Diff of /psppire/gtk_sheet/gtksheet.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.8 by jmd, Sun Nov 27 08:21:33 2005 UTC revision 1.9 by jmd, Mon Nov 28 07:14:23 2005 UTC
# Line 6521  create_sheet_entry(GtkSheet *sheet) Line 6521  create_sheet_entry(GtkSheet *sheet)
6521  }  }
6522    
6523    
6524    /* Finds the last child widget that happens to be of type GtkEntry */
6525    static void
6526    find_entry(GtkWidget *w, gpointer user_data)
6527    {
6528      GtkWidget **entry = user_data;
6529      if ( GTK_IS_ENTRY(w))
6530        {
6531          *entry = w;
6532        }
6533    }
6534    
6535  GtkWidget *  GtkWidget *
6536  gtk_sheet_get_entry(GtkSheet *sheet)  gtk_sheet_get_entry(GtkSheet *sheet)
6537  {  {
# Line 6541  gtk_sheet_get_entry(GtkSheet *sheet) Line 6552  gtk_sheet_get_entry(GtkSheet *sheet)
6552   if(GTK_IS_TABLE(parent)) children = GTK_TABLE(parent)->children;   if(GTK_IS_TABLE(parent)) children = GTK_TABLE(parent)->children;
6553   if(GTK_IS_BOX(parent)) children = GTK_BOX(parent)->children;   if(GTK_IS_BOX(parent)) children = GTK_BOX(parent)->children;
6554    
6555     if(GTK_IS_CONTAINER(parent))
6556       {
6557         gtk_container_forall(GTK_CONTAINER(parent), find_entry, &entry);
6558        
6559         if(GTK_IS_ENTRY(entry))  
6560           return entry;
6561       }
6562    
6563   if(!children) return NULL;   if(!children) return NULL;
6564    
6565   while(children){   while(children){

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26