Re: Seed: Getting to the bookmarks. HELP!



Magnus Therning wrote:
Aahhh!  The frustration!  I've always found the bookmarks in epiphany
somewhat weird, but with the help of the Python Console extension I managed
to work out how to go from the shell to a list of bookmarks.  However I'm
failing to do the same in Seed :-(

shell = Epiphany.EphyShell.get_default() -> the default EphyShell

bms = shell.get_bookmarks() -> an instance of EphyBookmarks

bms2 = bms.get_bookmarks() -> an instance of seed_struct which looks very much like an instance of EphyNode (based on its properties), however I can't call get_next_child() on it:
    ** (epiphany:23007): CRITICAL **: ephy_node_get_next_child: assertion `EPHY_IS_NODE (child)' failed
I also can't call get_property_string() on it:
    bms2.get_property_string(Epiphany.EPHY_NODE_BMK_PROP_TITLE) -> ConversionError Can not convert Javascript value to boolean

I found the likely reason for that particular problem.
Epiphany.EPHY_NODE_BMK_PROP_TITLE is undefined, I should have used
Epiphany.EphyBookmarkProperty.BMK_PROP_TITLE instead.  Using that yields the
same result as the statement below, i.e. an empty string which isn't what I
was hoping for...

    bms2.get_property_string(2) -> ""

and still no luck in getting to the other bookmarks.

/M

--
Magnus Therning                        (OpenPGP: 0xAB4DFBA4)
magnus@therning.org          Jabber: magnus@therning.org
http://therning.org/magnus         identi.ca|twitter: magthe

Attachment: signature.asc
Description: OpenPGP digital signature



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