2010-10-30 16:14:30 -04:00
|
|
|
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
|
|
|
|
*
|
|
|
|
* Copyright 2009-2010 Red Hat, Inc,
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
2012-09-06 07:43:05 -04:00
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
2010-10-30 16:14:30 -04:00
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program 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 General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
2014-01-23 12:57:27 +01:00
|
|
|
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
2010-10-30 16:14:30 -04:00
|
|
|
*
|
|
|
|
* Written by: Matthias Clasen <mclasen@redhat.com>
|
|
|
|
*/
|
|
|
|
|
2018-05-31 10:44:37 +12:00
|
|
|
#pragma once
|
2010-10-30 16:14:30 -04:00
|
|
|
|
|
|
|
#include <gtk/gtk.h>
|
2019-02-04 15:46:16 +00:00
|
|
|
#include <act/act.h>
|
2010-10-30 16:14:30 -04:00
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2013-08-06 15:43:23 +02:00
|
|
|
void set_entry_generation_icon (GtkEntry *entry);
|
2013-07-23 13:22:49 +02:00
|
|
|
void set_entry_validation_checkmark (GtkEntry *entry);
|
2010-10-30 16:14:30 -04:00
|
|
|
void set_entry_validation_error (GtkEntry *entry,
|
|
|
|
const gchar *text);
|
|
|
|
void clear_entry_validation_error (GtkEntry *entry);
|
|
|
|
|
2018-11-10 09:59:14 +13:00
|
|
|
gsize get_username_max_length (void);
|
2018-11-13 13:33:15 +13:00
|
|
|
gboolean is_username_used (const gchar *username);
|
|
|
|
gboolean is_valid_name (const gchar *name);
|
2019-01-25 16:32:20 +01:00
|
|
|
void is_valid_username_async (const gchar *username,
|
|
|
|
GCancellable *cancellable,
|
|
|
|
GAsyncReadyCallback callback,
|
|
|
|
gpointer callback_data);
|
|
|
|
gboolean is_valid_username_finish (GAsyncResult *result,
|
|
|
|
gchar **tip,
|
|
|
|
gchar **username,
|
|
|
|
GError **error);
|
2019-05-03 08:55:52 +02:00
|
|
|
GdkPixbuf *round_image (GdkPixbuf *pixbuf);
|
2019-05-03 09:00:56 +02:00
|
|
|
GdkPixbuf *generate_default_avatar (ActUser *user,
|
|
|
|
gint size);
|
|
|
|
void set_default_avatar (ActUser *user);
|
2019-02-04 15:46:16 +00:00
|
|
|
void set_user_icon_data (ActUser *user,
|
|
|
|
GdkPixbuf *pixbuf);
|
|
|
|
|
2010-10-30 16:14:30 -04:00
|
|
|
G_END_DECLS
|