summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorMaximilian Albert <maximilian.albert@gmail.com>2009-08-06 14:17:17 +0000
committercilix42 <cilix42@users.sourceforge.net>2009-08-06 14:17:17 +0000
commit51c2905fd3e99955db2d823b79abb763d8097028 (patch)
tree90128509479f5498e1125d1e4eb9cdc05bf6b6e6 /src/widgets
parentAdding one more control to Smart Jelly (diff)
downloadinkscape-51c2905fd3e99955db2d823b79abb763d8097028.tar.gz
inkscape-51c2905fd3e99955db2d823b79abb763d8097028.zip
Revert recent refactoring changes by johnce because they break the build, which cannot be fixed easily.
(bzr r8422)
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/desktop-widget.cpp4
-rw-r--r--src/widgets/fill-style.cpp2
-rw-r--r--src/widgets/gradient-selector.cpp4
-rw-r--r--src/widgets/gradient-selector.h2
-rw-r--r--src/widgets/gradient-toolbar.cpp4
-rw-r--r--src/widgets/gradient-vector.cpp8
-rw-r--r--src/widgets/gradient-vector.h8
-rw-r--r--src/widgets/icon.cpp6
-rw-r--r--src/widgets/paint-selector.cpp12
-rw-r--r--src/widgets/select-toolbar.cpp2
-rw-r--r--src/widgets/stroke-style.cpp34
-rw-r--r--src/widgets/toolbox.cpp8
12 files changed, 47 insertions, 47 deletions
diff --git a/src/widgets/desktop-widget.cpp b/src/widgets/desktop-widget.cpp
index fc2e82722..a2f88c16d 100644
--- a/src/widgets/desktop-widget.cpp
+++ b/src/widgets/desktop-widget.cpp
@@ -820,7 +820,7 @@ SPDesktopWidget::shutdown()
g_assert(desktop != NULL);
if (inkscape_is_sole_desktop_for_document(*desktop)) {
- Document *doc = desktop->doc();
+ SPDocument *doc = desktop->doc();
if (doc->isModifiedSinceSave()) {
GtkWidget *dialog;
@@ -1721,7 +1721,7 @@ sp_desktop_widget_update_scrollbars (SPDesktopWidget *dtw, double scale)
dtw->update = 1;
/* The desktop region we always show unconditionally */
- Document *doc = dtw->desktop->doc();
+ SPDocument *doc = dtw->desktop->doc();
Geom::Rect darea ( Geom::Point(-sp_document_width(doc), -sp_document_height(doc)),
Geom::Point(2 * sp_document_width(doc), 2 * sp_document_height(doc)) );
SPObject* root = doc->root;
diff --git a/src/widgets/fill-style.cpp b/src/widgets/fill-style.cpp
index 683b041b0..5e9d30bcd 100644
--- a/src/widgets/fill-style.cpp
+++ b/src/widgets/fill-style.cpp
@@ -355,7 +355,7 @@ sp_fill_style_widget_paint_changed ( SPPaintSelector *psel,
if (!desktop) {
return;
}
- Document *document = sp_desktop_document (desktop);
+ SPDocument *document = sp_desktop_document (desktop);
Inkscape::Selection *selection = sp_desktop_selection (desktop);
GSList const *items = selection->itemList();
diff --git a/src/widgets/gradient-selector.cpp b/src/widgets/gradient-selector.cpp
index 15b65c239..f24a6781b 100644
--- a/src/widgets/gradient-selector.cpp
+++ b/src/widgets/gradient-selector.cpp
@@ -248,7 +248,7 @@ sp_gradient_selector_get_spread (SPGradientSelector *sel)
}
void
-sp_gradient_selector_set_vector (SPGradientSelector *sel, Document *doc, SPGradient *vector)
+sp_gradient_selector_set_vector (SPGradientSelector *sel, SPDocument *doc, SPGradient *vector)
{
g_return_if_fail (sel != NULL);
g_return_if_fail (SP_IS_GRADIENT_SELECTOR (sel));
@@ -307,7 +307,7 @@ sp_gradient_selector_edit_vector_clicked (GtkWidget */*w*/, SPGradientSelector *
static void
sp_gradient_selector_add_vector_clicked (GtkWidget */*w*/, SPGradientSelector *sel)
{
- Document *doc = sp_gradient_vector_selector_get_document (
+ SPDocument *doc = sp_gradient_vector_selector_get_document (
SP_GRADIENT_VECTOR_SELECTOR (sel->vectors));
if (!doc)
diff --git a/src/widgets/gradient-selector.h b/src/widgets/gradient-selector.h
index 63e18554d..e68dfecfc 100644
--- a/src/widgets/gradient-selector.h
+++ b/src/widgets/gradient-selector.h
@@ -68,7 +68,7 @@ GtkWidget *sp_gradient_selector_new (void);
void sp_gradient_selector_set_mode (SPGradientSelector *sel, guint mode);
void sp_gradient_selector_set_units (SPGradientSelector *sel, guint units);
void sp_gradient_selector_set_spread (SPGradientSelector *sel, guint spread);
-void sp_gradient_selector_set_vector (SPGradientSelector *sel, Document *doc, SPGradient *vector);
+void sp_gradient_selector_set_vector (SPGradientSelector *sel, SPDocument *doc, SPGradient *vector);
void sp_gradient_selector_set_bbox (SPGradientSelector *sel, gdouble x0, gdouble y0, gdouble x1, gdouble y1);
SPGradientUnits sp_gradient_selector_get_units (SPGradientSelector *sel);
diff --git a/src/widgets/gradient-toolbar.cpp b/src/widgets/gradient-toolbar.cpp
index f64dc7bd8..ddd9fd96a 100644
--- a/src/widgets/gradient-toolbar.cpp
+++ b/src/widgets/gradient-toolbar.cpp
@@ -167,7 +167,7 @@ gr_prepare_label (SPObject *obj)
GtkWidget *
gr_vector_list (SPDesktop *desktop, bool selection_empty, SPGradient *gr_selected, bool gr_multi)
{
- Document *document = sp_desktop_document (desktop);
+ SPDocument *document = sp_desktop_document (desktop);
GtkWidget *om = gtk_option_menu_new ();
GtkWidget *m = gtk_menu_new ();
@@ -435,7 +435,7 @@ GtkWidget *
gr_change_widget (SPDesktop *desktop)
{
Inkscape::Selection *selection = sp_desktop_selection (desktop);
- Document *document = sp_desktop_document (desktop);
+ SPDocument *document = sp_desktop_document (desktop);
SPEventContext *ev = sp_desktop_event_context (desktop);
SPGradient *gr_selected = NULL;
diff --git a/src/widgets/gradient-vector.cpp b/src/widgets/gradient-vector.cpp
index c6a7b37f4..1f0c07754 100644
--- a/src/widgets/gradient-vector.cpp
+++ b/src/widgets/gradient-vector.cpp
@@ -155,7 +155,7 @@ sp_gradient_vector_selector_destroy (GtkObject *object)
}
GtkWidget *
-sp_gradient_vector_selector_new (Document *doc, SPGradient *gr)
+sp_gradient_vector_selector_new (SPDocument *doc, SPGradient *gr)
{
GtkWidget *gvs;
@@ -174,7 +174,7 @@ sp_gradient_vector_selector_new (Document *doc, SPGradient *gr)
}
void
-sp_gradient_vector_selector_set_gradient (SPGradientVectorSelector *gvs, Document *doc, SPGradient *gr)
+sp_gradient_vector_selector_set_gradient (SPGradientVectorSelector *gvs, SPDocument *doc, SPGradient *gr)
{
static gboolean suppress = FALSE;
@@ -220,7 +220,7 @@ sp_gradient_vector_selector_set_gradient (SPGradientVectorSelector *gvs, Documen
/* The case of setting NULL -> NULL is not very interesting */
}
-Document *
+SPDocument *
sp_gradient_vector_selector_get_document (SPGradientVectorSelector *gvs)
{
g_return_val_if_fail (gvs != NULL, NULL);
@@ -1037,7 +1037,7 @@ sp_gradient_vector_widget_load_gradient (GtkWidget *widget, SPGradient *gradient
// Once the user edits a gradient, it stops being auto-collectable
if (SP_OBJECT_REPR(gradient)->attribute("inkscape:collect")) {
- Document *document = SP_OBJECT_DOCUMENT (gradient);
+ SPDocument *document = SP_OBJECT_DOCUMENT (gradient);
bool saved = sp_document_get_undo_sensitive(document);
sp_document_set_undo_sensitive (document, false);
SP_OBJECT_REPR(gradient)->setAttribute("inkscape:collect", NULL);
diff --git a/src/widgets/gradient-vector.h b/src/widgets/gradient-vector.h
index aa5444755..ea1f5159f 100644
--- a/src/widgets/gradient-vector.h
+++ b/src/widgets/gradient-vector.h
@@ -31,7 +31,7 @@ struct SPGradientVectorSelector {
guint idlabel : 1;
- Document *doc;
+ SPDocument *doc;
SPGradient *gr;
/* Vector menu */
@@ -50,11 +50,11 @@ struct SPGradientVectorSelectorClass {
GType sp_gradient_vector_selector_get_type(void);
-GtkWidget *sp_gradient_vector_selector_new (Document *doc, SPGradient *gradient);
+GtkWidget *sp_gradient_vector_selector_new (SPDocument *doc, SPGradient *gradient);
-void sp_gradient_vector_selector_set_gradient (SPGradientVectorSelector *gvs, Document *doc, SPGradient *gr);
+void sp_gradient_vector_selector_set_gradient (SPGradientVectorSelector *gvs, SPDocument *doc, SPGradient *gr);
-Document *sp_gradient_vector_selector_get_document (SPGradientVectorSelector *gvs);
+SPDocument *sp_gradient_vector_selector_get_document (SPGradientVectorSelector *gvs);
SPGradient *sp_gradient_vector_selector_get_gradient (SPGradientVectorSelector *gvs);
/* fixme: rethink this (Lauris) */
diff --git a/src/widgets/icon.cpp b/src/widgets/icon.cpp
index 56602962d..5824b102c 100644
--- a/src/widgets/icon.cpp
+++ b/src/widgets/icon.cpp
@@ -908,7 +908,7 @@ GdkPixbuf *sp_icon_image_load_pixmap(gchar const *name, unsigned /*lsize*/, unsi
// takes doc, root, icon, and icon name to produce pixels
extern "C" guchar *
-sp_icon_doc_icon( Document *doc, NRArenaItem *root,
+sp_icon_doc_icon( SPDocument *doc, NRArenaItem *root,
gchar const *name, unsigned psize )
{
bool const dump = Inkscape::Preferences::get()->getBool("/debug/icons/dumpSvg");
@@ -1038,7 +1038,7 @@ sp_icon_doc_icon( Document *doc, NRArenaItem *root,
struct svg_doc_cache_t
{
- Document *doc;
+ SPDocument *doc;
NRArenaItem *root;
};
@@ -1081,7 +1081,7 @@ static std::list<gchar*> &icons_svg_paths()
static guchar *load_svg_pixels(gchar const *name,
unsigned /*lsize*/, unsigned psize)
{
- Document *doc = NULL;
+ SPDocument *doc = NULL;
NRArenaItem *root = NULL;
svg_doc_cache_t *info = NULL;
diff --git a/src/widgets/paint-selector.cpp b/src/widgets/paint-selector.cpp
index d203e094f..a101b9eeb 100644
--- a/src/widgets/paint-selector.cpp
+++ b/src/widgets/paint-selector.cpp
@@ -747,7 +747,7 @@ sp_psel_pattern_change(GtkWidget *widget, SPPaintSelector *psel)
* Returns NULL if there are no patterns in the document.
*/
GSList *
-ink_pattern_list_get (Document *source)
+ink_pattern_list_get (SPDocument *source)
{
if (source == NULL)
return NULL;
@@ -768,7 +768,7 @@ ink_pattern_list_get (Document *source)
* Adds menu items for pattern list - derived from marker code, left hb etc in to make addition of previews easier at some point.
*/
static void
-sp_pattern_menu_build (GtkWidget *m, GSList *pattern_list, Document */*source*/)
+sp_pattern_menu_build (GtkWidget *m, GSList *pattern_list, SPDocument */*source*/)
{
for (; pattern_list != NULL; pattern_list = pattern_list->next) {
@@ -813,7 +813,7 @@ sp_pattern_menu_build (GtkWidget *m, GSList *pattern_list, Document */*source*/)
*
*/
static void
-sp_pattern_list_from_doc (GtkWidget *m, Document *current_doc, Document *source, Document *pattern_doc)
+sp_pattern_list_from_doc (GtkWidget *m, SPDocument *current_doc, SPDocument *source, SPDocument *pattern_doc)
{
(void)current_doc;
(void)pattern_doc;
@@ -838,9 +838,9 @@ sp_pattern_list_from_doc (GtkWidget *m, Document *current_doc, Document *source,
static void
-ink_pattern_menu_populate_menu(GtkWidget *m, Document *doc)
+ink_pattern_menu_populate_menu(GtkWidget *m, SPDocument *doc)
{
- static Document *patterns_doc = NULL;
+ static SPDocument *patterns_doc = NULL;
// find and load patterns.svg
if (patterns_doc == NULL) {
@@ -878,7 +878,7 @@ ink_pattern_menu(GtkWidget *mnu)
/* Create new menu widget */
GtkWidget *m = gtk_menu_new();
gtk_widget_show(m);
- Document *doc = SP_ACTIVE_DOCUMENT;
+ SPDocument *doc = SP_ACTIVE_DOCUMENT;
if (!doc) {
GtkWidget *i;
diff --git a/src/widgets/select-toolbar.cpp b/src/widgets/select-toolbar.cpp
index 6d28f80e5..f168cedeb 100644
--- a/src/widgets/select-toolbar.cpp
+++ b/src/widgets/select-toolbar.cpp
@@ -153,7 +153,7 @@ sp_object_layout_any_value_changed(GtkAdjustment *adj, SPWidget *spw)
SPDesktop *desktop = SP_ACTIVE_DESKTOP;
Inkscape::Selection *selection = sp_desktop_selection(desktop);
- Document *document = sp_desktop_document(desktop);
+ SPDocument *document = sp_desktop_document(desktop);
sp_document_ensure_up_to_date (document);
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
diff --git a/src/widgets/stroke-style.cpp b/src/widgets/stroke-style.cpp
index e0002e5c2..f502f87d3 100644
--- a/src/widgets/stroke-style.cpp
+++ b/src/widgets/stroke-style.cpp
@@ -81,7 +81,7 @@ sigc::connection marker_start_menu_connection;
sigc::connection marker_mid_menu_connection;
sigc::connection marker_end_menu_connection;
-static SPObject *ink_extract_marker_name(gchar const *n, Document *doc);
+static SPObject *ink_extract_marker_name(gchar const *n, SPDocument *doc);
static void ink_markers_menu_update(Gtk::Container* spw, SPMarkerLoc const which);
static Inkscape::UI::Cache::SvgPreview svg_preview_cache;
@@ -307,7 +307,7 @@ sp_stroke_style_paint_changed(SPPaintSelector *psel, SPWidget *spw)
g_object_set_data (G_OBJECT (spw), "update", GINT_TO_POINTER (TRUE));
SPDesktop *desktop = SP_ACTIVE_DESKTOP;
- Document *document = sp_desktop_document (desktop);
+ SPDocument *document = sp_desktop_document (desktop);
Inkscape::Selection *selection = sp_desktop_selection (desktop);
GSList const *items = selection->itemList();
@@ -550,7 +550,7 @@ sp_stroke_style_widget_transientize_callback(Inkscape::Application */*inkscape*/
*/
static Gtk::Image *
sp_marker_prev_new(unsigned psize, gchar const *mname,
- Document *source, Document *sandbox,
+ SPDocument *source, SPDocument *sandbox,
gchar const *menu_id, NRArena const */*arena*/, unsigned /*visionkey*/, NRArenaItem *root)
{
// Retrieve the marker named 'mname' from the source SVG document
@@ -617,7 +617,7 @@ sp_marker_prev_new(unsigned psize, gchar const *mname,
* Returns NULL if there are no markers in the document.
*/
GSList *
-ink_marker_list_get (Document *source)
+ink_marker_list_get (SPDocument *source)
{
if (source == NULL)
return NULL;
@@ -641,7 +641,7 @@ ink_marker_list_get (Document *source)
* Adds previews of markers in marker_list to the given menu widget
*/
static void
-sp_marker_menu_build (Gtk::Menu *m, GSList *marker_list, Document *source, Document *sandbox, gchar const *menu_id)
+sp_marker_menu_build (Gtk::Menu *m, GSList *marker_list, SPDocument *source, SPDocument *sandbox, gchar const *menu_id)
{
// Do this here, outside of loop, to speed up preview generation:
NRArena const *arena = NRArena::create();
@@ -695,7 +695,7 @@ sp_marker_menu_build (Gtk::Menu *m, GSList *marker_list, Document *source, Docum
*
*/
static void
-sp_marker_list_from_doc (Gtk::Menu *m, Document */*current_doc*/, Document *source, Document */*markers_doc*/, Document *sandbox, gchar const *menu_id)
+sp_marker_list_from_doc (Gtk::Menu *m, SPDocument */*current_doc*/, SPDocument *source, SPDocument */*markers_doc*/, SPDocument *sandbox, gchar const *menu_id)
{
GSList *ml = ink_marker_list_get(source);
GSList *clean_ml = NULL;
@@ -716,7 +716,7 @@ sp_marker_list_from_doc (Gtk::Menu *m, Document */*current_doc*/, Document *sour
/**
* Returns a new document containing default start, mid, and end markers.
*/
-Document *
+SPDocument *
ink_markers_preview_doc ()
{
gchar const *buffer = "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:sodipodi=\"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd\" xmlns:inkscape=\"http://www.inkscape.org/namespaces/inkscape\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">"
@@ -749,9 +749,9 @@ gchar const *buffer = "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:sodipodi=
}
static void
-ink_marker_menu_create_menu(Gtk::Menu *m, gchar const *menu_id, Document *doc, Document *sandbox)
+ink_marker_menu_create_menu(Gtk::Menu *m, gchar const *menu_id, SPDocument *doc, SPDocument *sandbox)
{
- static Document *markers_doc = NULL;
+ static SPDocument *markers_doc = NULL;
// add "None"
Gtk::MenuItem *i = new Gtk::MenuItem();
@@ -804,10 +804,10 @@ ink_marker_menu_create_menu(Gtk::Menu *m, gchar const *menu_id, Document *doc, D
* Creates a menu widget to display markers from markers.svg
*/
static Gtk::OptionMenu *
-ink_marker_menu(Gtk::Widget */*tbl*/, gchar const *menu_id, Document *sandbox)
+ink_marker_menu(Gtk::Widget */*tbl*/, gchar const *menu_id, SPDocument *sandbox)
{
SPDesktop *desktop = inkscape_active_desktop();
- Document *doc = sp_desktop_document(desktop);
+ SPDocument *doc = sp_desktop_document(desktop);
Gtk::OptionMenu *mnu = new Gtk::OptionMenu();
/* Create new menu widget */
@@ -850,7 +850,7 @@ sp_marker_select(Gtk::OptionMenu *mnu, Gtk::Container *spw, SPMarkerLoc const wh
}
SPDesktop *desktop = inkscape_active_desktop();
- Document *document = sp_desktop_document(desktop);
+ SPDocument *document = sp_desktop_document(desktop);
if (!document) {
return;
}
@@ -930,8 +930,8 @@ ink_marker_menu_get_pos(Gtk::Menu *mnu, gchar const *markname)
static void
ink_markers_menu_update(Gtk::Container* /*spw*/, SPMarkerLoc const which) {
SPDesktop *desktop = inkscape_active_desktop();
- Document *document = sp_desktop_document(desktop);
- Document *sandbox = ink_markers_preview_doc ();
+ SPDocument *document = sp_desktop_document(desktop);
+ SPDocument *sandbox = ink_markers_preview_doc ();
Gtk::Menu *m;
int pos;
@@ -1225,7 +1225,7 @@ sp_stroke_style_line_widget_new(void)
// TODO: this code can be shortened by iterating over the possible menus!
// doing this here once, instead of for each preview, to speed things up
- Document *sandbox = ink_markers_preview_doc ();
+ SPDocument *sandbox = ink_markers_preview_doc ();
// TRANSLATORS: Path markers are an SVG feature that allows you to attach arbitrary shapes
// (arrowheads, bullets, faces, whatever) to the start, end, or middle nodes of a path.
@@ -1539,7 +1539,7 @@ sp_stroke_style_scale_line(Gtk::Container *spw)
Gtk::Adjustment *ml = static_cast<Gtk::Adjustment *>(spw->get_data("miterlimit"));
SPDesktop *desktop = SP_ACTIVE_DESKTOP;
- Document *document = sp_desktop_document (desktop);
+ SPDocument *document = sp_desktop_document (desktop);
Inkscape::Selection *selection = sp_desktop_selection (desktop);
GSList const *items = selection->itemList();
@@ -1833,7 +1833,7 @@ sp_stroke_style_update_marker_menus(Gtk::Container *spw, GSList const *objects)
* the caller should free the buffer when they no longer need it.
*/
static SPObject*
-ink_extract_marker_name(gchar const *n, Document *doc)
+ink_extract_marker_name(gchar const *n, SPDocument *doc)
{
gchar const *p = n;
while (*p != '\0' && *p != '#') {
diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp
index c13ad9ba6..8bb15ae6f 100644
--- a/src/widgets/toolbox.cpp
+++ b/src/widgets/toolbox.cpp
@@ -1886,7 +1886,7 @@ void toggle_snap_callback (GtkToggleAction *act, gpointer data) { //data points
SPDesktop *dt = reinterpret_cast<SPDesktop*>(ptr);
SPNamedView *nv = sp_desktop_namedview(dt);
- Document *doc = SP_OBJECT_DOCUMENT(nv);
+ SPDocument *doc = SP_OBJECT_DOCUMENT(nv);
if (dt == NULL || nv == NULL) {
g_warning("No desktop or namedview specified (in toggle_snap_callback)!");
@@ -3327,7 +3327,7 @@ static void
box3d_angle_value_changed(GtkAdjustment *adj, GObject *dataKludge, Proj::Axis axis)
{
SPDesktop *desktop = (SPDesktop *) g_object_get_data( dataKludge, "desktop" );
- Document *document = sp_desktop_document(desktop);
+ SPDocument *document = sp_desktop_document(desktop);
// quit if run by the attr_changed or selection changed listener
if (g_object_get_data( dataKludge, "freeze" )) {
@@ -3407,7 +3407,7 @@ static void box3d_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions,
{
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
EgeAdjustmentAction* eact = 0;
- Document *document = sp_desktop_document (desktop);
+ SPDocument *document = sp_desktop_document (desktop);
Persp3D *persp = document->current_persp3d;
EgeAdjustmentAction* box3d_angle_x = 0;
@@ -6845,7 +6845,7 @@ static void sp_connector_path_set_ignore(void)
static void connector_spacing_changed(GtkAdjustment *adj, GObject* tbl)
{
SPDesktop *desktop = (SPDesktop *) g_object_get_data( tbl, "desktop" );
- Document *doc = sp_desktop_document(desktop);
+ SPDocument *doc = sp_desktop_document(desktop);
if (!sp_document_get_undo_sensitive(doc))
{