/[gtktalog]/gtktalog/src/setup.c
ViewVC logotype

Diff of /gtktalog/src/setup.c

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

revision 1.20 by chevdor, Tue Aug 19 19:52:26 2003 UTC revision 1.21 by chevdor, Tue Aug 19 21:30:29 2003 UTC
# Line 2279  ess_include_delete_button_clicked (GtkWi Line 2279  ess_include_delete_button_clicked (GtkWi
2279    gint state;    gint state;
2280    int bol;    int bol;
2281    
   gtk_tree_model_get (model,&iter,  
                       0, &state,  
                       1, &mime_type,  
                       -1);  
   
2282    if (gtk_tree_selection_get_selected (listSelection, NULL, &iter))    if (gtk_tree_selection_get_selected (listSelection, NULL, &iter))
2283    {    {
2284        gint i;
2285        GtkTreePath *path;
2286        selection = &mime_type_to_skip_current_selection;
2287    
2288        path=gtk_tree_model_get_path (model, &iter);
2289        i = gtk_tree_path_get_indices (path)[0];
2290        
2291        //g_print ("Remove button clicked, str= %s | %d\n", selection->mime_type,selection->state);
2292        //disp_glist(glist);
2293        
2294        // go thru the glist to find the first type that matches
2295        tmp=glist;      
2296        while (tmp)
2297          {
2298            g_print("compare :\n >%s\n >%s\n",((mime_type_to_skip_t*)(tmp->data))->mime_type,selection->mime_type);
2299            res=strcmp(((mime_type_to_skip_t*)(tmp->data))->mime_type,selection->mime_type);
2300            if (!res)
2301              break;
2302            tmp=g_list_next(tmp);
2303          }
2304        g_print ("item found : %p\n",tmp);
2305        
2306        glist = g_list_delete_link(glist, tmp);
2307        disp_glist(glist);
2308        my_config->mime_to_skip_during_a_scan=glist;
2309    
2310        // Remove the entry from the treeview : Yeahhhhh
2311      gtk_list_store_remove (GTK_LIST_STORE (model), &iter);      gtk_list_store_remove (GTK_LIST_STORE (model), &iter);
2312    }    }
   g_print("Passed data = %p\niter.stamp=%d\nmime=%s",data,iter.stamp,mime_type);  
   
   selection = &mime_type_to_skip_current_selection;  
   if (selection)  
     {  
       gint i;  
       GtkTreePath *path;  
   
       path=gtk_tree_model_get_path (model, &iter);  
       i = gtk_tree_path_get_indices (path)[0];  
       disp_glist(glist);  
       gtk_list_store_remove (GTK_LIST_STORE (model), &iter);  
   
       g_print ("Remove button clicked, str= %s | %d\n", selection->mime_type,selection->state);  
       disp_glist(glist);  
   
       // go thru the glist to find the first type that matches  
       /*tmp=glist;        
       while (tmp)  
         {  
           g_print("compare :\n >%s\n >%s\n",((mime_type_to_skip_t*)(tmp->data))->mime_type,selection->mime_type);  
           res=strcmp(((mime_type_to_skip_t*)(tmp->data))->mime_type,selection->mime_type);  
           if (!res)  
             break;  
           tmp=g_list_next(tmp);  
         }  
       g_print ("item found : %p\n",tmp);  
         
       glist = g_list_delete_link(glist, tmp);  
       disp_glist(glist);  
       my_config->mime_to_skip_during_a_scan=glist;*/  
     }  
2313  }  }
2314    
2315  gint  gint
# Line 3225  mime_types_to_skip_create_model (void) Line 3215  mime_types_to_skip_create_model (void)
3215      {      {
3216        gtk_list_store_append (store, &iter);        gtk_list_store_append (store, &iter);
3217        tmp=(mime_type_to_skip_t *)item->data;        tmp=(mime_type_to_skip_t *)item->data;
3218        //g_print("adding %s in the model\n",tmp->mime_type);        g_print("adding %s in the model\n",tmp->mime_type);
       //gtk_list_store_set (store, &iter,  
       //                          MIME_TYPES_TO_SKIP_COLUMN_STATE, tmp->state ,  
       //                          MIME_TYPES_TO_SKIP_COLUMN_MIME_TYPE, g_strdup(tmp->mime_type),  
       //                          -1);  
3219        gtk_list_store_set (store, &iter,        gtk_list_store_set (store, &iter,
3220                            MIME_TYPES_TO_SKIP_COLUMN_STATE, 0 ,                            MIME_TYPES_TO_SKIP_COLUMN_STATE, tmp->state ,
3221                            MIME_TYPES_TO_SKIP_COLUMN_MIME_TYPE, test,                            MIME_TYPES_TO_SKIP_COLUMN_MIME_TYPE, g_strdup(tmp->mime_type),
3222                            -1);                            -1);
3223      
3224        item=g_list_next(item);        item=g_list_next(item);
3225      }      }
3226        

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.21

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