~centralelyon2010/inkscape/imagelinks2

« back to all changes in this revision

Viewing changes to src/widgets/toolbox.cpp

  • Committer: Ted Gould
  • Date: 2008-11-21 05:24:08 UTC
  • Revision ID: ted@canonical.com-20081121052408-tilucis2pjrrpzxx
MergeĀ fromĀ fe-moved

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
#include <gtk/gtk.h>
33
33
#include <iostream>
34
34
#include <sstream>
35
 
 
36
 
#include "widgets/button.h"
37
 
#include "widgets/widget-sizes.h"
38
 
#include "widgets/spw-utilities.h"
39
 
#include "widgets/spinbutton-events.h"
40
 
#include "dialogs/text-edit.h"
41
 
#include "dialogs/dialog-events.h"
42
 
 
43
 
#include "ui/widget/style-swatch.h"
44
 
 
45
 
#include "verbs.h"
46
 
#include "sp-namedview.h"
47
 
#include "desktop.h"
48
 
#include "desktop-handles.h"
49
 
#include "xml/repr.h"
50
 
#include "xml/node-event-vector.h"
51
 
#include "xml/attribute-record.h"
52
35
#include <glibmm/i18n.h>
53
 
#include "helper/unit-menu.h"
54
 
#include "helper/units.h"
55
 
#include "live_effects/effect.h"
56
 
 
57
 
#include "inkscape.h"
58
 
#include "conn-avoid-ref.h"
59
 
 
60
 
 
61
 
#include "select-toolbar.h"
 
36
 
 
37
#include "../box3d-context.h"
 
38
#include "../box3d.h"
 
39
#include "calligraphic-profile-rename.h"
 
40
#include "../conn-avoid-ref.h"
 
41
#include "../connection-pool.h"
 
42
#include "../connector-context.h"
 
43
#include "../desktop.h"
 
44
#include "../desktop-handles.h"
 
45
#include "../desktop-style.h"
 
46
#include "../dialogs/dialog-events.h"
 
47
#include "../dialogs/text-edit.h"
 
48
#include "../document-private.h"
 
49
#include "../ege-adjustment-action.h"
 
50
#include "../ege-output-action.h"
 
51
#include "../ege-select-one-action.h"
 
52
#include "../flood-context.h"
62
53
#include "gradient-toolbar.h"
63
 
 
64
 
#include "connector-context.h"
65
 
#include "node-context.h"
66
 
#include "pen-context.h"
67
 
#include "lpe-tool-context.h"
68
 
#include "live_effects/lpe-line_segment.h"
69
 
#include "shape-editor.h"
70
 
#include "tweak-context.h"
71
 
#include "sp-rect.h"
72
 
#include "box3d.h"
73
 
#include "box3d-context.h"
74
 
#include "sp-star.h"
75
 
#include "sp-spiral.h"
76
 
#include "sp-ellipse.h"
77
 
#include "sp-text.h"
78
 
#include "sp-flowtext.h"
79
 
#include "sp-clippath.h"
80
 
#include "sp-mask.h"
81
 
#include "style.h"
82
 
#include "tools-switch.h"
83
 
#include "selection.h"
84
 
#include "selection-chemistry.h"
85
 
#include "document-private.h"
86
 
#include "desktop-style.h"
 
54
#include "../graphlayout/graphlayout.h"
 
55
#include "../helper/unit-menu.h"
 
56
#include "../helper/units.h"
 
57
#include "../helper/unit-tracker.h"
 
58
#include "icon.h"
 
59
#include "../ink-action.h"
 
60
#include "../inkscape.h"
 
61
#include "../inkscape-stock.h"
 
62
#include "../interface.h"
 
63
#include "../libnrtype/font-instance.h"
87
64
#include "../libnrtype/font-lister.h"
88
 
#include "../libnrtype/font-instance.h"
89
 
#include "../connection-pool.h"
 
65
#include "../live_effects/effect.h"
 
66
#include "../live_effects/lpe-angle_bisector.h"
 
67
#include "../live_effects/lpe-line_segment.h"
 
68
#include "../lpe-tool-context.h"
 
69
#include "../mod360.h"
 
70
#include "../node-context.h"
 
71
#include "../pen-context.h"
90
72
#include "../preferences.h"
91
 
#include "../inkscape-stock.h"
92
 
#include "icon.h"
93
 
#include "graphlayout/graphlayout.h"
94
 
#include "interface.h"
95
 
#include "shortcuts.h"
96
 
 
97
 
#include "mod360.h"
 
73
#include "../selection-chemistry.h"
 
74
#include "../selection.h"
 
75
#include "select-toolbar.h"
 
76
#include "../shape-editor.h"
 
77
#include "../shortcuts.h"
 
78
#include "../sp-clippath.h"
 
79
#include "../sp-ellipse.h"
 
80
#include "../sp-flowtext.h"
 
81
#include "../sp-mask.h"
 
82
#include "../sp-namedview.h"
 
83
#include "../sp-rect.h"
 
84
#include "../sp-spiral.h"
 
85
#include "../sp-star.h"
 
86
#include "../sp-text.h"
 
87
#include "../style.h"
 
88
#include "../svg/css-ostringstream.h"
 
89
#include "../tools-switch.h"
 
90
#include "../tweak-context.h"
 
91
#include "../ui/widget/style-swatch.h"
 
92
#include "../verbs.h"
 
93
#include "../widgets/button.h"
 
94
#include "../widgets/spinbutton-events.h"
 
95
#include "../widgets/spw-utilities.h"
 
96
#include "../widgets/widget-sizes.h"
 
97
#include "../xml/attribute-record.h"
 
98
#include "../xml/node-event-vector.h"
 
99
#include "../xml/repr.h"
98
100
 
99
101
#include "toolbox.h"
100
102
 
101
 
#include "flood-context.h"
102
 
 
103
 
#include "ink-action.h"
104
 
#include "ege-adjustment-action.h"
105
 
#include "ege-output-action.h"
106
 
#include "ege-select-one-action.h"
107
 
#include "helper/unit-tracker.h"
108
 
#include "live_effects/lpe-angle_bisector.h"
109
 
 
110
 
#include "svg/css-ostringstream.h"
111
 
 
112
 
#include "widgets/calligraphic-profile-rename.h"
113
 
 
114
103
using Inkscape::UnitTracker;
115
104
 
116
105
typedef void (*SetupFunction)(GtkWidget *toolbox, SPDesktop *desktop);
4106
4095
 
4107
4096
static void sp_dcc_save_profile (GtkWidget */*widget*/, GObject *tbl)
4108
4097
{
 
4098
    using Inkscape::UI::Dialog::CalligraphicProfileRename;
4109
4099
    Inkscape::Preferences *prefs = Inkscape::Preferences::get();
4110
4100
    SPDesktop *desktop = (SPDesktop *) g_object_get_data(tbl, "desktop" );
4111
4101
    if (! desktop) return;
4113
4103
    if (g_object_get_data(tbl, "presets_blocked"))
4114
4104
        return;
4115
4105
 
4116
 
    Inkscape::UI::Dialogs::CalligraphicProfileDialog::show(desktop);
4117
 
    if ( ! Inkscape::UI::Dialogs::CalligraphicProfileDialog::applied()) {
 
4106
    CalligraphicProfileRename::show(desktop);
 
4107
    if ( !CalligraphicProfileRename::applied()) {
4118
4108
        // dialog cancelled
4119
4109
        update_presets_list (tbl);
4120
4110
        return;
4121
4111
    }
4122
 
    Glib::ustring profile_name = Inkscape::UI::Dialogs::CalligraphicProfileDialog::getProfileName();
 
4112
    Glib::ustring profile_name = CalligraphicProfileRename::getProfileName();
4123
4113
 
4124
4114
    if (profile_name.empty()) {
4125
4115
        // empty name entered
5007
4997
    SPDesktop *desktop = static_cast<SPDesktop *>(data);
5008
4998
    Inkscape::Selection *selection = desktop->selection;
5009
4999
 
5010
 
    boost::optional<Geom::Rect> bbox = selection->bounds();
 
5000
    Geom::OptRect bbox = selection->bounds();
5011
5001
 
5012
5002
    if (bbox) {
5013
5003
        Geom::Point A(bbox->min());