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

Diff of /gtktalog/src/interface.c

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

revision 1.10 by jci, Wed Feb 12 07:24:36 2003 UTC revision 1.11 by jci, Wed Feb 12 15:34:02 2003 UTC
# Line 115  clear_right_list(GtkWidget * treeview) Line 115  clear_right_list(GtkWidget * treeview)
115    
116  }  }
117    
118  void add_right_list(GtkWidget * treeview, gchar ** item, char * name)  void add_right_list(GtkWidget * treeview, gchar ** item, char * name, GdkPixbuf * icon)
119  {  {
120          GtkTreeView * tree = GTK_TREE_VIEW(treeview);          GtkTreeView * tree = GTK_TREE_VIEW(treeview);
121          GtkTreeModel * model = gtk_tree_view_get_model(tree);          GtkTreeModel * model = gtk_tree_view_get_model(tree);
# Line 128  void add_right_list(GtkWidget * treeview Line 128  void add_right_list(GtkWidget * treeview
128                    
129          gtk_list_store_append(GTK_LIST_STORE(model), &iter);          gtk_list_store_append(GTK_LIST_STORE(model), &iter);
130    
131  //      gtk_list_store_set(GTK_LIST_STORE(model),&iter,GTKTALOG_ICON,icon, -1);          gtk_list_store_set(GTK_LIST_STORE(model),&iter,GTKTALOG_ICON,icon, -1);
132          gtk_list_store_set(GTK_LIST_STORE(model),&iter,GTKTALOG_FILENAME, name,-1);          gtk_list_store_set(GTK_LIST_STORE(model),&iter,GTKTALOG_FILENAME, name,-1);
133          gtk_list_store_set(GTK_LIST_STORE(model),&iter,GTKTALOG_SIZE,item[1],-1);          gtk_list_store_set(GTK_LIST_STORE(model),&iter,GTKTALOG_SIZE,item[1],-1);
134          gtk_list_store_set(GTK_LIST_STORE(model),&iter,GTKTALOG_DATE,item[2],-1);          gtk_list_store_set(GTK_LIST_STORE(model),&iter,GTKTALOG_DATE,item[2],-1);
# Line 219  traverse_add_dir_to_clist (GNode * gn, g Line 219  traverse_add_dir_to_clist (GNode * gn, g
219          // g_print("%s", fd->name->str);                  // g_print("%s", fd->name->str);        
220  //      TODO : gdk support  //      TODO : gdk support
221    
222        add_right_list(clist, (gchar **) temp, fd->name->str);        add_right_list(clist, (gchar **) temp, fd->name->str, pix->icon);
223                
224        g_free ((gpointer) temp[1]);        g_free ((gpointer) temp[1]);
225        g_free ((gpointer) temp[2]);        g_free ((gpointer) temp[2]);
# Line 272  traverse_add_file_to_clist (GNode * gn, Line 272  traverse_add_file_to_clist (GNode * gn,
272            || (is_unreadable (gn) == TRUE))            || (is_unreadable (gn) == TRUE))
273          temp[5] = nothing;          temp[5] = nothing;
274    
275    //    i = gtk_clist_append (GTK_CLIST (clist), (gchar **) temp);        
   
       add_right_list(clist, (gchar **) temp, filename->str);  
276    
277        pix = get_pix_from_gnode (gn);        pix = get_pix_from_gnode (gn);
278    
# Line 283  traverse_add_file_to_clist (GNode * gn, Line 281  traverse_add_file_to_clist (GNode * gn,
281    
282    
283    //    gtk_clist_set_row_data (GTK_CLIST (clist), i, gn);    //    gtk_clist_set_row_data (GTK_CLIST (clist), i, gn);
284    
285          add_right_list(clist, (gchar **) temp, filename->str, pix->icon);
286          
287        g_free ((gpointer) temp[1]);        g_free ((gpointer) temp[1]);
288        g_free ((gpointer) temp[2]);        g_free ((gpointer) temp[2]);
289    
# Line 909  sort_list (GtkWidget * wid, gint column, Line 910  sort_list (GtkWidget * wid, gint column,
910    FOLDER *racine = data;    FOLDER *racine = data;
911    
912    racine->selected_folder = NULL;    racine->selected_folder = NULL;
 //  gtk_clist_set_sort_column (GTK_CLIST (clist), (gint) column);  
913    if (column == 0)    if (column == 0)
914      {      {
   //    gtk_clist_set_compare_func (GTK_CLIST (clist), clist_cmp_2files);  
915      }      }
916    else if (column == 1)    else if (column == 1)
917      {      {
   //    gtk_clist_set_compare_func (GTK_CLIST (clist), clist_cmp_2gint);  
918      }      }
919    else if (column == 2)    else if (column == 2)
920      {      {
   //    gtk_clist_set_compare_func (GTK_CLIST (clist), clist_cmp_2dates);  
921      }      }
922    else    else
923      {      {
   //    gtk_clist_set_compare_func (GTK_CLIST (clist), NULL);  
924      }      }
   //gtk_clist_sort (GTK_CLIST (clist));  
925    //    //
926    my_config->sort_column = column;    my_config->sort_column = column;
927  }  }
928    
929    // sort_list : function not needed (i guess)
930    
931    
932  void  void
933  set_currently_displayed_folder_pixtext (FOLDER * racine, gboolean is_open)  set_currently_displayed_folder_pixtext (FOLDER * racine, gboolean is_open)
934  {  {
# Line 998  list_folder (GNode * parent, gboolean ex Line 996  list_folder (GNode * parent, gboolean ex
996    current_displayed_gnode_expand_tree = expand_tree;    current_displayed_gnode_expand_tree = expand_tree;
997    if (current_displayed_gnode == NULL)    if (current_displayed_gnode == NULL)
998      return;      return;
   //gtk_clist_freeze (GTK_CLIST (clist));  
   //gtk_clist_clear (GTK_CLIST (clist));  
999    
1000    clear_right_list(clist);    clear_right_list(clist);
1001        
# Line 1031  list_folder (GNode * parent, gboolean ex Line 1027  list_folder (GNode * parent, gboolean ex
1027    
1028   //     i = gtk_clist_append (GTK_CLIST (clist), (gchar **) temp);   //     i = gtk_clist_append (GTK_CLIST (clist), (gchar **) temp);
1029    
1030        add_right_list(clist, (gchar **) temp, (gchar *) temp[0]);        
1031    
1032  //      gtk_clist_set_selectable (GTK_CLIST (clist), i, FALSE);  //      gtk_clist_set_selectable (GTK_CLIST (clist), i, FALSE);
1033    
# Line 1045  list_folder (GNode * parent, gboolean ex Line 1041  list_folder (GNode * parent, gboolean ex
1041   //     gtk_clist_set_pixtext (GTK_CLIST (clist), i, 0,   //     gtk_clist_set_pixtext (GTK_CLIST (clist), i, 0,
1042  //                           temp[0], 3, pix->pixmap, *(pix->mask));  //                           temp[0], 3, pix->pixmap, *(pix->mask));
1043   //     gtk_clist_set_row_data (GTK_CLIST (clist), i, parent);   //     gtk_clist_set_row_data (GTK_CLIST (clist), i, parent);
1044    
1045    
1046          add_right_list(clist, (gchar **) temp, (gchar *) temp[0], pix->icon);
1047    
1048          
1049        g_free ((gpointer) temp[0]);        g_free ((gpointer) temp[0]);
1050        g_free ((gpointer) temp[1]);        g_free ((gpointer) temp[1]);
1051        g_free ((gpointer) temp[2]);        g_free ((gpointer) temp[2]);

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

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