summaryrefslogtreecommitdiff
path: root/editors/leafpad/files/extra-new-selector.patch
diff options
context:
space:
mode:
Diffstat (limited to 'editors/leafpad/files/extra-new-selector.patch')
-rw-r--r--editors/leafpad/files/extra-new-selector.patch130
1 files changed, 0 insertions, 130 deletions
diff --git a/editors/leafpad/files/extra-new-selector.patch b/editors/leafpad/files/extra-new-selector.patch
deleted file mode 100644
index f0c86d93cfdb..000000000000
--- a/editors/leafpad/files/extra-new-selector.patch
+++ /dev/null
@@ -1,130 +0,0 @@
---- src/callback.c.orig Mon Dec 20 12:58:26 2004
-+++ src/callback.c Thu Feb 3 20:08:07 2005
-@@ -93,7 +93,7 @@
-
- if (!check_text_modification(sd)) {
- // fi = get_file_info_by_selector(OPEN, sd->fi);
-- fi = get_fileinfo_from_selector(sd->mainwin->window, sd->fi, OPEN);
-+ fi = get_fileinfo_from_chooser(sd->mainwin->window, sd->fi, OPEN);
- if (fi) {
- if (file_open_real(sd->mainwin->textview, fi)) {
- g_free(fi);
-@@ -123,7 +123,7 @@
- {
- FileInfo *fi;
-
-- fi = get_fileinfo_from_selector(sd->mainwin->window, sd->fi, SAVE);
-+ fi = get_fileinfo_from_chooser(sd->mainwin->window, sd->fi, SAVE);
- if (fi) {
- if (file_save_real(sd->mainwin->textview, fi))
- g_free(fi);
---- src/selector.c.orig Fri Dec 24 10:35:12 2004
-+++ src/selector.c Thu Feb 3 21:02:00 2005
-@@ -310,7 +310,7 @@
- return option_menu;
- }
-
--static GtkWidget *create_file_selector(FileInfo *selected_fi)
-+static GtkWidget *create_file_chooser(FileInfo *selected_fi, GtkWidget *window)
- {
- GtkWidget *filesel;
- GtkWidget *align;
-@@ -322,12 +322,19 @@
-
- title = mode ? _("Open") : _("Save As");
-
-- filesel = gtk_file_selection_new(title);
--// gtk_window_set_transient_for(GTK_WINDOW(filesel), GTK_WINDOW(window));
-+ if(mode == OPEN)
-+ filesel = gtk_file_chooser_dialog_new(title, GTK_WINDOW(window),
-+ GTK_FILE_CHOOSER_ACTION_OPEN,
-+ GTK_STOCK_CANCEL,GTK_RESPONSE_CANCEL,
-+ GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,NULL);
-+ else
-+ filesel = gtk_file_chooser_dialog_new(title, GTK_WINDOW(window),
-+ GTK_FILE_CHOOSER_ACTION_SAVE,
-+ GTK_STOCK_CANCEL,GTK_RESPONSE_CANCEL,
-+ GTK_STOCK_SAVE,GTK_RESPONSE_ACCEPT,NULL);
-
- align = gtk_alignment_new(1, 0, 0, 0);
-- gtk_box_pack_end(GTK_BOX(GTK_FILE_SELECTION(filesel)->main_vbox),
-- align, FALSE, FALSE, 0);
-+ gtk_file_chooser_set_extra_widget(GTK_FILE_CHOOSER(filesel),align);
- table = gtk_table_new(2, 2, FALSE);
- gtk_table_set_row_spacings(GTK_TABLE(table), 5);
- gtk_container_add(GTK_CONTAINER(align), table);
-@@ -340,15 +347,15 @@
- option_menu_lineend = create_lineend_menu(selected_fi);
- gtk_table_attach_defaults(GTK_TABLE(table), option_menu_lineend, 1, 2, 0, 1);
- }
-- gtk_widget_show_all(GTK_FILE_SELECTION(filesel)->main_vbox);
-+ gtk_widget_show_all(GTK_FILE_CHOOSER(filesel));
-
- if (selected_fi->filename)
-- gtk_file_selection_set_filename(GTK_FILE_SELECTION(filesel), selected_fi->filename);
-+ gtk_file_chooser_select_filename(GTK_FILE_CHOOSER(filesel), selected_fi->filename);
-
- return filesel;
- }
-
--FileInfo *get_fileinfo_from_selector(GtkWidget *window, FileInfo *fi, gint requested_mode)
-+FileInfo *get_fileinfo_from_chooser(GtkWidget *window, FileInfo *fi, gint requested_mode)
- {
- FileInfo *selected_fi;
- GtkWidget *filesel;
-@@ -366,24 +373,24 @@
- selected_fi->manual_charset =
- fi->manual_charset ? g_strdup(fi->manual_charset) : NULL;
-
-- filesel = create_file_selector(selected_fi);
-+ filesel = create_file_chooser(selected_fi,window);
-
- gtk_window_set_transient_for(GTK_WINDOW(filesel), GTK_WINDOW(window));
-
- do {
- res = gtk_dialog_run(GTK_DIALOG(filesel));
-- if (res == GTK_RESPONSE_OK) {
-+ if (res == GTK_RESPONSE_ACCEPT) {
- if (selected_fi->filename)
- g_free(selected_fi->filename);
- selected_fi->filename = g_strdup(
-- gtk_file_selection_get_filename(GTK_FILE_SELECTION(filesel)));
-+ gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(filesel)));
- if (g_file_test(selected_fi->filename, G_FILE_TEST_IS_DIR)) {
- len = strlen(selected_fi->filename);
- if (len < 1 || selected_fi->filename[len - 1] != G_DIR_SEPARATOR)
- str = g_strconcat(selected_fi->filename, G_DIR_SEPARATOR_S, NULL);
- else
- str = g_strdup(selected_fi->filename);
-- gtk_file_selection_set_filename(GTK_FILE_SELECTION(filesel), str);
-+ gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(filesel), str);
- g_free(str);
- continue;
- }
-@@ -397,14 +404,14 @@
- case GTK_RESPONSE_NO:
- continue;
- case GTK_RESPONSE_YES:
-- res = GTK_RESPONSE_OK;
-+ res = GTK_RESPONSE_ACCEPT;
- }
- }
- }
- gtk_widget_hide(filesel);
- } while (GTK_WIDGET_VISIBLE(filesel));
-
-- if (res != GTK_RESPONSE_OK) {
-+ if (res != GTK_RESPONSE_ACCEPT) {
- if (selected_fi->charset)
- g_free(selected_fi->charset);
- if (selected_fi->manual_charset)
---- src/selector.h.orig Thu Feb 3 20:17:09 2005
-+++ src/selector.h Thu Feb 3 20:17:27 2005
-@@ -30,6 +30,6 @@
- OPEN
- };
-
--FileInfo *get_fileinfo_from_selector(GtkWidget *window, FileInfo *fi, gint requested_mode);
-+FileInfo *get_fileinfo_from_chooser(GtkWidget *window, FileInfo *fi, gint requested_mode);
-
- #endif /* _SELECTOR_H */