From bb591631fe41ab7f27a8470773c474e52f60ca32 Mon Sep 17 00:00:00 2001 From: Martin Nordholts Date: Sun, 30 Nov 2008 21:25:02 +0000 Subject: [PATCH] New files defining GIMP_WIDGETS_ERROR domain with currently only a * libgimpwidgets/gimpwidgets-error.[ch]: New files defining GIMP_WIDGETS_ERROR domain with currently only a GIMP_WIDGETS_PARSE_ERROR error code. * libgimpwidgets/Makefile.am: Add the new files here. svn path=/trunk/; revision=27741 --- ChangeLog | 8 ++++++ libgimpwidgets/Makefile.am | 3 +++ libgimpwidgets/gimpwidgets-error.c | 41 +++++++++++++++++++++++++++++ libgimpwidgets/gimpwidgets-error.h | 42 ++++++++++++++++++++++++++++++ 4 files changed, 94 insertions(+) create mode 100644 libgimpwidgets/gimpwidgets-error.c create mode 100644 libgimpwidgets/gimpwidgets-error.h diff --git a/ChangeLog b/ChangeLog index e8197e7e1c..23fcf34ade 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-11-30 Martin Nordholts + + * libgimpwidgets/gimpwidgets-error.[ch]: New files defining + GIMP_WIDGETS_ERROR domain with currently only a + GIMP_WIDGETS_PARSE_ERROR error code. + + * libgimpwidgets/Makefile.am: Add the new files here. + 2008-11-27 Sven Neumann Bug 562459 – PF_PALETTE: 'TypeError' when used in a plugin that is diff --git a/libgimpwidgets/Makefile.am b/libgimpwidgets/Makefile.am index a61885872f..a1b03eb8b8 100644 --- a/libgimpwidgets/Makefile.am +++ b/libgimpwidgets/Makefile.am @@ -160,6 +160,8 @@ libgimpwidgets_2_0_la_sources = \ gimpstringcombobox.h \ gimpunitmenu.c \ gimpunitmenu.h \ + gimpwidgets-error.c \ + gimpwidgets-error.h \ gimpwidgets-private.c \ gimpwidgets-private.h \ gimpwidgets.c \ @@ -232,6 +234,7 @@ libgimpwidgetsinclude_HEADERS = \ gimpstock.h \ gimpstringcombobox.h \ gimpunitmenu.h \ + gimpwidgets-error.h \ gimpwidgets.h \ gimpwidgetsenums.h \ gimpwidgetstypes.h \ diff --git a/libgimpwidgets/gimpwidgets-error.c b/libgimpwidgets/gimpwidgets-error.c new file mode 100644 index 0000000000..76a259294f --- /dev/null +++ b/libgimpwidgets/gimpwidgets-error.c @@ -0,0 +1,41 @@ +/* LIBGIMP - The GIMP Library + * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball + * + * gimpwidgets-error.c + * Copyright (C) 2008 Martin Nordholts + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#include "config.h" + +#include + +#include "gimpwidgets-error.h" + + +/** + * gimp_widgets_error_quark: + * + * This function is never called directly. Use GIMP_WIDGETS_ERROR() instead. + * + * Return value: the #GQuark that defines the GIMP widgets error domain. + **/ +GQuark +gimp_widgets_error_quark (void) +{ + return g_quark_from_static_string ("gimp-widgets-error-quark"); +} diff --git a/libgimpwidgets/gimpwidgets-error.h b/libgimpwidgets/gimpwidgets-error.h new file mode 100644 index 0000000000..6cef6d0396 --- /dev/null +++ b/libgimpwidgets/gimpwidgets-error.h @@ -0,0 +1,42 @@ +/* LIBGIMP - The GIMP Library + * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball + * + * gimpwidgets-error.h + * Copyright (C) 2008 Martin Nordholts + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __GIMP_WIDGETS_ERROR_H__ +#define __GIMP_WIDGETS_ERROR_H__ + +G_BEGIN_DECLS + + +typedef enum +{ + GIMP_WIDGETS_PARSE_ERROR, +} GimpWidgetsError; + + +#define GIMP_WIDGETS_ERROR (gimp_widgets_error_quark ()) + +GQuark gimp_widgets_error_quark (void) G_GNUC_CONST; + + +G_END_DECLS + +#endif /* __GIMP_WIDGETS_ERROR_H__ */