summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2000-01-26 00:44:30 +0000
committerOwen Taylor <otaylor@src.gnome.org>2000-01-26 00:44:30 +0000
commitf86f2a2944a77277a5a3d1568f8fa53632fe4bbc (patch)
treed6fbf3c908a534898c7f3f816ca17994ad2dd23d
parent04d6ead184736d241decbe2988d8dfef00b589a2 (diff)
downloadgdk-pixbuf-f86f2a2944a77277a5a3d1568f8fa53632fe4bbc.tar.gz
Fix several bugs which occured after an attempt to open invalid home
Wed Jan 26 19:01:56 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtkfilesel.c (open_ref_dir): Fix several bugs which occured after an attempt to open invalid home directory left cmpl_state->reference_dir == NULL. - completion on files in home directory didn't work - completion on an empty string caused segfault (Bug #3768, reported by Steve Ratcliffe) * gtk/gtkscale.c (gtk_scale_get_value_width): Fix cut and paste error that was causing scales to be incorrectly positioned. (Bug #2956, patch from Steve Ratcliffe <steve@parabola.demon.co.uk>)
-rw-r--r--ChangeLog22
-rw-r--r--ChangeLog.pre-2-022
-rw-r--r--ChangeLog.pre-2-1022
-rw-r--r--ChangeLog.pre-2-222
-rw-r--r--ChangeLog.pre-2-422
-rw-r--r--ChangeLog.pre-2-622
-rw-r--r--ChangeLog.pre-2-822
-rw-r--r--gtk/gtkfilesel.c59
-rw-r--r--gtk/gtkscale.c2
9 files changed, 178 insertions, 37 deletions
diff --git a/ChangeLog b/ChangeLog
index afe1ddf5c..f76a2f076 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,25 @@
+Wed Jan 26 19:01:56 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkfilesel.c (open_ref_dir): Fix several
+ bugs which occured after an attempt to open
+ invalid home directory left cmpl_state->reference_dir == NULL.
+
+ - completion on files in home directory didn't work
+ - completion on an empty string caused segfault
+
+ (Bug #3768, reported by Steve Ratcliffe)
+
+ * gtk/gtkscale.c (gtk_scale_get_value_width): Fix
+ cut and paste error that was causing scales to
+ be incorrectly positioned.
+ (Bug #2956,
+ patch from Steve Ratcliffe <steve@parabola.demon.co.uk>)
+
2000-01-27 Shirasaki Yasuhiro <yasuhiro@gnome.gr.jp>
- * acinclude.m4 (AM_GTK_WITH_NLS): check dcgettext
- with libintl, if it's specified.
+ * acinclude.m4 (AM_GTK_WITH_NLS): Add -lintl to libs
+ when checking for dcgettext, if we've found we needed
+ it for dgettext.
Wed Jan 26 18:06:07 2000 Owen Taylor <otaylor@redhat.com>
diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0
index afe1ddf5c..f76a2f076 100644
--- a/ChangeLog.pre-2-0
+++ b/ChangeLog.pre-2-0
@@ -1,7 +1,25 @@
+Wed Jan 26 19:01:56 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkfilesel.c (open_ref_dir): Fix several
+ bugs which occured after an attempt to open
+ invalid home directory left cmpl_state->reference_dir == NULL.
+
+ - completion on files in home directory didn't work
+ - completion on an empty string caused segfault
+
+ (Bug #3768, reported by Steve Ratcliffe)
+
+ * gtk/gtkscale.c (gtk_scale_get_value_width): Fix
+ cut and paste error that was causing scales to
+ be incorrectly positioned.
+ (Bug #2956,
+ patch from Steve Ratcliffe <steve@parabola.demon.co.uk>)
+
2000-01-27 Shirasaki Yasuhiro <yasuhiro@gnome.gr.jp>
- * acinclude.m4 (AM_GTK_WITH_NLS): check dcgettext
- with libintl, if it's specified.
+ * acinclude.m4 (AM_GTK_WITH_NLS): Add -lintl to libs
+ when checking for dcgettext, if we've found we needed
+ it for dgettext.
Wed Jan 26 18:06:07 2000 Owen Taylor <otaylor@redhat.com>
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index afe1ddf5c..f76a2f076 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,7 +1,25 @@
+Wed Jan 26 19:01:56 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkfilesel.c (open_ref_dir): Fix several
+ bugs which occured after an attempt to open
+ invalid home directory left cmpl_state->reference_dir == NULL.
+
+ - completion on files in home directory didn't work
+ - completion on an empty string caused segfault
+
+ (Bug #3768, reported by Steve Ratcliffe)
+
+ * gtk/gtkscale.c (gtk_scale_get_value_width): Fix
+ cut and paste error that was causing scales to
+ be incorrectly positioned.
+ (Bug #2956,
+ patch from Steve Ratcliffe <steve@parabola.demon.co.uk>)
+
2000-01-27 Shirasaki Yasuhiro <yasuhiro@gnome.gr.jp>
- * acinclude.m4 (AM_GTK_WITH_NLS): check dcgettext
- with libintl, if it's specified.
+ * acinclude.m4 (AM_GTK_WITH_NLS): Add -lintl to libs
+ when checking for dcgettext, if we've found we needed
+ it for dgettext.
Wed Jan 26 18:06:07 2000 Owen Taylor <otaylor@redhat.com>
diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2
index afe1ddf5c..f76a2f076 100644
--- a/ChangeLog.pre-2-2
+++ b/ChangeLog.pre-2-2
@@ -1,7 +1,25 @@
+Wed Jan 26 19:01:56 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkfilesel.c (open_ref_dir): Fix several
+ bugs which occured after an attempt to open
+ invalid home directory left cmpl_state->reference_dir == NULL.
+
+ - completion on files in home directory didn't work
+ - completion on an empty string caused segfault
+
+ (Bug #3768, reported by Steve Ratcliffe)
+
+ * gtk/gtkscale.c (gtk_scale_get_value_width): Fix
+ cut and paste error that was causing scales to
+ be incorrectly positioned.
+ (Bug #2956,
+ patch from Steve Ratcliffe <steve@parabola.demon.co.uk>)
+
2000-01-27 Shirasaki Yasuhiro <yasuhiro@gnome.gr.jp>
- * acinclude.m4 (AM_GTK_WITH_NLS): check dcgettext
- with libintl, if it's specified.
+ * acinclude.m4 (AM_GTK_WITH_NLS): Add -lintl to libs
+ when checking for dcgettext, if we've found we needed
+ it for dgettext.
Wed Jan 26 18:06:07 2000 Owen Taylor <otaylor@redhat.com>
diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4
index afe1ddf5c..f76a2f076 100644
--- a/ChangeLog.pre-2-4
+++ b/ChangeLog.pre-2-4
@@ -1,7 +1,25 @@
+Wed Jan 26 19:01:56 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkfilesel.c (open_ref_dir): Fix several
+ bugs which occured after an attempt to open
+ invalid home directory left cmpl_state->reference_dir == NULL.
+
+ - completion on files in home directory didn't work
+ - completion on an empty string caused segfault
+
+ (Bug #3768, reported by Steve Ratcliffe)
+
+ * gtk/gtkscale.c (gtk_scale_get_value_width): Fix
+ cut and paste error that was causing scales to
+ be incorrectly positioned.
+ (Bug #2956,
+ patch from Steve Ratcliffe <steve@parabola.demon.co.uk>)
+
2000-01-27 Shirasaki Yasuhiro <yasuhiro@gnome.gr.jp>
- * acinclude.m4 (AM_GTK_WITH_NLS): check dcgettext
- with libintl, if it's specified.
+ * acinclude.m4 (AM_GTK_WITH_NLS): Add -lintl to libs
+ when checking for dcgettext, if we've found we needed
+ it for dgettext.
Wed Jan 26 18:06:07 2000 Owen Taylor <otaylor@redhat.com>
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index afe1ddf5c..f76a2f076 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,7 +1,25 @@
+Wed Jan 26 19:01:56 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkfilesel.c (open_ref_dir): Fix several
+ bugs which occured after an attempt to open
+ invalid home directory left cmpl_state->reference_dir == NULL.
+
+ - completion on files in home directory didn't work
+ - completion on an empty string caused segfault
+
+ (Bug #3768, reported by Steve Ratcliffe)
+
+ * gtk/gtkscale.c (gtk_scale_get_value_width): Fix
+ cut and paste error that was causing scales to
+ be incorrectly positioned.
+ (Bug #2956,
+ patch from Steve Ratcliffe <steve@parabola.demon.co.uk>)
+
2000-01-27 Shirasaki Yasuhiro <yasuhiro@gnome.gr.jp>
- * acinclude.m4 (AM_GTK_WITH_NLS): check dcgettext
- with libintl, if it's specified.
+ * acinclude.m4 (AM_GTK_WITH_NLS): Add -lintl to libs
+ when checking for dcgettext, if we've found we needed
+ it for dgettext.
Wed Jan 26 18:06:07 2000 Owen Taylor <otaylor@redhat.com>
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index afe1ddf5c..f76a2f076 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,7 +1,25 @@
+Wed Jan 26 19:01:56 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkfilesel.c (open_ref_dir): Fix several
+ bugs which occured after an attempt to open
+ invalid home directory left cmpl_state->reference_dir == NULL.
+
+ - completion on files in home directory didn't work
+ - completion on an empty string caused segfault
+
+ (Bug #3768, reported by Steve Ratcliffe)
+
+ * gtk/gtkscale.c (gtk_scale_get_value_width): Fix
+ cut and paste error that was causing scales to
+ be incorrectly positioned.
+ (Bug #2956,
+ patch from Steve Ratcliffe <steve@parabola.demon.co.uk>)
+
2000-01-27 Shirasaki Yasuhiro <yasuhiro@gnome.gr.jp>
- * acinclude.m4 (AM_GTK_WITH_NLS): check dcgettext
- with libintl, if it's specified.
+ * acinclude.m4 (AM_GTK_WITH_NLS): Add -lintl to libs
+ when checking for dcgettext, if we've found we needed
+ it for dgettext.
Wed Jan 26 18:06:07 2000 Owen Taylor <otaylor@redhat.com>
diff --git a/gtk/gtkfilesel.c b/gtk/gtkfilesel.c
index 85c7b2357..d1d24b714 100644
--- a/gtk/gtkfilesel.c
+++ b/gtk/gtkfilesel.c
@@ -1809,7 +1809,23 @@ open_ref_dir(gchar* text_to_complete,
first_slash = strchr(text_to_complete, '/');
- if (text_to_complete[0] == '/' || !cmpl_state->reference_dir)
+ if (text_to_complete[0] == '~')
+ {
+ new_dir = open_user_dir(text_to_complete, cmpl_state);
+
+ if(new_dir)
+ {
+ if(first_slash)
+ *remaining_text = first_slash + 1;
+ else
+ *remaining_text = text_to_complete + strlen(text_to_complete);
+ }
+ else
+ {
+ return NULL;
+ }
+ }
+ else if (text_to_complete[0] == '/' || !cmpl_state->reference_dir)
{
gchar *tmp = g_strdup(text_to_complete);
gchar *p;
@@ -1820,34 +1836,33 @@ open_ref_dir(gchar* text_to_complete,
*p = '\0';
p = strrchr(tmp, '/');
- if (p == tmp)
- p++;
+ if (p)
+ {
+ if (p == tmp)
+ p++;
- *p = '\0';
+ *p = '\0';
- new_dir = open_dir(tmp, cmpl_state);
+ new_dir = open_dir(tmp, cmpl_state);
- if(new_dir)
- *remaining_text = text_to_complete +
- ((p == tmp + 1) ? (p - tmp) : (p + 1 - tmp));
-
- g_free (tmp);
- }
- else if (text_to_complete[0] == '~')
- {
- new_dir = open_user_dir(text_to_complete, cmpl_state);
-
- if(new_dir)
- {
- if(first_slash)
- *remaining_text = first_slash + 1;
- else
- *remaining_text = text_to_complete + strlen(text_to_complete);
+ if(new_dir)
+ *remaining_text = text_to_complete +
+ ((p == tmp + 1) ? (p - tmp) : (p + 1 - tmp));
}
else
{
- return NULL;
+ /* If no possible candidates, use the cwd */
+ gchar *curdir = g_get_current_dir ();
+
+ new_dir = open_dir(curdir, cmpl_state);
+
+ if (new_dir)
+ *remaining_text = text_to_complete;
+
+ g_free (curdir);
}
+
+ g_free (tmp);
}
else
{
diff --git a/gtk/gtkscale.c b/gtk/gtkscale.c
index deaebecca..e4cc0aada 100644
--- a/gtk/gtkscale.c
+++ b/gtk/gtkscale.c
@@ -307,7 +307,7 @@ gtk_scale_get_value_width (GtkScale *scale)
digits = 13;
i = 0;
- if (range->adjustment->lower < 0)
+ if (range->adjustment->upper < 0)
buffer[i++] = '-';
for (j = 0; j < digits; j++)
buffer[i++] = '0';