summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorHans Breuer <hans@breuer.org>2002-02-10 13:18:51 +0000
committerHans Breuer <hans@src.gnome.org>2002-02-10 13:18:51 +0000
commit6d33d1c7e3d9782c22a85ed972c0745db0333791 (patch)
tree656df1715de144fdf8499fa21a1ec2e83a50be4f /gtk
parentf42f2a646e44c917fd0a435a7818d18eb513503d (diff)
downloadgtk+-6d33d1c7e3d9782c22a85ed972c0745db0333791.tar.gz
don't reduce the scroll rect size by the scroll amount
2002-02-10 Hans Breuer <hans@breuer.org> * gdk/win32/gdkgeometry-win32.c : don't reduce the scroll rect size by the scroll amount * gdk/win32/gdkwindow-win32.c * gdk/win32/gdkselection-win32.c : added some casts to make it compile with msvc's strict type checking * gtk/fnmatch.c : #include <ctype.h> again for tolower prototype. The fnmatch() code assumes to be in the crt locale though it is feeded by utf8 strings from gtkfilesel.c * gtk/gtkfilesel.c : let ->cmpl_text be a strdup managed by _CompletionDir instead of referencing already freed memory * gtk/gtktooltips.c (gtk_tooltips_init) : fix typo to gtk_rc_parse_string (theDefaultTooltipColor) once as it was intended * tests/makefile.msc : added more tests * tests/testgtk.c (create_list) : don't try to load gtkenums.h from the current directory use ../gtk/gtkenums.h instead
Diffstat (limited to 'gtk')
-rw-r--r--gtk/fnmatch.c1
-rw-r--r--gtk/gtkfilesel.c6
-rw-r--r--gtk/gtktooltips.c2
3 files changed, 6 insertions, 3 deletions
diff --git a/gtk/fnmatch.c b/gtk/fnmatch.c
index 06576cb561..198363fc84 100644
--- a/gtk/fnmatch.c
+++ b/gtk/fnmatch.c
@@ -28,6 +28,7 @@
#endif
#include <errno.h>
+#include <ctype.h> /* tolower */
/* Added for GTK. We need to make sure that all constants are defined
* to properly compile this file */
diff --git a/gtk/gtkfilesel.c b/gtk/gtkfilesel.c
index a3fc58149d..a61ab2212d 100644
--- a/gtk/gtkfilesel.c
+++ b/gtk/gtkfilesel.c
@@ -2308,6 +2308,7 @@ cmpl_free_state (CompletionState* cmpl_state)
static void
free_dir (CompletionDir* dir)
{
+ g_free (dir->cmpl_text);
g_free (dir->fullname);
g_free (dir);
}
@@ -2407,7 +2408,7 @@ cmpl_completion_matches (gchar *text_to_complete,
cmpl_state->completion_dir->cmpl_index = -1;
cmpl_state->completion_dir->cmpl_parent = NULL;
- cmpl_state->completion_dir->cmpl_text = *remaining_text;
+ cmpl_state->completion_dir->cmpl_text = g_strdup (*remaining_text);
cmpl_state->active_completion_dir = cmpl_state->completion_dir;
@@ -2856,6 +2857,7 @@ attach_dir (CompletionDirSent *sent,
new_dir->sent = sent;
new_dir->fullname = g_strdup (dir_name);
new_dir->fullname_len = strlen (dir_name);
+ new_dir->cmpl_text = NULL;
return new_dir;
}
@@ -3399,7 +3401,7 @@ attempt_file_completion (CompletionState *cmpl_state)
new_dir->cmpl_parent = dir;
new_dir->cmpl_index = -1;
- new_dir->cmpl_text = first_slash + 1;
+ new_dir->cmpl_text = g_strdup (first_slash + 1);
cmpl_state->active_completion_dir = new_dir;
diff --git a/gtk/gtktooltips.c b/gtk/gtktooltips.c
index 125a607327..ec4c21d808 100644
--- a/gtk/gtktooltips.c
+++ b/gtk/gtktooltips.c
@@ -105,7 +105,7 @@ static void
gtk_tooltips_init (GtkTooltips *tooltips)
{
static gboolean have_rc = FALSE;
- if (have_rc)
+ if (!have_rc)
{
have_rc = TRUE;