[Mono-devel-list] Question about Glade.

Chris Turchin chris at turchin.net
Wed Jul 21 17:19:09 EDT 2004


Hi Daniel,

Quote: "GtkToolButton is a 2.4 API addition.  We are currently tracking
the 2.2 API.  We should be jumping to the new API in July, if all goes
as planned."

see this post for more info:

http://lists.ximian.com/archives/public/gtk-sharp-list/2004-April/003869.html

Regards,
--chris

On Wed, 2004-07-21 at 20:53, Daniel Carrera wrote:
> Hello,
> 
> I'm getting started with Glade/Mono/C#.  I'm having problems connecting a 
> toolbar button to an event.  I can connect the window 'delete_event' to a 
> method successfully.  Ditto for regular buttons.  But I can't seem to get 
> toolbar buttons to work.
> 
> Here is the relevant portion of the .glade file:
> 
>   <widget class="GtkToolButton" id="toolbutton1">
>      <property name="visible">True</property>
>      <property name="stock_id">gtk-refresh</property>
>      <property name="visible_horizontal">True</property>
>      <property name="visible_vertical">True</property>
>      <property name="is_important">False</property>
>      <signal name="clicked" handler="OnRefreshClicked" last_modification_time="Wed, 21 Jul 2004 17:49:23 GMT"/>
>   </widget>
> 
> And here is the relevant portion of the C# file:
> 
> namespace OpenClipArtLibrary {
>     using System;
>     using Gtk;
>     using Glade;
>     using GtkSharp;	
> 
>     public class OCAL
>     {
> 
>       [snip]
> 
>         public void OnRefreshClicked (System.Object obj, EventArgs args)
>         {
>             Console.WriteLine("You clicked Refresh.");
>             Application.Quit();
>         }
>     }
> }
> 
> 
> I put the Application.Quit() there for testing purposes.  After 
> compilation, clicking on 'Refresh' doesn't produce anything.  No text to 
> the command-line.  The app doesn't exit.  This method is not being called 
> at all.
> 
> I have been banging my head against the wall on this for two hours.  
> Everything else works so far.  The 'delete_event' can find the correct 
> handler.
> 
> Mono produces no error btw.
> 
> I am running Mono 1.0 with Glade 2.6.0 on Debian GNU/Linux.
> 
> Can anyone see where I goofed?
> 
> Cheers,




More information about the Mono-devel-list mailing list