document-metadata.cpp revision 1b3a8414f17dc95fc921d999ea715c99d10dd4aa
/**
* @file
* Document metadata dialog, Gtkmm-style.
*/
/* Authors:
* bulia byak <buliabyak@users.sf.net>
* Bryce W. Harrington <bryce@bryceharrington.org>
* Lauris Kaplinski <lauris@kaplinski.com>
* Jon Phillips <jon@rejon.org>
* Ralf Stephan <ralf@ark.in-berlin.de> (Gtkmm)
*
* Copyright (C) 2000 - 2006 Authors
*
* Released under GNU GPL. Read the file 'COPYING' for more information
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "document-metadata.h"
#include "desktop.h"
#include "desktop-handles.h"
#include "inkscape.h"
#include "rdf.h"
#include "sp-namedview.h"
#include "ui/widget/entity-entry.h"
#include "verbs.h"
#include "xml/node-event-vector.h"
namespace Inkscape {
namespace UI {
namespace Dialog {
#define SPACE_SIZE_X 15
#define SPACE_SIZE_Y 15
//===================================================
//---------------------------------------------------
static void on_repr_attr_changed (Inkscape::XML::Node *, gchar const *, gchar const *, gchar const *, bool, gpointer);
NULL, /* child_added */
NULL, /* child_removed */
NULL, /* content_changed */
NULL /* order_changed */
};
{
return instance;
}
{
hide();
}
void
{
update();
}
{
repr->removeListenerByData (this);
delete (*it);
}
//========================================================================
/**
* Helper function that attachs widgets in a 3xn table. The widgets come in an
* array that has two entries per table row. The two entries code for four
* possible cases: (0,0) means insert space in first column; (0, non-0) means
* widget in columns 2-3; (non-0, 0) means label in columns 1-3; and
* (non-0, non-0) means two widgets in columns 2 and 3.
*/
{
{
{
}
else
{
if (arr[i+1])
else if (arr[i])
{
}
else
{
}
}
++r;
}
}
void
{
/* add generic metadata entry areas */
struct rdf_work_entity_t * entity;
int row = 1;
_page_metadata1.table().attach (*w->_packable, 2,3, row, row+1, Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0,0,0);
}
}
row = 0;
/* add license selector pull-down and URI */
++row;
_page_metadata2.table().attach (_licensor, 1,3, row, row+1, Gtk::EXPAND|Gtk::FILL, (Gtk::AttachOptions)0,0,0);
}
/**
* Update dialog widgets from desktop.
*/
void DocumentMetadata::update()
{
if (_wr.isUpdating()) return;
_wr.setUpdating (true);
set_sensitive (true);
//-----------------------------------------------------------meta pages
/* update the RDF entities */
_wr.setUpdating (false);
}
void
{
update();
}
void
{
update();
}
void
{
repr->removeListenerByData(this);
}
//--------------------------------------------------------------------
/**
* Called when XML node attribute changed; updates dialog widgets.
*/
static void on_repr_attr_changed(Inkscape::XML::Node *, gchar const *, gchar const *, gchar const *, bool, gpointer data)
{
}
} // namespace Dialog
} // namespace UI
} // namespace Inkscape
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :