X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fcanvasproperties.cpp;h=331f8b29488ecbe63479b49f8d2362b60515cc71;hb=e7e1794959f6b4af0d60d69b5501adcd305f2207;hp=ca4990dfdf1bb34d7848200abb2835a56f62021a;hpb=02252941b29de64037116f4d37991a38d9ff0d94;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/canvasproperties.cpp b/synfig-studio/trunk/src/gtkmm/canvasproperties.cpp index ca4990d..331f8b2 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasproperties.cpp +++ b/synfig-studio/trunk/src/gtkmm/canvasproperties.cpp @@ -5,16 +5,17 @@ ** $Id: canvasproperties.cpp,v 1.1.1.1 2005/01/07 03:34:35 darco Exp $ ** ** \legal -** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley ** -** This software and associated documentation -** are CONFIDENTIAL and PROPRIETARY property of -** the above-mentioned copyright holder. +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. ** -** You may not copy, print, publish, or in any -** other way distribute this software without -** a prior written agreement with -** the copyright holder. +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. ** \endlegal */ /* ========================================================================= */ @@ -32,7 +33,7 @@ #include #include #include -#include +#include #include #include "metadatatreestore.h" #include @@ -61,36 +62,51 @@ CanvasProperties::CanvasProperties(Gtk::Window& parent,handleset_padding(12, 12, 12, 12); + get_vbox()->pack_start(*dialogPadding, false, false, 0); + + Gtk::VBox *dialogBox = manage(new Gtk::VBox(false, 12)); + dialogPadding->add(*dialogBox); + Gtk::Frame *info_frame=manage(new Gtk::Frame(_("Canvas Info"))); + info_frame->set_shadow_type(Gtk::SHADOW_NONE); + ((Gtk::Label *) info_frame->get_label_widget())->set_markup(_("Canvas Info")); + dialogBox->pack_start(*info_frame, false, false, 0); + + Gtk::Alignment *infoPadding = manage(new Gtk::Alignment(0, 0, 1, 1)); + infoPadding->set_padding(6, 0, 24, 0); + info_frame->add(*infoPadding); Gtk::Table *info_table=manage(new Gtk::Table(2,2,false)); - info_frame->add(*info_table); + info_table->set_row_spacings(6); + info_table->set_col_spacings(12); + infoPadding->add(*info_table); // The root canvas doesn't have an ID, so don't // display it if this is a root canvas. if(!canvas_interface_->get_canvas()->is_root()) { - info_table->attach(*manage(new Gtk::Label(_("ID"))), 0, 1, 0, 1, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); + Gtk::Label *idLabel = manage(new Gtk::Label(_("_ID"), true)); + idLabel->set_alignment(0, 0.5); + idLabel->set_mnemonic_widget(entry_id); + info_table->attach(*idLabel, 0, 1, 0, 1, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); info_table->attach(entry_id, 1, 2, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); } - info_table->attach(*manage(new Gtk::Label(_("Name"))), 0, 1, 1, 2, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); - info_table->attach(*manage(new Gtk::Label(_("Description"))), 0, 1, 2, 3, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); + Gtk::Label *nameLabel = manage(new Gtk::Label(_("_Name"), true)); + nameLabel->set_alignment(0, 0.5); + nameLabel->set_mnemonic_widget(entry_name); + Gtk::Label *descriptionLabel = manage(new Gtk::Label(_("_Description"), true)); + descriptionLabel->set_alignment(0, 0.5); + descriptionLabel->set_mnemonic_widget(entry_description); + info_table->attach(*nameLabel, 0, 1, 1, 2, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); + info_table->attach(*descriptionLabel, 0, 1, 2, 3, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); info_table->attach(entry_name, 1, 2, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); info_table->attach(entry_description, 1, 2, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); - info_frame->show_all(); - - get_vbox()->pack_start(*info_frame); - - Gtk::Notebook* notebook(manage(new Gtk::Notebook())); - notebook->show(); - notebook->append_page(widget_rend_desc,_("RendDesc")); - //notebook->append_page(create_meta_data_view(),_("MetaData")); - - get_vbox()->pack_start(*notebook); + dialogBox->pack_start(widget_rend_desc, false, false, 0); canvas_interface_->signal_rend_desc_changed().connect(sigc::mem_fun(*this,&studio::CanvasProperties::refresh)); @@ -111,6 +127,7 @@ CanvasProperties::CanvasProperties(Gtk::Window& parent,handleshow_all(); refresh(); update_title();