<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    I've started writing some plugins for geany on github, but I'm
    running into a problem.  C is not my language of expertise, so I
    thought I would see if I'm just doing something stupid.<br>
    <br>
    <b>The Problem:</b><br>
    <br>
    The basic problem is that I have a struct I'm using to pass
    information around like an object, but the information isn't staying
    with the struct when retrieving it from a TreeView.<br>
    <br>
    <b>Steps to produce the issue:</b><br>
    <br>
    1. Open the plugin's configure window (Tools -> External
    Tools...)<br>
    2. Click the "New" button a few times.<br>
    3. Alternate which row of the TreeView is highlighted.<br>
    4. Note the checkboxes inconsistently are checked/unchecked on each
    item.<br>
    <br>
    <b>The Code:</b><br>
    <br>
<a class="moz-txt-link-freetext" href="https://github.com/sblatnick/geany-plugins/tree/external-tools/external-tools">https://github.com/sblatnick/geany-plugins/tree/external-tools/external-tools</a><br>
    <br>
    <b>Further Details:</b><br>
    <br>
    I create a GtkTreeView which I populate the only column with a
    struct called "Tool".  Then, when the user clicks on a row in the
    table, it updates other UI components based on the Tool.  I've
    already successfully overwritten the GtkTreeCellDataFunc to pull the
    name of the tool out, but for some reason the boolean checkboxes are
    updating rather randomly.<br>
    <br>
    I'm guessing I'm not initializing the struct correctly, or that the
    pointer isn't handled correctly when storing/retreiving from the
    tree/table.<br>
    <br>
    Also, one of the things I love about Geany is how little memory it
    uses, so feel free to give me pointers on when I need to free up
    memory, because I don't want my code to leak.<br>
    <br>
    Currently I do a lot of Java, so any advice about pointers, memory
    allocation, and garbage clean-up are appreciated.  Also, ideas for
    structuring C code into different files are appreciated.<br>
    <br>
    Thanks,<br>
    <br>
    Steve<br>
  </body>
</html>