diff options
| author | Jon A. Cruz <jon@joncruz.org> | 2011-10-02 08:26:17 +0000 |
|---|---|---|
| committer | Jon A. Cruz <jon@joncruz.org> | 2011-10-02 08:26:17 +0000 |
| commit | 122894f12a4f8214207f533ed26569fbab5ac9f7 (patch) | |
| tree | 1b989255a12c84a5a69e47b11eb426f6620a5234 /src/helper | |
| parent | Dutch translation update (diff) | |
| download | inkscape-122894f12a4f8214207f533ed26569fbab5ac9f7.tar.gz inkscape-122894f12a4f8214207f533ed26569fbab5ac9f7.zip | |
Warning cleanup.
(bzr r10655)
Diffstat (limited to 'src/helper')
| -rw-r--r-- | src/helper/action.cpp | 2 | ||||
| -rw-r--r-- | src/helper/pixbuf-ops.cpp | 40 |
2 files changed, 18 insertions, 24 deletions
diff --git a/src/helper/action.cpp b/src/helper/action.cpp index 3eb881300..532078a3d 100644 --- a/src/helper/action.cpp +++ b/src/helper/action.cpp @@ -157,7 +157,7 @@ public: \param data ignored */ void -sp_action_perform (SPAction *action, void * data) +sp_action_perform (SPAction *action, void * /*data*/) { g_return_if_fail (action != NULL); g_return_if_fail (SP_IS_ACTION (action)); diff --git a/src/helper/pixbuf-ops.cpp b/src/helper/pixbuf-ops.cpp index 3f987dc01..9f80cc58b 100644 --- a/src/helper/pixbuf-ops.cpp +++ b/src/helper/pixbuf-ops.cpp @@ -64,28 +64,23 @@ static void hide_other_items_recursively(SPObject *o, GSList *list, unsigned dke // The dpi settings dont do anything yet, but I want them to, and was wanting to keep reasonably close // to the call for the interface to the png writing. -bool -sp_export_jpg_file(SPDocument *doc, gchar const *filename, - double x0, double y0, double x1, double y1, - unsigned width, unsigned height, double xdpi, double ydpi, - unsigned long bgcolor, double quality,GSList *items) - +bool sp_export_jpg_file(SPDocument *doc, gchar const *filename, + double x0, double y0, double x1, double y1, + unsigned width, unsigned height, double xdpi, double ydpi, + unsigned long bgcolor, double quality,GSList *items) { - - - GdkPixbuf* pixbuf; - pixbuf = sp_generate_internal_bitmap(doc, filename, x0, y0, x1, y1, + GdkPixbuf* pixbuf = 0; + pixbuf = sp_generate_internal_bitmap(doc, filename, x0, y0, x1, y1, width, height, xdpi, ydpi, bgcolor, items ); + gchar c[32]; + g_snprintf(c, 32, "%f", quality); + gboolean saved = gdk_pixbuf_save (pixbuf, filename, "jpeg", NULL, "quality", c, NULL); + g_free(c); + gdk_pixbuf_unref (pixbuf); - gchar c[32]; - g_snprintf(c, 32, "%f", quality); - gboolean saved = gdk_pixbuf_save (pixbuf, filename, "jpeg", NULL, "quality", c, NULL); - g_free(c); - gdk_pixbuf_unref (pixbuf); - if (saved) return true; - else return false; + return saved; } /** @@ -101,12 +96,11 @@ sp_export_jpg_file(SPDocument *doc, gchar const *filename, @param ydpi @return the created GdkPixbuf structure or NULL if no memory is allocable */ -GdkPixbuf* -sp_generate_internal_bitmap(SPDocument *doc, gchar const */*filename*/, - double x0, double y0, double x1, double y1, - unsigned width, unsigned height, double xdpi, double ydpi, - unsigned long bgcolor, - GSList *items_only) +GdkPixbuf *sp_generate_internal_bitmap(SPDocument *doc, gchar const */*filename*/, + double x0, double y0, double x1, double y1, + unsigned width, unsigned height, double xdpi, double ydpi, + unsigned long /*bgcolor*/, + GSList *items_only) { if (width == 0 || height == 0) return NULL; |
