25 #include "pips_config.h"
32 #include <sys/resource.h>
47 void start_query(
char * window_title,
char * query_title,
char * help_topic,
48 success(* ok_func)(
const char * ),
void(* cancel_func)( GtkWidget*, gpointer)) {
50 gtk_window_set_title(GTK_WINDOW(
query_dialog), window_title);
54 if (cancel_func == NULL)
59 GTK_SIGNAL_FUNC(cancel_func), NULL);
103 const char * s = gtk_entry_get_text(GTK_ENTRY(
query_entry));
143 va_copy(acpy, *args);
144 vsprintf(message_buffer, a_printf_format, acpy);
147 start_query(
"User Query", message_buffer,
"UserQuery",
158 user_log(
"%s\n\"%s\"\nEnd User Request\n", message_buffer,
"" );
166 GtkWidget *content_area;
177 GtkWidget * hbox = gtk_hbox_new(FALSE,0);
181 gtk_box_pack_start(GTK_BOX(hbox),
query_entry, FALSE, FALSE, 5);
182 gtk_container_add(GTK_CONTAINER(content_area), hbox);
183 gtk_widget_show_all(hbox);
185 ok_button = gtk_button_new_with_label(
"OK");
187 gtk_signal_connect(GTK_OBJECT(
ok_button),
"clicked", GTK_SIGNAL_FUNC(
194 gtk_signal_connect(GTK_OBJECT(
help_button),
"clicked", GTK_SIGNAL_FUNC(
void user_log(const char *format,...)
#define SMALL_BUFFER_LENGTH
void display_help(char *topic)
static GtkWidget * ok_button
static GtkWidget * help_button
static char * query_help_topic
void create_query_window()
static GtkWidget * query_entry
void cancel_user_request_notify(GtkWidget *widget, gpointer data)
Cancel clear the string value and return:
void help_query_notify(GtkWidget *widget, gpointer data)
void end_query_notify(GtkWidget *widget, gpointer data)
void start_query(char *window_title, char *query_title, char *help_topic, success(*ok_func)(const char *), void(*cancel_func)(GtkWidget *, gpointer))
static GtkWidget * query_cancel_button
static success(* apply_on_query)(const char *)
success end_user_request_notify(const char *the_answer)
void cancel_query_notify(GtkWidget *widget, gpointer data)
hides a window...
string gpips_user_request(const char *a_printf_format, va_list *args)
static GtkWidget * query_entry_label
gint hide_window(GtkWidget *window, GdkEvent *ev __attribute__((unused)), gpointer data __attribute__((unused)))
GtkWidget * gpips_gtk_dialog_get_content_area(GtkDialog *dialog)