- Fix up and re-enable persistent file selector size patch
This commit is contained in:
parent
e139c35b12
commit
5176e0e27b
176
gedit-2.13.1-filesel-persistent-size.patch
Normal file
176
gedit-2.13.1-filesel-persistent-size.patch
Normal file
@ -0,0 +1,176 @@
|
||||
--- gedit-2.13.1/data/gedit.schemas.in.filesel 2006-01-08 21:06:29.000000000 -0500
|
||||
+++ gedit-2.13.1/data/gedit.schemas.in 2006-01-08 21:19:10.000000000 -0500
|
||||
@@ -604,5 +604,29 @@
|
||||
is writable by default.</long>
|
||||
</locale>
|
||||
</schema>
|
||||
+
|
||||
+ <schema>
|
||||
+ <key>/schemas/apps/gedit-2/preferences/ui/open_save/selector_width</key>
|
||||
+ <applyto>/apps/gedit-2/preferences/ui/open_save/selector_width</applyto>
|
||||
+ <owner>gedit</owner>
|
||||
+ <type>int</type>
|
||||
+ <default>400</default>
|
||||
+ <locale name="C">
|
||||
+ <short>Open/Save Dialog Width</short>
|
||||
+ <long>Persistent Open/Save dialog width.</long>
|
||||
+ </locale>
|
||||
+ </schema>
|
||||
+
|
||||
+ <schema>
|
||||
+ <key>/schemas/apps/gedit-2/preferences/ui/open_save/selector_height</key>
|
||||
+ <applyto>/apps/gedit-2/preferences/ui/open_save/selector_height</applyto>
|
||||
+ <owner>gedit</owner>
|
||||
+ <type>int</type>
|
||||
+ <default>400</default>
|
||||
+ <locale name="C">
|
||||
+ <short>Open/Save Dialog Height</short>
|
||||
+ <long>Persistent Open/Save dialog height.</long>
|
||||
+ </locale>
|
||||
+ </schema>
|
||||
</schemalist>
|
||||
</gconfschemafile>
|
||||
--- gedit-2.13.1/gedit/gedit-prefs-manager.h.filesel 2006-01-08 21:10:21.000000000 -0500
|
||||
+++ gedit-2.13.1/gedit/gedit-prefs-manager.h 2006-01-08 21:22:10.000000000 -0500
|
||||
@@ -101,6 +101,10 @@
|
||||
#define GPM_RECENTS_DIR GPM_PREFS_DIR "/ui/recents"
|
||||
#define GPM_MAX_RECENTS GPM_RECENTS_DIR "/max_recents"
|
||||
|
||||
+#define GPM_OPENSAVE_DIR GPM_PREFS_DIR "/ui/open_save"
|
||||
+#define GPM_OPENSAVE_WIDTH GPM_OPENSAVE_DIR "/selector_width"
|
||||
+#define GPM_OPENSAVE_HEIGHT GPM_OPENSAVE_DIR "/selector_height"
|
||||
+
|
||||
/* Print */
|
||||
#define GPM_PRINT_PAGE_DIR GPM_PREFS_DIR "/print/page"
|
||||
#define GPM_PRINT_SYNTAX GPM_PRINT_PAGE_DIR "/print_syntax_highlighting"
|
||||
@@ -184,6 +188,9 @@
|
||||
|
||||
#define GPM_DEFAULT_MAX_RECENTS 5
|
||||
|
||||
+#define GPM_DEFAULT_OPENSAVE_WIDTH 400
|
||||
+#define GPM_DEFAULT_OPENSAVE_HEIGHT 400
|
||||
+
|
||||
#define GPM_DEFAULT_WINDOW_STATE 0
|
||||
#define GPM_DEFAULT_WINDOW_WIDTH 650
|
||||
#define GPM_DEFAULT_WINDOW_HEIGHT 500
|
||||
@@ -377,6 +384,15 @@
|
||||
*/
|
||||
gint gedit_prefs_manager_get_max_recents (void);
|
||||
|
||||
+/* Persistent size of open/save dialogs */
|
||||
+gint gedit_prefs_manager_get_opensave_dialog_width (void);
|
||||
+void gedit_prefs_manager_set_opensave_dialog_width (gint width);
|
||||
+gboolean gedit_prefs_manager_opensave_dialog_width_can_set (void);
|
||||
+
|
||||
+gint gedit_prefs_manager_get_opensave_dialog_height (void);
|
||||
+void gedit_prefs_manager_set_opensave_dialog_height (gint height);
|
||||
+gboolean gedit_prefs_manager_opensave_dialog_height_can_set (void);
|
||||
+
|
||||
/* Encodings */
|
||||
GSList *gedit_prefs_manager_get_auto_detected_encodings (void);
|
||||
|
||||
--- gedit-2.13.1/gedit/gedit-commands-file.c.filesel 2006-01-08 21:22:53.000000000 -0500
|
||||
+++ gedit-2.13.1/gedit/gedit-commands-file.c 2006-01-08 21:29:17.000000000 -0500
|
||||
@@ -50,6 +50,7 @@
|
||||
#include "dialogs/gedit-close-confirmation-dialog.h"
|
||||
#include "dialogs/gedit-open-location-dialog.h"
|
||||
#include "gedit-file-chooser-dialog.h"
|
||||
+#include "gedit-prefs-manager.h"
|
||||
|
||||
|
||||
/* Defined constants */
|
||||
@@ -239,9 +240,15 @@
|
||||
{
|
||||
GSList *uris;
|
||||
const GeditEncoding *encoding;
|
||||
+ gint selector_width;
|
||||
+ gint selector_height;
|
||||
|
||||
gedit_debug (DEBUG_COMMANDS);
|
||||
|
||||
+ gtk_window_get_size (GTK_WINDOW (dialog), &selector_width, &selector_height);
|
||||
+ gedit_prefs_manager_set_opensave_dialog_width (selector_width);
|
||||
+ gedit_prefs_manager_set_opensave_dialog_height (selector_height);
|
||||
+
|
||||
if (response_id != GTK_RESPONSE_OK)
|
||||
{
|
||||
gtk_widget_destroy (GTK_WIDGET (dialog));
|
||||
@@ -272,6 +279,8 @@
|
||||
gpointer data;
|
||||
GeditDocument *doc;
|
||||
gchar *default_path = NULL;
|
||||
+ gint selector_width;
|
||||
+ gint selector_height;
|
||||
|
||||
gedit_debug (DEBUG_COMMANDS);
|
||||
|
||||
@@ -336,6 +345,10 @@
|
||||
|
||||
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);
|
||||
+
|
||||
g_signal_connect (open_dialog,
|
||||
"response",
|
||||
G_CALLBACK (open_dialog_response_cb),
|
||||
@@ -585,6 +598,8 @@
|
||||
GeditTab *tab;
|
||||
gpointer data;
|
||||
GSList *tabs_to_save_as;
|
||||
+ gint selector_width;
|
||||
+ gint selector_height;
|
||||
|
||||
gedit_debug (DEBUG_COMMANDS);
|
||||
|
||||
@@ -603,6 +618,10 @@
|
||||
|
||||
encoding = gedit_file_chooser_dialog_get_encoding (dialog);
|
||||
|
||||
+ gtk_window_get_size (GTK_WINDOW (dialog), &selector_width, &selector_height);
|
||||
+ gedit_prefs_manager_set_opensave_dialog_width (selector_width);
|
||||
+ gedit_prefs_manager_set_opensave_dialog_height (selector_height);
|
||||
+
|
||||
gtk_widget_destroy (GTK_WIDGET (dialog));
|
||||
|
||||
if (tab != NULL)
|
||||
@@ -701,6 +720,8 @@
|
||||
gchar *uri;
|
||||
gboolean uri_set = FALSE;
|
||||
const GeditEncoding *encoding;
|
||||
+ gint selector_width;
|
||||
+ gint selector_height;
|
||||
|
||||
g_return_if_fail (GEDIT_IS_TAB (tab));
|
||||
g_return_if_fail (GEDIT_IS_WINDOW (window));
|
||||
@@ -778,6 +799,10 @@
|
||||
G_CALLBACK (save_dialog_response_cb),
|
||||
window);
|
||||
|
||||
+ selector_width = gedit_prefs_manager_get_opensave_dialog_width();
|
||||
+ selector_height = gedit_prefs_manager_get_opensave_dialog_height();
|
||||
+ gtk_window_resize (GTK_WINDOW (save_dialog), selector_width, selector_height);
|
||||
+
|
||||
gtk_widget_show (save_dialog);
|
||||
}
|
||||
|
||||
--- gedit-2.13.1/gedit/gedit-prefs-manager.c.filesel 2006-01-08 21:10:08.000000000 -0500
|
||||
+++ gedit-2.13.1/gedit/gedit-prefs-manager.c 2006-01-08 21:20:17.000000000 -0500
|
||||
@@ -721,6 +721,16 @@
|
||||
|
||||
}
|
||||
|
||||
+/* Open/Save dialog width */
|
||||
+DEFINE_INT_PREF (opensave_dialog_width,
|
||||
+ GPM_OPENSAVE_WIDTH,
|
||||
+ GPM_DEFAULT_OPENSAVE_WIDTH)
|
||||
+
|
||||
+/* Open/Save dialog height */
|
||||
+DEFINE_INT_PREF (opensave_dialog_height,
|
||||
+ GPM_OPENSAVE_HEIGHT,
|
||||
+ GPM_DEFAULT_OPENSAVE_HEIGHT)
|
||||
+
|
||||
/* Statusbar visiblity */
|
||||
DEFINE_BOOL_PREF (statusbar_visible,
|
||||
GPM_STATUSBAR_VISIBLE,
|
||||
13
gedit.spec
13
gedit.spec
@ -15,7 +15,7 @@
|
||||
Summary: gEdit is a small but powerful text editor for GNOME.
|
||||
Name: gedit
|
||||
Version: 2.13.1
|
||||
Release: 1
|
||||
Release: 2
|
||||
Epoch: 1
|
||||
License: GPL
|
||||
Group: Applications/Editors
|
||||
@ -27,9 +27,8 @@ PreReq: scrollkeeper >= 0.1.4
|
||||
PreReq: GConf2
|
||||
PreReq: desktop-file-utils >= %{desktop_file_utils_version}
|
||||
|
||||
# Make the file selector remember last window size and directory
|
||||
#Patch4: gedit-2.5.90-filesel.patch
|
||||
#Patch6: gedit-2.7.92-opensize.patch
|
||||
# Make the file selector remember last window size
|
||||
Patch0: gedit-2.13.1-filesel-persistent-size.patch
|
||||
|
||||
BuildRequires: glib2-devel >= %{glib2_version}
|
||||
BuildRequires: pango-devel >= %{pango_version}
|
||||
@ -78,8 +77,7 @@ Install gedit-devel if you want to write plug-ins for gEdit.
|
||||
%prep
|
||||
%setup -n gedit-%{version} -q
|
||||
|
||||
#%patch4 -p1 -b .filesel
|
||||
#%patch6 -p1 -b .opensize
|
||||
%patch0 -p1 -b .filesel
|
||||
|
||||
%build
|
||||
%configure --disable-scrollkeeper
|
||||
@ -150,6 +148,9 @@ scrollkeeper-update
|
||||
%{_libdir}/pkgconfig/gedit-2.10.pc
|
||||
|
||||
%changelog
|
||||
* Sun Jan 8 2006 Dan Williams <dcbw@redhat.com > - 1:2.13.1-2
|
||||
- Fix up and re-enable persistent file selector size patch
|
||||
|
||||
* Tue Jan 3 2006 Matthias Clasen <mclasen@redhat.com> - 1:2.13.1-1
|
||||
- Update to 2.13.1
|
||||
- Disable scrollkeeper
|
||||
|
||||
Loading…
Reference in New Issue
Block a user