* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include <gmodule.h>
#include "gtkprinteroptionset.h"
-#include "gtkalias.h"
/*****************************************
* GtkPrinterOptionSet *
NULL);
}
-static int
-safe_strcmp (const char *a, const char *b)
-{
- if (a == NULL)
- a = "";
- if (b == NULL)
- b = "";
-
- return strcmp (a, b);
-}
-
+/**
+ * gtk_printer_option_set_get_groups:
+ *
+ * Return value: (element-type utf8) (transfer full):
+ */
GList *
gtk_printer_option_set_get_groups (GtkPrinterOptionSet *set)
{
{
option = g_ptr_array_index (set->array, i);
- if (g_list_find_custom (list, option->group, (GCompareFunc)safe_strcmp) == NULL)
+ if (g_list_find_custom (list, option->group, (GCompareFunc)g_strcmp0) == NULL)
list = g_list_prepend (list, g_strdup (option->group));
}
{
option = g_ptr_array_index (set->array, i);
- if (group == NULL ||
- (option->group != NULL && strcmp (group, option->group) == 0))
+ if (group == NULL || g_strcmp0 (group, option->group) == 0)
func (option, user_data);
}
}
{
gtk_printer_option_set_foreach_in_group (set, NULL, func, user_data);
}
-
-
-#define __GTK_PRINTER_OPTION_SET_C__
-#include "gtkaliasdef.c"