gtk2/gtk/gtkfilechoosererrorstackprivate.h
Timm Bäder 3505e0d6e7 filechooserwidget: Add GtkFileChooserErrorStack
Showing all the different errors and warnings when renaming and creating
files/folders without potentially resizing popovers on every keystroke
requires us to know the size of the error messages beforehand, so pack
all of the possible error messages and warnings in labels and those into
a stack. This way we can also neatly crossfade transition between them.

https://bugzilla.gnome.org/show_bug.cgi?id=775636
2017-07-18 15:11:26 -04:00

59 lines
2.6 KiB
C

/* 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, see <http://www.gnu.org/licenses/>.
*/
#ifndef __GTK_FILE_CHOOSER_ERROR_STACK_H__
#define __GTK_FILE_CHOOSER_ERROR_STACK_H__
#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
#error "Only <gtk/gtk.h> can be included directly."
#endif
#include "gtkstack.h"
G_BEGIN_DECLS
#define GTK_TYPE_FILE_CHOOSER_ERROR_STACK (gtk_file_chooser_error_stack_get_type ())
#define GTK_FILE_CHOOSER_ERROR_STACK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_FILE_CHOOSER_ERROR_STACK, GtkFileChooserErrorStack))
#define GTK_FILE_CHOOSER_ERROR_STACK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_FILE_CHOOSER_ERROR_STACK, GtkFileChooserErrorStackClass))
#define GTK_IS_FILE_CHOOSER_ERROR_STACK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_FILE_CHOOSER_ERROR_STACK))
#define GTK_IS_FILE_CHOOSER_ERROR_STACK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_FILE_CHOOSER_ERROR_STACK))
#define GTK_FILE_CHOOSER_ERROR_STACK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_FILE_CHOOSER_ERROR_STACK, GtkFileChooserErrorStackClass))
typedef struct _GtkFileChooserErrorStack GtkFileChooserErrorStack;
typedef struct _GtkFileChooserErrorStackClass GtkFileChooserErrorStackClass;
struct _GtkFileChooserErrorStack
{
GtkStack parent_instance;
};
struct _GtkFileChooserErrorStackClass
{
GtkStackClass parent_class;
};
GType gtk_file_chooser_error_stack_get_type (void) G_GNUC_CONST;
void gtk_file_chooser_error_stack_set_error (GtkFileChooserErrorStack *self,
gboolean is_folder,
const char *label_name);
void gtk_file_chooser_error_stack_set_custom_error (GtkFileChooserErrorStack *self,
const char *label_text);
G_END_DECLS
#endif