Re: Progress Report - Evolution - 2007/29



В Пнд, 16/07/2007 в 21:29 +0200, Tobias Mueller пишет:
> Hi!
> 
> Sorry for not writing a report last week, but I flew to Dublin on
> monday, so I didn't have the time to write anything. Over the last
> weekend I was really busy with Evolution so I definitely needed some
> break as well.
> 
> I tried to fix a bug in Evolution that makes Evo collapse a thread after
> the user selected to collapsed all thread and expanded just one
> afterwards [1].
> 
> Evo stores whether to collapse all threads or not, so my idea was to
> reset this information after the user expanded a thread on his own. So
> far so good, at least the idea is nice. I actually found the piece of
> code which is responsible for recognizing the users choice. Since the UI
> has no direct access to the models data, I emitted a signal there which
> gets catched and actually resets the above mentioned information. All
> this happened with the awesome help of Nickolay. Thank you very much, dude!
> 
> I had problem with finding an object which both, the model and the
> userinterface, share to emit and catch the signal on. Then I ran into
> strange building problems. My binary didn't change, although I (really)
> changed the sourcecode. So I had do to a make clean or a make install,
> but most of the time both to make my changes work. I suspect some magic
> library weirdness to make trouble.
> 
> But after successfully beating the troubles, my changes don't work.
> Instead they make my evo die with a segfault :( So I have either buggy
> code or the wrong idea. You can find my patch here [2].
> 
> This week is GUADEC *yay*. I hope to meet Evo people there which I can
> bother with my questions :)
> 
> Have a nice week guys!
> 
> Cheers,
>   Tobi
> 
> PS: Haven't seen any SoC students yet, where are you hiding? :p
> 
> [1] http://bugzilla.gnome.org/show_bug.cgi?id=387312
> [2]
> http://trac.cryptobitch.de/proj/attachment/wiki/2007/07/16/18.15-SoC_Report_2007/29/evolution-collapse.patch?format=raw
> 

Right, because you are incorrectly emitting the signal, you should pass
NULL as a last argument to g_signal_emit:

> +       e_tree_table_adapter_signals [THREAD_COLLAPSED] =                                                                    
> +               g_signal_new ("thread_collapsed",                                                                            
> +                             G_TYPE_FROM_CLASS (klass),                                                                     
> +                             G_SIGNAL_RUN_LAST,                                                                             
> +                             G_STRUCT_OFFSET (ETreeTableAdapterClass, thread_collapsed),                                    
> +                             (GSignalAccumulator) NULL, NULL,                                                               
> +                             g_cclosure_marshal_VOID__VOID,                                                                 
> +                             G_TYPE_NONE, 0);

you define VOID__VOID signal
 
> g_signal_emit (G_OBJECT (etta), e_tree_table_adapter_signals [THREAD_EXPANDED], 0, expanded_node);  

and here you should use

g_signal_emit (G_OBJECT (etta), e_tree_table_adapter_signals [THREAD_EXPANDED], 0, NULL);

Attachment: signature.asc
Description: =?koi8-r?Q?=FC=D4=C1?= =?koi8-r?Q?_=DE=C1=D3=D4=D8?= =?koi8-r?Q?_=D3=CF=CF=C2=DD=C5=CE=C9=D1?= =?koi8-r?Q?_=D0=CF=C4=D0=C9=D3=C1=CE=C1?= =?koi8-r?Q?_=C3=C9=C6=D2=CF=D7=CF=CA?= =?koi8-r?Q?_=D0=CF=C4=D0=C9=D3=D8=C0?=



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