# Cancel button to close window

**URL:** <https://www.ruby-forum.com/t/cancel-button-to-close-window/238066>\
**Category:** Ruby-Gnome 2\
**Created:** [December 15, 2013, 10:12am UTC](https://www.ruby-forum.com/t/cancel-button-to-close-window/238066 "2013-12-15T10:12:07Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![musicdenotation](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ea666f/32.png) [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Post date:** [December 15, 2013, 10:12am UTC](https://www.ruby-forum.com/t/cancel-button-to-close-window/238066/1 "2013-12-15T10:12:07Z")

</div>

I may have something wrong here, but I just went to the latest visual  
ruby gem, and now my modal windows won’t close. Same problem with the  
ChildWindow example.  
I’ve tried to follow the instructions on [visualruby.org](http://visualruby.org) to get the  
latest visual-ruby.  
Here’s what i’ve got.  
ruby 1.9.3 (no change)  
GTK+ 3.6.7  
gem install visualruby (shows 1.0.13)  
I’m running on Windows XP.

---

<div class="post-metadata">

**Author:** ![quickshotjoe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/q/cc9497/32.png) [@quickshotjoe](https://www.ruby-forum.com/u/quickshotjoe)\
**Post date:** [December 15, 2013, 7:56pm UTC](https://www.ruby-forum.com/t/cancel-button-to-close-window/238066/2 "2013-12-15T19:56:17Z")

</div>

Hi:

I think the problem is that you’re using gtk3. visualruby uses gtk2.  
Try changing that, and see if it fixes it. I know that the ChildWindo  
demo works.

Eric

---

<div class="post-metadata">

**Author:** ![quickshotjoe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/q/cc9497/32.png) [@quickshotjoe](https://www.ruby-forum.com/u/quickshotjoe)\
**Post date:** [December 15, 2013, 8:18pm UTC](https://www.ruby-forum.com/t/cancel-button-to-close-window/238066/3 "2013-12-15T20:18:52Z")

</div>

Hi Andru:

I think I found the problem. Glade must now install gtk3+ by default.  
So to install glade w/ gtk2:

Remove your current glade install (this may not be necessary).

sudo apt-get install -y glade-gtk2 libgtksourceview2.0-dev  
gtk2-engines-pixbuf

In your Tools-\>Project Settings menu, the command line for glade should  
be glade-gtk2 for linux.

If anyone is using a Mac, please let me know if I need to update my  
install instructions for Mac too.

Eric

---

<div class="post-metadata">

**Author:** ![quickshotjoe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/q/cc9497/32.png) [@quickshotjoe](https://www.ruby-forum.com/u/quickshotjoe)\
**Post date:** [December 15, 2013, 9:08pm UTC](https://www.ruby-forum.com/t/cancel-button-to-close-window/238066/4 "2013-12-15T21:08:25Z")

</div>

Hi Eric,  
Thanks a tonne, I am on windows so I am downloading the binary GTK+  
2.24.10.  
I will let you know.  
A

---

<div class="post-metadata">

**Author:** ![quickshotjoe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/q/cc9497/32.png) [@quickshotjoe](https://www.ruby-forum.com/u/quickshotjoe)\
**Post date:** [December 15, 2013, 10:46pm UTC](https://www.ruby-forum.com/t/cancel-button-to-close-window/238066/5 "2013-12-15T22:46:59Z")

</div>

So I misunderstood a bit there! That didn’t work.  
Do you have a sense of how you would specify gtk2 for windows?

---

<div class="post-metadata">

**Author:** ![quickshotjoe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/q/cc9497/32.png) [@quickshotjoe](https://www.ruby-forum.com/u/quickshotjoe)\
**Post date:** [December 15, 2013, 10:44pm UTC](https://www.ruby-forum.com/t/cancel-button-to-close-window/238066/6 "2013-12-15T22:44:59Z")

</div>

I think everything gets installed automatically using the download on  
[Visualruby.net](http://Visualruby.net). Uninstall your current version, and go to the Download  
page for the correct file.

E

---

<div class="post-metadata">

**Author:** ![quickshotjoe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/q/cc9497/32.png) [@quickshotjoe](https://www.ruby-forum.com/u/quickshotjoe)\
**Post date:** [December 16, 2013, 2:56am UTC](https://www.ruby-forum.com/t/cancel-button-to-close-window/238066/7 "2013-12-16T02:56:16Z")

</div>

On [visualruby.net](http://visualruby.net), click on “Download”

On the windows instructions, you’ll see a link to this file:

glade3-3.6.7-with-GTK+.exe

click on it, and you should be able to download and install bundled  
version of glade and gtk2.

Hope that helps,  
Eric
