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>)
This commit is contained in:
22
ChangeLog
22
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>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -1809,31 +1809,7 @@ open_ref_dir(gchar* text_to_complete,
|
||||
|
||||
first_slash = strchr(text_to_complete, '/');
|
||||
|
||||
if (text_to_complete[0] == '/' || !cmpl_state->reference_dir)
|
||||
{
|
||||
gchar *tmp = g_strdup(text_to_complete);
|
||||
gchar *p;
|
||||
|
||||
p = tmp;
|
||||
while (*p && *p != '*' && *p != '?')
|
||||
p++;
|
||||
|
||||
*p = '\0';
|
||||
p = strrchr(tmp, '/');
|
||||
if (p == tmp)
|
||||
p++;
|
||||
|
||||
*p = '\0';
|
||||
|
||||
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] == '~')
|
||||
if (text_to_complete[0] == '~')
|
||||
{
|
||||
new_dir = open_user_dir(text_to_complete, cmpl_state);
|
||||
|
||||
@@ -1849,6 +1825,45 @@ open_ref_dir(gchar* text_to_complete,
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
else if (text_to_complete[0] == '/' || !cmpl_state->reference_dir)
|
||||
{
|
||||
gchar *tmp = g_strdup(text_to_complete);
|
||||
gchar *p;
|
||||
|
||||
p = tmp;
|
||||
while (*p && *p != '*' && *p != '?')
|
||||
p++;
|
||||
|
||||
*p = '\0';
|
||||
p = strrchr(tmp, '/');
|
||||
if (p)
|
||||
{
|
||||
if (p == tmp)
|
||||
p++;
|
||||
|
||||
*p = '\0';
|
||||
|
||||
new_dir = open_dir(tmp, cmpl_state);
|
||||
|
||||
if(new_dir)
|
||||
*remaining_text = text_to_complete +
|
||||
((p == tmp + 1) ? (p - tmp) : (p + 1 - tmp));
|
||||
}
|
||||
else
|
||||
{
|
||||
/* 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
|
||||
{
|
||||
*remaining_text = text_to_complete;
|
||||
|
||||
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user