unit-tracker.cpp revision cb4d410e84360ca7912d7c9f7dd003682dc7cd6f
/*
* Inkscape::UnitTracker - Simple mediator to synchronize changes to a set
* of possible units
*
* Authors:
* Jon A. Cruz <jon@joncruz.org>
*
* Copyright (C) 2007 Jon A. Cruz
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#include "unit-tracker.h"
#include "ege-select-one-action.h"
namespace Inkscape {
enum {
};
_active(0),
_isUpdating(false),
_activeUnit(0),
_store(0),
_unitList(0),
_actionList(0),
_adjList(0),
{
}
{
if ( _unitList ) {
}
// Unhook weak references to GtkActions
while ( _actionList ) {
g_signal_handlers_disconnect_by_func( G_OBJECT(_actionList->data), (gpointer)_unitChangedCB, this );
}
// Unhook wek references to GtkAdjustments
while ( _adjList ) {
}
}
{
}
} else {
_setActive( _active );
}
}
{
gtk_list_store_set( _store, &iter, COLUMN_STRING, percentUnit->abbr, COLUMN_SPUNIT, percentUnit, -1 );
}
bool UnitTracker::isUpdating() const
{
return _isUpdating;
}
{
return _activeUnit;
}
{
/*if ( unit ) {
GtkTreeIter iter;
int index = 0;
gboolean found = gtk_tree_model_get_iter_first( GTK_TREE_MODEL(_store), &iter );
while ( found ) {
SPUnit* storedUnit = 0;
gtk_tree_model_get( GTK_TREE_MODEL(_store), &iter, COLUMN_SPUNIT, &storedUnit, -1 );
if ( storedUnit && (storedUnit->unit_id == unit->unit_id) ) {
_setActive(index);
break;
}
found = gtk_tree_model_iter_next( GTK_TREE_MODEL(_store), &iter );
index++;
}
}*/
}
{
}
}
{
}
{
EgeSelectOneAction* act1 = ege_select_one_action_new( name, label, tooltip, NULL, GTK_TREE_MODEL(_store) );
if ( _active ) {
}
return GTK_ACTION(act1);
}
{
}
}
{
if ( data && where_the_object_was ) {
}
}
{
if ( data && where_the_object_was ) {
}
}
{
if ( target ) {
} else {
}
}
{
if ( target ) {
} else {
}
}
{
if ( found ) {
if ( found ) {
if ( _adjList ) {
}
} else {
g_warning("Did not find new unit");
}
} else {
g_warning("Did not find old unit");
}
}
}
}
}
{
_isUpdating = true;
{
}
} else {
}
}
_isUpdating = false;
}
}
/*
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 :