Re: [PATCH] Multi-VC chooser preferences



2009/3/7 Vincent Legoll <vincent legoll gmail com>:
> But, there are still 2 small things to shake out:
>
> 1) I get those gtk assertion failures
>
> gnomeglade.py:45: GtkWarning: gtk_tree_row_reference_new:
> assertion `GTK_IS_TREE_MODEL (model)' failed
>  self.xml = gtk.glade.XML(filename, root, typedict=override)
>
> gnomeglade.py:45: GtkWarning: gtk_cell_view_set_displayed_row:
> assertion `GTK_IS_TREE_MODEL (cell_view->priv->model)' failed
>  self.xml = gtk.glade.XML(filename, root, typedict=override)

I don't see these assertions - not sure why. On startup I do get
tracebacks like:

    if not cb.lock:
AttributeError: 'gtk.ComboBox' object has no attribute 'lock'

and there are also problems with accessing the active combo entry
before a model is set. These can both be fixed by replacing the lock
attribute with a check for the active entry.

> 2) When viewing a location that has a single git repository
> after having been in a git+hg one, the size of the combobox
> stays the same, whereas it should shrink. Refreshing or
> re-entering the same location make the combobox shrink
> to the right size.

Here is a horribly hacky (and only slightly tested) way to get it to
shrink properly:

        model = self.combobox_vcs.get_model()
        self.combobox_vcs.set_model(None)
        model.clear()
        for avc in vcs:
            model.append([avc.NAME, avc])
        self.combobox_vcs.set_model(model)

Not sure if it's worth relying on this behaviour though.

> Stephens patch for historyentry is included, but should be
> committed separately. This is just for review.

Looks good to me.

One minor nitpick - the spacing in vcview.glade on hbox2 should be set
to 6 (or 12?) (and HistoryFileEntry should probably have always been
6, not 4).

Rather than post a diff of your diff, I've attached an updated version
of your patch that works-for-me, and includes the above changes.

Kai

Attachment: MultiVCChooser.patch
Description: Binary data



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]