changeset 13269:3638606a5afa

[gaim-migrate @ 15635] Reverting the request folder stuff, because it uses GtkFileChooser, which was added in GTK+ 2.4. committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Mon, 13 Feb 2006 04:11:39 +0000
parents 16f6d6f8afc7
children 8754a0fe2297
files plugins/ChangeLog.API src/gtkrequest.c src/request.c src/request.h
diffstat 4 files changed, 2 insertions(+), 90 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/ChangeLog.API	Mon Feb 13 03:49:57 2006 +0000
+++ b/plugins/ChangeLog.API	Mon Feb 13 04:11:39 2006 +0000
@@ -272,9 +272,6 @@
 	* gaim_date_format_full()
 	* gaim_time_format()
 	* gaim_plugin_action_free()
-	* GaimRequestType: Added GAIM_REQUEST_FOLDER
-	* GaimRequestUiOps: Added request_folder
-	* gaim_request_folder()
 
 	Signals - Changed:  (See the Doxygen docs for details on all signals.)
 	* Signal propagation now stops after a handler returns a non-NULL value.
--- a/src/gtkrequest.c	Mon Feb 13 03:49:57 2006 +0000
+++ b/src/gtkrequest.c	Mon Feb 13 04:11:39 2006 +0000
@@ -1951,44 +1951,6 @@
 	return (void *)data;
 }
 
-static void *
-gaim_gtk_request_folder(const char *title, const char *dirname,
-					  GCallback ok_cb, GCallback cancel_cb,
-					  void *user_data)
-{
-	GaimGtkRequestData *data;
-	GtkWidget *dirsel;
-	
-	data = g_new0(GaimGtkRequestData, 1);
-	data->type = GAIM_REQUEST_FOLDER;
-	data->user_data = user_data;
-	data->cb_count = 2;
-	data->cbs = g_new0(GCallback, 2);
-	data->cbs[0] = cancel_cb;
-	data->cbs[1] = ok_cb;
-	data->u.file.savedialog = FALSE;
-	
-	dirsel = gtk_file_chooser_dialog_new(
-						title ? title : _("Select Folder..."),
-						NULL,
-						GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER,
-						GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
-						GTK_STOCK_OK, GTK_RESPONSE_ACCEPT,
-						NULL);
-	gtk_dialog_set_default_response(GTK_DIALOG(dirsel), GTK_RESPONSE_ACCEPT);
-
-	if ((dirname != NULL) && (*dirname != '\0'))
-		gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(dirsel), dirname);
-
-	g_signal_connect(G_OBJECT(GTK_FILE_CHOOSER(dirsel)), "response",
-						G_CALLBACK(file_ok_check_if_exists_cb), data);
-
-	data->dialog = dirsel;
-	gtk_widget_show(dirsel);
-
-	return (void *)data;
-}
-
 static void
 gaim_gtk_close_request(GaimRequestType type, void *ui_handle)
 {
@@ -2014,8 +1976,7 @@
 	gaim_gtk_request_action,
 	gaim_gtk_request_fields,
 	gaim_gtk_request_file,
-	gaim_gtk_close_request,
-	gaim_gtk_request_folder
+	gaim_gtk_close_request
 };
 
 GaimRequestUiOps *
--- a/src/request.c	Mon Feb 13 03:49:57 2006 +0000
+++ b/src/request.c	Mon Feb 13 04:11:39 2006 +0000
@@ -1363,29 +1363,6 @@
 	return NULL;
 }
 
-void *
-gaim_request_folder(void *handle, const char *title, const char *dirname,
-				  GCallback ok_cb, GCallback cancel_cb, void *user_data)
-{
-	GaimRequestUiOps *ops;
-
-	ops = gaim_request_get_ui_ops();
-
-	if (ops != NULL && ops->request_file != NULL) {
-		GaimRequestInfo *info;
-
-		info            = g_new0(GaimRequestInfo, 1);
-		info->type      = GAIM_REQUEST_FOLDER;
-		info->handle    = handle;
-		info->ui_handle = ops->request_folder(title, dirname,
-											ok_cb, cancel_cb, user_data);
-		handles = g_list_append(handles, info);
-		return info->ui_handle;
-	}
-
-	return NULL;
-}
-
 static void
 gaim_request_close_info(GaimRequestInfo *info)
 {
--- a/src/request.h	Mon Feb 13 03:49:57 2006 +0000
+++ b/src/request.h	Mon Feb 13 04:11:39 2006 +0000
@@ -42,8 +42,7 @@
 	GAIM_REQUEST_CHOICE,     /**< Multiple-choice request.   */
 	GAIM_REQUEST_ACTION,     /**< Action request.            */
 	GAIM_REQUEST_FIELDS,     /**< Multiple fields request.   */
-	GAIM_REQUEST_FILE,       /**< File open or save request. */
-	GAIM_REQUEST_FOLDER      /**< Folder selection request.  */
+	GAIM_REQUEST_FILE        /**< File open or save request. */
 
 } GaimRequestType;
 
@@ -206,9 +205,6 @@
 						  gboolean savedialog, GCallback ok_cb,
 						  GCallback cancel_cb, void *user_data);
 	void (*close_request)(GaimRequestType type, void *ui_handle);
-	void *(*request_folder)(const char *title, const char *dirname,
-							GCallback ok_cb, GCallback cancel_cb,
-							void *user_data);
 } GaimRequestUiOps;
 
 typedef void (*GaimRequestInputCb)(void *, const char *);
@@ -1375,25 +1371,6 @@
 						GCallback ok_cb, GCallback cancel_cb,
 						void *user_data);
 
-/**
- * Displays a folder select dialog. Returns the selected filename to
- * the callback.
- *
- * @param handle      The plugin or connection handle.  For some
- *                    things this is EXTREMELY important.  See
- *                    the comments on gaim_request_input.
- * @param title       The title for the dialog (may be @c NULL)
- * @param dirname     The default directory name (may be @c NULL)
- * @param ok_cb       The callback for the @c OK button.
- * @param cancel_cb   The callback for the @c Cancel button.
- * @param user_data   The data to pass to the callback.
- *
- * @return A UI-specific handle.
- */
-void *gaim_request_folder(void *handle, const char *title, const char *dirname,
-						  GCallback ok_cb, GCallback cancel_cb,
-						  void *user_data);
-
 /*@}*/
 
 /**************************************************************************/