aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-request.c
diff options
context:
space:
mode:
authornobody <nobody@localhost>2003-12-09 09:57:09 +0800
committernobody <nobody@localhost>2003-12-09 09:57:09 +0800
commit5866e8a3b6e25cbb0a6166af0dfb0a756f4fd14d (patch)
tree75bb0caf9afd4b94842023406d6a7938c5d8b2b7 /e-util/e-request.c
parent0031a7166cd0f3fc0cec0b60c468ca22a8c45b0b (diff)
downloadgsoc2013-evolution-gnome-2-8-devel-merge-2.tar
gsoc2013-evolution-gnome-2-8-devel-merge-2.tar.gz
gsoc2013-evolution-gnome-2-8-devel-merge-2.tar.bz2
gsoc2013-evolution-gnome-2-8-devel-merge-2.tar.lz
gsoc2013-evolution-gnome-2-8-devel-merge-2.tar.xz
gsoc2013-evolution-gnome-2-8-devel-merge-2.tar.zst
gsoc2013-evolution-gnome-2-8-devel-merge-2.zip
This commit was manufactured by cvs2svn to create taggnome-2-8-devel-merge-2
'gnome-2-8-devel-merge-2'. svn path=/tags/gnome-2-8-devel-merge-2/; revision=23864
Diffstat (limited to 'e-util/e-request.c')
-rw-r--r--e-util/e-request.c102
1 files changed, 0 insertions, 102 deletions
diff --git a/e-util/e-request.c b/e-util/e-request.c
deleted file mode 100644
index 65c6a8e84b..0000000000
--- a/e-util/e-request.c
+++ /dev/null
@@ -1,102 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-request.c
- *
- * Copyright (C) 2000, 2001 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * 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 along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Author: Ettore Perazzoli
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "e-request.h"
-
-#include <gtk/gtkbox.h>
-#include <gtk/gtkdialog.h>
-#include <gtk/gtkentry.h>
-#include <gtk/gtklabel.h>
-#include <gtk/gtkstock.h>
-
-
-/**
- * e_request_string:
- * @parent: parent window, or %NULL
- * @title: the dialog title (in the locale character set)
- * @prompt: the prompt (in the locale character set)
- * @default: default value (in UTF8)
- *
- * Request a string from the user.
- *
- * Return value: %NULL if the user cancelled the dialog, the inserted
- * string (in UTF8) otherwise. The string must be freed by the caller.
- **/
-char *
-e_request_string (GtkWindow *parent,
- const char *title,
- const char *prompt,
- const char *default_string)
-{
- GtkWidget *prompt_label;
- char *text;
- GtkWidget *dialog;
- GtkWidget *entry;
- GtkWidget *vbox;
-
- g_return_val_if_fail (title != NULL, NULL);
- g_return_val_if_fail (prompt != NULL, NULL);
-
- dialog = gtk_dialog_new_with_buttons (title, parent,
- GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_MODAL,
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_OK, GTK_RESPONSE_OK,
- NULL);
- gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
- gtk_window_set_default_size (GTK_WINDOW (dialog), 275, -1);
- gtk_container_set_border_width (GTK_CONTAINER (dialog), 6);
-
- vbox = GTK_DIALOG (dialog)->vbox;
-
- prompt_label = gtk_label_new (prompt);
- gtk_box_pack_start (GTK_BOX (vbox), prompt_label, TRUE, TRUE, 6);
- gtk_box_set_spacing (GTK_BOX (vbox), 6);
-
- entry = gtk_entry_new ();
- gtk_entry_set_text (GTK_ENTRY (entry), default_string);
- gtk_editable_select_region (GTK_EDITABLE (entry), 0, -1);
- gtk_entry_set_activates_default (GTK_ENTRY (entry), TRUE);
- gtk_box_pack_start (GTK_BOX (vbox), entry, TRUE, TRUE, 3);
-
- gtk_widget_grab_focus (entry);
-
- gtk_widget_show (prompt_label);
- gtk_widget_show (entry);
- gtk_widget_show (dialog);
-
- switch (gtk_dialog_run (GTK_DIALOG (dialog))) {
- case GTK_RESPONSE_OK:
- text = g_strdup (gtk_entry_get_text (GTK_ENTRY (entry)));
- break;
- default:
- text = NULL;
- break;
- }
-
- gtk_widget_destroy (dialog);
-
- return text;
-}