~valavanisalex/ubuntu/oneiric/inkscape/inkscape_0.48.1-2ubuntu4

« back to all changes in this revision

Viewing changes to src/dialogs/object-attributes.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook, Ted Gould, Kees Cook
  • Date: 2009-06-24 14:00:43 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20090624140043-07stp20mry48hqup
Tags: 0.47~pre0-0ubuntu1
* New upstream release

[ Ted Gould ]
* debian/control: Adding libgsl0 and removing version specifics on boost

[ Kees Cook ]
* debian/watch: updated to run uupdate and mangle pre-release versions.
* Dropped patches that have been taken upstream:
  - 01_mips
  - 02-poppler-0.8.3
  - 03-chinese-inkscape
  - 05_fix_latex_patch
  - 06_gcc-4.4
  - 07_cdr2svg
  - 08_skip-bad-utf-on-pdf-import
  - 09_gtk-clist
  - 10_belarussian
  - 11_libpng
  - 12_desktop
  - 13_slider
  - 100_svg_import_improvements
  - 102_sp_pattern_painter_free
  - 103_bitmap_type_print

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#define __SP_OBJECT_ATTRIBUTES_C__
2
 
 
3
 
/**
4
 
 * \brief  Generic properties editor
5
 
 *
6
 
 * Authors:
 
1
/** @file
 
2
 * @brief  Generic properties editor
 
3
 */
 
4
/* Authors:
7
5
 *   Lauris Kaplinski <lauris@kaplinski.com>
8
6
 *   bulia byak <buliabyak@users.sf.net>
9
7
 *
12
10
 * Released under GNU GPL, read the file 'COPYING' for more information
13
11
 */
14
12
 
15
 
#ifdef HAVE_CONFIG_H
16
 
# include "config.h"
17
 
#endif
18
 
 
19
13
#include <glibmm/i18n.h>
20
14
#include <string>
21
15
#include <cstring>
 
16
#include <sigc++/connection.h>
 
17
#include <sigc++/functors/ptr_fun.h>
 
18
#include <sigc++/adaptors/bind.h>
22
19
 
23
20
#include "helper/window.h"
24
21
#include "macros.h"
25
22
#include "sp-anchor.h"
26
 
#include "sp-attribute-widget.h"
27
 
 
28
 
#include <sigc++/connection.h>
29
 
#include <sigc++/functors/ptr_fun.h>
30
 
#include <sigc++/adaptors/bind.h>
 
23
#include "widgets/sp-attribute-widget.h"
 
24
#include "../xml/repr.h"
31
25
 
32
26
struct SPAttrDesc {
33
27
    gchar const *label;
61
55
    { NULL, NULL}
62
56
};
63
57
 
 
58
static const SPAttrDesc image_nohref_desc[] = {
 
59
    { N_("X:"), "x"},
 
60
    { N_("Y:"), "y"},
 
61
    { N_("Width:"), "width"},
 
62
    { N_("Height:"), "height"},
 
63
    { NULL, NULL}
 
64
};
 
65
 
64
66
 
65
67
static void
66
68
object_released( SPObject */*object*/, GtkWidget *widget )
132
134
    if (!strcmp (tag, "Link")) {
133
135
        sp_object_attr_show_dialog (object, anchor_desc, tag);
134
136
    } else if (!strcmp (tag, "Image")) {
135
 
        sp_object_attr_show_dialog (object, image_desc, tag);
 
137
        Inkscape::XML::Node *ir = SP_OBJECT_REPR(object);
 
138
        const gchar *href = ir->attribute("xlink:href");
 
139
        if ( (!href) || ((strncmp(href, "data:", 5) == 0)) ) {
 
140
            sp_object_attr_show_dialog (object, image_nohref_desc, tag);
 
141
        } else {
 
142
            sp_object_attr_show_dialog (object, image_desc, tag);
 
143
        }
136
144
    } 
137
 
 
138
145
} // end of sp_object_attributes_dialog()
139
146
 
140
 
 
141
 
 
142
147
/*
143
148
  Local Variables:
144
149
  mode:c++