~ubuntu-branches/ubuntu/raring/nautilus/raring

1.1.52 by Sebastien Bacher
Import upstream version 2.25.2
1
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
2
3
/* eel-stock-dialogs.h: Various standard dialogs for Eel.
4
5
   Copyright (C) 2000 Eazel, Inc.
6
7
   The Gnome Library is free software; you can redistribute it and/or
8
   modify it under the terms of the GNU Library General Public License as
9
   published by the Free Software Foundation; either version 2 of the
10
   License, or (at your option) any later version.
11
12
   The Gnome Library is distributed in the hope that it will be useful,
13
   but WITHOUT ANY WARRANTY; without even the implied warranty of
14
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15
   Library General Public License for more details.
16
17
   You should have received a copy of the GNU Library General Public
18
   License along with the Gnome Library; see the file COPYING.LIB.  If not,
19
   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20
   Boston, MA 02111-1307, USA.
21
22
   Authors: Darin Adler <darin@eazel.com>
23
*/
24
25
#ifndef EEL_STOCK_DIALOGS_H
26
#define EEL_STOCK_DIALOGS_H
27
28
#include <gtk/gtk.h>
29
30
typedef void (* EelCancelCallback) (gpointer callback_data);
31
32
/* Dialog for cancelling something that normally is fast enough not to need a dialog. */
33
void       eel_timed_wait_start               (EelCancelCallback  cancel_callback,
34
					       gpointer           callback_data,
35
					       const char        *wait_message,
36
					       GtkWindow         *parent_window);
37
void       eel_timed_wait_start_with_duration (int                duration,
38
					       EelCancelCallback  cancel_callback,
39
					       gpointer           callback_data,
40
					       const char        *wait_message,
41
					       GtkWindow         *parent_window);
42
void       eel_timed_wait_stop                (EelCancelCallback  cancel_callback,
43
					       gpointer           callback_data);
44
45
/* Basic dialog with buttons. */
46
int        eel_run_simple_dialog              (GtkWidget         *parent,
47
					       gboolean           ignore_close_box,
48
					       GtkMessageType     message_type,
49
					       const char        *primary_text,
50
					       const char        *secondary_text,
51
					       ...);
52
53
/* Variations on gnome stock dialogs; these do line wrapping, we don't
54
 * bother with non-parented versions, we allow setting the title,
55
 * primary, and secondary messages, and we return GtkDialog pointers 
56
 * instead of GtkWidget pointers.
57
 */
58
GtkDialog *eel_show_info_dialog               (const char        *primary_text,
59
					       const char        *secondary_text,
60
					       GtkWindow         *parent);
61
GtkDialog *eel_show_info_dialog_with_details  (const char        *primary_text,
62
					       const char        *secondary_text,
63
					       const char        *detailed_informative_message,
64
					       GtkWindow         *parent);
65
GtkDialog *eel_show_warning_dialog            (const char        *primary_text,
66
					       const char        *secondary_text,
67
					       GtkWindow         *parent);
68
GtkDialog *eel_show_error_dialog              (const char        *primary_text,
69
					       const char        *secondary_text,
70
					       GtkWindow         *parent);
71
GtkDialog *eel_show_error_dialog_with_details (const char        *primary_text,
72
					       const char        *secondary_text,
73
					       const char        *detailed_error_message,
74
					       GtkWindow         *parent);
75
GtkDialog *eel_show_yes_no_dialog             (const char        *primary_text,
76
					       const char        *secondary_text,
77
					       const char        *yes_label,
78
					       const char        *no_label,
79
					       GtkWindow         *parent);
80
GtkDialog *eel_create_question_dialog         (const char        *primary_text,
81
					       const char        *secondary_text,
82
					       const char        *answer_one,
83
					       int                response_one,
84
					       const char        *answer_two,
85
					       int                response_two,
86
					       GtkWindow         *parent);
87
GtkDialog *eel_create_info_dialog             (const char        *primary_text,
88
					       const char        *secondary_text,
89
					       GtkWindow         *parent);
90
91
#endif /* EEL_STOCK_DIALOGS_H */