~ubuntu-branches/ubuntu/saucy/libfm/saucy-proposed

« back to all changes in this revision

Viewing changes to src/gtk/fm-places-model.c

  • Committer: Bazaar Package Importer
  • Author(s): Julien Lavergne
  • Date: 2011-08-11 01:41:00 UTC
  • mto: (18.1.1 quantal-proposed)
  • mto: This revision was merged to the branch mainline in revision 12.
  • Revision ID: james.westby@ubuntu.com-20110811014100-629gayqwjcjdq2k4
Tags: upstream-0.1.16
ImportĀ upstreamĀ versionĀ 0.1.16

Show diffs side-by-side

added added

removed removed

Lines of Context:
682
682
        pix = FM_PLACES_MODEL(tree_model)->eject_icon;
683
683
    g_object_set(render, "pixbuf", pix, NULL);
684
684
}
 
685
 
 
686
gboolean fm_places_model_find_path(FmPlacesModel* model, GtkTreeIter* iter, FmPath* path)
 
687
{
 
688
    GtkTreeIter it;
 
689
    GtkTreeModel* model_ = GTK_TREE_MODEL(model);
 
690
    if(gtk_tree_model_get_iter_first(model_, &it))
 
691
    {
 
692
        FmPlaceItem* item;
 
693
        do{
 
694
            item = NULL;
 
695
            gtk_tree_model_get(model_, &it, FM_PLACES_MODEL_COL_INFO, &item, -1);
 
696
            if(item && item->fi && fm_path_equal(item->fi->path, path))
 
697
            {
 
698
                *iter = it;
 
699
                return TRUE;
 
700
            }
 
701
        }while(gtk_tree_model_iter_next(model_, &it));
 
702
    }
 
703
    return FALSE;
 
704
}