- Work around gnome.org #341055 (gedit doesn't remember previous open/save
dir)
This commit is contained in:
parent
9283a9969f
commit
100cd3be03
77
gedit-2.15.1-bgo-341055-workaround.patch
Normal file
77
gedit-2.15.1-bgo-341055-workaround.patch
Normal file
@ -0,0 +1,77 @@
|
||||
--- gedit-2.15.1/gedit/gedit-commands-file.c.bgo-341055-workaround 2006-05-13 13:46:43.000000000 -0400
|
||||
+++ gedit-2.15.1/gedit/gedit-commands-file.c 2006-05-13 13:48:12.000000000 -0400
|
||||
@@ -336,12 +336,6 @@
|
||||
if (default_path == NULL)
|
||||
default_path = g_strdup (_gedit_window_get_default_path (window));
|
||||
|
||||
- if (default_path != NULL)
|
||||
- gtk_file_chooser_set_current_folder_uri (GTK_FILE_CHOOSER (open_dialog),
|
||||
- default_path);
|
||||
-
|
||||
- g_free (default_path);
|
||||
-
|
||||
selector_width = gedit_prefs_manager_get_opensave_dialog_width ();
|
||||
selector_height = gedit_prefs_manager_get_opensave_dialog_height ();
|
||||
gtk_window_resize (GTK_WINDOW (open_dialog), selector_width, selector_height);
|
||||
@@ -351,6 +345,11 @@
|
||||
window);
|
||||
|
||||
gtk_widget_show (open_dialog);
|
||||
+
|
||||
+ if (default_path != NULL)
|
||||
+ gtk_file_chooser_set_current_folder_uri (GTK_FILE_CHOOSER (open_dialog),
|
||||
+ default_path);
|
||||
+ g_free (default_path);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -767,24 +766,6 @@
|
||||
|
||||
g_free (uri);
|
||||
|
||||
- if (!uri_set)
|
||||
- {
|
||||
- const gchar *default_path;
|
||||
- gchar *docname;
|
||||
-
|
||||
- default_path = _gedit_window_get_default_path (window);
|
||||
- docname = gedit_document_get_short_name_for_display (doc);
|
||||
-
|
||||
- if (default_path != NULL)
|
||||
- gtk_file_chooser_set_current_folder_uri (GTK_FILE_CHOOSER (save_dialog),
|
||||
- default_path);
|
||||
-
|
||||
- gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (save_dialog),
|
||||
- docname);
|
||||
-
|
||||
- g_free (docname);
|
||||
- }
|
||||
-
|
||||
/* Set suggested encoding */
|
||||
encoding = gedit_document_get_encoding (doc);
|
||||
g_return_if_fail (encoding != NULL);
|
||||
@@ -807,6 +788,24 @@
|
||||
gtk_window_resize (GTK_WINDOW (save_dialog), selector_width, selector_height);
|
||||
|
||||
gtk_widget_show (save_dialog);
|
||||
+
|
||||
+ if (!uri_set)
|
||||
+ {
|
||||
+ const gchar *default_path;
|
||||
+ gchar *docname;
|
||||
+
|
||||
+ default_path = _gedit_window_get_default_path (window);
|
||||
+ docname = gedit_document_get_short_name_for_display (doc);
|
||||
+
|
||||
+ if (default_path != NULL)
|
||||
+ gtk_file_chooser_set_current_folder_uri (GTK_FILE_CHOOSER (save_dialog),
|
||||
+ default_path);
|
||||
+
|
||||
+ gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (save_dialog),
|
||||
+ docname);
|
||||
+
|
||||
+ g_free (docname);
|
||||
+ }
|
||||
}
|
||||
|
||||
static void
|
||||
11
gedit.spec
11
gedit.spec
@ -17,7 +17,7 @@
|
||||
Summary: gEdit is a small but powerful text editor for GNOME.
|
||||
Name: gedit
|
||||
Version: 2.15.1
|
||||
Release: 1
|
||||
Release: 2
|
||||
Epoch: 1
|
||||
License: GPL
|
||||
Group: Applications/Editors
|
||||
@ -47,6 +47,11 @@ Patch1: gedit-2.13.90-libdir.patch
|
||||
# and I needed this patch to make autoconf happy
|
||||
Patch2: gedit-2.15.1-python.patch
|
||||
|
||||
# work around bugzilla.gnome.org #341055 by moving the
|
||||
# gtk_file_chooser_set_current_folder_uri() calls _after_
|
||||
# gtk_widget_show()
|
||||
Patch3: gedit-2.15.1-bgo-341055-workaround.patch
|
||||
|
||||
BuildRequires: glib2-devel >= %{glib2_version}
|
||||
BuildRequires: pango-devel >= %{pango_version}
|
||||
BuildRequires: gtk2-devel >= %{gtk2_version}
|
||||
@ -105,6 +110,7 @@ tar xzf %{SOURCE1}
|
||||
%endif
|
||||
|
||||
%patch2 -p1 -b .python
|
||||
%patch3 -p1 -b .bgo-341055-workaround
|
||||
|
||||
%build
|
||||
# full automadness due to intltool breakage
|
||||
@ -186,6 +192,9 @@ fi
|
||||
%{_libdir}/pkgconfig/gedit-2.14.pc
|
||||
|
||||
%changelog
|
||||
* Sat May 13 2006 Dan Williams <dcbw@redhat.com> - 2.15.1-2
|
||||
- Work around gnome.org #341055 (gedit doesn't remember previous open/save dir)
|
||||
|
||||
* Tue May 9 2006 Matthias Clasen <mclasen@redhat.com> 2.15.1-1
|
||||
- Update to 2.15.1
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user