summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: da6a815)
raw | patch | inline | side by side (parent: da6a815)
author | joncruz <joncruz@users.sourceforge.net> | |
Sun, 25 Nov 2007 08:46:19 +0000 (08:46 +0000) | ||
committer | joncruz <joncruz@users.sourceforge.net> | |
Sun, 25 Nov 2007 08:46:19 +0000 (08:46 +0000) |
25 files changed:
index e90f0a419f8dddc7a5cf060b78efdbfd83bbb76c..42bf96050b3a23c8743f1406d5a98d3405ad18cb 100644 (file)
/*##### THIS IS THE IMPORTANT PART ##### */
-void dialogLoggingFunction(const gchar *log_domain,
- GLogLevelFlags log_level,
+void dialogLoggingFunction(const gchar */*log_domain*/,
+ GLogLevelFlags /*log_level*/,
const gchar *messageText,
gpointer user_data)
{
index bb7b69a8a4f826733549dc94737b8100f40fa036..9a079b68fe89010739873ed46f154cb7350d6b09 100644 (file)
void ColorDef::removeCallback( ColorCallback cb, void* data )
{
-
+ (void)cb;
+ (void)data;
}
index 0108d47775bacf0908ce496a021e6c43101a03c7..41149177752c3396bdcb146e9df4be3df6df771c 100644 (file)
gint insetX = 0;
gint insetY = 0;
+ (void)event;
/*
gint lower = widget->allocation.width;
lower = (widget->allocation.height < lower) ? widget->allocation.height : lower;
@@ -345,12 +346,16 @@ static gboolean eek_preview_button_release_cb( GtkWidget* widget, GdkEventButton
gboolean eek_preview_key_press_event( GtkWidget* widget, GdkEventKey* event)
{
+ (void)widget;
+ (void)event;
g_message("TICK");
return FALSE;
}
gboolean eek_preview_key_release_event( GtkWidget* widget, GdkEventKey* event)
{
+ (void)widget;
+ (void)event;
g_message("tock");
return FALSE;
}
diff --git a/src/dialogs/input.cpp b/src/dialogs/input.cpp
index 21a6ea4a7d40a7c519c33f314c59cd0abc3b6b45..4cad0b64c5b878e3f8f453a26e32a0fa0101da20 100644 (file)
--- a/src/dialogs/input.cpp
+++ b/src/dialogs/input.cpp
static gchar *prefs_path = "dialogs.input";
static void
-sp_input_dialog_destroy (GtkObject *object, gpointer data)
+sp_input_dialog_destroy (GtkObject */*object*/, gpointer /*data*/)
{
sp_signal_disconnect_by_data (INKSCAPE, dlg);
wd.win = dlg = NULL;
}
static gboolean
-sp_input_dialog_delete (GtkObject *object, GdkEvent *event, gpointer data)
+sp_input_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 void
-sp_input_save_button (GtkObject *object, gpointer data)
+sp_input_save_button (GtkObject */*object*/, gpointer /*data*/)
{
sp_input_save_to_preferences();
}
index 1c450cff54137453c7e1b102c43d3941ac5749ef..92da747a42db484478a219860461ef3ba18bf4ff 100644 (file)
static void sp_attribute_widget_changed (GtkEditable *editable);
-static void sp_attribute_widget_object_modified ( SPObject *object,
- guint flags,
+static void sp_attribute_widget_object_modified ( SPObject *object,
+ guint flags,
SPAttributeWidget *spaw );
-static void sp_attribute_widget_object_release ( SPObject *object,
+static void sp_attribute_widget_object_release ( SPObject *object,
SPAttributeWidget *spaw );
static GtkEntryClass *parent_class;
type = gtk_type_unique (GTK_TYPE_ENTRY, &info);
}
return type;
-
+
} // end of sp_attribute_widget_get_type()
static void
sp_attribute_widget_destroy (GtkObject *object)
{
-
+
SPAttributeWidget *spaw;
spaw = SP_ATTRIBUTE_WIDGET (object);
spaw->attribute = NULL;
}
-
+
if (spaw->hasobj) {
-
+
if (spaw->src.object) {
spaw->modified_connection.disconnect();
spaw->release_connection.disconnect();
spaw->src.object = NULL;
}
} else {
-
+
if (spaw->src.repr) {
spaw->src.repr = Inkscape::GC::release(spaw->src.repr);
}
spaw->modified_connection.~connection();
spaw->release_connection.~connection();
-
+
((GtkObjectClass *) parent_class)->destroy (object);
}
spaw = SP_ATTRIBUTE_WIDGET (editable);
if (!spaw->blocked) {
-
+
const gchar *text;
spaw->blocked = TRUE;
text = gtk_entry_get_text (GTK_ENTRY (spaw));
- if (!*text)
+ if (!*text)
text = NULL;
-
+
if (spaw->hasobj && spaw->src.object) {
-
- if (!sp_repr_set_attr ( SP_OBJECT_REPR (spaw->src.object),
+
+ if (!sp_repr_set_attr ( SP_OBJECT_REPR (spaw->src.object),
spaw->attribute, text) )
{
/* Cannot set attribute */
text = SP_OBJECT_REPR (spaw->src.object)->attribute(spaw->attribute);
gtk_entry_set_text (GTK_ENTRY (spaw), text ? text : "");
}
- sp_document_done (SP_OBJECT_DOCUMENT (spaw->src.object), SP_VERB_NONE,
+ sp_document_done (SP_OBJECT_DOCUMENT (spaw->src.object), SP_VERB_NONE,
_("Set attribute"));
-
+
} else if (spaw->src.repr) {
-
+
if (!sp_repr_set_attr (spaw->src.repr, spaw->attribute, text))
{
/* Cannot set attribute */
}
spaw->blocked = FALSE;
}
-
+
} // end of sp_attribute_widget_changed()
sp_attribute_widget_set_object (spaw, object, attribute);
return GTK_WIDGET (spaw);
-
+
} // end of sp_attribute_widget_new()
@@ -219,8 +219,8 @@ sp_attribute_widget_new_repr ( Inkscape::XML::Node *repr, const gchar *attribute
void
-sp_attribute_widget_set_object ( SPAttributeWidget *spaw,
- SPObject *object,
+sp_attribute_widget_set_object ( SPAttributeWidget *spaw,
+ SPObject *object,
const gchar *attribute )
{
}
if (spaw->hasobj) {
-
+
if (spaw->src.object) {
spaw->modified_connection.disconnect();
spaw->release_connection.disconnect();
spaw->src.object = NULL;
}
} else {
-
+
if (spaw->src.repr) {
spaw->src.repr = Inkscape::GC::release(spaw->src.repr);
}
void
-sp_attribute_widget_set_repr ( SPAttributeWidget *spaw,
- Inkscape::XML::Node *repr,
+sp_attribute_widget_set_repr ( SPAttributeWidget *spaw,
+ Inkscape::XML::Node *repr,
const gchar *attribute )
{
}
if (spaw->hasobj) {
-
+
if (spaw->src.object) {
spaw->modified_connection.disconnect();
spaw->release_connection.disconnect();
spaw->src.object = NULL;
}
} else {
-
+
if (spaw->src.repr) {
spaw->src.repr = Inkscape::GC::release(spaw->src.repr);
}
static void
-sp_attribute_widget_object_modified ( SPObject *object,
- guint flags,
+sp_attribute_widget_object_modified ( SPObject */*object*/,
+ guint flags,
SPAttributeWidget *spaw )
{
if (flags && SP_OBJECT_MODIFIED_FLAG) {
-
+
const gchar *val, *text;
val = SP_OBJECT_REPR (spaw->src.object)->attribute(spaw->attribute);
text = gtk_entry_get_text (GTK_ENTRY (spaw));
-
+
if (val || text) {
-
+
if (!val || !text || strcmp (val, text)) {
/* We are different */
spaw->blocked = TRUE;
- gtk_entry_set_text ( GTK_ENTRY (spaw),
+ gtk_entry_set_text ( GTK_ENTRY (spaw),
val ? val : (const gchar *) "");
spaw->blocked = FALSE;
} // end of if()
-
+
} // end of if()
-
+
} //end of if()
} // end of sp_attribute_widget_object_modified()
static void
-sp_attribute_widget_object_release ( SPObject *object,
+sp_attribute_widget_object_release ( SPObject */*object*/,
SPAttributeWidget *spaw )
{
sp_attribute_widget_set_object (spaw, NULL, NULL);
}
if (spat->hasobj) {
-
+
if (spat->src.object) {
spat->modified_connection.disconnect();
spat->release_connection.disconnect();
spat->modified_connection.~connection();
spat->release_connection.~connection();
-
+
if (spat->entries) {
g_free (spat->entries);
spat->entries = NULL;
if (((GtkObjectClass *) table_parent_class)->destroy) {
(* ((GtkObjectClass *) table_parent_class)->destroy) (object);
}
-
+
} // end of sp_attribute_table_destroy()
GtkWidget *
-sp_attribute_table_new ( SPObject *object,
- gint num_attr,
- const gchar **labels,
+sp_attribute_table_new ( SPObject *object,
+ gint num_attr,
+ const gchar **labels,
const gchar **attributes )
{
SPAttributeTable *spat;
GtkWidget *
-sp_attribute_table_new_repr ( Inkscape::XML::Node *repr,
- gint num_attr,
- const gchar **labels,
+sp_attribute_table_new_repr ( Inkscape::XML::Node *repr,
+ gint num_attr,
+ const gchar **labels,
const gchar **attributes )
{
SPAttributeTable *spat;
#define YPAD 0
void
-sp_attribute_table_set_object ( SPAttributeTable *spat,
- SPObject *object,
- gint num_attr,
- const gchar **labels,
+sp_attribute_table_set_object ( SPAttributeTable *spat,
+ SPObject *object,
+ gint num_attr,
+ const gchar **labels,
const gchar **attributes )
{
w = gtk_label_new (_(labels[i]));
gtk_widget_show (w);
gtk_misc_set_alignment (GTK_MISC (w), 1.0, 0.5);
- gtk_table_attach ( GTK_TABLE (spat->table), w, 0, 1, i, i + 1,
- GTK_FILL,
- (GtkAttachOptions)(GTK_EXPAND | GTK_FILL),
+ gtk_table_attach ( GTK_TABLE (spat->table), w, 0, 1, i, i + 1,
+ GTK_FILL,
+ (GtkAttachOptions)(GTK_EXPAND | GTK_FILL),
XPAD, YPAD );
w = gtk_entry_new ();
gtk_widget_show (w);
val = SP_OBJECT_REPR (object)->attribute(attributes[i]);
gtk_entry_set_text (GTK_ENTRY (w), val ? val : (const gchar *) "");
- gtk_table_attach ( GTK_TABLE (spat->table), w, 1, 2, i, i + 1,
- (GtkAttachOptions)(GTK_EXPAND | GTK_FILL),
- (GtkAttachOptions)(GTK_EXPAND | GTK_FILL),
+ gtk_table_attach ( GTK_TABLE (spat->table), w, 1, 2, i, i + 1,
+ (GtkAttachOptions)(GTK_EXPAND | GTK_FILL),
+ (GtkAttachOptions)(GTK_EXPAND | GTK_FILL),
XPAD, YPAD );
spat->entries[i] = w;
- g_signal_connect ( G_OBJECT (w), "changed",
- G_CALLBACK (sp_attribute_table_entry_changed),
+ g_signal_connect ( G_OBJECT (w), "changed",
+ G_CALLBACK (sp_attribute_table_entry_changed),
spat );
}
/* Show table */
spat->blocked = FALSE;
}
- gtk_widget_set_sensitive ( GTK_WIDGET (spat),
+ gtk_widget_set_sensitive ( GTK_WIDGET (spat),
(spat->src.object != NULL) );
} // end of sp_attribute_table_set_object()
void
-sp_attribute_table_set_repr ( SPAttributeTable *spat,
- Inkscape::XML::Node *repr,
- gint num_attr,
- const gchar **labels,
+sp_attribute_table_set_repr ( SPAttributeTable *spat,
+ Inkscape::XML::Node *repr,
+ gint num_attr,
+ const gchar **labels,
const gchar **attributes )
{
g_return_if_fail (spat != NULL);
/* Arrays */
spat->attributes = g_new0 (gchar *, num_attr);
spat->entries = g_new0 (GtkWidget *, num_attr);
-
+
/* Fill rows */
for (i = 0; i < num_attr; i++) {
GtkWidget *w;
w = gtk_label_new (labels[i]);
gtk_widget_show (w);
gtk_misc_set_alignment (GTK_MISC (w), 1.0, 0.5);
- gtk_table_attach ( GTK_TABLE (spat->table), w, 0, 1, i, i + 1,
- GTK_FILL,
- (GtkAttachOptions)(GTK_EXPAND | GTK_FILL),
+ gtk_table_attach ( GTK_TABLE (spat->table), w, 0, 1, i, i + 1,
+ GTK_FILL,
+ (GtkAttachOptions)(GTK_EXPAND | GTK_FILL),
XPAD, YPAD );
w = gtk_entry_new ();
gtk_widget_show (w);
val = repr->attribute(attributes[i]);
gtk_entry_set_text (GTK_ENTRY (w), val ? val : (const gchar *) "");
- gtk_table_attach ( GTK_TABLE (spat->table), w, 1, 2, i, i + 1,
- (GtkAttachOptions)(GTK_EXPAND | GTK_FILL),
- (GtkAttachOptions)(GTK_EXPAND | GTK_FILL),
+ gtk_table_attach ( GTK_TABLE (spat->table), w, 1, 2, i, i + 1,
+ (GtkAttachOptions)(GTK_EXPAND | GTK_FILL),
+ (GtkAttachOptions)(GTK_EXPAND | GTK_FILL),
XPAD, YPAD );
spat->entries[i] = w;
- g_signal_connect ( G_OBJECT (w), "changed",
- G_CALLBACK (sp_attribute_table_entry_changed),
+ g_signal_connect ( G_OBJECT (w), "changed",
+ G_CALLBACK (sp_attribute_table_entry_changed),
spat );
}
/* Show table */
static void
-sp_attribute_table_object_modified ( SPObject *object,
- guint flags,
+sp_attribute_table_object_modified ( SPObject */*object*/,
+ guint flags,
SPAttributeTable *spat )
{
if (flags && SP_OBJECT_MODIFIED_FLAG)
if (!val || !text || strcmp (val, text)) {
/* We are different */
spat->blocked = TRUE;
- gtk_entry_set_text ( GTK_ENTRY (spat->entries[i]),
+ gtk_entry_set_text ( GTK_ENTRY (spat->entries[i]),
val ? val : (const gchar *) "");
spat->blocked = FALSE;
}
}
}
} // end of if()
-
+
} // end of sp_attribute_table_object_modified()
static void
-sp_attribute_table_object_release (SPObject *object, SPAttributeTable *spat)
+sp_attribute_table_object_release (SPObject */*object*/, SPAttributeTable *spat)
{
sp_attribute_table_set_object (spat, NULL, 0, NULL, NULL);
}
static void
-sp_attribute_table_entry_changed ( GtkEditable *editable,
+sp_attribute_table_entry_changed ( GtkEditable *editable,
SPAttributeTable *spat )
{
if (!spat->blocked)
{
gint i;
for (i = 0; i < spat->num_attr; i++) {
-
+
if (GTK_WIDGET (editable) == spat->entries[i]) {
const gchar *text;
spat->blocked = TRUE;
text = gtk_entry_get_text (GTK_ENTRY (spat->entries[i]));
-
- if (!*text)
+
+ if (!*text)
text = NULL;
-
+
if (spat->hasobj && spat->src.object) {
- if (!sp_repr_set_attr ( SP_OBJECT_REPR (spat->src.object),
+ if (!sp_repr_set_attr ( SP_OBJECT_REPR (spat->src.object),
spat->attributes[i], text))
{
/* Cannot set attribute */
text = SP_OBJECT_REPR (spat->src.object)->attribute(spat->attributes[i]);
- gtk_entry_set_text ( GTK_ENTRY (spat->entries[i]),
+ gtk_entry_set_text ( GTK_ENTRY (spat->entries[i]),
text ? text : (const gchar *) "");
}
- sp_document_done (SP_OBJECT_DOCUMENT (spat->src.object), SP_VERB_NONE,
+ sp_document_done (SP_OBJECT_DOCUMENT (spat->src.object), SP_VERB_NONE,
_("Set attribute"));
-
+
} else if (spat->src.repr) {
-
- if (!sp_repr_set_attr (spat->src.repr,
- spat->attributes[i], text))
+
+ if (!sp_repr_set_attr (spat->src.repr,
+ spat->attributes[i], text))
{
/* Cannot set attribute */
text = spat->src.repr->attribute(spat->attributes[i]);
- gtk_entry_set_text ( GTK_ENTRY (spat->entries[i]),
+ gtk_entry_set_text ( GTK_ENTRY (spat->entries[i]),
text ? text : (const gchar *) "" );
}
/* TODO: Warning! Undo will not be flushed in given case */
index dd5371460f7c21a552f5a3f58a1f147f709bb002..6da0096e206346eed254a0580e4ad90fe77e94b8 100644 (file)
--- a/src/dialogs/xml-tree.cpp
+++ b/src/dialogs/xml-tree.cpp
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;
} // end of sp_xml_tree_dialog()
-static gboolean sp_xml_tree_key_press(GtkWidget *widget, GdkEventKey *event)
+static gboolean sp_xml_tree_key_press(GtkWidget */*widget*/, GdkEventKey *event)
{
unsigned int shortcut = get_group0_keyval(event) |
}
-static void sp_xmltree_desktop_change(Inkscape::Application *inkscape,
+static void sp_xmltree_desktop_change(Inkscape::Application */*inkscape*/,
SPDesktop *desktop,
- GtkWidget *dialog )
+ GtkWidget */*dialog*/ )
{
if (!desktop) {
return;
void on_tree_select_row(GtkCTree *tree,
GtkCTreeNode *node,
- gint column,
- gpointer data)
+ gint /*column*/,
+ gpointer /*data*/)
{
if (blocked) {
return;
void on_tree_unselect_row(GtkCTree *tree,
GtkCTreeNode *node,
- gint column,
- gpointer data)
+ gint /*column*/,
+ gpointer /*data*/)
{
if (blocked) {
return;
-void after_tree_move(GtkCTree *tree,
+void after_tree_move(GtkCTree */*tree*/,
GtkCTreeNode *node,
GtkCTreeNode *new_parent,
GtkCTreeNode *new_sibling,
- gpointer data)
+ gpointer /*data*/)
{
if (GTK_CTREE_ROW(node)->parent == new_parent &&
GTK_CTREE_ROW(node)->sibling == new_sibling)
}
-static void on_destroy(GtkObject *object, gpointer data)
+static void on_destroy(GtkObject */*object*/, gpointer /*data*/)
{
set_tree_desktop(NULL);
gtk_object_destroy(GTK_OBJECT(tooltips));
-static gboolean on_delete(GtkObject *object, GdkEvent *event, gpointer data)
+static gboolean on_delete(GtkObject */*object*/, GdkEvent */*event*/, gpointer /*data*/)
{
gtk_window_get_position((GtkWindow *) dlg, &x, &y);
gtk_window_get_size((GtkWindow *) dlg, &w, &h);
}
-static void _set_status_message(Inkscape::MessageType type, const gchar *message, GtkWidget *dialog)
+static void _set_status_message(Inkscape::MessageType /*type*/, const gchar *message, GtkWidget */*dialog*/)
{
if (status) {
gtk_label_set_markup(GTK_LABEL(status), message ? message : "");
@@ -941,9 +941,9 @@ static void _set_status_message(Inkscape::MessageType type, const gchar *message
}
-void on_tree_select_row_enable(GtkCTree *tree,
- GtkCTreeNode *node,
- gint column,
+void on_tree_select_row_enable(GtkCTree */*tree*/,
+ GtkCTreeNode */*node*/,
+ gint /*column*/,
gpointer data)
{
gtk_widget_set_sensitive(GTK_WIDGET(data), TRUE);
void on_tree_select_row_enable_if_element(GtkCTree *tree,
GtkCTreeNode *node,
- gint column,
+ gint /*column*/,
gpointer data )
{
Inkscape::XML::Node *repr = sp_xmlview_tree_node_get_repr(SP_XMLVIEW_TREE(tree), node);
void on_tree_select_row_show_if_element(GtkCTree *tree, GtkCTreeNode *node,
- gint column, gpointer data)
+ gint /*column*/, gpointer data)
{
Inkscape::XML::Node *repr = sp_xmlview_tree_node_get_repr(SP_XMLVIEW_TREE(tree), node);
void on_tree_select_row_show_if_text(GtkCTree *tree, GtkCTreeNode *node,
- gint column, gpointer data)
+ gint /*column*/, gpointer data)
{
Inkscape::XML::Node *repr = sp_xmlview_tree_node_get_repr(SP_XMLVIEW_TREE(tree), node);
}
-void on_tree_select_row_enable_if_mutable(GtkCTree *tree, GtkCTreeNode *node,
- gint column, gpointer data)
+void on_tree_select_row_enable_if_mutable(GtkCTree */*tree*/, GtkCTreeNode *node,
+ gint /*column*/, gpointer data)
{
gtk_widget_set_sensitive(GTK_WIDGET(data), xml_tree_node_mutable(node));
}
-void on_tree_unselect_row_disable(GtkCTree *tree, GtkCTreeNode *node,
- gint column, gpointer data)
+void on_tree_unselect_row_disable(GtkCTree */*tree*/, GtkCTreeNode */*node*/,
+ gint /*column*/, gpointer data)
{
gtk_widget_set_sensitive(GTK_WIDGET(data), FALSE);
}
-void on_tree_unselect_row_hide(GtkCTree *tree, GtkCTreeNode *node,
- gint column, gpointer data)
+void on_tree_unselect_row_hide(GtkCTree */*tree*/, GtkCTreeNode */*node*/,
+ gint /*column*/, gpointer data)
{
gtk_widget_hide(GTK_WIDGET(data));
}
-void on_tree_unselect_row_clear_text(GtkCTree *tree, GtkCTreeNode *node,
- gint column, gpointer data)
+void on_tree_unselect_row_clear_text(GtkCTree */*tree*/, GtkCTreeNode */*node*/,
+ gint /*column*/, gpointer data)
{
if (GTK_IS_EDITABLE(data)) {
gtk_editable_delete_text(GTK_EDITABLE(data), 0, -1);
}
-void on_attr_select_row(GtkCList *list, gint row, gint column,
- GdkEventButton *event, gpointer data)
+void on_attr_select_row(GtkCList *list, gint row, gint /*column*/,
+ GdkEventButton */*event*/, gpointer /*data*/)
{
selected_attr = sp_xmlview_attr_list_get_row_key(list, row);
gtk_window_set_focus(GTK_WINDOW(dlg), GTK_WIDGET(attr_value));
}
-void on_attr_unselect_row(GtkCList *list, gint row, gint column,
- GdkEventButton *event, gpointer data)
+void on_attr_unselect_row(GtkCList */*list*/, gint /*row*/, gint /*column*/,
+ GdkEventButton */*event*/, gpointer /*data*/)
{
selected_attr = 0;
attr_reset_context(selected_attr);
}
-void on_attr_row_changed(GtkCList *list, gint row, gpointer data)
+void on_attr_row_changed(GtkCList *list, gint row, gpointer /*data*/)
{
gint attr = sp_xmlview_attr_list_get_row_key(list, row);
void on_attr_select_row_set_name_content(GtkCList *list, gint row,
- gint column, GdkEventButton *event,
+ gint /*column*/, GdkEventButton */*event*/,
gpointer data)
{
GtkEditable *editable = GTK_EDITABLE(data);
-void on_attr_select_row_set_value_content(GtkCList *list, gint row, gint column,
- GdkEventButton *event,
+void on_attr_select_row_set_value_content(GtkCList *list, gint row, gint /*column*/,
+ GdkEventButton */*event*/,
gpointer data)
{
GtkTextBuffer *tb = gtk_text_view_get_buffer(GTK_TEXT_VIEW(data));
@@ -1142,7 +1142,7 @@ void on_attr_select_row_set_value_content(GtkCList *list, gint row, gint column,
void on_tree_select_row_enable_if_indentable(GtkCTree *tree, GtkCTreeNode *node,
- gint column, gpointer data)
+ gint /*column*/, gpointer data)
{
gboolean indentable = FALSE;
@@ -1172,7 +1172,7 @@ void on_tree_select_row_enable_if_indentable(GtkCTree *tree, GtkCTreeNode *node,
void on_tree_select_row_enable_if_not_first_child(GtkCTree *tree,
GtkCTreeNode *node,
- gint column,
+ gint /*column*/,
gpointer data)
{
Inkscape::XML::Node *repr = sp_xmlview_tree_node_get_repr(SP_XMLVIEW_TREE(tree), node);
void on_tree_select_row_enable_if_not_last_child(GtkCTree *tree,
GtkCTreeNode *node,
- gint column, gpointer data)
+ gint /*column*/, gpointer data)
{
Inkscape::XML::Node *repr = sp_xmlview_tree_node_get_repr(SP_XMLVIEW_TREE(tree), node);
-void on_tree_select_row_enable_if_has_grandparent(GtkCTree *tree,
+void on_tree_select_row_enable_if_has_grandparent(GtkCTree */*tree*/,
GtkCTreeNode *node,
- gint column, gpointer data)
+ gint /*column*/, gpointer data)
{
GtkCTreeNode *parent = GTK_CTREE_ROW(node)->parent;
-void on_attr_select_row_enable(GtkCList *list, gint row, gint column,
- GdkEventButton *event, gpointer data)
+void on_attr_select_row_enable(GtkCList */*list*/, gint /*row*/, gint /*column*/,
+ GdkEventButton */*event*/, gpointer data)
{
gtk_widget_set_sensitive(GTK_WIDGET(data), TRUE);
}
-void on_attr_unselect_row_disable(GtkCList *list, gint row, gint column,
- GdkEventButton *event, gpointer data)
+void on_attr_unselect_row_disable(GtkCList */*list*/, gint /*row*/, gint /*column*/,
+ GdkEventButton */*event*/, gpointer data)
{
gtk_widget_set_sensitive(GTK_WIDGET(data), FALSE);
}
-void on_attr_unselect_row_clear_text(GtkCList *list, gint row, gint column,
- GdkEventButton *event, gpointer data)
+void on_attr_unselect_row_clear_text(GtkCList */*list*/, gint /*row*/, gint /*column*/,
+ GdkEventButton */*event*/, gpointer data)
{
if (GTK_IS_EDITABLE(data)) {
gtk_editable_delete_text(GTK_EDITABLE(data), 0, -1);
-void on_desktop_selection_changed(Inkscape::Selection *selection)
+void on_desktop_selection_changed(Inkscape::Selection */*selection*/)
{
if (!blocked++) {
set_tree_select(get_dt_select());
set_tree_document(doc);
}
-void on_document_uri_set(gchar const *uri, SPDocument *document)
+void on_document_uri_set(gchar const */*uri*/, SPDocument *document)
{
gchar title[500];
sp_ui_dialog_title_string(Inkscape::Verb::get(SP_VERB_DIALOG_XML_EDITOR), title);
-void on_clicked_get_editable_text(GtkWidget *widget, gpointer data)
+void on_clicked_get_editable_text(GtkWidget */*widget*/, gpointer data)
{
EditableDest *dest = (EditableDest *) data;
dest->text = gtk_editable_get_chars(dest->editable, 0, -1);
-void cmd_new_element_node(GtkObject *object, gpointer data)
+void cmd_new_element_node(GtkObject */*object*/, gpointer /*data*/)
{
EditableDest name;
GtkWidget *window, *create, *cancel, *vbox, *entry, *bbox, *sep;
-void cmd_new_text_node(GtkObject *object, gpointer data)
+void cmd_new_text_node(GtkObject */*object*/, gpointer /*data*/)
{
g_assert(selected_repr != NULL);
}
-void cmd_duplicate_node(GtkObject *object, gpointer data)
+void cmd_duplicate_node(GtkObject */*object*/, gpointer /*data*/)
{
g_assert(selected_repr != NULL);
-void cmd_delete_node(GtkObject *object, gpointer data)
+void cmd_delete_node(GtkObject */*object*/, gpointer /*data*/)
{
g_assert(selected_repr != NULL);
sp_repr_unparent(selected_repr);
-void cmd_delete_attr(GtkObject *object, gpointer data)
+void cmd_delete_attr(GtkObject */*object*/, gpointer /*data*/)
{
g_assert(selected_repr != NULL);
g_assert(selected_attr != 0);
updated->updateRepr();
}
- sp_document_done(current_document, SP_VERB_DIALOG_XML_EDITOR,
+ sp_document_done(current_document, SP_VERB_DIALOG_XML_EDITOR,
_("Delete attribute"));
}
-void cmd_set_attr(GtkObject *object, gpointer data)
+void cmd_set_attr(GtkObject */*object*/, gpointer /*data*/)
{
g_assert(selected_repr != NULL);
-void cmd_raise_node(GtkObject *object, gpointer data)
+void cmd_raise_node(GtkObject */*object*/, gpointer /*data*/)
{
g_assert(selected_repr != NULL);
parent->changeOrder(selected_repr, ref);
- sp_document_done(current_document, SP_VERB_DIALOG_XML_EDITOR,
+ sp_document_done(current_document, SP_VERB_DIALOG_XML_EDITOR,
_("Raise node"));
set_tree_select(selected_repr);
-void cmd_lower_node(GtkObject *object, gpointer data)
+void cmd_lower_node(GtkObject */*object*/, gpointer /*data*/)
{
g_assert(selected_repr != NULL);
g_return_if_fail(selected_repr->next() != NULL);
set_dt_select(selected_repr);
}
-void cmd_indent_node(GtkObject *object, gpointer data)
+void cmd_indent_node(GtkObject */*object*/, gpointer /*data*/)
{
Inkscape::XML::Node *repr = selected_repr;
g_assert(repr != NULL);
parent->removeChild(repr);
prev->addChild(repr, ref);
- sp_document_done(current_document, SP_VERB_DIALOG_XML_EDITOR,
+ sp_document_done(current_document, SP_VERB_DIALOG_XML_EDITOR,
_("Indent node"));
set_tree_select(repr);
set_dt_select(repr);
-void cmd_unindent_node(GtkObject *object, gpointer data)
+void cmd_unindent_node(GtkObject */*object*/, gpointer /*data*/)
{
Inkscape::XML::Node *repr = selected_repr;
g_assert(repr != NULL);
parent->removeChild(repr);
grandparent->addChild(repr, parent);
- sp_document_done(current_document, SP_VERB_DIALOG_XML_EDITOR,
+ sp_document_done(current_document, SP_VERB_DIALOG_XML_EDITOR,
_("Unindent node"));
set_tree_select(repr);
set_dt_select(repr);
index e69e753e8a1bd1a58d0abfa21c4a1b21e016d103..e5a3ca33f1d743199056320f87072be0bcab3a34 100644 (file)
FilterColorMatrix::~FilterColorMatrix()
{}
-int FilterColorMatrix::render(FilterSlot &slot, FilterUnits const &units) {
+int FilterColorMatrix::render(FilterSlot &slot, FilterUnits const &/*units*/) {
NRPixBlock *in = slot.get(_input);
NRPixBlock *out = new NRPixBlock;
x0=in->area.x0;
y0=in->area.y0;
x1=in->area.x1;
- y1=in->area.y1;
+ y1=in->area.y1;
switch(type){
case COLORMATRIX_MATRIX:
if (values.size()!=20) {
- g_warning("ColorMatrix: values parameter error. Wrong size: %i.", values.size());
+ g_warning("ColorMatrix: values parameter error. Wrong size: %i.", static_cast<int>(values.size()));
return -1;
}
for (x=x0;x<x1;x++){
a20 = 0.213 + coshue*(-0.213) + sinhue*(-0.787);
a21 = 0.715 + coshue*(-0.715) + sinhue*( 0.715);
a22 = 0.072 + coshue*( 0.928) + sinhue*( 0.072);
-
+
for (x=x0;x<x1;x++){
for (y=y0;y<y1;y++){
i = ((x-x0) + (x1-x0)*(y-y0))*4;
g = in_data[i+1];
b = in_data[i+2];
a = in_data[i+3];
-
+
out_data[i] = CLAMP_D_TO_U8( r*a00 + g*a01 + b*a02 );
out_data[i+1] = CLAMP_D_TO_U8( r*a10 + g*a11 + b*a12 );
out_data[i+2] = CLAMP_D_TO_U8( r*a20 + g*a21 + b*a22 );
return 0;
}
-void FilterColorMatrix::area_enlarge(NRRectL &area, Matrix const &trans)
+void FilterColorMatrix::area_enlarge(NRRectL &/*area*/, Matrix const &/*trans*/)
{
}
diff --git a/src/display/nr-filter-component-transfer.cpp b/src/display/nr-filter-component-transfer.cpp
index a190cecde593a2bd0dac140b364f6cda1fa792cd..270e2296c2991fa153e0b85d39c9463d63ef99eb 100644 (file)
FilterComponentTransfer::~FilterComponentTransfer()
{}
-int FilterComponentTransfer::render(FilterSlot &slot, FilterUnits const &units) {
+int FilterComponentTransfer::render(FilterSlot &slot, FilterUnits const &/*units*/) {
NRPixBlock *in = slot.get(_input);
NRPixBlock *out = new NRPixBlock;
unsigned char *out_data = NR_PIXBLOCK_PX(out);
//IMPLEMENT ME!
-
+ (void)in_data;
+ (void)out_data;
+
out->empty = FALSE;
slot.set(_output, out);
return 0;
}
-void FilterComponentTransfer::area_enlarge(NRRectL &area, Matrix const &trans)
+void FilterComponentTransfer::area_enlarge(NRRectL &/*area*/, Matrix const &/*trans*/)
{
}
index de7dd7952eb2306f9014b100a393008d1a23af7d..8670f61b29ac604cb47396de534f141825ec255a 100644 (file)
FilterComposite::~FilterComposite()
{}
-int FilterComposite::render(FilterSlot &slot, FilterUnits const &units) {
+int FilterComposite::render(FilterSlot &slot, FilterUnits const &/*units*/) {
NRPixBlock *in1 = slot.get(_input);
NRPixBlock *in2 = slot.get(_input2);
NRPixBlock *original_in1 = in1;
index e40a201a08527955c60acb6b8b2c3a79740db207..fe28c4b0b0f5299393887eb0a5127b334bf296c1 100644 (file)
return true;
}
-int FilterConvolveMatrix::render(FilterSlot &slot, FilterUnits const &units) {
+int FilterConvolveMatrix::render(FilterSlot &slot, FilterUnits const &/*units*/) {
NRPixBlock *in = slot.get(_input);
NRPixBlock *out = new NRPixBlock;
void FilterConvolveMatrix::set_edgeMode(FilterConvolveMatrixEdgeMode mode){
edgeMode = mode;
-}
+}
void FilterConvolveMatrix::set_preserveAlpha(bool pa){
preserveAlpha = pa;
}
-void FilterConvolveMatrix::area_enlarge(NRRectL &area, Matrix const &trans)
+void FilterConvolveMatrix::area_enlarge(NRRectL &area, Matrix const &/*trans*/)
{
//Seems to me that since this filter's operation is resolution dependent,
// some spurious pixels may still appear at the borders when low zooming or rotating. Needs a better fix.
diff --git a/src/display/nr-filter-displacement-map.cpp b/src/display/nr-filter-displacement-map.cpp
index 184aa802d1661243d33b9373aaa8a2156e727025..afc2df8e7263f06063e0eec5feb42fcecbd87805 100644 (file)
FilterDisplacementMap::~FilterDisplacementMap()
{}
-int FilterDisplacementMap::render(FilterSlot &slot, FilterUnits const &units) {
+int FilterDisplacementMap::render(FilterSlot &slot, FilterUnits const &/*units*/) {
NRPixBlock *texture = slot.get(_input);
NRPixBlock *map = slot.get(_input2);
-
+
// Bail out if either one of source images is missing
if (!map || !texture) {
g_warning("Missing source image for feDisplacementMap (map=%d texture=%d)", _input, _input2);
return 1;
}
-
+
//TODO: check whether do we really need this check:
if (map->area.x1 <= map->area.x0 || map->area.y1 <= map->area.y0) return 0; //nothing to do!
-
- NRPixBlock *out = new NRPixBlock;
+
+ NRPixBlock *out = new NRPixBlock;
//are these checks really necessary?
if (out_w > map->area.x1 - out_x0) out_w = map->area.x1 - out_x0;
- if (out_h > map->area.y1 - out_y0) out_h = map->area.y1 - out_y0;
+ if (out_h > map->area.y1 - out_y0) out_h = map->area.y1 - out_y0;
if (out_x0 < map->area.x0){
out_x0 = map->area.x0;
out_w -= (map->area.x0 - out_x0);
out->area.y1 = out_y0 + out_h;
nr_pixblock_setup_fast(out, map->mode, out->area.x0, out->area.y0, out->area.x1, out->area.y1, true);
-
+
unsigned char *map_data = NR_PIXBLOCK_PX(map);
unsigned char *texture_data = NR_PIXBLOCK_PX(texture);
unsigned char *out_data = NR_PIXBLOCK_PX(out);
x+out_x0-map->area.x0 < in_w &&
y+out_y0-map->area.y0 >= 0 &&
y+out_y0-map->area.y0 < in_h){
-
+
coordx = out_x0 - map->area.x0 + x + scale * ( double(map_data[4*((x+out_x0-map->area.x0) + in_w*(y+out_y0-map->area.y0)) + Xchannel])/255 - 0.5);
coordy = out_y0 - map->area.y0 + y + scale * ( double(map_data[4*((x+out_x0-map->area.x0) + in_w*(y+out_y0-map->area.y0)) + Ychannel])/255 - 0.5);
if (s == 1) Ychannel = channel;
}
-void FilterDisplacementMap::area_enlarge(NRRectL &area, Matrix const &trans)
+void FilterDisplacementMap::area_enlarge(NRRectL &area, Matrix const &/*trans*/)
{
out_x0 = area.x0;
out_y0 = area.y0;
index fc03e564f8ce8483ac7c9d2d0166e4ab4945e592..55576842bdc201d9821e2a9638ae0ca236d1adb2 100644 (file)
FilterFlood::~FilterFlood()
{}
-int FilterFlood::render(FilterSlot &slot, FilterUnits const &units) {
+int FilterFlood::render(FilterSlot &slot, FilterUnits const &/*units*/) {
NRPixBlock *in = slot.get(_input);
NRPixBlock *out = new NRPixBlock;
unsigned char *out_data = NR_PIXBLOCK_PX(out);
//IMPLEMENT ME!
-
+ (void)in_data;
+ (void)out_data;
+
out->empty = FALSE;
slot.set(_output, out);
return 0;
}
-void FilterFlood::area_enlarge(NRRectL &area, Matrix const &trans)
+void FilterFlood::area_enlarge(NRRectL &/*area*/, Matrix const &/*trans*/)
{
}
index d96d2013b9dce6160fe3d8efac4570d160b85c56..312e854045e17ec5e0a42aebcc5a3faf84ccc2bf 100644 (file)
if (image_pixbuf) g_free(image_pixbuf);
}
-int FilterImage::render(FilterSlot &slot, FilterUnits const &units) {
+int FilterImage::render(FilterSlot &slot, FilterUnits const &/*units*/) {
if (!feImageHref) return 0;
-
+
if (!image_pixbuf){
if ( (image = Gdk::Pixbuf::create_from_file(feImageHref)) < 0 ) return 0;
width = image->get_width();
int x1 = in->area.x1, y1 = in->area.y1;
int bbox_x0 = (int) slot.get_arenaitem()->bbox.x0;
int bbox_y0 = (int) slot.get_arenaitem()->bbox.y0;
-
+
nr_pixblock_setup_fast(out, in->mode, x0, y0, x1, y1, true);
w = x1 - x0;
FilterTraits FilterImage::get_input_traits() {
return TRAIT_PARALLER;
}
-
+
} /* namespace NR */
/*
index 1e95d7cf120a5cb4e9b86ea5773928ee5980217c..ed060b6495f15e4b4b1cb2003a363fb56e37a070 100644 (file)
FilterMerge::~FilterMerge()
{}
-int FilterMerge::render(FilterSlot &slot, FilterUnits const &units) {
+int FilterMerge::render(FilterSlot &slot, FilterUnits const &/*units*/) {
NRPixBlock *in[_input_image.size()];
NRPixBlock *original_in[_input_image.size()];
void FilterMerge::set_input(int input, int slot) {
if (input < 0) return;
- if (_input_image.size() > input) {
+ if (static_cast<int>(_input_image.size()) > input) {
_input_image[input] = slot;
} else {
- for (unsigned int i = _input_image.size() ; i < input ; i++) {
+ for (int i = static_cast<int>(_input_image.size()) ; i < input ; i++) {
_input_image.push_back(NR_FILTER_SLOT_NOT_SET);
}
_input_image.push_back(slot);
index 20dc95bfabfb4c0490e35bfc00ba6a9c01e1d9b1..abc529aadc8b746d1698192d467fd4bae15181de 100644 (file)
FilterMorphology::~FilterMorphology()
{}
-int FilterMorphology::render(FilterSlot &slot, FilterUnits const &units) {
+int FilterMorphology::render(FilterSlot &slot, FilterUnits const &/*units*/) {
NRPixBlock *in = slot.get(_input);
NRPixBlock *out = new NRPixBlock;
int x0=in->area.x0;
int y0=in->area.y0;
int x1=in->area.x1;
- int y1=in->area.y1;
+ int y1=in->area.y1;
int w=x1-x0, h=y1-y0;
int x,y,i,j;
int rmax,gmax,bmax,amax;
int rmin,gmin,bmin,amin;
-
+
nr_pixblock_setup_fast(out, in->mode, x0, y0, x1, y1, true);
unsigned char *in_data = NR_PIXBLOCK_PX(in);
if(in_data[4*(i + w*j)+1]>gmax) gmax = in_data[4*(i + w*j)+1];
if(in_data[4*(i + w*j)+2]>bmax) bmax = in_data[4*(i + w*j)+2];
if(in_data[4*(i + w*j)+3]>amax) amax = in_data[4*(i + w*j)+3];
-
+
if(in_data[4*(i + w*j)]<rmin) rmin = in_data[4*(i + w*j)];
if(in_data[4*(i + w*j)+1]<gmin) gmin = in_data[4*(i + w*j)+1];
if(in_data[4*(i + w*j)+2]<bmin) bmin = in_data[4*(i + w*j)+2];
- if(in_data[4*(i + w*j)+3]<amin) amin = in_data[4*(i + w*j)+3];
+ if(in_data[4*(i + w*j)+3]<amin) amin = in_data[4*(i + w*j)+3];
}
}
if (Operator==MORPHOLOGY_OPERATOR_DILATE){
}
}
}
-
+
out->empty = FALSE;
slot.set(_output, out);
return 0;
}
-void FilterMorphology::area_enlarge(NRRectL &area, Matrix const &trans)
+void FilterMorphology::area_enlarge(NRRectL &area, Matrix const &/*trans*/)
{
area.x0-=xradius;
area.x1+=xradius;
area.y0-=yradius;
- area.y1+=yradius;
+ area.y1+=yradius;
}
void FilterMorphology::set_operator(FilterMorphologyOperator &o){
index 6e7e9e6abfd6a18f1a9c59a77452322fd5b21850..32467e3decbe956d151fd5df69b57d30a4f21a63 100644 (file)
// Nothing to do here
}
-void FilterPrimitive::area_enlarge(NRRectL &area, Matrix const &m)
+void FilterPrimitive::area_enlarge(NRRectL &/*area*/, Matrix const &/*m*/)
{
// This doesn't need to do anything by default
}
diff --git a/src/display/nr-filter-specularlighting.cpp b/src/display/nr-filter-specularlighting.cpp
index 7f24f3ec26055f0f46510d6680a30e3a06aaabba..3f459f164dbba5ecaef49062c2979fdcdcecb903 100644 (file)
namespace NR {
-FilterSpecularLighting::FilterSpecularLighting()
+FilterSpecularLighting::FilterSpecularLighting()
{
light_type = NO_LIGHT;
specularConstant = 1;
//Investigating Phong Lighting model we should not take N.H but
//R.E which equals to 2*N.H^2 - 1
-//replace the second line by
+//replace the second line by
//gdouble scal = scalar_product((N), (H)); scal = 2 * scal * scal - 1;
//to get the expected formula
#define COMPUTE_INTER(inter, H, N, ks, speculaExponent) \
NRPixBlock *out = new NRPixBlock;
//Fvector *L = NULL; //vector to the light
-
+
int w = in->area.x1 - in->area.x0;
int h = in->area.y1 - in->area.y0;
int x0 = in->area.x0;
gdouble ks = specularConstant; //diffuse lighting constant
Fvector L, N, LC, H;
gdouble inter;
-
+
nr_pixblock_setup_fast(out, in->mode,
in->area.x0, in->area.y0, in->area.x1, in->area.y1,
true);
unsigned char *data_o = NR_PIXBLOCK_PX (out);
//No light, nothing to do
switch (light_type) {
- case DISTANT_LIGHT:
+ case DISTANT_LIGHT:
//the light vector is constant
{
DistantLight *dl = new DistantLight(light.distant, lighting_color);
@@ -126,7 +126,7 @@ int FilterSpecularLighting::render(FilterSlot &slot, FilterUnits const &units) {
ss * (double) data_i[4*i+3]/ 255);
normalized_sum(H, L, EYE_VECTOR);
COMPUTE_INTER(inter, N, H, ks, specularExponent);
-
+
data_o[j++] = CLAMP_D_TO_U8(inter * LC[LIGHT_RED]);
data_o[j++] = CLAMP_D_TO_U8(inter * LC[LIGHT_GREEN]);
data_o[j++] = CLAMP_D_TO_U8(inter * LC[LIGHT_BLUE]);
@@ -153,7 +153,7 @@ int FilterSpecularLighting::render(FilterSlot &slot, FilterUnits const &units) {
sl->light_components(LC, L);
normalized_sum(H, L, EYE_VECTOR);
COMPUTE_INTER(inter, N, H, ks, specularExponent);
-
+
data_o[j++] = CLAMP_D_TO_U8(inter * LC[LIGHT_RED]);
data_o[j++] = CLAMP_D_TO_U8(inter * LC[LIGHT_GREEN]);
data_o[j++] = CLAMP_D_TO_U8(inter * LC[LIGHT_BLUE]);
@@ -172,7 +172,7 @@ int FilterSpecularLighting::render(FilterSlot &slot, FilterUnits const &units) {
out->empty = false;
}
}
-
+
//finishing
slot.set(_output, out);
nr_pixblock_release(in);
index 01453da39447111376981bd7b615fe57d85a0297..b058db2bc1e4eea82784f1bc3029a011b0836b64 100644 (file)
FilterTile::~FilterTile()
{}
-int FilterTile::render(FilterSlot &slot, FilterUnits const &units) {
+int FilterTile::render(FilterSlot &slot, FilterUnits const &/*units*/) {
NRPixBlock *in = slot.get(_input);
NRPixBlock *out = new NRPixBlock;
unsigned char *out_data = NR_PIXBLOCK_PX(out);
//IMPLEMENT ME!
-
+ (void)in_data;
+ (void)out_data;
+
out->empty = FALSE;
slot.set(_output, out);
return 0;
}
-void FilterTile::area_enlarge(NRRectL &area, Matrix const &trans)
+void FilterTile::area_enlarge(NRRectL &/*area*/, Matrix const &/*trans*/)
{
}
index addbbb66380e0f9d81cc7aa2562b67cdb0eeaa4f..2c5d0ee64ecbf1aa626fa2a2fffbfa3861d3b234 100644 (file)
* feTurbulence filter primitive renderer
*
* Authors:
- * Felipe Corrêa da Silva Sanches <felipe.sanches@gmail.com>
+ * Felipe Corrêa da Silva Sanches <felipe.sanches@gmail.com>
*
* Copyright (C) 2007 authors
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-
+
#include "display/nr-arena-item.h"
#include "display/nr-filter.h"
#include "display/nr-filter-turbulence.h"
int bbox_y1 = (int) slot.get_arenaitem()->bbox.y1;
int w = bbox_x1 - bbox_x0;
- int h = bbox_y1 - bbox_y0;
- int x,y;
+ int h = bbox_y1 - bbox_y0;
if (!pix){
pix = new NRPixBlock;
updated=true;
}
-int FilterTurbulence::render(FilterSlot &slot, FilterUnits const &units) {
+int FilterTurbulence::render(FilterSlot &slot, FilterUnits const &/*units*/) {
//g_warning("render");
if (!updated) update_pixbuffer(slot);
-
+
NRPixBlock *in = slot.get(_input);
NRPixBlock *out = new NRPixBlock;
int x,y;
int bbox_y0 = (int) slot.get_arenaitem()->bbox.y0;
int bbox_x1 = (int) slot.get_arenaitem()->bbox.x1;
int bbox_w = bbox_x1 - bbox_x0;
-
+
unsigned char *out_data = NR_PIXBLOCK_PX(out);
for (x=x0; x < x1; x++){
for (y=y0; y < y1; y++){
diff --git a/src/dom/uri.cpp b/src/dom/uri.cpp
index e68caf898a375b48b477e673e71d658648b19e75..13b76c413d3a962a685bd505cec1e5be3a842609 100644 (file)
--- a/src/dom/uri.cpp
+++ b/src/dom/uri.cpp
static int findLast(const std::vector<int> &str, int ch)
{
+ // TODO FIXME BUGBUG
+ // This loop appears to be infinite, so it is probably not being called.
+ // Test for a problem, then fix after it has been observed locking up.
for (unsigned int i = str.size()-1 ; i>=0 ; i--)
{
if (ch == str[i])
index 7e51db9334b7d41996dc2144bf241786df189aa1..900246595e25feaf949c7b3709345e75b691ab9a 100644 (file)
signals[ADDED] = g_signal_new( "added",
G_TYPE_FROM_CLASS(klass),
G_SIGNAL_RUN_FIRST,
- NULL,
+ 0,
NULL, NULL,
gtk_marshal_VOID__INT_INT,
G_TYPE_NONE, 2,
signals[REMOVED] = g_signal_new( "removed",
G_TYPE_FROM_CLASS(klass),
G_SIGNAL_RUN_FIRST,
- NULL,
+ 0,
NULL, NULL,
gtk_marshal_VOID__INT_INT,
G_TYPE_NONE, 2,
signals[MODIFIED] = g_signal_new( "modified",
G_TYPE_FROM_CLASS(klass),
G_SIGNAL_RUN_FIRST,
- NULL,
+ 0,
NULL, NULL,
gtk_marshal_VOID__INT_INT,
G_TYPE_NONE, 2,
diff --git a/src/extension/internal/gdkpixbuf-input.cpp b/src/extension/internal/gdkpixbuf-input.cpp
index b24bda8e9ed079449b5422e62ba8c32f955441ef..9f3360bab0f95febfa06992cb0ef7a9c3f0a9a75 100644 (file)
namespace Internal {
SPDocument *
-GdkpixbufInput::open(Inkscape::Extension::Input *mod, char const *uri)
+GdkpixbufInput::open(Inkscape::Extension::Input */*mod*/, char const *uri)
{
SPDocument *doc = sp_document_new(NULL, TRUE, TRUE);
bool saved = sp_document_get_undo_sensitive(doc);
// import as <image>
repr = xml_doc->createElement("svg:image");
// both are the same, as we don't know our base dir here and cannot relativate href (importer will fixupHrefs):
- repr->setAttribute("xlink:href", uri);
- repr->setAttribute("sodipodi:absref", uri);
+ repr->setAttribute("xlink:href", uri);
+ repr->setAttribute("sodipodi:absref", uri);
sp_repr_set_svg_double(repr, "width", width);
sp_repr_set_svg_double(repr, "height", height);
index 5674f44b2be7addbefca579a732040d49ee9f688..888fe2d8ed8d4a8f050dbc17c021e410289ac93d 100644 (file)
--- a/src/sp-object-group.cpp
+++ b/src/sp-object-group.cpp
}
static void
-sp_objectgroup_init (SPObjectGroup *objectgroup)
+sp_objectgroup_init (SPObjectGroup */*objectgroup*/)
{
}
diff --git a/src/text-context.cpp b/src/text-context.cpp
index 6ebd6c9598e7e2698332810eb44b7284efb2dc11..f97bb26ac281dfe3235895277373e86c74c770c4 100644 (file)
--- a/src/text-context.cpp
+++ b/src/text-context.cpp
Inkscape::GC::release(rtext);
text_item->transform = SP_ITEM(ec->desktop->currentRoot())->getRelativeTransform(ec->desktop->currentLayer());
text_item->updateRepr();
- sp_document_done(sp_desktop_document(ec->desktop), SP_VERB_CONTEXT_TEXT,
+ sp_document_done(sp_desktop_document(ec->desktop), SP_VERB_CONTEXT_TEXT,
_("Create text"));
}
tc->text_sel_start = tc->text_sel_end = sp_te_replace(tc->text, tc->text_sel_start, tc->text_sel_end, u);
sp_text_context_update_cursor(tc);
sp_text_context_update_text_selection(tc);
- sp_document_done(sp_desktop_document(tc->desktop), SP_VERB_DIALOG_TRANSFORM,
+ sp_document_done(sp_desktop_document(tc->desktop), SP_VERB_DIALOG_TRANSFORM,
_("Insert Unicode character"));
}
}
@@ -702,7 +702,7 @@ sp_text_context_root_handler(SPEventContext *const event_context, GdkEvent *cons
sp_desktop_apply_style_tool(desktop, SP_OBJECT_REPR(ft), "tools.text", true);
sp_desktop_selection(desktop)->set(ft);
desktop->messageStack()->flash(Inkscape::NORMAL_MESSAGE, _("Flowed text is created."));
- sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_TEXT,
+ sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_TEXT,
_("Create flowed text"));
} else {
desktop->messageStack()->flash(Inkscape::ERROR_MESSAGE, _("The frame is <b>too small</b> for the current font size. Flowed text not created."));
@@ -832,7 +832,7 @@ sp_text_context_root_handler(SPEventContext *const event_context, GdkEvent *cons
sp_text_context_update_cursor(tc);
sp_text_context_update_text_selection(tc);
desktop->messageStack()->flash(Inkscape::NORMAL_MESSAGE, _("No-break space"));
- sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_TEXT,
+ sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_TEXT,
_("Insert no-break space"));
return TRUE;
}
@@ -869,7 +869,7 @@ sp_text_context_root_handler(SPEventContext *const event_context, GdkEvent *cons
sp_repr_css_set_property(css, "font-weight", "normal");
sp_te_apply_style(tc->text, tc->text_sel_start, tc->text_sel_end, css);
sp_repr_css_attr_unref(css);
- sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_TEXT,
+ sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_TEXT,
_("Make bold"));
sp_text_context_update_cursor(tc);
sp_text_context_update_text_selection(tc);
@@ -887,7 +887,7 @@ sp_text_context_root_handler(SPEventContext *const event_context, GdkEvent *cons
sp_repr_css_set_property(css, "font-style", "normal");
sp_te_apply_style(tc->text, tc->text_sel_start, tc->text_sel_end, css);
sp_repr_css_attr_unref(css);
- sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_TEXT,
+ sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_TEXT,
_("Make italic"));
sp_text_context_update_cursor(tc);
sp_text_context_update_text_selection(tc);
@@ -916,32 +916,33 @@ sp_text_context_root_handler(SPEventContext *const event_context, GdkEvent *cons
sp_text_context_setup_text(tc);
tc->nascent_object = 0; // we don't need it anymore, having created a real <text>
}
-
+
iterator_pair enter_pair;
bool success = sp_te_delete(tc->text, tc->text_sel_start, tc->text_sel_end, enter_pair);
+ (void)success; // TODO cleanup
tc->text_sel_start = tc->text_sel_end = enter_pair.first;
-
+
tc->text_sel_start = tc->text_sel_end = sp_te_insert_line(tc->text, tc->text_sel_start);
-
+
sp_text_context_update_cursor(tc);
sp_text_context_update_text_selection(tc);
- sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_TEXT,
+ sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_TEXT,
_("New line"));
return TRUE;
}
case GDK_BackSpace:
if (tc->text) { // if nascent_object, do nothing, but return TRUE; same for all other delete and move keys
-
+
bool noSelection = false;
-
+
if (tc->text_sel_start == tc->text_sel_end) {
tc->text_sel_start.prevCursorPosition();
noSelection = true;
}
-
+
iterator_pair bspace_pair;
bool success = sp_te_delete(tc->text, tc->text_sel_start, tc->text_sel_end, bspace_pair);
-
+
if (noSelection) {
if (success) {
tc->text_sel_start = tc->text_sel_end = bspace_pair.first;
@@ -956,10 +957,10 @@ sp_text_context_root_handler(SPEventContext *const event_context, GdkEvent *cons
tc->text_sel_end = bspace_pair.second;
}
}
-
+
sp_text_context_update_cursor(tc);
sp_text_context_update_text_selection(tc);
- sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_TEXT,
+ sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_TEXT,
_("Backspace"));
}
return TRUE;
@@ -967,15 +968,15 @@ sp_text_context_root_handler(SPEventContext *const event_context, GdkEvent *cons
case GDK_KP_Delete:
if (tc->text) {
bool noSelection = false;
-
+
if (tc->text_sel_start == tc->text_sel_end) {
tc->text_sel_end.nextCursorPosition();
noSelection = true;
}
-
+
iterator_pair del_pair;
bool success = sp_te_delete(tc->text, tc->text_sel_start, tc->text_sel_end, del_pair);
-
+
if (noSelection) {
tc->text_sel_start = tc->text_sel_end = del_pair.first;
} else {
@@ -986,11 +987,11 @@ sp_text_context_root_handler(SPEventContext *const event_context, GdkEvent *cons
tc->text_sel_end = del_pair.second;
}
}
-
-
+
+
sp_text_context_update_cursor(tc);
sp_text_context_update_text_selection(tc);
- sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_TEXT,
+ sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_TEXT,
_("Delete"));
}
return TRUE;
@@ -1007,7 +1008,7 @@ sp_text_context_root_handler(SPEventContext *const event_context, GdkEvent *cons
sp_te_adjust_kerning_screen(tc->text, tc->text_sel_start, tc->text_sel_end, desktop, NR::Point(mul*-1, 0));
sp_text_context_update_cursor(tc);
sp_text_context_update_text_selection(tc);
- sp_document_maybe_done(sp_desktop_document(desktop), "kern:left", SP_VERB_CONTEXT_TEXT,
+ sp_document_maybe_done(sp_desktop_document(desktop), "kern:left", SP_VERB_CONTEXT_TEXT,
_("Kern to the left"));
} else {
cursor_movement_operator = MOD__CTRL ? &Inkscape::Text::Layout::iterator::cursorLeftWithControl
@@ -1029,7 +1030,7 @@ sp_text_context_root_handler(SPEventContext *const event_context, GdkEvent *cons
sp_te_adjust_kerning_screen(tc->text, tc->text_sel_start, tc->text_sel_end, desktop, NR::Point(mul*1, 0));
sp_text_context_update_cursor(tc);
sp_text_context_update_text_selection(tc);
- sp_document_maybe_done(sp_desktop_document(desktop), "kern:right", SP_VERB_CONTEXT_TEXT,
+ sp_document_maybe_done(sp_desktop_document(desktop), "kern:right", SP_VERB_CONTEXT_TEXT,
_("Kern to the right"));
} else {
cursor_movement_operator = MOD__CTRL ? &Inkscape::Text::Layout::iterator::cursorRightWithControl
@@ -1051,7 +1052,7 @@ sp_text_context_root_handler(SPEventContext *const event_context, GdkEvent *cons
sp_te_adjust_kerning_screen(tc->text, tc->text_sel_start, tc->text_sel_end, desktop, NR::Point(0, mul*-1));
sp_text_context_update_cursor(tc);
sp_text_context_update_text_selection(tc);
- sp_document_maybe_done(sp_desktop_document(desktop), "kern:up", SP_VERB_CONTEXT_TEXT,
+ sp_document_maybe_done(sp_desktop_document(desktop), "kern:up", SP_VERB_CONTEXT_TEXT,
_("Kern up"));
} else {
@@ -1074,7 +1075,7 @@ sp_text_context_root_handler(SPEventContext *const event_context, GdkEvent *cons
sp_te_adjust_kerning_screen(tc->text, tc->text_sel_start, tc->text_sel_end, desktop, NR::Point(0, mul*1));
sp_text_context_update_cursor(tc);
sp_text_context_update_text_selection(tc);
- sp_document_maybe_done(sp_desktop_document(desktop), "kern:down", SP_VERB_CONTEXT_TEXT,
+ sp_document_maybe_done(sp_desktop_document(desktop), "kern:down", SP_VERB_CONTEXT_TEXT,
_("Kern down"));
} else {
@@ -1130,7 +1131,7 @@ sp_text_context_root_handler(SPEventContext *const event_context, GdkEvent *cons
} else {
sp_te_adjust_rotation(tc->text, tc->text_sel_start, tc->text_sel_end, desktop, -90);
}
- sp_document_maybe_done(sp_desktop_document(desktop), "textrot:ccw", SP_VERB_CONTEXT_TEXT,
+ sp_document_maybe_done(sp_desktop_document(desktop), "textrot:ccw", SP_VERB_CONTEXT_TEXT,
_("Rotate counterclockwise"));
sp_text_context_update_cursor(tc);
sp_text_context_update_text_selection(tc);
@@ -1151,7 +1152,7 @@ sp_text_context_root_handler(SPEventContext *const event_context, GdkEvent *cons
} else {
sp_te_adjust_rotation(tc->text, tc->text_sel_start, tc->text_sel_end, desktop, 90);
}
- sp_document_maybe_done(sp_desktop_document(desktop), "textrot:cw", SP_VERB_CONTEXT_TEXT,
+ sp_document_maybe_done(sp_desktop_document(desktop), "textrot:cw", SP_VERB_CONTEXT_TEXT,
_("Rotate clockwise"));
sp_text_context_update_cursor(tc);
sp_text_context_update_text_selection(tc);
@@ -1168,7 +1169,7 @@ sp_text_context_root_handler(SPEventContext *const event_context, GdkEvent *cons
sp_te_adjust_linespacing_screen(tc->text, tc->text_sel_start, tc->text_sel_end, desktop, -10);
else
sp_te_adjust_linespacing_screen(tc->text, tc->text_sel_start, tc->text_sel_end, desktop, -1);
- sp_document_maybe_done(sp_desktop_document(desktop), "linespacing:dec", SP_VERB_CONTEXT_TEXT,
+ sp_document_maybe_done(sp_desktop_document(desktop), "linespacing:dec", SP_VERB_CONTEXT_TEXT,
_("Contract line spacing"));
} else {
@@ -1176,7 +1177,7 @@ sp_text_context_root_handler(SPEventContext *const event_context, GdkEvent *cons
sp_te_adjust_tspan_letterspacing_screen(tc->text, tc->text_sel_start, tc->text_sel_end, desktop, -10);
else
sp_te_adjust_tspan_letterspacing_screen(tc->text, tc->text_sel_start, tc->text_sel_end, desktop, -1);
- sp_document_maybe_done(sp_desktop_document(desktop), "letterspacing:dec", SP_VERB_CONTEXT_TEXT,
+ sp_document_maybe_done(sp_desktop_document(desktop), "letterspacing:dec", SP_VERB_CONTEXT_TEXT,
_("Contract letter spacing"));
}
@@ -1195,7 +1196,7 @@ sp_text_context_root_handler(SPEventContext *const event_context, GdkEvent *cons
sp_te_adjust_linespacing_screen(tc->text, tc->text_sel_start, tc->text_sel_end, desktop, 10);
else
sp_te_adjust_linespacing_screen(tc->text, tc->text_sel_start, tc->text_sel_end, desktop, 1);
- sp_document_maybe_done(sp_desktop_document(desktop), "linespacing:inc", SP_VERB_CONTEXT_TEXT,
+ sp_document_maybe_done(sp_desktop_document(desktop), "linespacing:inc", SP_VERB_CONTEXT_TEXT,
_("Expand line spacing"));
} else {
@@ -1203,7 +1204,7 @@ sp_text_context_root_handler(SPEventContext *const event_context, GdkEvent *cons
sp_te_adjust_tspan_letterspacing_screen(tc->text, tc->text_sel_start, tc->text_sel_end, desktop, 10);
else
sp_te_adjust_tspan_letterspacing_screen(tc->text, tc->text_sel_start, tc->text_sel_end, desktop, 1);
- sp_document_maybe_done(sp_desktop_document(desktop), "letterspacing:inc", SP_VERB_CONTEXT_TEXT,
+ sp_document_maybe_done(sp_desktop_document(desktop), "letterspacing:inc", SP_VERB_CONTEXT_TEXT,
_("Expand letter spacing"));
}
tc->text_sel_start = tc->text_sel_end = sp_te_insert_line(tc->text, tc->text_sel_start);
begin = end + 1;
}
- sp_document_done(sp_desktop_document(ec->desktop), SP_VERB_CONTEXT_TEXT,
+ sp_document_done(sp_desktop_document(ec->desktop), SP_VERB_CONTEXT_TEXT,
_("Paste text"));
return true;
if (tc->text_sel_start == tc->text_sel_end)
return false;
-
+
iterator_pair pair;
bool success = sp_te_delete(tc->text, tc->text_sel_start, tc->text_sel_end, pair);
-
-
+
+
if (success) {
tc->text_sel_start = tc->text_sel_end = pair.first;
} else { // nothing deleted
tc->text_sel_start = pair.first;
tc->text_sel_end = pair.second;
}
-
+
sp_text_context_update_cursor(tc);
sp_text_context_update_text_selection(tc);
-
+
return true;
}
return false; // will get picked up by the parent and applied to the whole text object
sp_te_apply_style(tc->text, tc->text_sel_start, tc->text_sel_end, css);
- sp_document_done(sp_desktop_document(tc->desktop), SP_VERB_CONTEXT_TEXT,
+ sp_document_done(sp_desktop_document(tc->desktop), SP_VERB_CONTEXT_TEXT,
_("Set text style"));
sp_text_context_update_cursor(tc);
sp_text_context_update_text_selection(tc);
{
if (! tc->text) return;
SPItem *ti = tc->text;
+ (void)ti;
/* We have to set it to zero,
* or selection changed signal messes everything up */
tc->text = NULL;
// the XML editor
if ( text_repr && sp_repr_parent(text_repr) ) {
sp_repr_unparent(text_repr);
- sp_document_done(sp_desktop_document(tc->desktop), SP_VERB_CONTEXT_TEXT,
+ sp_document_done(sp_desktop_document(tc->desktop), SP_VERB_CONTEXT_TEXT,
_("Remove empty text"));
}
}
sp_text_context_update_cursor(tc);
sp_text_context_update_text_selection(tc);
- sp_document_done(SP_OBJECT_DOCUMENT(tc->text), SP_VERB_CONTEXT_TEXT,
+ sp_document_done(SP_OBJECT_DOCUMENT(tc->text), SP_VERB_CONTEXT_TEXT,
_("Type text"));
}
index 278198b12d8edaad907302df4a66456e9dae4872..6f72a962140accd9ae0ee5c22845df39c6ac6772 100644 (file)
--- a/src/vanishing-point.cpp
+++ b/src/vanishing-point.cpp
}
static void
-vp_drag_sel_modified (Inkscape::Selection */*selection*/, guint flags, gpointer data)
+vp_drag_sel_modified (Inkscape::Selection */*selection*/, guint /*flags*/, gpointer data)
{
VPDrag *drag = (VPDrag *) data;
/***