[Geany-devel] Empty project properties dialog

Matthew Brush mbrush at xxxxx
Thu Jan 12 07:52:56 UTC 2012


On 01/11/2012 11:10 PM, Lex Trotman wrote:
> On Thu, Jan 12, 2012 at 1:25 PM, Matthew Brush<mbrush at codebrainz.ca>  wrote:
>> On 01/11/2012 04:11 PM, Jiří Techet wrote:
>>>
>>> On Mon, Jan 9, 2012 at 01:05, Matthew Brush<mbrush at codebrainz.ca>    wrote:
>>>>
>>>> On 12/26/2011 01:37 PM, Jiří Techet wrote:
>>>>>
>>>>>
>>>>> Hi,
>>>>>
>>>>> I'm experiencing a bug where the project properties dialog is empty
>>>>> when opened for the second time. Steps to reproduce:
>>>>>
>>>>> 1. Open project properties dialog.
>>>>> 2. Close it.
>>>>> 3. Open it for the second time.
>>>>>
>>>>> Result: the project properties dialog is much smaller and it's empty.
>>>>>
>>>>> I suspect it's related to the GtkBuiler transition. I haven't looked
>>>>> into it because I guess Matthew knows better what might be wrong.
>>>>>
>>>>
>>>> I fixed this in:
>>>>
>>>> https://github.com/geany/geany/commit/0755b44db1a238a65d7b3cec7f8b11430c8b2f1e
>>>>
>>>> If you don't mind to test around the project preferences dialog a bit to
>>>> see
>>>> if you can spot any more problems it would great.
>>>
>>>
>>> In general it seems to be fixed.
>>>
>>> However, there's one related problem - in GProject I add additional
>>> tab to the dialog. At the moment I'm adding the tab every time the
>>> dialog appears because before the GtkBuilder changes the dialog was
>>> destroyed once it was closed. Now it seems you reuse the same dialog
>>> which means I should change the GProject behavior otherwise new and
>>> new GProject tabs are added every time the dialog appears. If this new
>>> behavior is official then the plugins API version should be bumped
>>> because it changes their behavior.
>>>
>>
>> Yeah, I guess that couldn't hurt, although according to the docs, this is
>> how the API version is supposed to be used[1]:
>>
>> "The Application Programming Interface (API) version, incremented whenever
>> any plugin data types are modified or appended to."
>>
>> Which is why I never touched the API version, since it's quite clear when to
>> increment it[2].
>>
>> Cheers,
>> Matthew Brush
>>
>> [1] Although I personally dislike this in general since it does not give any
>> indication when new functions are added or removed or like this case where
>> behaviour is changed, nor does it give any correlation between API version
>> and the currently running version of Geany. In other words, it seems
>> basically useless, IMO.
>>
>> [2] Despite the example in the same comment that shows it being used to
>> guard a function, which can't actually be guarded since there's no way to
>> know what API version to check for functions.
>>
>
> Hi Guys,
>
> This should be an ABI and API change unfortunately, current functions
> do not work the way they did so old plugins (eg old GProjects) won't
> work.
>
> API without ABI is for adding new stuff that does not prevent current
> plugins from working.
>

There was no change in documented functions, signals or behaviour AFAIK.

Would you, for example, increment the API and ABI if GeanyPluginX 
depended on the fact that the main GtkVBox widget in the Glade file was 
named `vbox1` and we changed it to `vbox_main`?

In this case GProject was (understandably) relying on undefined internal 
behaviour of Geany rather than using the signal provided in the API to 
allow a plugin to remove the notebook page from the projects dialog (not 
that the docs would lead you to believe this, in fact the opposite).

Since we're loading plugins into the Geany process with basically 
complete access to everything, then we should bump the API version on 
every commit, since we could potentially be changing undocumented 
internal behaviour that the plugins can have access to if they really want.

In any case, the docs, especially for `project_dialog_confirmed` should 
be improved/fixed.

Cheers,
Matthew Brush



More information about the Devel mailing list