Mercurial > pidgin
comparison src/gtkrequest.c @ 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 | f3ae450fb947 |
children | 3de53fe8345f |
comparison
equal
deleted
inserted
replaced
13268:16f6d6f8afc7 | 13269:3638606a5afa |
---|---|
1949 gtk_widget_show(filesel); | 1949 gtk_widget_show(filesel); |
1950 | 1950 |
1951 return (void *)data; | 1951 return (void *)data; |
1952 } | 1952 } |
1953 | 1953 |
1954 static void * | |
1955 gaim_gtk_request_folder(const char *title, const char *dirname, | |
1956 GCallback ok_cb, GCallback cancel_cb, | |
1957 void *user_data) | |
1958 { | |
1959 GaimGtkRequestData *data; | |
1960 GtkWidget *dirsel; | |
1961 | |
1962 data = g_new0(GaimGtkRequestData, 1); | |
1963 data->type = GAIM_REQUEST_FOLDER; | |
1964 data->user_data = user_data; | |
1965 data->cb_count = 2; | |
1966 data->cbs = g_new0(GCallback, 2); | |
1967 data->cbs[0] = cancel_cb; | |
1968 data->cbs[1] = ok_cb; | |
1969 data->u.file.savedialog = FALSE; | |
1970 | |
1971 dirsel = gtk_file_chooser_dialog_new( | |
1972 title ? title : _("Select Folder..."), | |
1973 NULL, | |
1974 GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, | |
1975 GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, | |
1976 GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, | |
1977 NULL); | |
1978 gtk_dialog_set_default_response(GTK_DIALOG(dirsel), GTK_RESPONSE_ACCEPT); | |
1979 | |
1980 if ((dirname != NULL) && (*dirname != '\0')) | |
1981 gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(dirsel), dirname); | |
1982 | |
1983 g_signal_connect(G_OBJECT(GTK_FILE_CHOOSER(dirsel)), "response", | |
1984 G_CALLBACK(file_ok_check_if_exists_cb), data); | |
1985 | |
1986 data->dialog = dirsel; | |
1987 gtk_widget_show(dirsel); | |
1988 | |
1989 return (void *)data; | |
1990 } | |
1991 | |
1992 static void | 1954 static void |
1993 gaim_gtk_close_request(GaimRequestType type, void *ui_handle) | 1955 gaim_gtk_close_request(GaimRequestType type, void *ui_handle) |
1994 { | 1956 { |
1995 GaimGtkRequestData *data = (GaimGtkRequestData *)ui_handle; | 1957 GaimGtkRequestData *data = (GaimGtkRequestData *)ui_handle; |
1996 | 1958 |
2012 gaim_gtk_request_input, | 1974 gaim_gtk_request_input, |
2013 gaim_gtk_request_choice, | 1975 gaim_gtk_request_choice, |
2014 gaim_gtk_request_action, | 1976 gaim_gtk_request_action, |
2015 gaim_gtk_request_fields, | 1977 gaim_gtk_request_fields, |
2016 gaim_gtk_request_file, | 1978 gaim_gtk_request_file, |
2017 gaim_gtk_close_request, | 1979 gaim_gtk_close_request |
2018 gaim_gtk_request_folder | |
2019 }; | 1980 }; |
2020 | 1981 |
2021 GaimRequestUiOps * | 1982 GaimRequestUiOps * |
2022 gaim_gtk_request_get_ui_ops(void) | 1983 gaim_gtk_request_get_ui_ops(void) |
2023 { | 1984 { |