Fix toolbox buttons adjustment in the table.
[synfig.git] / synfig-studio / src / gtkmm / toolbox.cpp
index 81d911e..d35f010 100644 (file)
@@ -8,6 +8,7 @@
 **     Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
 **     Copyright (c) 2007, 2008 Chris Moore
 **  Copyright (c) 2008 Paul Wise
+**     Copyright (c) 2009 Nikita Kitaev
 **
 **     This package is free software; you can redistribute it and/or
 **     modify it under the terms of the GNU General Public License as
@@ -260,20 +261,21 @@ Toolbox::Toolbox():
 
 #define WIKI(title,page)                                                                                       \
        helpmenu->items().push_back(Gtk::Menu_Helpers::MenuElem(title,  \
+               sigc::bind(sigc::ptr_fun(&studio::App::open_url),String("http://synfig.org/wiki")+page)))
+
+#define SITE(title,page)                                                                                       \
+       helpmenu->items().push_back(Gtk::Menu_Helpers::MenuElem(title,  \
                sigc::bind(sigc::ptr_fun(&studio::App::open_url),String("http://synfig.org")+page)))
 
        Gtk::Menu       *helpmenu = manage(new class Gtk::Menu());
        helpmenu->items().push_back(Gtk::Menu_Helpers::StockMenuElem(Gtk::Stock::HELP, sigc::ptr_fun(studio::App::dialog_help)));
        helpmenu->items().push_back(Gtk::Menu_Helpers::SeparatorElem());
 
-       /* TRANSLATORS: Help menu entry */ WIKI(_("Synfig Wiki"),                               /* TRANSLATORS: a wiki page */ _("/Main_Page")                          );
-       /* TRANSLATORS: Help menu entry */ WIKI(_("Tutorials"),                                 /* TRANSLATORS: a wiki page */ _("/Tutorials")                          );
+       /* TRANSLATORS: Help menu entry */ WIKI(_("Tutorials"),                                 /* TRANSLATORS: a wiki page */ _("/Category:Tutorials")                         );
+       /* TRANSLATORS: Help menu entry */ WIKI(_("Reference"),                                 /* TRANSLATORS: a wiki page */ _("/Category:Reference")                         );
        /* TRANSLATORS: Help menu entry */ WIKI(_("Frequently Asked Questions"),/* TRANSLATORS: a wiki page */ _("/FAQ")                                        );
-       /* TRANSLATORS: Help menu entry */ WIKI(_("Get Support"),                               /* TRANSLATORS: a wiki page */ _("/Contact")                    );
-       /* TRANSLATORS: Help menu entry */ WIKI(_("Keyboard Shortcuts"),                /* TRANSLATORS: a wiki page */ _("/Keyboard_Shortcuts")         );
-       /* TRANSLATORS: Help menu entry */ WIKI(_("Mouse Shortcuts"),                   /* TRANSLATORS: a wiki page */ _("/Mouse_Shortcuts")            );
-       /* TRANSLATORS: Help menu entry */ WIKI(_("All Pages"), "/Special:Allpages" );
-
+       helpmenu->items().push_back(Gtk::Menu_Helpers::SeparatorElem());
+       /* TRANSLATORS: Help menu entry */ SITE(_("Get Support"),                               /* TRANSLATORS: a website page */ _("/en/support")                      );
        helpmenu->items().push_back(Gtk::Menu_Helpers::SeparatorElem());
        helpmenu->items().push_back(Gtk::Menu_Helpers::StockMenuElem(Gtk::StockID("synfig-about"),
                sigc::ptr_fun(studio::App::dialog_about)));
@@ -312,17 +314,17 @@ Toolbox::Toolbox():
        // Create the file button cluster
        Gtk::Table *file_buttons=manage(new class Gtk::Table());
 
-       file_buttons->attach(*button_new,      0,1, 0,1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
-       file_buttons->attach(*button_open,     1,2, 0,1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
-       file_buttons->attach(*button_save,     2,3, 0,1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
-       file_buttons->attach(*button_saveas,   3,4, 0,1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
-       file_buttons->attach(*button_save_all, 4,5, 0,1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
+       file_buttons->attach(*button_new,      0,1, 0,1, Gtk::EXPAND, Gtk::EXPAND, 0, 0);
+       file_buttons->attach(*button_open,     1,2, 0,1, Gtk::EXPAND, Gtk::EXPAND, 0, 0);
+       file_buttons->attach(*button_save,     2,3, 0,1, Gtk::EXPAND, Gtk::EXPAND, 0, 0);
+       file_buttons->attach(*button_saveas,   3,4, 0,1, Gtk::EXPAND, Gtk::EXPAND, 0, 0);
+       file_buttons->attach(*button_save_all, 4,5, 0,1, Gtk::EXPAND, Gtk::EXPAND, 0, 0);
 
-       file_buttons->attach(*button_undo,     0,1, 1,2, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
-       file_buttons->attach(*button_redo,     1,2, 1,2, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
-       file_buttons->attach(*button_setup,    2,3, 1,2, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
-       file_buttons->attach(*button_about,    3,4, 1,2, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
-       file_buttons->attach(*button_help,     4,5, 1,2, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
+       file_buttons->attach(*button_undo,     0,1, 1,2, Gtk::EXPAND, Gtk::EXPAND, 0, 0);
+       file_buttons->attach(*button_redo,     1,2, 1,2, Gtk::EXPAND, Gtk::EXPAND, 0, 0);
+       file_buttons->attach(*button_setup,    2,3, 1,2, Gtk::EXPAND, Gtk::EXPAND, 0, 0);
+       file_buttons->attach(*button_about,    3,4, 1,2, Gtk::EXPAND, Gtk::EXPAND, 0, 0);
+       file_buttons->attach(*button_help,     4,5, 1,2, Gtk::EXPAND, Gtk::EXPAND, 0, 0);
 
        file_buttons->show();
 
@@ -511,7 +513,7 @@ Toolbox::add_state(const Smach::state_base *state)
        int row=state_button_map.size()/5;
        int col=state_button_map.size()%5;
 
-       tool_table->attach(*button,col,col+1,row,row+1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
+       tool_table->attach(*button,col,col+1,row,row+1, Gtk::EXPAND, Gtk::EXPAND, 0, 0);
 
        state_button_map[name]=button;