summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9aa7d5d)
raw | patch | inline | side by side (parent: 9aa7d5d)
author | joncruz <joncruz@users.sourceforge.net> | |
Thu, 8 Nov 2007 07:35:44 +0000 (07:35 +0000) | ||
committer | joncruz <joncruz@users.sourceforge.net> | |
Thu, 8 Nov 2007 07:35:44 +0000 (07:35 +0000) |
31 files changed:
index f6d3b030958859530d3f96b19157a2ab91df44fd..60750796f89f23130c70beb3cd6dcde393e15fc7 100644 (file)
* Clone tiling dialog
*
* Authors:
- * bulia byak <buliabyak@users.sf.net>
+ * bulia byak <buliabyak@users.sf.net>
* Johan Engelen <goejendaagh@zonnet.nl>
*
* Copyright (C) 2004-2006 Authors
static Inkscape::UI::Widget::ColorPicker *color_picker;
static void
-clonetiler_dialog_destroy (GtkObject *object, gpointer data)
+clonetiler_dialog_destroy( GtkObject */*object*/, gpointer /*data*/ )
{
if (Inkscape::NSApplication::Application::getNewGui())
{
_color_changed_connection.disconnect();
delete color_picker;
-
+
wd.win = dlg = NULL;
wd.stop = 0;
}
static gboolean
-clonetiler_dialog_delete (GtkObject *object, GdkEvent * /*event*/, gpointer data)
+clonetiler_dialog_delete (GtkObject */*object*/, GdkEvent * /*event*/, gpointer /*data*/)
{
gtk_window_get_position ((GtkWindow *) dlg, &x, &y);
gtk_window_get_size ((GtkWindow *) dlg, &w, &h);
static NR::Matrix
-clonetiler_get_transform (
+clonetiler_get_transform (
// symmetry group
int type,
// row, column
trace_arena = NRArena::create();
/* Create ArenaItem and set transform */
trace_visionkey = sp_item_display_key_new(1);
- trace_root = sp_item_invoke_show( SP_ITEM(SP_DOCUMENT_ROOT (doc)),
+ trace_root = sp_item_invoke_show( SP_ITEM(SP_DOCUMENT_ROOT (doc)),
(NRArena *) trace_arena, trace_visionkey, SP_ITEM_SHOW_DISPLAY);
// hide the (current) original and any tiled clones, we only want to pick the background
- sp_item_invoke_hide(original, trace_visionkey);
+ sp_item_invoke_hide(original, trace_visionkey);
clonetiler_trace_hide_tiled_clones_recursively (SP_OBJECT(SP_DOCUMENT_ROOT (doc)));
sp_document_root (doc)->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG);
}
static void
-clonetiler_unclump (GtkWidget *widget, void *)
+clonetiler_unclump( GtkWidget */*widget*/, void * )
{
SPDesktop *desktop = SP_ACTIVE_DESKTOP;
if (desktop == NULL)
g_slist_free (to_unclump);
- sp_document_done (sp_desktop_document (desktop), SP_VERB_DIALOG_CLONETILER,
+ sp_document_done (sp_desktop_document (desktop), SP_VERB_DIALOG_CLONETILER,
_("Unclump tiled clones"));
}
}
static void
-clonetiler_remove (GtkWidget *widget, void *, bool do_undo = true)
+clonetiler_remove( GtkWidget */*widget*/, void *, bool do_undo = true )
{
SPDesktop *desktop = SP_ACTIVE_DESKTOP;
if (desktop == NULL)
clonetiler_change_selection (NULL, selection, dlg);
if (do_undo)
- sp_document_done (sp_desktop_document (desktop), SP_VERB_DIALOG_CLONETILER,
+ sp_document_done (sp_desktop_document (desktop), SP_VERB_DIALOG_CLONETILER,
_("Delete tiled clones"));
}
NR::Point const p4 = r.corner(4) * m;
return NR::Rect(
NR::Point(
- std::min(std::min(p1[X], p2[X]), std::min(p3[X], p4[X])),
- std::min(std::min(p1[Y], p2[Y]), std::min(p3[Y], p4[Y]))),
+ std::min(std::min(p1[X], p2[X]), std::min(p3[X], p4[X])),
+ std::min(std::min(p1[Y], p2[Y]), std::min(p3[Y], p4[Y]))),
NR::Point(
- std::max(std::max(p1[X], p2[X]), std::max(p3[X], p4[X])),
+ std::max(std::max(p1[X], p2[X]), std::max(p3[X], p4[X])),
std::max(std::max(p1[Y], p2[Y]), std::max(p3[Y], p4[Y]))));
}
static void
-clonetiler_apply (GtkWidget *widget, void *)
+clonetiler_apply( GtkWidget */*widget*/, void * )
{
SPDesktop *desktop = SP_ACTIVE_DESKTOP;
if (desktop == NULL)
clonetiler_change_selection (NULL, selection, dlg);
- sp_document_done(sp_desktop_document(desktop), SP_VERB_DIALOG_CLONETILER,
+ sp_document_done(sp_desktop_document(desktop), SP_VERB_DIALOG_CLONETILER,
_("Create tiled clones"));
}
@@ -1444,7 +1444,7 @@ clonetiler_spinbox (GtkTooltips *tt, const char *tip, const char *attr, double l
}
static void
-clonetiler_symgroup_changed (GtkMenuItem *item, gpointer data)
+clonetiler_symgroup_changed( GtkMenuItem */*item*/, gpointer data )
{
gint group_new = GPOINTER_TO_INT (data);
prefs_set_int_attribute ( prefs_path, "symmetrygroup", group_new );
}
static void
-clonetiler_keep_bbox_toggled (GtkToggleButton *tb, gpointer data)
+clonetiler_keep_bbox_toggled( GtkToggleButton *tb, gpointer /*data*/ )
{
prefs_set_int_attribute (prefs_path, "keepbbox", gtk_toggle_button_get_active (tb));
}
}
static void
-clonetiler_reset (GtkWidget *widget, void *)
+clonetiler_reset( GtkWidget */*widget*/, void * )
{
clonetiler_reset_recursive (dlg);
}
}
static void
-clonetiler_pick_switched (GtkToggleButton *tb, gpointer data)
+clonetiler_pick_switched( GtkToggleButton */*tb*/, gpointer data )
{
guint v = GPOINTER_TO_INT (data);
prefs_set_int_attribute (prefs_path, "pick", v);
static void
-clonetiler_switch_to_create (GtkToggleButton *tb, GtkWidget *dlg)
+clonetiler_switch_to_create( GtkToggleButton */*tb*/, GtkWidget *dlg )
{
GtkWidget *rowscols = (GtkWidget *) g_object_get_data (G_OBJECT(dlg), "rowscols");
GtkWidget *widthheight = (GtkWidget *) g_object_get_data (G_OBJECT(dlg), "widthheight");
static void
-clonetiler_switch_to_fill (GtkToggleButton *tb, GtkWidget *dlg)
+clonetiler_switch_to_fill( GtkToggleButton */*tb*/, GtkWidget *dlg )
{
GtkWidget *rowscols = (GtkWidget *) g_object_get_data (G_OBJECT(dlg), "rowscols");
GtkWidget *widthheight = (GtkWidget *) g_object_get_data (G_OBJECT(dlg), "widthheight");
static void
-clonetiler_do_pick_toggled (GtkToggleButton *tb, gpointer data)
+clonetiler_do_pick_toggled( GtkToggleButton *tb, gpointer /*data*/ )
{
GtkWidget *vvb = (GtkWidget *) g_object_get_data (G_OBJECT(dlg), "dotrace");
x = prefs_get_int_attribute (prefs_path, "x", -1000);
y = prefs_get_int_attribute (prefs_path, "y", -1000);
}
-
+
if (w ==0 || h == 0) {
w = prefs_get_int_attribute (prefs_path, "w", 0);
h = prefs_get_int_attribute (prefs_path, "h", 0);
}
-
+
// if (x<0) x=0;
// if (y<0) y=0;
}
if (x >= 0 && y >= 0 && (x < (gdk_screen_width()-MIN_ONSCREEN_DISTANCE)) && (y < (gdk_screen_height()-MIN_ONSCREEN_DISTANCE))) {
gtk_window_move ((GtkWindow *) dlg, x, y);
-
+
} else {
gtk_window_set_position(GTK_WINDOW(dlg), GTK_WIN_POS_CENTER);
}
-
-
+
+
sp_transientize (dlg);
wd.win = dlg;
wd.stop = 0;
-
-
+
+
gtk_signal_connect ( GTK_OBJECT (dlg), "event", GTK_SIGNAL_FUNC (sp_dialog_event_handler), dlg);
-
+
gtk_signal_connect ( GTK_OBJECT (dlg), "destroy", G_CALLBACK (clonetiler_dialog_destroy), dlg);
gtk_signal_connect ( GTK_OBJECT (dlg), "delete_event", G_CALLBACK (clonetiler_dialog_delete), dlg);
_dialogs_hidden_connection = Inkscape::NSApplication::Editor::connectDialogsHidden (sigc::bind (&on_dialog_hide, dlg));
_dialogs_unhidden_connection = Inkscape::NSApplication::Editor::connectDialogsUnhidden (sigc::bind (&on_dialog_unhide, dlg));
_desktop_activated_connection = Inkscape::NSApplication::Editor::connectDesktopActivated (sigc::bind (&on_transientize, &wd));
- } else {
+ } else {
g_signal_connect ( G_OBJECT (INKSCAPE), "shut_down", G_CALLBACK (clonetiler_dialog_delete), dlg);
g_signal_connect ( G_OBJECT (INKSCAPE), "dialogs_hide", G_CALLBACK (sp_dialog_hide), dlg);
g_signal_connect ( G_OBJECT (INKSCAPE), "dialogs_unhide", G_CALLBACK (sp_dialog_unhide), dlg);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radio), prefs_get_int_attribute(prefs_path, "pick", 0) == PICK_B);
}
{
- //TRANSLATORS: only translate "string" in "context|string".
+ //TRANSLATORS: only translate "string" in "context|string".
// For more details, see http://developer.gnome.org/doc/API/2.0/glib/glib-I18N.html#Q-:CAPS
radio = gtk_radio_button_new_with_label (gtk_radio_button_group (GTK_RADIO_BUTTON (radio)), Q_("clonetiler|H"));
gtk_tooltips_set_tip (GTK_TOOLTIPS (tt), radio, _("Pick the hue of the color"), NULL);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radio), prefs_get_int_attribute(prefs_path, "pick", 0) == PICK_H);
}
{
- //TRANSLATORS: only translate "string" in "context|string".
+ //TRANSLATORS: only translate "string" in "context|string".
// For more details, see http://developer.gnome.org/doc/API/2.0/glib/glib-I18N.html#Q-:CAPS
radio = gtk_radio_button_new_with_label (gtk_radio_button_group (GTK_RADIO_BUTTON (radio)), Q_("clonetiler|S"));
gtk_tooltips_set_tip (GTK_TOOLTIPS (tt), radio, _("Pick the saturation of the color"), NULL);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radio), prefs_get_int_attribute(prefs_path, "pick", 0) == PICK_S);
}
{
- //TRANSLATORS: only translate "string" in "context|string".
+ //TRANSLATORS: only translate "string" in "context|string".
// For more details, see http://developer.gnome.org/doc/API/2.0/glib/glib-I18N.html#Q-:CAPS
radio = gtk_radio_button_new_with_label (gtk_radio_button_group (GTK_RADIO_BUTTON (radio)), Q_("clonetiler|L"));
gtk_tooltips_set_tip (GTK_TOOLTIPS (tt), radio, _("Pick the lightness of the color"), NULL);
// unitmenu
GtkWidget *u = sp_unit_selector_new (SP_UNIT_ABSOLUTE | SP_UNIT_DEVICE);
sp_unit_selector_set_unit (SP_UNIT_SELECTOR(u), sp_desktop_namedview(SP_ACTIVE_DESKTOP)->doc_units);
-
+
{
- // Width spinbutton
+ // Width spinbutton
GtkObject *a = gtk_adjustment_new (0.0, -1e6, 1e6, 1.0, 10.0, 10.0);
sp_unit_selector_add_adjustment (SP_UNIT_SELECTOR (u), GTK_ADJUSTMENT (a));
diff --git a/src/dialogs/export.cpp b/src/dialogs/export.cpp
index 441047a27dcbd0566839e0e652e125b26695a924..1b74afb7e13b4b8be2d2bd3c7fd520b78471bf4e 100644 (file)
--- a/src/dialogs/export.cpp
+++ b/src/dialogs/export.cpp
#define DPI_BASE PX_PER_IN
-#define EXPORT_COORD_PRECISION 3
+#define EXPORT_COORD_PRECISION 3
#define MIN_ONSCREEN_DISTANCE 50
static void sp_export_export_clicked ( GtkButton *button, GtkObject *base );
static void sp_export_browse_clicked ( GtkButton *button, gpointer userdata );
-static void sp_export_area_x_value_changed ( GtkAdjustment *adj,
+static void sp_export_area_x_value_changed ( GtkAdjustment *adj,
GtkObject *base);
-
-static void sp_export_area_y_value_changed ( GtkAdjustment *adj,
+
+static void sp_export_area_y_value_changed ( GtkAdjustment *adj,
GtkObject *base);
-
-static void sp_export_area_width_value_changed ( GtkAdjustment *adj,
+
+static void sp_export_area_width_value_changed ( GtkAdjustment *adj,
GtkObject *base);
-
-static void sp_export_area_height_value_changed ( GtkAdjustment *adj,
+
+static void sp_export_area_height_value_changed ( GtkAdjustment *adj,
GtkObject *base);
-
-static void sp_export_bitmap_width_value_changed ( GtkAdjustment *adj,
+
+static void sp_export_bitmap_width_value_changed ( GtkAdjustment *adj,
GtkObject *base);
-
-static void sp_export_bitmap_height_value_changed ( GtkAdjustment *adj,
+
+static void sp_export_bitmap_height_value_changed ( GtkAdjustment *adj,
GtkObject *base);
-
-static void sp_export_xdpi_value_changed ( GtkAdjustment *adj,
+
+static void sp_export_xdpi_value_changed ( GtkAdjustment *adj,
GtkObject *base);
-
-static void sp_export_selection_changed ( Inkscape::Application *inkscape,
- Inkscape::Selection *selection,
+
+static void sp_export_selection_changed ( Inkscape::Application *inkscape,
+ Inkscape::Selection *selection,
GtkObject *base);
-static void sp_export_selection_modified ( Inkscape::Application *inkscape,
- Inkscape::Selection *selection,
+static void sp_export_selection_modified ( Inkscape::Application *inkscape,
+ Inkscape::Selection *selection,
guint flags,
GtkObject *base );
N_("_Page"), N_("_Drawing"), N_("_Selection"), N_("_Custom")};
static void
-sp_export_dialog_destroy ( GtkObject *object, gpointer data )
+sp_export_dialog_destroy ( GtkObject */*object*/, gpointer /*data*/ )
{
sp_signal_disconnect_by_data (INKSCAPE, dlg);
/// Called when dialog is closed or inkscape is shut down.
static bool
-sp_export_dialog_delete ( GtkObject *object, GdkEvent *event, gpointer data )
+sp_export_dialog_delete ( GtkObject */*object*/, GdkEvent */*event*/, gpointer /*data*/ )
{
gtk_window_get_position ((GtkWindow *) dlg, &x, &y);
b->set_data("key", GINT_TO_POINTER(i));
gtk_object_set_data (GTK_OBJECT (dlg), selection_names[i], b->gobj());
togglebox->pack_start(*b, false, true, 0);
- gtk_signal_connect ( GTK_OBJECT (b->gobj()), "clicked",
+ gtk_signal_connect ( GTK_OBJECT (b->gobj()), "clicked",
GTK_SIGNAL_FUNC (sp_export_area_toggled), dlg );
}
- g_signal_connect ( G_OBJECT (INKSCAPE), "change_selection",
+ g_signal_connect ( G_OBJECT (INKSCAPE), "change_selection",
G_CALLBACK (sp_export_selection_changed), dlg );
- g_signal_connect ( G_OBJECT (INKSCAPE), "modify_selection",
+ g_signal_connect ( G_OBJECT (INKSCAPE), "modify_selection",
G_CALLBACK (sp_export_selection_modified), dlg );
- g_signal_connect ( G_OBJECT (INKSCAPE), "activate_desktop",
+ g_signal_connect ( G_OBJECT (INKSCAPE), "activate_desktop",
G_CALLBACK (sp_export_selection_changed), dlg );
-
+
Gtk::Table* t = new Gtk::Table(2, 6, FALSE);
t->set_row_spacings (4);
t->set_col_spacings (4);
- sp_export_spinbutton_new ( "x0", 0.0, -1000000.0, 1000000.0, 0.1, 1.0, us->gobj(),
+ sp_export_spinbutton_new ( "x0", 0.0, -1000000.0, 1000000.0, 0.1, 1.0, us->gobj(),
GTK_WIDGET(t->gobj()), 0, 0, _("_x0:"), NULL, EXPORT_COORD_PRECISION, 1,
- G_CALLBACK ( sp_export_area_x_value_changed),
+ G_CALLBACK ( sp_export_area_x_value_changed),
dlg );
- sp_export_spinbutton_new ( "x1", 0.0, -1000000.0, 1000000.0, 0.1, 1.0, us->gobj(),
+ sp_export_spinbutton_new ( "x1", 0.0, -1000000.0, 1000000.0, 0.1, 1.0, us->gobj(),
GTK_WIDGET(t->gobj()), 2, 0, _("x_1:"), NULL, EXPORT_COORD_PRECISION, 1,
- G_CALLBACK (sp_export_area_x_value_changed),
+ G_CALLBACK (sp_export_area_x_value_changed),
dlg );
- sp_export_spinbutton_new ( "width", 0.0, -1000000.0, 1000000.0, 0.1, 1.0,
+ sp_export_spinbutton_new ( "width", 0.0, -1000000.0, 1000000.0, 0.1, 1.0,
us->gobj(), GTK_WIDGET(t->gobj()), 4, 0, _("Width:"), NULL, EXPORT_COORD_PRECISION, 1,
- G_CALLBACK
- (sp_export_area_width_value_changed),
+ G_CALLBACK
+ (sp_export_area_width_value_changed),
dlg );
- sp_export_spinbutton_new ( "y0", 0.0, -1000000.0, 1000000.0, 0.1, 1.0, us->gobj(),
+ sp_export_spinbutton_new ( "y0", 0.0, -1000000.0, 1000000.0, 0.1, 1.0, us->gobj(),
GTK_WIDGET(t->gobj()), 0, 1, _("_y0:"), NULL, EXPORT_COORD_PRECISION, 1,
- G_CALLBACK (sp_export_area_y_value_changed),
+ G_CALLBACK (sp_export_area_y_value_changed),
dlg );
- sp_export_spinbutton_new ( "y1", 0.0, -1000000.0, 1000000.0, 0.1, 1.0, us->gobj(),
+ sp_export_spinbutton_new ( "y1", 0.0, -1000000.0, 1000000.0, 0.1, 1.0, us->gobj(),
GTK_WIDGET(t->gobj()), 2, 1, _("y_1:"), NULL, EXPORT_COORD_PRECISION, 1,
- G_CALLBACK (sp_export_area_y_value_changed),
+ G_CALLBACK (sp_export_area_y_value_changed),
dlg );
- sp_export_spinbutton_new ( "height", 0.0, -1000000.0, 1000000.0, 0.1, 1.0,
+ sp_export_spinbutton_new ( "height", 0.0, -1000000.0, 1000000.0, 0.1, 1.0,
us->gobj(), GTK_WIDGET(t->gobj()), 4, 1, _("Height:"), NULL, EXPORT_COORD_PRECISION, 1,
- G_CALLBACK (sp_export_area_height_value_changed),
+ G_CALLBACK (sp_export_area_height_value_changed),
dlg );
vb->pack_start(*togglebox, false, false, 3);
t->set_col_spacings (4);
size_box->pack_start(*t);
- sp_export_spinbutton_new ( "bmwidth", 16.0, 1.0, 1000000.0, 1.0, 10.0,
+ sp_export_spinbutton_new ( "bmwidth", 16.0, 1.0, 1000000.0, 1.0, 10.0,
NULL, GTK_WIDGET(t->gobj()), 0, 0,
_("_Width:"), _("pixels at"), 0, 1,
- G_CALLBACK
- (sp_export_bitmap_width_value_changed),
+ G_CALLBACK
+ (sp_export_bitmap_width_value_changed),
dlg );
- sp_export_spinbutton_new ( "xdpi",
- prefs_get_double_attribute
- ( "dialogs.export.defaultxdpi",
- "value", DPI_BASE),
+ sp_export_spinbutton_new ( "xdpi",
+ prefs_get_double_attribute
+ ( "dialogs.export.defaultxdpi",
+ "value", DPI_BASE),
0.01, 100000.0, 0.1, 1.0, NULL, GTK_WIDGET(t->gobj()), 3, 0,
NULL, _("dp_i"), 2, 1,
- G_CALLBACK (sp_export_xdpi_value_changed),
+ G_CALLBACK (sp_export_xdpi_value_changed),
dlg );
- sp_export_spinbutton_new ( "bmheight", 16.0, 1.0, 1000000.0, 1.0, 10.0,
- NULL, GTK_WIDGET(t->gobj()), 0, 1,
- _("Height:"), _("pixels at"), 0, 1,
+ sp_export_spinbutton_new ( "bmheight", 16.0, 1.0, 1000000.0, 1.0, 10.0,
+ NULL, GTK_WIDGET(t->gobj()), 0, 1,
+ _("Height:"), _("pixels at"), 0, 1,
G_CALLBACK
- (sp_export_bitmap_height_value_changed),
+ (sp_export_bitmap_height_value_changed),
dlg );
/** \todo
- * Needs fixing: there's no way to set ydpi currently, so we use
+ * Needs fixing: there's no way to set ydpi currently, so we use
* the defaultxdpi value here, too...
*/
- sp_export_spinbutton_new ( "ydpi", prefs_get_double_attribute
- ( "dialogs.export.defaultxdpi",
- "value", DPI_BASE),
+ sp_export_spinbutton_new ( "ydpi", prefs_get_double_attribute
+ ( "dialogs.export.defaultxdpi",
+ "value", DPI_BASE),
0.01, 100000.0, 0.1, 1.0, NULL, GTK_WIDGET(t->gobj()), 3, 1,
NULL, _("dpi"), 2, 0, NULL, dlg );
/**
- * \brief If selection changed or a different document activated, we must
+ * \brief If selection changed or a different document activated, we must
* recalculate any chosen areas
*
*/
static void
-sp_export_selection_changed ( Inkscape::Application *inkscape,
- Inkscape::Selection *selection,
+sp_export_selection_changed ( Inkscape::Application *inkscape,
+ Inkscape::Selection *selection,
GtkObject *base )
{
selection_type current_key;
GtkToggleButton * button;
button = (GtkToggleButton *)gtk_object_get_data(base, selection_names[current_key]);
sp_export_area_toggled(button, base);
- }
+ }
sp_export_update_checkbuttons (base);
-}
+}
static void
-sp_export_selection_modified ( Inkscape::Application *inkscape,
- Inkscape::Selection *selection,
- guint flags,
+sp_export_selection_modified ( Inkscape::Application */*inkscape*/,
+ Inkscape::Selection */*selection*/,
+ guint /*flags*/,
GtkObject *base )
{
selection_type current_key;
break;
}
case SELECTION_DRAWING:
- /** \todo
+ /** \todo
* This returns wrong values if the document has a viewBox.
*/
bbox = sp_item_bbox_desktop (SP_ITEM (SP_DOCUMENT_ROOT (doc)));
break;
}
case SELECTION_PAGE:
- bbox = NR::Rect(NR::Point(0.0, 0.0),
+ bbox = NR::Rect(NR::Point(0.0, 0.0),
NR::Point(sp_document_width(doc), sp_document_height(doc))
);
default:
break;
} // switch
-
+
// remember area setting
- prefs_set_string_attribute ( "dialogs.export.exportarea",
+ prefs_set_string_attribute ( "dialogs.export.exportarea",
"value", selection_names[key]);
if ( key != SELECTION_CUSTOM && bbox ) {
bbox->max()[NR::X],
bbox->max()[NR::Y]);
}
-
+
} // end of if ( SP_ACTIVE_DESKTOP )
/// Called when dialog is deleted
static gint
-sp_export_progress_delete ( GtkWidget *widget, GdkEvent *event, GObject *base )
+sp_export_progress_delete ( GtkWidget */*widget*/, GdkEvent */*event*/, GObject *base )
{
g_object_set_data (base, "cancel", (gpointer) 1);
return TRUE;
/// Called when progress is cancelled
static void
-sp_export_progress_cancel ( GtkWidget *widget, GObject *base )
+sp_export_progress_cancel ( GtkWidget */*widget*/, GObject *base )
{
g_object_set_data (base, "cancel", (gpointer) 1);
} // end of sp_export_progress_cancel()
GtkWidget *
create_progress_dialog (GtkObject *base, gchar *progress_text) {
GtkWidget *dlg, *prg, *btn; /* progressbar-stuff */
-
+
dlg = gtk_dialog_new ();
gtk_window_set_title (GTK_WINDOW (dlg), _("Export in progress"));
prg = gtk_progress_bar_new ();
gtk_progress_bar_set_text ((GtkProgressBar *) prg, progress_text);
- gtk_progress_bar_set_orientation ( (GtkProgressBar *) prg,
+ gtk_progress_bar_set_orientation ( (GtkProgressBar *) prg,
GTK_PROGRESS_LEFT_TO_RIGHT);
- gtk_box_pack_start ((GtkBox *) ((GtkDialog *) dlg)->vbox,
+ gtk_box_pack_start ((GtkBox *) ((GtkDialog *) dlg)->vbox,
prg, FALSE, FALSE, 4 );
- btn = gtk_dialog_add_button ( GTK_DIALOG (dlg),
- GTK_STOCK_CANCEL,
+ btn = gtk_dialog_add_button ( GTK_DIALOG (dlg),
+ GTK_STOCK_CANCEL,
GTK_RESPONSE_CANCEL );
-
- g_signal_connect ( (GObject *) dlg, "delete_event",
+
+ g_signal_connect ( (GObject *) dlg, "delete_event",
(GCallback) sp_export_progress_delete, base);
- g_signal_connect ( (GObject *) btn, "clicked",
+ g_signal_connect ( (GObject *) btn, "clicked",
(GCallback) sp_export_progress_cancel, base);
gtk_window_set_modal ((GtkWindow *) dlg, TRUE);
gtk_widget_show_all (dlg);
/// Called when export button is clicked
static void
-sp_export_export_clicked (GtkButton *button, GtkObject *base)
+sp_export_export_clicked (GtkButton */*button*/, GtkObject *base)
{
if (!SP_ACTIVE_DESKTOP) return;
gint num = g_slist_length((GSList *) sp_desktop_selection(SP_ACTIVE_DESKTOP)->itemList());
gint n = 0;
- if (num < 1)
+ if (num < 1)
return;
gchar *progress_text = g_strdup_printf (_("Exporting %d files"), num);
if (width > 1 && height > 1) {
/* Do export */
- if (!sp_export_png_file (sp_desktop_document (SP_ACTIVE_DESKTOP), fn,
- area.x0, area.y0, area.x1, area.y1, width, height, dpi, dpi,
- nv->pagecolor,
- NULL, NULL, TRUE, // overwrite without asking
+ if (!sp_export_png_file (sp_desktop_document (SP_ACTIVE_DESKTOP), fn,
+ area.x0, area.y0, area.x1, area.y1, width, height, dpi, dpi,
+ nv->pagecolor,
+ NULL, NULL, TRUE, // overwrite without asking
hide ? (GSList *) sp_desktop_selection(SP_ACTIVE_DESKTOP)->itemList() : NULL
)) {
gchar * error;
g_free (fn);
GtkWidget *prog_dlg = create_progress_dialog (base, progress_text);
g_free (progress_text);
-
+
/* Do export */
- if (!sp_export_png_file (sp_desktop_document (SP_ACTIVE_DESKTOP), filename_ext,
- x0, y0, x1, y1, width, height, xdpi, ydpi,
- nv->pagecolor,
+ if (!sp_export_png_file (sp_desktop_document (SP_ACTIVE_DESKTOP), filename_ext,
+ x0, y0, x1, y1, width, height, xdpi, ydpi,
+ nv->pagecolor,
sp_export_progress_callback, base, FALSE,
hide ? (GSList *) sp_desktop_selection(SP_ACTIVE_DESKTOP)->itemList() : NULL
)) {
/// Called when Browse button is clicked
static void
-sp_export_browse_clicked (GtkButton *button, gpointer userdata)
+sp_export_browse_clicked (GtkButton */*button*/, gpointer /*userdata*/)
{
GtkWidget *fs, *fe;
const gchar *filename;
// TODO: Move this to nr-rect-fns.h.
static bool
sp_export_bbox_equal(NR::Rect const &one, NR::Rect const &two)
-{
+{
double const epsilon = pow(10.0, -EXPORT_COORD_PRECISION);
return (
(fabs(one.min()[NR::X] - two.min()[NR::X]) < epsilon) &&
/// Called when x1-x0 or area width is changed
static void
-sp_export_area_width_value_changed (GtkAdjustment *adj, GtkObject *base)
+sp_export_area_width_value_changed (GtkAdjustment */*adj*/, GtkObject *base)
{
float x0, x1, xdpi, width, bmwidth;
/// Called when y1-y0 or area height is changed.
static void
-sp_export_area_height_value_changed (GtkAdjustment *adj, GtkObject *base)
+sp_export_area_height_value_changed (GtkAdjustment */*adj*/, GtkObject *base)
{
float y0, y1, ydpi, height, bmheight;
/// Called when pixel width is changed
static void
-sp_export_bitmap_width_value_changed (GtkAdjustment *adj, GtkObject *base)
+sp_export_bitmap_width_value_changed (GtkAdjustment */*adj*/, GtkObject *base)
{
float x0, x1, bmwidth, xdpi;
/// Called when pixel height is changed
static void
-sp_export_bitmap_height_value_changed (GtkAdjustment *adj, GtkObject *base)
+sp_export_bitmap_height_value_changed (GtkAdjustment */*adj*/, GtkObject *base)
{
float y0, y1, bmheight, xdpi;
currently be independent. This is likely to change in the future.
*/
void
-sp_export_xdpi_value_changed (GtkAdjustment *adj, GtkObject *base)
+sp_export_xdpi_value_changed (GtkAdjustment */*adj*/, GtkObject *base)
{
float x0, x1, xdpi, bmwidth;
index 08f3d90317fd5c8c76966f0de65041c8fb059510..54c1b7164b87b0cf675a08bf2040e7fd39334f6f 100644 (file)
* On construction, simply does an update of the stroke style paint object.
*/
static void
-sp_stroke_style_paint_construct(SPWidget *spw, SPPaintSelector *psel)
+sp_stroke_style_paint_construct(SPWidget *spw, SPPaintSelector */*psel*/)
{
- (void)psel;
#ifdef SP_SS_VERBOSE
g_print( "Stroke style widget constructed: inkscape %p repr %p\n",
spw->inkscape, spw->repr );
* On signal modified, invokes an update of the stroke style paint object.
*/
static void
-sp_stroke_style_paint_selection_modified ( SPWidget *spw,
- Inkscape::Selection *selection,
- guint flags,
- SPPaintSelector *psel)
+sp_stroke_style_paint_selection_modified( SPWidget *spw,
+ Inkscape::Selection */*selection*/,
+ guint flags,
+ SPPaintSelector */*psel*/ )
{
- (void)selection;
if (flags & ( SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_PARENT_MODIFIED_FLAG |
SP_OBJECT_STYLE_MODIFIED_FLAG) ) {
sp_stroke_style_paint_update(spw);
* On signal selection changed, invokes an update of the stroke style paint object.
*/
static void
-sp_stroke_style_paint_selection_changed ( SPWidget *spw,
- Inkscape::Selection *selection,
- SPPaintSelector *psel )
+sp_stroke_style_paint_selection_changed( SPWidget *spw,
+ Inkscape::Selection */*selection*/,
+ SPPaintSelector */*psel*/ )
{
- (void)selection;
sp_stroke_style_paint_update (spw);
}
* On signal change subselection, invoke an update of the stroke style widget.
*/
static void
-sp_stroke_style_widget_change_subselection ( Inkscape::Application *inkscape,
- SPDesktop *desktop,
- SPWidget *spw )
+sp_stroke_style_widget_change_subselection( Inkscape::Application */*inkscape*/,
+ SPDesktop */*desktop*/,
+ SPWidget *spw )
{
- (void)inkscape;
sp_stroke_style_paint_update (spw);
}
*/
static void
sp_stroke_style_paint_mode_changed( SPPaintSelector *psel,
- SPPaintSelectorMode mode,
+ SPPaintSelectorMode /*mode*/,
SPWidget *spw )
{
- (void)mode;
if (gtk_object_get_data(GTK_OBJECT(spw), "update")) {
return;
}
}
static void
-sp_stroke_style_widget_transientize_callback(Inkscape::Application *inkscape,
- SPDesktop *desktop,
- SPWidget *spw )
+sp_stroke_style_widget_transientize_callback(Inkscape::Application */*inkscape*/,
+ SPDesktop */*desktop*/,
+ SPWidget */*spw*/ )
{
- (void)inkscape;
- (void)desktop;
- (void)spw;
// TODO: Either of these will cause crashes sometimes
// sp_stroke_style_line_update( SP_WIDGET(spw), desktop ? sp_desktop_selection(desktop) : NULL);
// ink_markers_menu_update(spw);
static GtkWidget *
sp_marker_prev_new(unsigned psize, gchar const *mname,
SPDocument *source, SPDocument *sandbox,
- gchar *menu_id, NRArena const *arena, unsigned visionkey, NRArenaItem *root)
+ gchar *menu_id, NRArena const */*arena*/, unsigned /*visionkey*/, NRArenaItem *root)
{
- (void)arena;
- (void)visionkey;
// Retrieve the marker named 'mname' from the source SVG document
SPObject const *marker = source->getObjectById(mname);
if (marker == NULL)
@@ -730,10 +720,8 @@ sp_marker_menu_build (GtkWidget *m, GSList *marker_list, SPDocument *source, SPD
*
*/
static void
-sp_marker_list_from_doc (GtkWidget *m, SPDocument *current_doc, SPDocument *source, SPDocument *markers_doc, SPDocument *sandbox, gchar *menu_id)
+sp_marker_list_from_doc (GtkWidget *m, SPDocument */*current_doc*/, SPDocument *source, SPDocument */*markers_doc*/, SPDocument *sandbox, gchar *menu_id)
{
- (void)current_doc;
- (void)markers_doc;
GSList *ml = ink_marker_list_get(source);
GSList *clean_ml = NULL;
@@ -842,9 +830,8 @@ ink_marker_menu_create_menu(GtkWidget *m, gchar *menu_id, SPDocument *doc, SPDoc
* Creates a menu widget to display markers from markers.svg
*/
static GtkWidget *
-ink_marker_menu( GtkWidget *tbl, gchar *menu_id, SPDocument *sandbox)
+ink_marker_menu( GtkWidget */*tbl*/, gchar *menu_id, SPDocument *sandbox)
{
- (void)tbl;
SPDesktop *desktop = inkscape_active_desktop();
SPDocument *doc = sp_desktop_document(desktop);
GtkWidget *mnu = gtk_option_menu_new();
* the stroke line style to be updated.
*/
static void
-sp_stroke_style_line_construct(SPWidget *spw, gpointer data)
+sp_stroke_style_line_construct(SPWidget *spw, gpointer /*data*/)
{
- (void)data;
#ifdef SP_SS_VERBOSE
g_print( "Stroke style widget constructed: inkscape %p repr %p\n",
spw->inkscape, spw->repr );
* Triggers update action.
*/
static void
-sp_stroke_style_line_selection_modified ( SPWidget *spw,
- Inkscape::Selection *selection,
- guint flags,
- gpointer data )
+sp_stroke_style_line_selection_modified( SPWidget *spw,
+ Inkscape::Selection *selection,
+ guint flags,
+ gpointer /*data*/ )
{
- (void)data;
if (flags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_PARENT_MODIFIED_FLAG)) {
sp_stroke_style_line_update (spw, selection);
}
* Triggers update action.
*/
static void
-sp_stroke_style_line_selection_changed ( SPWidget *spw,
- Inkscape::Selection *selection,
- gpointer data )
+sp_stroke_style_line_selection_changed( SPWidget *spw,
+ Inkscape::Selection *selection,
+ gpointer /*data*/ )
{
- (void)data;
sp_stroke_style_line_update (spw, selection);
}
* Causes all line styles to be applied to all selected items.
*/
static void
-sp_stroke_style_width_changed(GtkAdjustment *adj, SPWidget *spw)
+sp_stroke_style_width_changed(GtkAdjustment */*adj*/, SPWidget *spw)
{
- (void)adj;
if (gtk_object_get_data(GTK_OBJECT(spw), "update")) {
return;
}
* Causes all line styles to be applied to all selected items.
*/
static void
-sp_stroke_style_miterlimit_changed(GtkAdjustment *adj, SPWidget *spw)
+sp_stroke_style_miterlimit_changed(GtkAdjustment */*adj*/, SPWidget *spw)
{
- (void)adj;
if (gtk_object_get_data(GTK_OBJECT(spw), "update")) {
return;
}
* Causes all line styles to be applied to all selected items.
*/
static void
-sp_stroke_style_line_dash_changed(SPDashSelector *dsel, SPWidget *spw)
+sp_stroke_style_line_dash_changed(SPDashSelector */*dsel*/, SPWidget *spw)
{
- (void)dsel;
if (gtk_object_get_data(GTK_OBJECT(spw), "update")) {
return;
}
index 2c1c832ae4085fc12a174e1bfb60d19fa44ed3e9..dbd750ee91d5e471ec6a2dd9dd7dabb6526c2402 100644 (file)
--- a/src/extension/effect.cpp
+++ b/src/extension/effect.cpp
/** \brief Decode the verb code and take appropriate action */
void
-Effect::EffectVerb::perform (SPAction *action, void * data, void *pdata)
+Effect::EffectVerb::perform( SPAction *action, void * data, void */*pdata*/ )
{
Inkscape::UI::View::View * current_view = sp_action_get_view(action);
// SPDocument * current_document = current_view->doc;
index 8e33fe64aeabcc7450666d9dab29eb36b3000852..72808a096b660170f4c0db7acc348c89b167724e 100644 (file)
_selfdelete(false),
_changeSignal(changeSignal),
_doc(doc),
- _effect(effect),
- _docCache(docCache) {
-
+ _docCache(docCache),
+ _effect(effect)
+{
SPDesktop *desktop = (SPDesktop *)_doc;
sp_namedview_document_from_window(desktop);
}
void
-ExecutionEnv::workingCanceled (const int resp) {
+ExecutionEnv::workingCanceled( const int /*resp*/ ) {
processingCancel();
documentCancel();
_finished = true;
index 16ab66dc0f9e96aacb9c7214a4822e8aa1256b93..7513d27e18ffa685e3da71c2ccc8426c4153c5df 100644 (file)
replace all the instances of ink_ext_XXXXXX in this file that represent
svg files with ink_ext_XXXXXX.svg . Doing so will prevent errors in extensions
that call inkscape to manipulate the file.
-
+
"** (inkscape:5848): WARNING **: Format autodetect failed. The file is being opened as SVG."
-
+
references:
http://www.gtk.org/api/2.6/glib/glib-File-Utilities.html#g-mkstemp
http://ftp.gnome.org/pub/gnome/sources/glib/2.11/glib-2.11.4.changes
http://developer.gnome.org/doc/API/2.0/glib/glib-File-Utilities.html#g-mkstemp
-
+
--Aaron Spike
*/
#define __INKSCAPE_EXTENSION_IMPLEMENTATION_SCRIPT_C__
interpPath .c_str(),
(int)finfo.st_size);
return interpPath;
- }
+ }
}
// 3. Try searching the path
}
- Glib::ustring path;
+ Glib::ustring path;
gchar *s = (gchar *) g_getenv("PATH");
if (s)
path = s;
localPath = path.substr(pos, pos2-pos);
pos = pos2+1;
}
-
+
//printf("### %s\n", localPath.c_str());
- Glib::ustring candidatePath =
+ Glib::ustring candidatePath =
Glib::build_filename(localPath, command);
if (Inkscape::IO::file_test(candidatePath .c_str(),
command if it has been allocated.
*/
void
-Script::unload(Inkscape::Extension::Extension *module)
+Script::unload(Inkscape::Extension::Extension */*module*/)
{
command.clear();
helper_extension = "";
friend class Script;
protected:
std::string _filename;
- int _tempfd;
+ int _tempfd;
public:
ScriptDocCache (Inkscape::UI::View::View * view);
~ScriptDocCache ( );
return;
}
-
+
ScriptDocCache::~ScriptDocCache ( )
{
close(_tempfd);
}
ImplementationDocumentCache *
-Script::newDocCache (Inkscape::Extension::Extension * ext, Inkscape::UI::View::View * view) {
- return new ScriptDocCache(view);
+Script::newDocCache( Inkscape::Extension::Extension * /*ext*/, Inkscape::UI::View::View * view ) {
+ return new ScriptDocCache(view);
}
@@ -505,7 +505,7 @@ Script::newDocCache (Inkscape::Extension::Extension * ext, Inkscape::UI::View::V
*/
Gtk::Widget *
Script::prefs_input(Inkscape::Extension::Input *module,
- const gchar *filename)
+ const gchar */*filename*/)
{
return module->autogui(NULL, NULL);
}
Gtk::Widget *
Script::prefs_output(Inkscape::Extension::Output *module)
{
- return module->autogui(NULL, NULL);
+ return module->autogui(NULL, NULL);
}
This function should really do something, right now it doesn't.
*/
Gtk::Widget *
-Script::prefs_effect(Inkscape::Extension::Effect *module,
- Inkscape::UI::View::View *view,
- sigc::signal<void> * changeSignal,
- ImplementationDocumentCache * docCache)
+Script::prefs_effect( Inkscape::Extension::Effect *module,
+ Inkscape::UI::View::View *view,
+ sigc::signal<void> * changeSignal,
+ ImplementationDocumentCache * /*docCache*/ )
{
SPDocument * current_document = view->doc();
std::list<std::string> params;
module->paramListString(params);
- if (module->no_doc) {
- // this is a no-doc extension, e.g. a Help menu command;
+ if (module->no_doc) {
+ // this is a no-doc extension, e.g. a Help menu command;
// just run the command without any files, ignoring errors
Glib::ustring empty;
diff --git a/src/gradient-drag.cpp b/src/gradient-drag.cpp
index 2da6d6ef40046834232c20c7d23abb2ce180920b..3f51b0824b5b5ca0bc5dfcd8f896d4598639acf8 100644 (file)
--- a/src/gradient-drag.cpp
+++ b/src/gradient-drag.cpp
}
static void
-gr_drag_sel_modified (Inkscape::Selection */*selection*/, guint flags, gpointer data)
+gr_drag_sel_modified (Inkscape::Selection */*selection*/, guint /*flags*/, gpointer data)
{
GrDrag *drag = (GrDrag *) data;
if (drag->local_change) {
@@ -859,7 +859,7 @@ gr_knot_moved_midpoint_handler(SPKnot */*knot*/, NR::Point const *ppointer, guin
static void
-gr_knot_grabbed_handler (SPKnot */*knot*/, unsigned int state, gpointer data)
+gr_knot_grabbed_handler (SPKnot */*knot*/, unsigned int /*state*/, gpointer data)
{
GrDragger *dragger = (GrDragger *) data;
Called when a dragger knot is doubleclicked; opens gradient editor with the stop from the first draggable
*/
static void
-gr_knot_doubleclicked_handler (SPKnot */*knot*/, guint state, gpointer data)
+gr_knot_doubleclicked_handler (SPKnot */*knot*/, guint /*state*/, gpointer data)
{
GrDragger *dragger = (GrDragger *) data;
index 6d37a0235fb17975ad8b2f0fbb77723a2b6b1dd4..2a38836cd7146617450376d1cc7f256f10674489 100644 (file)
@@ -140,7 +140,7 @@ lpeobjectreference_delete_self(SPObject */*deleted*/, LPEObjectReference *lpeobj
}
static void
-lpeobjectreference_source_modified(SPObject *iSource, guint flags, LPEObjectReference *lpeobjref)
+lpeobjectreference_source_modified(SPObject */*iSource*/, guint /*flags*/, LPEObjectReference *lpeobjref)
{
lpeobjref->owner->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG);
}
index 90a49e2ff7a75da3c6391281e406c2d71ac1adb9..6066f11f356409422c799b10303a6754a985cfb6 100644 (file)
/**
* Callback to initialize livepatheffect vtable.
*/
-static void
+static void
livepatheffect_class_init(LivePathEffectObjectClass *klass)
{
SPObjectClass *sp_object_class = (SPObjectClass *) klass;
/**
* Virtual build: set livepatheffect attributes from its associated XML node.
*/
-static void
+static void
livepatheffect_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
#ifdef LIVEPATHEFFECT_VERBOSE
@@ -227,12 +227,12 @@ livepatheffect_write(SPObject *object, Inkscape::XML::Node *repr, guint flags)
return repr;
}
-static void
-livepatheffect_on_repr_attr_changed ( Inkscape::XML::Node * repr,
- const gchar *key,
- const gchar *oldval,
- const gchar *newval,
- bool is_interactive,
+static void
+livepatheffect_on_repr_attr_changed ( Inkscape::XML::Node * /*repr*/,
+ const gchar *key,
+ const gchar */*oldval*/,
+ const gchar *newval,
+ bool /*is_interactive*/,
void * data )
{
#ifdef LIVEPATHEFFECT_VERBOSE
return;
LivePathEffectObject *lpeobj = (LivePathEffectObject*) data;
- if (!lpeobj->lpe)
+ if (!lpeobj->lpe)
return;
lpeobj->lpe->setParameter(key, newval);
diff --git a/src/main.cpp b/src/main.cpp
index 67c5a84e87f43faf521ddbcc7a60bfc70c723fd1..d70a7a030c4e40154f2eba43d8ea5b66d9d762c9 100644 (file)
--- a/src/main.cpp
+++ b/src/main.cpp
bindtextdomain(GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
#endif
#endif
- // Allow the user to override the locale directory by setting
+ // Allow the user to override the locale directory by setting
// the environment variable INKSCAPE_LOCALEDIR.
char *inkscape_localedir = getenv("INKSCAPE_LOCALEDIR");
if (inkscape_localedir != NULL) {
}
static void
-snooper(GdkEvent *event, gpointer data) {
+snooper(GdkEvent *event, gpointer /*data*/) {
if(inkscape_mapalt()) /* returns the map of the keyboard modifier to map to Alt, zero if no mapping */
{
GdkModifierType mapping=(GdkModifierType)inkscape_mapalt();
if(event->motion.state & mapping) {
event->motion.state|=GDK_MOD1_MASK;
}
- break;
+ break;
case GDK_BUTTON_PRESS:
if(event->button.state & mapping) {
event->button.state|=GDK_MOD1_MASK;
}
- break;
+ break;
case GDK_KEY_PRESS:
if(event->key.state & mapping) {
event->key.state|=GDK_MOD1_MASK;
}
- break;
+ break;
default:
break;
}
} else if (sp_export_area_drawing) {
o = SP_DOCUMENT_ROOT (doc);
o_area = o;
- }
+ }
if (o) {
if (!SP_IS_ITEM (o)) {
return;
}
}
-
+
if (sp_export_area) {
/* Try to parse area (given in SVG pixels) */
if (!sscanf(sp_export_area, "%lg:%lg:%lg:%lg", &area.x0, &area.y0, &area.x1, &area.y1) == 4) {
diff --git a/src/marker.cpp b/src/marker.cpp
index 5cc63d9d7f0c7303f2c86c7e3cedb44c258124c0..15b85659560a1522868a59c3fcd02eb3d0f6563f 100644 (file)
--- a/src/marker.cpp
+++ b/src/marker.cpp
}
/**
- * Initializes a SPMarkerClass object. Establishes the function pointers to the class'
+ * Initializes a SPMarkerClass object. Establishes the function pointers to the class'
* member routines in the class vtable, and sets pointers to parent classes.
*/
static void
*
* This is to be invoked immediately after creation of an SPMarker. This
* method fills an SPMarker object with its SVG attributes, and calls the
- * parent class' build routine to attach the object to its document and
+ * parent class' build routine to attach the object to its document and
* repr. The result will be creation of the whole document tree.
*
* \see sp_object_build()
}
}
-/**
+/**
* Writes the object's properties into its repr object.
*/
static Inkscape::XML::Node *
* This routine is disabled to break propagation.
*/
static NRArenaItem *
-sp_marker_private_show (SPItem *item, NRArena *arena, unsigned int key, unsigned int flags)
+sp_marker_private_show (SPItem */*item*/, NRArena */*arena*/, unsigned int /*key*/, unsigned int /*flags*/)
{
- /* Break propagation */
- return NULL;
+ /* Break propagation */
+ return NULL;
}
/**
* This routine is disabled to break propagation.
*/
static void
-sp_marker_private_hide (SPItem *item, unsigned int key)
+sp_marker_private_hide (SPItem */*item*/, unsigned int /*key*/)
{
- /* Break propagation */
+ /* Break propagation */
}
/**
* This routine is disabled to break propagation.
*/
static void
-sp_marker_print (SPItem *item, SPPrintContext *ctx)
+sp_marker_print (SPItem */*item*/, SPPrintContext */*ctx*/)
{
- /* Break propagation */
+ /* Break propagation */
}
/* fixme: Remove link if zero-sized (Lauris) */
* This is called from sp_shape_update() for shapes that have markers. It
* removes the old view of the marker and establishes a new one, registering
* it with the marker's list of views for future updates.
- *
+ *
* \param marker Marker to create views in.
* \param key Key to give each SPMarkerView.
* \param size Number of NRArenaItems to put in the SPMarkerView.
@@ -619,7 +619,7 @@ sp_marker_show_dimension (SPMarker *marker, unsigned int key, unsigned int size)
}
}
-/**
+/**
* Shows an instance of a marker. This is called during sp_shape_update_marker_view()
* show and transform a child item in the arena for all views with the given key.
*/
}
/**
- * Removes a given view. Also will destroy sub-items in the view if destroyitems
+ * Removes a given view. Also will destroy sub-items in the view if destroyitems
* is set to a non-zero value.
*/
static void
@@ -716,7 +716,7 @@ sp_marker_view_remove (SPMarker *marker, SPMarkerView *view, unsigned int destro
}
const gchar *
-generate_marker (GSList *reprs, NR::Rect bounds, SPDocument *document, NR::Matrix transform, NR::Matrix move)
+generate_marker (GSList *reprs, NR::Rect bounds, SPDocument *document, NR::Matrix /*transform*/, NR::Matrix move)
{
Inkscape::XML::Document *xml_doc = sp_document_repr_doc(document);
Inkscape::XML::Node *defsrepr = SP_OBJECT_REPR (SP_DOCUMENT_DEFS (document));
diff --git a/src/sp-guide.cpp b/src/sp-guide.cpp
index ccaf8164949532ca82b2df536344df214928c384..d65c9997a1fadbe8a351b6ace9f34aa6008a8fd9 100644 (file)
--- a/src/sp-guide.cpp
+++ b/src/sp-guide.cpp
guide->hicolor = 0xff00007f;
}
-static void sp_guide_set_property(GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
+static void sp_guide_set_property(GObject *object, guint prop_id, const GValue *value, GParamSpec */*pspec*/)
{
SPGuide &guide = *SP_GUIDE(object);
switch (prop_id) {
- case PROP_COLOR:
+ case PROP_COLOR:
guide.color = g_value_get_uint(value);
for (GSList *l = guide.views; l != NULL; l = l->next) {
sp_guideline_set_color(SP_GUIDELINE(l->data), guide.color);
}
break;
- case PROP_HICOLOR:
+ case PROP_HICOLOR:
guide.hicolor = g_value_get_uint(value);
break;
}
}
-static void sp_guide_get_property(GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
+static void sp_guide_get_property(GObject *object, guint prop_id, GValue *value, GParamSpec */*pspec*/)
{
SPGuide const &guide = *SP_GUIDE(object);
switch (prop_id) {
- case PROP_COLOR:
+ case PROP_COLOR:
g_value_set_uint(value, guide.color);
break;
- case PROP_HICOLOR:
+ case PROP_HICOLOR:
g_value_set_uint(value, guide.hicolor);
break;
}
diff --git a/src/sp-offset.cpp b/src/sp-offset.cpp
index e682f394bb74c41029ce91c6aec088aa84c729ba..97481a477f93500552713dd44b178967b71dd07a 100644 (file)
--- a/src/sp-offset.cpp
+++ b/src/sp-offset.cpp
@@ -1094,7 +1094,7 @@ sp_offset_href_changed(SPObject */*old_ref*/, SPObject */*ref*/, SPOffset *offse
}
static void
-sp_offset_move_compensate(NR::Matrix const *mp, SPItem *original, SPOffset *self)
+sp_offset_move_compensate(NR::Matrix const *mp, SPItem */*original*/, SPOffset *self)
{
guint mode = prefs_get_int_attribute("options.clonecompensation", "value", SP_CLONE_COMPENSATION_PARALLEL);
if (mode == SP_CLONE_COMPENSATION_NONE) return;
}
static void
-sp_offset_source_modified (SPObject *iSource, guint flags, SPItem *item)
+sp_offset_source_modified (SPObject */*iSource*/, guint /*flags*/, SPItem *item)
{
SPOffset *offset = SP_OFFSET(item);
offset->sourceDirty=true;
diff --git a/src/sp-pattern.cpp b/src/sp-pattern.cpp
index 4a919afa669cf6d1cf8dca485aa06cd75ecec7d2..af9c23260d0d33e08ca2c902c9e786a4030aaa86 100644 (file)
--- a/src/sp-pattern.cpp
+++ b/src/sp-pattern.cpp
Gets called when the referenced <pattern> is changed
*/
static void
-pattern_ref_modified (SPObject *ref, guint flags, SPPattern *pattern)
+pattern_ref_modified (SPObject */*ref*/, guint /*flags*/, SPPattern *pattern)
{
if (SP_IS_OBJECT (pattern))
SP_OBJECT (pattern)->requestModified(SP_OBJECT_MODIFIED_FLAG);
See (*) below for why the parent_transform may be necessary.
*/
static SPPainter *
-sp_pattern_painter_new (SPPaintServer *ps, NR::Matrix const &full_transform, NR::Matrix const &parent_transform, const NRRect *bbox)
+sp_pattern_painter_new (SPPaintServer *ps, NR::Matrix const &full_transform, NR::Matrix const &/*parent_transform*/, const NRRect *bbox)
{
SPPattern *pat = SP_PATTERN (ps);
SPPatPainter *pp = g_new (SPPatPainter, 1);
@@ -794,7 +794,7 @@ sp_pattern_painter_new (SPPaintServer *ps, NR::Matrix const &full_transform, NR:
}
static void
-sp_pattern_painter_free (SPPaintServer *ps, SPPainter *painter)
+sp_pattern_painter_free (SPPaintServer */*ps*/, SPPainter *painter)
{
SPPatPainter *pp = (SPPatPainter *) painter;
SPPattern *pat = pp->pat;
diff --git a/src/sp-polygon.cpp b/src/sp-polygon.cpp
index a2b1c59724572f0ee8ba17e6e8b6664f3d22bae2..1fb43c03673de3f895c7723518a23bae8f3cd1a2 100644 (file)
--- a/src/sp-polygon.cpp
+++ b/src/sp-polygon.cpp
item_class->description = sp_polygon_description;
}
-static void sp_polygon_init(SPPolygon *polygon)
+static void sp_polygon_init(SPPolygon */*polygon*/)
{
/* Nothing here */
}
@@ -230,7 +230,7 @@ static void sp_polygon_set(SPObject *object, unsigned int key, const gchar *valu
}
}
-static gchar *sp_polygon_description(SPItem *item)
+static gchar *sp_polygon_description(SPItem */*item*/)
{
return g_strdup(_("<b>Polygon</b>"));
}
diff --git a/src/sp-polyline.cpp b/src/sp-polyline.cpp
index 33f3286f96e61580ad6e8a54d884dffdca8430e6..d974f61e3a080504e31c6b17b08519ce5d8c7bdd 100644 (file)
--- a/src/sp-polyline.cpp
+++ b/src/sp-polyline.cpp
}
static void
-sp_polyline_init (SPPolyLine * polyline)
+sp_polyline_init (SPPolyLine * /*polyline*/)
{
- /* Nothing here */
+ /* Nothing here */
}
static void
}
static gchar *
-sp_polyline_description(SPItem *item)
+sp_polyline_description(SPItem */*item*/)
{
- return g_strdup(_("<b>Polyline</b>"));
+ return g_strdup(_("<b>Polyline</b>"));
}
diff --git a/src/sp-rect.cpp b/src/sp-rect.cpp
index 0aaa834f251a3b98bc4a1a7eed0de5d785cc6cab..d9caebd5a00eaeae4464aec2536b30deaf79c57a 100644 (file)
--- a/src/sp-rect.cpp
+++ b/src/sp-rect.cpp
}
static void
-sp_rect_init(SPRect *rect)
+sp_rect_init(SPRect */*rect*/)
{
/* Initializing to zero is automatic */
/* sp_svg_length_unset(&rect->x, SP_SVG_UNIT_NONE, 0.0, 0.0); */
diff --git a/src/sp-shape.cpp b/src/sp-shape.cpp
index ddec7aecc1dda7bbc196e9909dcfd8c0f68896e0..8a34266aad1c5584b0a80c0a1ac6698c815aec74 100644 (file)
--- a/src/sp-shape.cpp
+++ b/src/sp-shape.cpp
* Sets style, path, and paintbox. Updates marker views, including dimensions.
*/
static NRArenaItem *
-sp_shape_show (SPItem *item, NRArena *arena, unsigned int key, unsigned int flags)
+sp_shape_show (SPItem *item, NRArena *arena, unsigned int /*key*/, unsigned int /*flags*/)
{
SPObject *object = SP_OBJECT(item);
SPShape *shape = SP_SHAPE(item);
* No-op. Exists for handling 'modified' messages
*/
static void
-sp_shape_marker_modified (SPObject *marker, guint flags, SPItem *item)
+sp_shape_marker_modified (SPObject */*marker*/, guint /*flags*/, SPItem */*item*/)
{
/* I think mask does update automagically */
/* g_warning ("Item %s mask %s modified", SP_OBJECT_ID (item), SP_OBJECT_ID (mask)); */
* Gets called when lpeobject repr contents change: i.e. parameter change.
*/
static void
-lpeobject_ref_modified(SPObject *href, guint flags, SPShape *shape)
+lpeobject_ref_modified(SPObject */*href*/, guint /*flags*/, SPShape *shape)
{
sp_shape_update_patheffect (shape, true);
}
diff --git a/src/sp-tref.cpp b/src/sp-tref.cpp
index 16420436180a84f8c9d9713707265440628722b9..b3d5c5ffe03ecc5cd2f5e1eabec411ba476331d2 100644 (file)
--- a/src/sp-tref.cpp
+++ b/src/sp-tref.cpp
* The code for this function is swiped from the tspan bbox code, since tref should work pretty much the same way
*/
static void
-sp_tref_bbox(SPItem const *item, NRRect *bbox, NR::Matrix const &transform, unsigned const flags)
+sp_tref_bbox(SPItem const *item, NRRect *bbox, NR::Matrix const &transform, unsigned const /*flags*/)
{
// find out the ancestor text which holds our layout
SPObject *parent_text = SP_OBJECT(item);
/* For the sigc::connection changes (i.e. when the object being refered to changes) */
static void
-sp_tref_href_changed(SPObject *old_ref, SPObject *ref, SPTRef *tref)
+sp_tref_href_changed(SPObject */*old_ref*/, SPObject */*ref*/, SPTRef *tref)
{
if (tref)
{
* Delete the tref object
*/
static void
-sp_tref_delete_self(SPObject *deleted, SPTRef *self)
+sp_tref_delete_self(SPObject */*deleted*/, SPTRef *self)
{
SP_OBJECT(self)->deleteObject();
}
diff --git a/src/sp-tspan.cpp b/src/sp-tspan.cpp
index a767ab1949e2d80aacecf526cfd39d132529592e..842d6c2493251f1033e0abb2cbadb9be897db425 100644 (file)
--- a/src/sp-tspan.cpp
+++ b/src/sp-tspan.cpp
}
}
-static void sp_tspan_bbox(SPItem const *item, NRRect *bbox, NR::Matrix const &transform, unsigned const flags)
+static void sp_tspan_bbox(SPItem const *item, NRRect *bbox, NR::Matrix const &transform, unsigned const /*flags*/)
{
// find out the ancestor text which holds our layout
SPObject *parent_text = SP_OBJECT(item);
diff --git a/src/sp-use.cpp b/src/sp-use.cpp
index cd5f818356115b19588de9b10d4f9088561c025c..0e1c257eb04eae40c8039664667293bd984b9917 100644 (file)
--- a/src/sp-use.cpp
+++ b/src/sp-use.cpp
* clone's transform.
*/
static void
-sp_use_move_compensate(NR::Matrix const *mp, SPItem *original, SPUse *self)
+sp_use_move_compensate(NR::Matrix const *mp, SPItem */*original*/, SPUse *self)
{
// the clone is orphaned; or this is not a real use, but a clone of another use;
// we skip it, otherwise duplicate compensation will occur
}
static void
-sp_use_href_changed(SPObject *old_ref, SPObject *ref, SPUse *use)
+sp_use_href_changed(SPObject */*old_ref*/, SPObject */*ref*/, SPUse *use)
{
SPItem *item = SP_ITEM(use);
}
static void
-sp_use_delete_self(SPObject *deleted, SPUse *self)
+sp_use_delete_self(SPObject */*deleted*/, SPUse *self)
{
// always delete uses which are used in flowtext
if (SP_OBJECT_PARENT(self) && SP_IS_FLOWREGION(SP_OBJECT_PARENT(self))) {
diff --git a/src/text-context.cpp b/src/text-context.cpp
index 02dac686833240fa3de90d53cb45d6e81aea7ecf..579309c1e5ca2414a5555f9a3bc12e38a397a27f 100644 (file)
--- a/src/text-context.cpp
+++ b/src/text-context.cpp
@@ -1410,7 +1410,7 @@ sp_text_context_selection_changed(Inkscape::Selection *selection, SPTextContext
}
static void
-sp_text_context_selection_modified(Inkscape::Selection *selection, guint flags, SPTextContext *tc)
+sp_text_context_selection_modified(Inkscape::Selection */*selection*/, guint /*flags*/, SPTextContext *tc)
{
sp_text_context_update_cursor(tc);
sp_text_context_update_text_selection(tc);
}
gint
-sptc_focus_in(GtkWidget *widget, GdkEventFocus *event, SPTextContext *tc)
+sptc_focus_in(GtkWidget */*widget*/, GdkEventFocus */*event*/, SPTextContext *tc)
{
gtk_im_context_focus_in(tc->imc);
return FALSE;
}
gint
-sptc_focus_out(GtkWidget *widget, GdkEventFocus *event, SPTextContext *tc)
+sptc_focus_out(GtkWidget */*widget*/, GdkEventFocus */*event*/, SPTextContext *tc)
{
gtk_im_context_focus_out(tc->imc);
return FALSE;
}
static void
-sptc_commit(GtkIMContext *imc, gchar *string, SPTextContext *tc)
+sptc_commit(GtkIMContext */*imc*/, gchar *string, SPTextContext *tc)
{
if (!tc->text) {
sp_text_context_setup_text(tc);
index 82c56f2a46f2d18826f6f046c9233a65e59f9cfa..c00e58f5e1fb85e26921c2dfc54a8684c31e4806 100644 (file)
@@ -131,12 +131,12 @@ void SvgPreview::set_preview_in_cache(const Glib::ustring& key, GdkPixbuf* px) {
_pixmap_cache[key] = px;
}
-GdkPixbuf* SvgPreview::get_preview(const gchar* uri, const gchar* id, NRArenaItem *root,
- double scale_factor, unsigned int psize) {
+GdkPixbuf* SvgPreview::get_preview(const gchar* uri, const gchar* id, NRArenaItem */*root*/,
+ double /*scale_factor*/, unsigned int psize) {
// First try looking up the cached preview in the cache map
Glib::ustring key = cache_key(uri, id, psize);
GdkPixbuf* px = get_preview_from_cache(key);
-
+
if (px == NULL) {
/*
px = render_pixbuf(root, scale_factor, dbox, psize);
index ca2da205e5ecc44526203b360fe187206561ce53..22f6f64bed2d15c44846ab53f063f559875d34eb 100644 (file)
}
}
-DocumentMetadata::DocumentMetadata(Behavior::BehaviorFactory behavior_factory)
+DocumentMetadata::DocumentMetadata(Behavior::BehaviorFactory behavior_factory)
: Dialog (behavior_factory, "dialogs.documentmetadata", SP_VERB_DIALOG_METADATA),
_page_metadata1(1, 1), _page_metadata2(1, 1),
_prefs_path("dialogs.documentmetadata")
g_signal_connect(G_OBJECT(INKSCAPE), "activate_desktop",
G_CALLBACK(on_activate_desktop), 0);
-
+
g_signal_connect(G_OBJECT(INKSCAPE), "deactivate_desktop",
G_CALLBACK(on_deactivate_desktop), 0);
-
+
show_all_children();
present();
}
-DocumentMetadata::~DocumentMetadata()
+DocumentMetadata::~DocumentMetadata()
{
Inkscape::XML::Node *repr = SP_OBJECT_REPR(sp_desktop_namedview(SP_ACTIVE_DESKTOP));
repr->removeListenerByData (this);
@@ -144,28 +144,28 @@ attach_all (Gtk::Table &table, const Gtk::Widget *arr[], unsigned size, int star
{
if (arr[i] && arr[i+1])
{
- table.attach (const_cast<Gtk::Widget&>(*arr[i]), 1, 2, r, r+1,
+ table.attach (const_cast<Gtk::Widget&>(*arr[i]), 1, 2, r, r+1,
Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0,0,0);
- table.attach (const_cast<Gtk::Widget&>(*arr[i+1]), 2, 3, r, r+1,
+ table.attach (const_cast<Gtk::Widget&>(*arr[i+1]), 2, 3, r, r+1,
Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0,0,0);
}
else
{
if (arr[i+1])
- table.attach (const_cast<Gtk::Widget&>(*arr[i+1]), 1, 3, r, r+1,
+ table.attach (const_cast<Gtk::Widget&>(*arr[i+1]), 1, 3, r, r+1,
Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0,0,0);
else if (arr[i])
{
Gtk::Label& label = static_cast<Gtk::Label&> (const_cast<Gtk::Widget&>(*arr[i]));
label.set_alignment (0.0);
- table.attach (label, 0, 3, r, r+1,
+ table.attach (label, 0, 3, r, r+1,
Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0,0,0);
}
else
{
Gtk::HBox *space = manage (new Gtk::HBox);
space->set_size_request (SPACE_SIZE_X, SPACE_SIZE_Y);
- table.attach (*space, 0, 1, r, r+1,
+ table.attach (*space, 0, 1, r, r+1,
(Gtk::AttachOptions)0, (Gtk::AttachOptions)0,0,0);
}
}
DocumentMetadata::update()
{
if (_wr.isUpdating()) return;
-
+
_wr.setUpdating (true);
set_sensitive (true);
/* update the RDF entities */
for (RDElist::iterator it = _rdflist.begin(); it != _rdflist.end(); it++)
(*it)->update (SP_ACTIVE_DOCUMENT);
-
+
_licensor.update (SP_ACTIVE_DOCUMENT);
_wr.setUpdating (false);
@@ -255,8 +255,8 @@ on_repr_attr_changed (Inkscape::XML::Node *, gchar const *, gchar const *, gchar
_instance->update();
}
-static void
-on_activate_desktop (Inkscape::Application *, SPDesktop* dt, void*)
+static void
+on_activate_desktop (Inkscape::Application *, SPDesktop* /*dt*/, void*)
{
if (!_instance)
return;
_instance->update();
}
-static void
-on_deactivate_desktop (Inkscape::Application *, SPDesktop* dt, void*)
+static void
+on_deactivate_desktop (Inkscape::Application *, SPDesktop* /*dt*/, void*)
{
if (!_instance)
return;
_instance->_doc_replaced_connection.disconnect();
}
-static void
-on_doc_replaced (SPDesktop* dt, SPDocument* doc)
+static void
+on_doc_replaced (SPDesktop* dt, SPDocument* /*doc*/)
{
if (!_instance)
return;
index 4f8db942d41e707bdbc6dc263ba26d7505d9ff91..f8192dc8c69d5b8d9edcbd5d207859d2394291f7 100644 (file)
}
}
-DocumentProperties::DocumentProperties(Behavior::BehaviorFactory behavior_factory)
+DocumentProperties::DocumentProperties(Behavior::BehaviorFactory behavior_factory)
: Dialog (behavior_factory, "dialogs.documentoptions", SP_VERB_DIALOG_NAMEDVIEW),
_page_page(1, 1), _page_guides(1, 1),
- _page_snap(1, 1), _page_grids(1, 1), _page_snap_dtls(1, 1),
+ _page_snap(1, 1), _page_snap_dtls(1, 1), _page_grids(1, 1),
_grids_button_new(_("_New"), _("Create new grid.")),
_grids_button_remove(_("_Remove"), _("Remove selected grid.")),
_prefs_path("dialogs.documentoptions")
_rcbsnn.init (_("_Nodes"),
_("Snap nodes to grid lines, to guides, to paths, and to other nodes"),
"inkscape:snap-nodes", _wr);
-
+
//Options for snapping to objects
_rcbsnop.init (_("Snap to pat_hs"),
_("Snap nodes to object paths"),
"inkscape:object-paths", _wr);
_rcbsnon.init (_("Snap to n_odes"),
_("Snap nodes and guides to object nodes"),
- "inkscape:object-nodes", _wr);
+ "inkscape:object-nodes", _wr);
_rcbsnbbn.init (_("Snap to bounding box co_rners"),
_("Snap bounding box corners to other bounding box corners"),
"inkscape:bbox-nodes", _wr);
_rcbsnbbp.init (_("Snap to bounding box _edges"),
_("Snap bounding box corners and guides to bounding box edges"),
- "inkscape:bbox-paths", _wr);
-
+ "inkscape:bbox-paths", _wr);
+
_rsu_sno.init (_("Snap _distance"), _("Snap at any d_istance"),
_("Snapping distance, in screen pixels, for snapping to objects"),
_("If set, objects snap to the nearest object, regardless of distance"),
"objecttolerance", _wr);
-
+
//Options for snapping to grids
_rsu_sn.init (_("Snap di_stance"), _("Snap at any dis_tance"),
_("Snapping distance, in screen pixels, for snapping to grid"),
_("If set, objects snap to the nearest grid line, regardless of distance"),
"gridtolerance", _wr);
-
- //Options for snapping to guides
+
+ //Options for snapping to guides
_rsu_gusn.init (_("Snap dist_ance"), _("Snap at any distan_ce"),
_("Snapping distance, in screen pixels, for snapping to guides"),
_("If set, objects snap to the nearest guide, regardless of distance"),
"guidetolerance", _wr);
-
- //Other options to locate here: e.g. visual snapping indicators on/off
-
+
+ //Other options to locate here: e.g. visual snapping indicators on/off
+
std::list<Gtk::ToggleButton*> slaves;
slaves.push_back(_rcbsnop._button);
slaves.push_back(_rcbsnon._button);
_rcbsnn.setSlaveButton(slaves);
-
+
slaves.clear();
slaves.push_back(_rcbsnbbp._button);
slaves.push_back(_rcbsnbbn._button);
_rcbsnbb.setSlaveButton(slaves);
-
+
Gtk::Label *label_g = manage (new Gtk::Label);
label_g->set_markup (_("<b>Snapping of</b>"));
Gtk::Label *label_o = manage (new Gtk::Label);
0, _rsu_sn._vbox,
0, 0,
label_gu, 0,
- 0, _rsu_gusn._vbox
+ 0, _rsu_gusn._vbox
};
attach_all(_page_snap.table(), array, G_N_ELEMENTS(array));
}
-
+
void
DocumentProperties::build_snap_dtls()
{
_page_snap_dtls.show();
-
+
_rcbsng.init (_("_Snap guides while dragging"),
_("While dragging a guide, snap to object nodes or bounding box corners ('snap to nodes' or 'snap to bounding box corners', both on the previous tab, must be enabled)"),
"inkscape:snap-guide", _wr);
-
+
_rcbic.init (_("_Include the object's rotation center"),
_("Also snap the rotation center of an object when snapping nodes or guides"),
"inkscape:snap-center", _wr);
//Applies to both nodes and guides, but not to bboxes, that's why its located here
-
- //Other options to locate here: e.g. visual snapping indicators on/off
-
+
+ //Other options to locate here: e.g. visual snapping indicators on/off
+
Gtk::Label *label_i= manage (new Gtk::Label);
label_i->set_markup (_("<b>Snapping to intersections</b>"));
Gtk::Label *label_m = manage (new Gtk::Label);
label_m->set_markup (_("<b>Miscellaneous</b>"));
-
+
Gtk::Widget *const array[] =
{
label_i, 0,
0, 0,
- 0, 0,
+ 0, 0,
label_m, 0,
0, _rcbsng._button,
- 0, _rcbic._button,
+ 0, _rcbic._button,
};
attach_all(_page_snap_dtls.table(), array, G_N_ELEMENTS(array));
label_crea->set_markup (_("<b>Creation</b>"));
Gtk::Label* label_crea_type = manage (new Gtk::Label);
label_crea_type->set_markup (_("Gridtype"));
-
+
for (gint t = 0; t <= GRID_MAXTYPENR; t++) {
_grids_combo_gridtype.append_text( CanvasGrid::getName( (GridType) t ) );
}
_grids_combo_gridtype.set_active_text( CanvasGrid::getName(GRID_RECTANGULAR) );
-
+
Gtk::Label* label_def = manage (new Gtk::Label);
label_def->set_markup (_("<b>Defined grids</b>"));
{
label_crea, 0,
label_crea_type, (Gtk::Widget*) &_grids_combo_gridtype,
- (Gtk::Widget*) &_grids_button_new, (Gtk::Widget*) &_grids_button_remove,
+ (Gtk::Widget*) &_grids_button_new, (Gtk::Widget*) &_grids_button_remove,
label_def, 0
};
attach_all(_page_grids.table(), widget_array, G_N_ELEMENTS(widget_array));
_rcp_hgui.setRgba32 (nv->guidehicolor);
//-----------------------------------------------------------snap
-
+
_rcbsnbb.setActive (nv->snap_manager.getSnapModeBBox());
_rcbsnn.setActive (nv->snap_manager.getSnapModeNode());
_rcbsng.setActive (nv->snap_manager.getSnapModeGuide());
_rcbsnop.setActive(nv->snap_manager.object.getSnapToItemPath());
_rcbsnon.setActive(nv->snap_manager.object.getSnapToItemNode());
_rcbsnbbp.setActive(nv->snap_manager.object.getSnapToBBoxPath());
- _rcbsnbbn.setActive(nv->snap_manager.object.getSnapToBBoxNode());
+ _rcbsnbbn.setActive(nv->snap_manager.object.getSnapToBBoxNode());
_rsu_sno.setValue (nv->objecttolerance);
_rsu_sn.setValue (nv->gridtolerance);
static void
-on_child_added(Inkscape::XML::Node *repr, Inkscape::XML::Node *child, Inkscape::XML::Node *ref, void * data)
+on_child_added(Inkscape::XML::Node */*repr*/, Inkscape::XML::Node */*child*/, Inkscape::XML::Node */*ref*/, void * /*data*/)
{
if (!_instance)
return;
@@ -545,7 +545,7 @@ on_child_added(Inkscape::XML::Node *repr, Inkscape::XML::Node *child, Inkscape::
}
static void
-on_child_removed(Inkscape::XML::Node *repr, Inkscape::XML::Node *child, Inkscape::XML::Node *ref, void * data)
+on_child_removed(Inkscape::XML::Node */*repr*/, Inkscape::XML::Node */*child*/, Inkscape::XML::Node */*ref*/, void * /*data*/)
{
if (!_instance)
return;
@@ -568,7 +568,7 @@ on_repr_attr_changed (Inkscape::XML::Node *, gchar const *, gchar const *, gchar
}
static void
-on_activate_desktop (Inkscape::Application *, SPDesktop* dt, void*)
+on_activate_desktop (Inkscape::Application *, SPDesktop* /*dt*/, void*)
{
if (!_instance)
return;
}
static void
-on_deactivate_desktop (Inkscape::Application *, SPDesktop* dt, void*)
+on_deactivate_desktop (Inkscape::Application *, SPDesktop* /*dt*/, void*)
{
if (!_instance)
return;
gint pagenum = _grids_notebook.get_current_page();
if (pagenum == -1) // no pages
return;
-
+
Gtk::Widget *page = _grids_notebook.get_nth_page(pagenum);
if (!page) return;
-
+
Glib::ustring tabtext = _grids_notebook.get_tab_label_text(*page);
-
+
// find the grid with name tabtext (it's id) and delete that one.
SPDesktop *dt = SP_ACTIVE_DESKTOP;
SPNamedView *nv = sp_desktop_namedview(dt);
index ecedd8b8f826ad23d1b8caf0763afccececf0310..b47e26d124d753063bde895fca571302cf6e2642 100644 (file)
/**
* Constructor
*/
-FileSaveDialogImplGtk::FileSaveDialogImplGtk(Gtk::Window &parentWindow,
- const Glib::ustring &dir,
- FileDialogType fileTypes,
- const Glib::ustring &title,
- const Glib::ustring &default_key) :
+FileSaveDialogImplGtk::FileSaveDialogImplGtk( Gtk::Window &parentWindow,
+ const Glib::ustring &dir,
+ FileDialogType fileTypes,
+ const Glib::ustring &title,
+ const Glib::ustring &/*default_key*/ ) :
FileDialogBaseGtk(parentWindow, title, Gtk::FILE_CHOOSER_ACTION_SAVE, fileTypes, "dialogs.save_as")
{
/* One file at a time */
/**
* Constructor
*/
-FileExportDialogImpl::FileExportDialogImpl(Gtk::Window& parentWindow,
- const Glib::ustring &dir,
- FileDialogType fileTypes,
- const Glib::ustring &title,
- const Glib::ustring &default_key) :
+FileExportDialogImpl::FileExportDialogImpl( Gtk::Window& parentWindow,
+ const Glib::ustring &dir,
+ FileDialogType fileTypes,
+ const Glib::ustring &title,
+ const Glib::ustring &/*default_key*/ ) :
FileDialogBaseGtk(parentWindow, title, Gtk::FILE_CHOOSER_ACTION_SAVE, fileTypes, "dialogs.export"),
sourceX0Spinner("X0", _("Left edge of source")),
sourceY0Spinner("Y0", _("Top edge of source")),
index 81c5d824b14e8f9ff0492f7cb95897b98b41689c..85dc05c556226eafd9040c1f845cdcf18b5fb920 100644 (file)
/**
- * \brief Fill and Stroke dialog,
+ * \brief Fill and Stroke dialog,
* based on sp_object_properties_dialog
*
* Authors:
namespace UI {
namespace Dialog {
-void on_selection_changed(Inkscape::Application *inkscape,
+void on_selection_changed(Inkscape::Application *inkscape,
Inkscape::Selection *selection,
FillAndStroke *dlg)
{
dlg->selectionChanged(inkscape, selection);
}
-void on_selection_modified(Inkscape::Application *inkscape,
- Inkscape::Selection *selection,
- guint flags,
+void on_selection_modified(Inkscape::Application *inkscape,
+ Inkscape::Selection *selection,
+ guint /*flags*/,
FillAndStroke *dlg)
{
dlg->selectionChanged(inkscape, selection);
}
-FillAndStroke::FillAndStroke(Behavior::BehaviorFactory behavior_factory)
+FillAndStroke::FillAndStroke(Behavior::BehaviorFactory behavior_factory)
: Dialog (behavior_factory, "dialogs.fillstroke", SP_VERB_DIALOG_FILL_STROKE),
_page_fill(1, 1, true, true),
_page_stroke_paint(1, 1, true, true),
_fe_vbox.pack_start(_fe_alignment, false, false, 0);
_fe_cb.signal_blend_blur_changed().connect(sigc::mem_fun(*this, &Inkscape::UI::Dialog::FillAndStroke::_blendBlurValueChanged));
-
+
// Opacity
vbox->pack_start(_opacity_vbox, false, false, 2);
_opacity_label_box.pack_start(_opacity_label, false, false, 4);
show_all_children();
}
-FillAndStroke::~FillAndStroke()
+FillAndStroke::~FillAndStroke()
{
}
// FIXME: fix for GTK breakage, see comment in SelectedStyle::on_opacity_changed; here it results in crash 1580903
sp_canvas_force_full_redraw_after_interruptions(sp_desktop_canvas(desktop), 0);
-
+
//get current selection
Inkscape::Selection *selection = sp_desktop_selection (desktop);
SPFilter *filter = 0;
const bool remfilter = (blendmode == "normal" && radius == 0) || (blendmode == "filter" && !filter);
-
+
if(blendmode != "filter" || filter) {
//apply created filter to every selected item
for (GSList const *i = items; i != NULL; i = i->next) {
SPItem * item = SP_ITEM(i->data);
SPStyle *style = SP_OBJECT_STYLE(item);
g_assert(style != NULL);
-
+
if(remfilter) {
remove_filter (item, false);
}
filter = new_filter_simple_from_item(document, item, blendmode.c_str(), radius);
sp_style_set_property_url (SP_OBJECT(item), "filter", SP_OBJECT(filter), false);
}
-
+
//request update
SP_OBJECT(item)->requestDisplayUpdate(( SP_OBJECT_MODIFIED_FLAG |
SP_OBJECT_STYLE_MODIFIED_FLAG ));
sp_repr_css_attr_unref (css);
- sp_document_maybe_done (sp_desktop_document (SP_ACTIVE_DESKTOP), "fillstroke:opacity", SP_VERB_DIALOG_FILL_STROKE,
+ sp_document_maybe_done (sp_desktop_document (SP_ACTIVE_DESKTOP), "fillstroke:opacity", SP_VERB_DIALOG_FILL_STROKE,
_("Change opacity"));
// resume interruptibility
}
void
-FillAndStroke::selectionChanged(Inkscape::Application *inkscape,
- Inkscape::Selection *selection)
+FillAndStroke::selectionChanged(Inkscape::Application */*inkscape*/,
+ Inkscape::Selection */*selection*/)
{
if (_blocked)
return;
break;
case QUERY_STYLE_SINGLE:
case QUERY_STYLE_MULTIPLE_AVERAGED: // TODO: treat this slightly differently
- case QUERY_STYLE_MULTIPLE_SAME:
+ case QUERY_STYLE_MULTIPLE_SAME:
_opacity_hbox.set_sensitive(true);
_opacity_adjustment.set_value(100 * SP_SCALE24_TO_FLOAT(query->opacity.value));
break;
break;
case QUERY_STYLE_SINGLE:
case QUERY_STYLE_MULTIPLE_AVERAGED:
- case QUERY_STYLE_MULTIPLE_SAME:
+ case QUERY_STYLE_MULTIPLE_SAME:
NR::Maybe<NR::Rect> bbox = sp_desktop_selection(SP_ACTIVE_DESKTOP)->bounds();
if (bbox) {
double perimeter = bbox->extent(NR::X) + bbox->extent(NR::Y);
break;
}
}
-
+
sp_style_unref(query);
_blocked = false;
index 6a492eed12fe24f1932b74a33ce5cab94b945b74..ecaf3a11b267d2a48530dde0d4dbc0b8b664d36e 100644 (file)
@@ -958,7 +958,7 @@ void FilterEffectsDialog::FilterModifier::on_activate_desktop(Application*, SPDe
// When the selection changes, show the active filter(s) in the dialog
-void FilterEffectsDialog::FilterModifier::on_inkscape_change_selection(Application *inkscape,
+void FilterEffectsDialog::FilterModifier::on_inkscape_change_selection(Application */*inkscape*/,
Selection *sel,
FilterModifier* fm)
{
}
void FilterEffectsDialog::CellRendererConnection::get_size_vfunc(
- Gtk::Widget& widget, const Gdk::Rectangle* cell_area,
+ Gtk::Widget& widget, const Gdk::Rectangle* /*cell_area*/,
int* x_offset, int* y_offset, int* width, int* height) const
{
PrimitiveList& primlist = dynamic_cast<PrimitiveList&>(widget);
@@ -1783,7 +1783,7 @@ void FilterEffectsDialog::PrimitiveList::sanitize_connections(const Gtk::TreeIte
}
// Reorder the filter primitives to match the list order
-void FilterEffectsDialog::PrimitiveList::on_drag_end(const Glib::RefPtr<Gdk::DragContext>& dc)
+void FilterEffectsDialog::PrimitiveList::on_drag_end(const Glib::RefPtr<Gdk::DragContext>& /*dc*/)
{
SPFilter* filter = _dialog._filter_modifier.get_selected_filter();
int ndx = 0;
index b60d7e35774807b1d5945231d9f3a2eacecd9676..ee12e652abe5b11e387c228143a7022abc2c1111 100644 (file)
lpeeditor->onSelectionChanged(selection);
}
-static void lpeeditor_selection_modified (Inkscape::Selection *selection, guint flags, gpointer data)
+static void lpeeditor_selection_modified( Inkscape::Selection *selection, guint /*flags*/, gpointer data )
{
lpeeditor_selection_changed (selection, data);
}
index 0d7f04d7d4eca84f94dc2aa10e7953d35b3d2473..f62c6d4f90f05e788f95f3fff93eda08c4ada932 100644 (file)
static gdouble const _sw_presets[] = { 32 , 16 , 10 , 8 , 6 , 4 , 3 , 2 , 1.5 , 1 , 0.75 , 0.5 , 0.25 , 0.1 };
static gchar const *const _sw_presets_str[] = {"32", "16", "10", "8", "6", "4", "3", "2", "1.5", "1", "0.75", "0.5", "0.25", "0.1"};
-static void
+static void
ss_selection_changed (Inkscape::Selection *, gpointer data)
{
Inkscape::UI::Widget::SelectedStyle *ss = (Inkscape::UI::Widget::SelectedStyle *) data;
}
static void
-ss_selection_modified (Inkscape::Selection *selection, guint flags, gpointer data)
+ss_selection_modified( Inkscape::Selection *selection, guint /*flags*/, gpointer data )
{
ss_selection_changed (selection, data);
}
static void
-ss_subselection_changed (gpointer dragger, gpointer data)
+ss_subselection_changed( gpointer /*dragger*/, gpointer data )
{
ss_selection_changed (NULL, data);
}
static guint nui_drop_target_entries = ENTRIES_SIZE(ui_drop_target_entries);
-SelectedStyle::SelectedStyle(bool layout)
+SelectedStyle::SelectedStyle(bool /*layout*/)
: _desktop (NULL),
_table(2, 6),
__multiple[i] = (i == SS_FILL)? (_("Multiple selected objects have the same fill")) : (_("Multiple selected objects have the same stroke"));
_popup_edit[i].add(*(new Gtk::Label((i == SS_FILL)? _("Edit fill...") : _("Edit stroke..."), 0.0, 0.5)));
- _popup_edit[i].signal_activate().connect(sigc::mem_fun(*this,
+ _popup_edit[i].signal_activate().connect(sigc::mem_fun(*this,
(i == SS_FILL)? &SelectedStyle::on_fill_edit : &SelectedStyle::on_stroke_edit ));
_popup_lastused[i].add(*(new Gtk::Label(_("Last set color"), 0.0, 0.5)));
- _popup_lastused[i].signal_activate().connect(sigc::mem_fun(*this,
+ _popup_lastused[i].signal_activate().connect(sigc::mem_fun(*this,
(i == SS_FILL)? &SelectedStyle::on_fill_lastused : &SelectedStyle::on_stroke_lastused ));
_popup_lastselected[i].add(*(new Gtk::Label(_("Last selected color"), 0.0, 0.5)));
- _popup_lastselected[i].signal_activate().connect(sigc::mem_fun(*this,
+ _popup_lastselected[i].signal_activate().connect(sigc::mem_fun(*this,
(i == SS_FILL)? &SelectedStyle::on_fill_lastselected : &SelectedStyle::on_stroke_lastselected ));
_popup_invert[i].add(*(new Gtk::Label(_("Invert"), 0.0, 0.5)));
- _popup_invert[i].signal_activate().connect(sigc::mem_fun(*this,
+ _popup_invert[i].signal_activate().connect(sigc::mem_fun(*this,
(i == SS_FILL)? &SelectedStyle::on_fill_invert : &SelectedStyle::on_stroke_invert ));
_popup_white[i].add(*(new Gtk::Label(_("White"), 0.0, 0.5)));
- _popup_white[i].signal_activate().connect(sigc::mem_fun(*this,
+ _popup_white[i].signal_activate().connect(sigc::mem_fun(*this,
(i == SS_FILL)? &SelectedStyle::on_fill_white : &SelectedStyle::on_stroke_white ));
_popup_black[i].add(*(new Gtk::Label(_("Black"), 0.0, 0.5)));
- _popup_black[i].signal_activate().connect(sigc::mem_fun(*this,
+ _popup_black[i].signal_activate().connect(sigc::mem_fun(*this,
(i == SS_FILL)? &SelectedStyle::on_fill_black : &SelectedStyle::on_stroke_black ));
_popup_copy[i].add(*(new Gtk::Label(_("Copy color"), 0.0, 0.5)));
- _popup_copy[i].signal_activate().connect(sigc::mem_fun(*this,
+ _popup_copy[i].signal_activate().connect(sigc::mem_fun(*this,
(i == SS_FILL)? &SelectedStyle::on_fill_copy : &SelectedStyle::on_stroke_copy ));
_popup_paste[i].add(*(new Gtk::Label(_("Paste color"), 0.0, 0.5)));
- _popup_paste[i].signal_activate().connect(sigc::mem_fun(*this,
+ _popup_paste[i].signal_activate().connect(sigc::mem_fun(*this,
(i == SS_FILL)? &SelectedStyle::on_fill_paste : &SelectedStyle::on_stroke_paste ));
_popup_swap[i].add(*(new Gtk::Label(_("Swap fill and stroke"), 0.0, 0.5)));
- _popup_swap[i].signal_activate().connect(sigc::mem_fun(*this,
+ _popup_swap[i].signal_activate().connect(sigc::mem_fun(*this,
&SelectedStyle::on_fillstroke_swap));
_popup_opaque[i].add(*(new Gtk::Label((i == SS_FILL)? _("Make fill opaque") : _("Make stroke opaque"), 0.0, 0.5)));
- _popup_opaque[i].signal_activate().connect(sigc::mem_fun(*this,
+ _popup_opaque[i].signal_activate().connect(sigc::mem_fun(*this,
(i == SS_FILL)? &SelectedStyle::on_fill_opaque : &SelectedStyle::on_stroke_opaque ));
//TRANSLATORS COMMENT: unset is a verb here
_popup_unset[i].add(*(new Gtk::Label((i == SS_FILL)? _("Unset fill") : _("Unset stroke"), 0.0, 0.5)));
- _popup_unset[i].signal_activate().connect(sigc::mem_fun(*this,
+ _popup_unset[i].signal_activate().connect(sigc::mem_fun(*this,
(i == SS_FILL)? &SelectedStyle::on_fill_unset : &SelectedStyle::on_stroke_unset ));
_popup_remove[i].add(*(new Gtk::Label((i == SS_FILL)? _("Remove fill") : _("Remove stroke"), 0.0, 0.5)));
- _popup_remove[i].signal_activate().connect(sigc::mem_fun(*this,
+ _popup_remove[i].signal_activate().connect(sigc::mem_fun(*this,
(i == SS_FILL)? &SelectedStyle::on_fill_remove : &SelectedStyle::on_stroke_remove ));
_popup[i].attach(_popup_edit[i], 0,1, 0,1);
_popup_copy[i].set_sensitive(false);
_popup[i].attach(_popup_paste[i], 0,1, 11,12);
_popup[i].attach(_popup_swap[i], 0,1, 12,13);
- _popup[i].attach(*(new Gtk::SeparatorMenuItem()), 0,1, 13,14);
+ _popup[i].attach(*(new Gtk::SeparatorMenuItem()), 0,1, 13,14);
_popup[i].attach(_popup_opaque[i], 0,1, 14,15);
_popup[i].attach(_popup_unset[i], 0,1, 15,16);
_popup[i].attach(_popup_remove[i], 0,1, 16,17);
for (int i = SS_FILL; i <= SS_STROKE; i++) {
delete _color_preview[i];
- // FIXME: do we need this? the destroy methods are not exported
+ // FIXME: do we need this? the destroy methods are not exported
//sp_gradient_image_destroy(GTK_OBJECT(_gradient_preview_l[i]));
//sp_gradient_image_destroy(GTK_OBJECT(_gradient_preview_r[i]));
}
//_sw_unit = (SPUnit *) sp_desktop_namedview(desktop)->doc_units;
}
-void SelectedStyle::dragDataReceived( GtkWidget *widget,
- GdkDragContext *drag_context,
- gint x, gint y,
+void SelectedStyle::dragDataReceived( GtkWidget */*widget*/,
+ GdkDragContext */*drag_context*/,
+ gint /*x*/, gint /*y*/,
GtkSelectionData *data,
- guint info,
- guint event_time,
+ guint /*info*/,
+ guint /*event_time*/,
gpointer user_data )
{
DropTracker* tracker = (DropTracker*)user_data;
sp_repr_css_set_property( css, (tracker->item == SS_FILL) ? "fill":"stroke", c );
sp_desktop_set_style( tracker->parent->_desktop, css );
sp_repr_css_attr_unref( css );
- sp_document_done( sp_desktop_document(tracker->parent->_desktop) , SP_VERB_NONE,
+ sp_document_done( sp_desktop_document(tracker->parent->_desktop) , SP_VERB_NONE,
_("Drop color"));
}
}
void SelectedStyle::on_fill_remove() {
SPCSSAttr *css = sp_repr_css_attr_new ();
sp_repr_css_set_property (css, "fill", "none");
- sp_desktop_set_style (_desktop, css, true, true);
+ sp_desktop_set_style (_desktop, css, true, true);
sp_repr_css_attr_unref (css);
sp_document_done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
_("Remove fill"));
void SelectedStyle::on_stroke_remove() {
SPCSSAttr *css = sp_repr_css_attr_new ();
sp_repr_css_set_property (css, "stroke", "none");
- sp_desktop_set_style (_desktop, css, true, true);
+ sp_desktop_set_style (_desktop, css, true, true);
sp_repr_css_attr_unref (css);
sp_document_done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
_("Remove stroke"));
void SelectedStyle::on_fill_unset() {
SPCSSAttr *css = sp_repr_css_attr_new ();
sp_repr_css_unset_property (css, "fill");
- sp_desktop_set_style (_desktop, css, true, true);
+ sp_desktop_set_style (_desktop, css, true, true);
sp_repr_css_attr_unref (css);
sp_document_done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
_("Unset fill"));
sp_repr_css_set_property (css, "fill", c);
sp_desktop_set_style (_desktop, css);
sp_repr_css_attr_unref (css);
- sp_document_done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
+ sp_document_done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
_("Apply last set color to fill"));
}
sp_repr_css_set_property (css, "stroke", c);
sp_desktop_set_style (_desktop, css);
sp_repr_css_attr_unref (css);
- sp_document_done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
+ sp_document_done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
_("Apply last set color to stroke"));
}
sp_repr_css_set_property (css, "stroke", c);
sp_desktop_set_style (_desktop, css);
sp_repr_css_attr_unref (css);
- sp_document_done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
+ sp_document_done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
_("Apply last selected color to stroke"));
}
sp_repr_css_attr_unref (css);
sp_document_done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
_("Invert stroke"));
-}
+}
void SelectedStyle::on_fill_white() {
SPCSSAttr *css = sp_repr_css_attr_new ();
sp_repr_css_set_property (css, "stroke-opacity", "1");
sp_desktop_set_style (_desktop, css);
sp_repr_css_attr_unref (css);
- sp_document_done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
+ sp_document_done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
_("White stroke"));
}
sp_repr_css_set_property (css, "fill-opacity", "1.0");
sp_desktop_set_style (_desktop, css);
sp_repr_css_attr_unref (css);
- sp_document_done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
+ sp_document_done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
_("Black fill"));
}
sp_repr_css_set_property (css, "stroke-opacity", "1.0");
sp_desktop_set_style (_desktop, css);
sp_repr_css_attr_unref (css);
- sp_document_done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
+ sp_document_done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
_("Black stroke"));
}
sp_repr_css_set_property (css, "fill", text.c_str());
sp_desktop_set_style (_desktop, css);
sp_repr_css_attr_unref (css);
- sp_document_done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
+ sp_document_done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
_("Paste fill"));
}
}
sp_desktop_set_style (_desktop, css);
sp_repr_css_attr_unref (css);
- sp_document_done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
+ sp_document_done (sp_desktop_document(_desktop), SP_VERB_DIALOG_FILL_STROKE,
_("Swap fill and stroke"));
}
dialog->showPageStrokePaint();
}
-bool
+bool
SelectedStyle::on_fill_click(GdkEventButton *event)
{
if (event->button == 1) { // click, open fill&stroke
return true;
}
-bool
+bool
SelectedStyle::on_stroke_click(GdkEventButton *event)
{
if (event->button == 1) { // click, open fill&stroke
return true;
}
-bool
+bool
SelectedStyle::on_sw_click(GdkEventButton *event)
{
if (event->button == 1) { // click, open fill&stroke
return true;
}
-bool
+bool
SelectedStyle::on_opacity_click(GdkEventButton *event)
{
if (event->button == 2) { // middle click
_popup_copy[i].set_sensitive(false);
// query style from desktop. This returns a result flag and fills query with the style of subselection, if any, or selection
- int result = sp_desktop_query_style (_desktop, query,
+ int result = sp_desktop_query_style (_desktop, query,
(i == SS_FILL)? QUERY_STYLE_PROPERTY_FILL : QUERY_STYLE_PROPERTY_STROKE);
switch (result) {
case QUERY_STYLE_NOTHING:
break;
case QUERY_STYLE_SINGLE:
case QUERY_STYLE_MULTIPLE_AVERAGED:
- case QUERY_STYLE_MULTIPLE_SAME:
+ case QUERY_STYLE_MULTIPLE_SAME:
if ( !_dropEnabled[i] ) {
gtk_drag_dest_set( GTK_WIDGET( (i==SS_FILL) ? _fill_place.gobj():_stroke_place.gobj()),
GTK_DEST_DEFAULT_ALL,
break;
case QUERY_STYLE_SINGLE:
case QUERY_STYLE_MULTIPLE_AVERAGED:
- case QUERY_STYLE_MULTIPLE_SAME:
+ case QUERY_STYLE_MULTIPLE_SAME:
{
double w;
if (_sw_unit) {
g_free (str);
}
{
- gchar *str = g_strdup_printf(_("Stroke width: %.5g%s%s"),
- w,
- _sw_unit? sp_unit_get_abbreviation(_sw_unit) : "px",
+ gchar *str = g_strdup_printf(_("Stroke width: %.5g%s%s"),
+ w,
+ _sw_unit? sp_unit_get_abbreviation(_sw_unit) : "px",
(result_sw == QUERY_STYLE_MULTIPLE_AVERAGED)?
_(" (averaged)") : "");
_tooltips.set_tip(_stroke_width_place, str);
@@ -1183,9 +1183,9 @@ RotateableSwatch::color_adjust(float *hsl, double by, guint32 cc, guint modifier
} else { // hue
double old = hsl[0];
hsl[0] += by/2;
- while (hsl[0] < 0)
+ while (hsl[0] < 0)
hsl[0] += 1;
- while (hsl[0] > 1)
+ while (hsl[0] > 1)
hsl[0] -= 1;
diff = hsl[0] - old;
}
@@ -1206,7 +1206,7 @@ RotateableSwatch::color_adjust(float *hsl, double by, guint32 cc, guint modifier
SPCSSAttr *css = sp_repr_css_attr_new ();
if (fillstroke == SS_FILL)
sp_repr_css_set_property (css, "fill", c);
- else
+ else
sp_repr_css_set_property (css, "stroke", c);
sp_desktop_set_style (parent->getDesktop(), css);
sp_repr_css_attr_unref (css);
@@ -1215,7 +1215,7 @@ RotateableSwatch::color_adjust(float *hsl, double by, guint32 cc, guint modifier
void
RotateableSwatch::do_motion(double by, guint modifier) {
- if (parent->_mode[fillstroke] != SS_COLOR)
+ if (parent->_mode[fillstroke] != SS_COLOR)
return;
if (!cr_set && modifier != 3) {
if (modifier == 3) { // do nothing
} else if (modifier == 2) { // saturation
- sp_document_maybe_done (sp_desktop_document(parent->getDesktop()), undokey,
+ sp_document_maybe_done (sp_desktop_document(parent->getDesktop()), undokey,
SP_VERB_DIALOG_FILL_STROKE, (_("Adjust saturation")));
double ch = hsl[1];
parent->getDesktop()->event_context->_message_context->setF(Inkscape::IMMEDIATE_MESSAGE, _("Adusting <b>saturation</b>: was %.3g, now <b>%.3g</b> (diff %.3g); without modifiers to adjust hue, with <b>Ctrl</b> to adjust lightness"), ch - diff, ch, diff);
} else if (modifier == 1) { // lightness
- sp_document_maybe_done (sp_desktop_document(parent->getDesktop()), undokey,
+ sp_document_maybe_done (sp_desktop_document(parent->getDesktop()), undokey,
SP_VERB_DIALOG_FILL_STROKE, (_("Adjust lightness")));
double ch = hsl[2];
parent->getDesktop()->event_context->_message_context->setF(Inkscape::IMMEDIATE_MESSAGE, _("Adusting <b>lightness</b>: was %.3g, now <b>%.3g</b> (diff %.3g); without modifiers to adjust hue, with <b>Shift</b> to adjust saturation"), ch - diff, ch, diff);
} else { // hue
- sp_document_maybe_done (sp_desktop_document(parent->getDesktop()), undokey,
+ sp_document_maybe_done (sp_desktop_document(parent->getDesktop()), undokey,
SP_VERB_DIALOG_FILL_STROKE, (_("Adjust hue")));
double ch = hsl[0];
parent->getDesktop()->event_context->_message_context->setF(Inkscape::IMMEDIATE_MESSAGE, _("Adusting <b>hue</b>: was %.3g, now <b>%.3g</b> (diff %.3g); with <b>Shift</b> to adjust saturation, with <b>Ctrl</b> to adjust lightness"), ch - diff, ch, diff);
void
RotateableSwatch::do_release(double by, guint modifier) {
- if (parent->_mode[fillstroke] != SS_COLOR)
+ if (parent->_mode[fillstroke] != SS_COLOR)
return;
float hsl[3];
if (modifier == 3) { // nothing
} else if (modifier == 2) { // saturation
- sp_document_maybe_done (sp_desktop_document(parent->getDesktop()), undokey,
+ sp_document_maybe_done (sp_desktop_document(parent->getDesktop()), undokey,
SP_VERB_DIALOG_FILL_STROKE, ("Adjust saturation"));
} else if (modifier == 1) { // lightness
- sp_document_maybe_done (sp_desktop_document(parent->getDesktop()), undokey,
+ sp_document_maybe_done (sp_desktop_document(parent->getDesktop()), undokey,
SP_VERB_DIALOG_FILL_STROKE, ("Adjust lightness"));
} else { // hue
- sp_document_maybe_done (sp_desktop_document(parent->getDesktop()), undokey,
+ sp_document_maybe_done (sp_desktop_document(parent->getDesktop()), undokey,
SP_VERB_DIALOG_FILL_STROKE, ("Adjust hue"));
}
} // namespace UI
} // namespace Inkscape
-/*
+/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
diff --git a/src/verbs.cpp b/src/verbs.cpp
index 8997ec06cdd279c148c1d0412c7dae78088edb29..1b2ae16b4707d196a9437b33f104cda5253ee5d8 100644 (file)
--- a/src/verbs.cpp
+++ b/src/verbs.cpp
\return NULL to represent error (this function shouldn't ever be called)
*/
SPAction *
-Verb::make_action(Inkscape::UI::View::View *view)
+Verb::make_action(Inkscape::UI::View::View */*view*/)
{
//std::cout << "make_action" << std::endl;
return NULL;
for (ActionTable::iterator cur_action = _actions->begin();
cur_action != _actions->end();
cur_action++) {
- if (in_doc == NULL || (cur_action->first != NULL && cur_action->first->doc() == in_doc)) {
+ if (in_doc == NULL || (cur_action->first != NULL && cur_action->first->doc() == in_doc)) {
sp_action_set_sensitive(cur_action->second, in_sensitive ? 1 : 0);
}
}
for (ActionTable::iterator cur_action = _actions->begin();
cur_action != _actions->end();
cur_action++) {
- if (in_doc == NULL || (cur_action->first != NULL && cur_action->first->doc() == in_doc)) {
- sp_action_set_name(cur_action->second, in_name);
+ if (in_doc == NULL || (cur_action->first != NULL && cur_action->first->doc() == in_doc)) {
+ sp_action_set_name(cur_action->second, in_name);
}
}
}
/** \brief Decode the verb code and take appropriate action */
void
-FileVerb::perform(SPAction *action, void *data, void *pdata)
+FileVerb::perform(SPAction *action, void *data, void */*pdata*/)
{
#if 0
/* These aren't used, but are here to remind people not to use
#endif
SPDesktop *desktop = dynamic_cast<SPDesktop*>(sp_action_get_view(action));
- g_assert(desktop != NULL);
- Gtk::Window *parent = desktop->getToplevel();
- g_assert(parent != NULL);
+ g_assert(desktop != NULL);
+ Gtk::Window *parent = desktop->getToplevel();
+ g_assert(parent != NULL);
switch ((long) data) {
case SP_VERB_FILE_NEW:
/** \brief Decode the verb code and take appropriate action */
void
-EditVerb::perform(SPAction *action, void *data, void *pdata)
+EditVerb::perform(SPAction *action, void *data, void */*pdata*/)
{
SPDesktop *dt = static_cast<SPDesktop*>(sp_action_get_view(action));
if (!dt)
case SP_VERB_EDIT_SELECT_NEXT:
if (tools_isactive(dt, TOOLS_NODES)) {
SP_NODE_CONTEXT(ec)->shape_editor->select_next();
- } else if (tools_isactive(dt, TOOLS_GRADIENT)
+ } else if (tools_isactive(dt, TOOLS_GRADIENT)
&& ec->_grdrag->isNonEmpty()) {
sp_gradient_context_select_next (ec);
} else {
/** \brief Decode the verb code and take appropriate action */
void
-SelectionVerb::perform(SPAction *action, void *data, void *pdata)
+SelectionVerb::perform(SPAction *action, void *data, void */*pdata*/)
{
SPDesktop *dt = static_cast<SPDesktop*>(sp_action_get_view(action));
/** \brief Decode the verb code and take appropriate action */
void
-LayerVerb::perform(SPAction *action, void *data, void *pdata)
+LayerVerb::perform(SPAction *action, void *data, void */*pdata*/)
{
SPDesktop *dt = static_cast<SPDesktop*>(sp_action_get_view(action));
unsigned int verb = reinterpret_cast<std::size_t>(data);
/** \brief Decode the verb code and take appropriate action */
void
-ObjectVerb::perform( SPAction *action, void *data, void *pdata )
+ObjectVerb::perform( SPAction *action, void *data, void */*pdata*/ )
{
SPDesktop *dt = static_cast<SPDesktop*>(sp_action_get_view(action));
if (!dt)
// ... flip the selected nodes about that node
SP_NODE_CONTEXT(ec)->shape_editor->flip(NR::X, active_node->pos);
- } else {
+ } else {
// ... or else about the center of their bounding box.
SP_NODE_CONTEXT(ec)->shape_editor->flip(NR::X);
/** \brief Decode the verb code and take appropriate action */
void
-ContextVerb::perform(SPAction *action, void *data, void *pdata)
+ContextVerb::perform(SPAction *action, void *data, void */*pdata*/)
{
SPDesktop *dt;
sp_verb_t verb;
/** \brief Decode the verb code and take appropriate action */
void
-TextVerb::perform(SPAction *action, void *data, void *pdata)
+TextVerb::perform(SPAction *action, void */*data*/, void */*pdata*/)
{
SPDesktop *dt = static_cast<SPDesktop*>(sp_action_get_view(action));
if (!dt)
/** \brief Decode the verb code and take appropriate action */
void
-ZoomVerb::perform(SPAction *action, void *data, void *pdata)
+ZoomVerb::perform(SPAction *action, void *data, void */*pdata*/)
{
SPDesktop *dt = static_cast<SPDesktop*>(sp_action_get_view(action));
if (!dt)
/** \brief Decode the verb code and take appropriate action */
void
-DialogVerb::perform(SPAction *action, void *data, void *pdata)
+DialogVerb::perform(SPAction *action, void *data, void */*pdata*/)
{
if (reinterpret_cast<std::size_t>(data) != SP_VERB_DIALOG_TOGGLE) {
// unhide all when opening a new dialog
break;
#ifdef WITH_INKBOARD
case SP_VERB_XMPP_CLIENT:
- {
+ {
Inkscape::Whiteboard::SessionManager::showClient();
- break;
- }
+ break;
+ }
#endif
case SP_VERB_DIALOG_INPUT:
sp_input_dialog();
/** \brief Decode the verb code and take appropriate action */
void
-HelpVerb::perform(SPAction *action, void *data, void *pdata)
+HelpVerb::perform(SPAction *action, void *data, void */*pdata*/)
{
SPDesktop *dt = static_cast<SPDesktop*>(sp_action_get_view(action));
g_assert(dt->_dlg_mgr != NULL);
/** \brief Decode the verb code and take appropriate action */
void
-TutorialVerb::perform(SPAction *action, void *data, void *pdata)
+TutorialVerb::perform(SPAction */*action*/, void *data, void */*pdata*/)
{
switch (reinterpret_cast<std::size_t>(data)) {
case SP_VERB_TUTORIAL_BASIC:
/** \brief Decode the verb code and take appropriate action */
void
-EffectLastVerb::perform(SPAction *action, void *data, void *pdata)
+EffectLastVerb::perform(SPAction *action, void *data, void */*pdata*/)
{
/* These aren't used, but are here to remind people not to use
the CURRENT_DOCUMENT macros unless they really have to. */
/** \brief Decode the verb code and take appropriate action */
void
-FitCanvasVerb::perform(SPAction *action, void *data, void *pdata)
+FitCanvasVerb::perform(SPAction *action, void *data, void */*pdata*/)
{
SPDesktop *dt = static_cast<SPDesktop*>(sp_action_get_view(action));
if (!dt) return;
/** \brief Decode the verb code and take appropriate action */
void
-LockAndHideVerb::perform(SPAction *action, void *data, void *pdata)
+LockAndHideVerb::perform(SPAction *action, void *data, void */*pdata*/)
{
SPDesktop *dt = static_cast<SPDesktop*>(sp_action_get_view(action));
if (!dt) return;