Commit c879883d authored by Owen Taylor's avatar Owen Taylor Committed by Owen Taylor
Browse files

Fix srcdir != builddir

Mon Nov 13 14:43:48 2000  Owen Taylor  <otaylor@redhat.com>

	* demos/Makefile.am (test-inline-pixbufs.h): Fix srcdir != builddir

	* gtk/Makefile.am (INCLUDES): Add -I$(builddir)/gtk

	* gtk/stock-icons/Makefile.am (gtkstockpixbufs.h): Handles
	srcdir != builddir

	* modules/input/Makefile.am (INCLUDES): add $(top_srcdir)/gdk

	* configure.in (GTK_VERSION): Up to 1.3.2

	* modules/input/Makefile.am (im_xim_la_SOURCES): Add
	gtkimcontextxim.h

	* gtk/gtkimcontext.c (gtk_im_context_get_preedit_string): Add
	missing doc comment.
parent 5dd656fa
Mon Nov 13 14:43:48 2000 Owen Taylor <otaylor@redhat.com>
* demos/Makefile.am (test-inline-pixbufs.h): Fix srcdir != builddir
* gtk/Makefile.am (INCLUDES): Add -I$(builddir)/gtk
* gtk/stock-icons/Makefile.am (gtkstockpixbufs.h): Handles
srcdir != builddir
* modules/input/Makefile.am (INCLUDES): add $(top_srcdir)/gdk
* configure.in (GTK_VERSION): Up to 1.3.2
* modules/input/Makefile.am (im_xim_la_SOURCES): Add
gtkimcontextxim.h
* gtk/gtkimcontext.c (gtk_im_context_get_preedit_string): Add
missing doc comment.
2000-11-14 Alexander Larsson <alexl@redhat.com> 2000-11-14 Alexander Larsson <alexl@redhat.com>
* modules/linux-fb/basic.c: * modules/linux-fb/basic.c:
...@@ -30,6 +49,7 @@ ...@@ -30,6 +49,7 @@
attributes at once. attributes at once.
2000-11-13 Elliot Lee <sopwith@redhat.com> 2000-11-13 Elliot Lee <sopwith@redhat.com>
* gdk/gdk.h: Add a couple of missing G_GNUC_CONST's. * gdk/gdk.h: Add a couple of missing G_GNUC_CONST's.
Mon Nov 13 14:29:32 2000 Jonathan Blandford <jrb@redhat.com> Mon Nov 13 14:29:32 2000 Jonathan Blandford <jrb@redhat.com>
......
Mon Nov 13 14:43:48 2000 Owen Taylor <otaylor@redhat.com>
* demos/Makefile.am (test-inline-pixbufs.h): Fix srcdir != builddir
* gtk/Makefile.am (INCLUDES): Add -I$(builddir)/gtk
* gtk/stock-icons/Makefile.am (gtkstockpixbufs.h): Handles
srcdir != builddir
* modules/input/Makefile.am (INCLUDES): add $(top_srcdir)/gdk
* configure.in (GTK_VERSION): Up to 1.3.2
* modules/input/Makefile.am (im_xim_la_SOURCES): Add
gtkimcontextxim.h
* gtk/gtkimcontext.c (gtk_im_context_get_preedit_string): Add
missing doc comment.
2000-11-14 Alexander Larsson <alexl@redhat.com> 2000-11-14 Alexander Larsson <alexl@redhat.com>
* modules/linux-fb/basic.c: * modules/linux-fb/basic.c:
...@@ -30,6 +49,7 @@ ...@@ -30,6 +49,7 @@
attributes at once. attributes at once.
2000-11-13 Elliot Lee <sopwith@redhat.com> 2000-11-13 Elliot Lee <sopwith@redhat.com>
* gdk/gdk.h: Add a couple of missing G_GNUC_CONST's. * gdk/gdk.h: Add a couple of missing G_GNUC_CONST's.
Mon Nov 13 14:29:32 2000 Jonathan Blandford <jrb@redhat.com> Mon Nov 13 14:29:32 2000 Jonathan Blandford <jrb@redhat.com>
......
Mon Nov 13 14:43:48 2000 Owen Taylor <otaylor@redhat.com>
* demos/Makefile.am (test-inline-pixbufs.h): Fix srcdir != builddir
* gtk/Makefile.am (INCLUDES): Add -I$(builddir)/gtk
* gtk/stock-icons/Makefile.am (gtkstockpixbufs.h): Handles
srcdir != builddir
* modules/input/Makefile.am (INCLUDES): add $(top_srcdir)/gdk
* configure.in (GTK_VERSION): Up to 1.3.2
* modules/input/Makefile.am (im_xim_la_SOURCES): Add
gtkimcontextxim.h
* gtk/gtkimcontext.c (gtk_im_context_get_preedit_string): Add
missing doc comment.
2000-11-14 Alexander Larsson <alexl@redhat.com> 2000-11-14 Alexander Larsson <alexl@redhat.com>
* modules/linux-fb/basic.c: * modules/linux-fb/basic.c:
...@@ -30,6 +49,7 @@ ...@@ -30,6 +49,7 @@
attributes at once. attributes at once.
2000-11-13 Elliot Lee <sopwith@redhat.com> 2000-11-13 Elliot Lee <sopwith@redhat.com>
* gdk/gdk.h: Add a couple of missing G_GNUC_CONST's. * gdk/gdk.h: Add a couple of missing G_GNUC_CONST's.
Mon Nov 13 14:29:32 2000 Jonathan Blandford <jrb@redhat.com> Mon Nov 13 14:29:32 2000 Jonathan Blandford <jrb@redhat.com>
......
Mon Nov 13 14:43:48 2000 Owen Taylor <otaylor@redhat.com>
* demos/Makefile.am (test-inline-pixbufs.h): Fix srcdir != builddir
* gtk/Makefile.am (INCLUDES): Add -I$(builddir)/gtk
* gtk/stock-icons/Makefile.am (gtkstockpixbufs.h): Handles
srcdir != builddir
* modules/input/Makefile.am (INCLUDES): add $(top_srcdir)/gdk
* configure.in (GTK_VERSION): Up to 1.3.2
* modules/input/Makefile.am (im_xim_la_SOURCES): Add
gtkimcontextxim.h
* gtk/gtkimcontext.c (gtk_im_context_get_preedit_string): Add
missing doc comment.
2000-11-14 Alexander Larsson <alexl@redhat.com> 2000-11-14 Alexander Larsson <alexl@redhat.com>
* modules/linux-fb/basic.c: * modules/linux-fb/basic.c:
...@@ -30,6 +49,7 @@ ...@@ -30,6 +49,7 @@
attributes at once. attributes at once.
2000-11-13 Elliot Lee <sopwith@redhat.com> 2000-11-13 Elliot Lee <sopwith@redhat.com>
* gdk/gdk.h: Add a couple of missing G_GNUC_CONST's. * gdk/gdk.h: Add a couple of missing G_GNUC_CONST's.
Mon Nov 13 14:29:32 2000 Jonathan Blandford <jrb@redhat.com> Mon Nov 13 14:29:32 2000 Jonathan Blandford <jrb@redhat.com>
......
Mon Nov 13 14:43:48 2000 Owen Taylor <otaylor@redhat.com>
* demos/Makefile.am (test-inline-pixbufs.h): Fix srcdir != builddir
* gtk/Makefile.am (INCLUDES): Add -I$(builddir)/gtk
* gtk/stock-icons/Makefile.am (gtkstockpixbufs.h): Handles
srcdir != builddir
* modules/input/Makefile.am (INCLUDES): add $(top_srcdir)/gdk
* configure.in (GTK_VERSION): Up to 1.3.2
* modules/input/Makefile.am (im_xim_la_SOURCES): Add
gtkimcontextxim.h
* gtk/gtkimcontext.c (gtk_im_context_get_preedit_string): Add
missing doc comment.
2000-11-14 Alexander Larsson <alexl@redhat.com> 2000-11-14 Alexander Larsson <alexl@redhat.com>
* modules/linux-fb/basic.c: * modules/linux-fb/basic.c:
...@@ -30,6 +49,7 @@ ...@@ -30,6 +49,7 @@
attributes at once. attributes at once.
2000-11-13 Elliot Lee <sopwith@redhat.com> 2000-11-13 Elliot Lee <sopwith@redhat.com>
* gdk/gdk.h: Add a couple of missing G_GNUC_CONST's. * gdk/gdk.h: Add a couple of missing G_GNUC_CONST's.
Mon Nov 13 14:29:32 2000 Jonathan Blandford <jrb@redhat.com> Mon Nov 13 14:29:32 2000 Jonathan Blandford <jrb@redhat.com>
......
Mon Nov 13 14:43:48 2000 Owen Taylor <otaylor@redhat.com>
* demos/Makefile.am (test-inline-pixbufs.h): Fix srcdir != builddir
* gtk/Makefile.am (INCLUDES): Add -I$(builddir)/gtk
* gtk/stock-icons/Makefile.am (gtkstockpixbufs.h): Handles
srcdir != builddir
* modules/input/Makefile.am (INCLUDES): add $(top_srcdir)/gdk
* configure.in (GTK_VERSION): Up to 1.3.2
* modules/input/Makefile.am (im_xim_la_SOURCES): Add
gtkimcontextxim.h
* gtk/gtkimcontext.c (gtk_im_context_get_preedit_string): Add
missing doc comment.
2000-11-14 Alexander Larsson <alexl@redhat.com> 2000-11-14 Alexander Larsson <alexl@redhat.com>
* modules/linux-fb/basic.c: * modules/linux-fb/basic.c:
...@@ -30,6 +49,7 @@ ...@@ -30,6 +49,7 @@
attributes at once. attributes at once.
2000-11-13 Elliot Lee <sopwith@redhat.com> 2000-11-13 Elliot Lee <sopwith@redhat.com>
* gdk/gdk.h: Add a couple of missing G_GNUC_CONST's. * gdk/gdk.h: Add a couple of missing G_GNUC_CONST's.
Mon Nov 13 14:29:32 2000 Jonathan Blandford <jrb@redhat.com> Mon Nov 13 14:29:32 2000 Jonathan Blandford <jrb@redhat.com>
......
Mon Nov 13 14:43:48 2000 Owen Taylor <otaylor@redhat.com>
* demos/Makefile.am (test-inline-pixbufs.h): Fix srcdir != builddir
* gtk/Makefile.am (INCLUDES): Add -I$(builddir)/gtk
* gtk/stock-icons/Makefile.am (gtkstockpixbufs.h): Handles
srcdir != builddir
* modules/input/Makefile.am (INCLUDES): add $(top_srcdir)/gdk
* configure.in (GTK_VERSION): Up to 1.3.2
* modules/input/Makefile.am (im_xim_la_SOURCES): Add
gtkimcontextxim.h
* gtk/gtkimcontext.c (gtk_im_context_get_preedit_string): Add
missing doc comment.
2000-11-14 Alexander Larsson <alexl@redhat.com> 2000-11-14 Alexander Larsson <alexl@redhat.com>
* modules/linux-fb/basic.c: * modules/linux-fb/basic.c:
...@@ -30,6 +49,7 @@ ...@@ -30,6 +49,7 @@
attributes at once. attributes at once.
2000-11-13 Elliot Lee <sopwith@redhat.com> 2000-11-13 Elliot Lee <sopwith@redhat.com>
* gdk/gdk.h: Add a couple of missing G_GNUC_CONST's. * gdk/gdk.h: Add a couple of missing G_GNUC_CONST's.
Mon Nov 13 14:29:32 2000 Jonathan Blandford <jrb@redhat.com> Mon Nov 13 14:29:32 2000 Jonathan Blandford <jrb@redhat.com>
......
...@@ -28,8 +28,8 @@ GTK+ requires the following packages: ...@@ -28,8 +28,8 @@ GTK+ requires the following packages:
Simple install procedure Simple install procedure
======================== ========================
% gzip -cd gtk+-1.3.1.tar.gz | tar xvf - # unpack the sources % gzip -cd gtk+-1.3.2.tar.gz | tar xvf - # unpack the sources
% cd gtk+-1.3.1 # change to the toplevel directory % cd gtk+-1.3.2 # change to the toplevel directory
% ./configure # run the `configure' script % ./configure # run the `configure' script
% make # build GTK % make # build GTK
[ Become root if necessary ] [ Become root if necessary ]
...@@ -139,7 +139,7 @@ You can compile GTK+ against a copy of GLIB that you have not ...@@ -139,7 +139,7 @@ You can compile GTK+ against a copy of GLIB that you have not
yet installed. To do this, give the --with-glib=DIR options yet installed. To do this, give the --with-glib=DIR options
to ./configure. For instance: to ./configure. For instance:
./configure --with-glib=../glib-1.3.1 ./configure --with-glib=../glib-1.3.2
This, however, will not work if you built GLIB with different This, however, will not work if you built GLIB with different
source and build directories. source and build directories.
......
General Information General Information
=================== ===================
This is GTK+ version 1.3.1. GTK+, which stands for the Gimp ToolKit, This is GTK+ version 1.3.2. GTK+, which stands for the Gimp ToolKit,
is a library for creating graphical user interfaces for the X Window is a library for creating graphical user interfaces for the X Window
System. It is designed to be small, efficient, and flexible. GTK+ is System. It is designed to be small, efficient, and flexible. GTK+ is
written in C with a very object-oriented approach. written in C with a very object-oriented approach.
...@@ -37,9 +37,9 @@ version number. This should be separated by a blank ...@@ -37,9 +37,9 @@ version number. This should be separated by a blank
line from the actual headers. line from the actual headers.
Package: gtk+ Package: gtk+
Version: 1.3.1 Version: 1.3.2
[ Please substitute 1.3.1 with the version of GTK+ that [ Please substitute 1.3.2 with the version of GTK+ that
you have installed ] you have installed ]
Then describe the bug. Include: Then describe the bug. Include:
...@@ -82,7 +82,7 @@ From: yourname@your.address.org ...@@ -82,7 +82,7 @@ From: yourname@your.address.org
Subject: handlebox test in testgtk is misnamed. Subject: handlebox test in testgtk is misnamed.
Package: gtk+ Package: gtk+
Version: 1.3.1 Version: 1.3.2
When I run gtk/testgtk, the button "handle box" When I run gtk/testgtk, the button "handle box"
is misnamed. There are multiple handle boxes in is misnamed. There are multiple handle boxes in
......
...@@ -29,7 +29,7 @@ AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl ...@@ -29,7 +29,7 @@ AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
# #
GTK_MAJOR_VERSION=1 GTK_MAJOR_VERSION=1
GTK_MINOR_VERSION=3 GTK_MINOR_VERSION=3
GTK_MICRO_VERSION=1 GTK_MICRO_VERSION=2
GTK_INTERFACE_AGE=0 GTK_INTERFACE_AGE=0
GTK_BINARY_AGE=0 GTK_BINARY_AGE=0
GTK_VERSION=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION.$GTK_MICRO_VERSION GTK_VERSION=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION.$GTK_MICRO_VERSION
......
...@@ -43,7 +43,9 @@ noinst_PROGRAMS = \ ...@@ -43,7 +43,9 @@ noinst_PROGRAMS = \
BUILT_SOURCES=test-inline-pixbufs.h BUILT_SOURCES=test-inline-pixbufs.h
test-inline-pixbufs.h: $(top_builddir)/gdk-pixbuf/make-inline-pixbuf apple-red.png gnome-foot.png test-inline-pixbufs.h: $(top_builddir)/gdk-pixbuf/make-inline-pixbuf apple-red.png gnome-foot.png
GDK_PIXBUF_MODULEDIR=$(top_builddir)/gdk-pixbuf/.libs $(top_builddir)/gdk-pixbuf/make-inline-pixbuf test-inline-pixbufs.h apple_red apple-red.png gnome_foot gnome-foot.png (topdir=`cd $(top_builddir) && pwd` ; curdir=`pwd` ; \
cd $(srcdir) && \
GDK_PIXBUF_MODULEDIR=$$topdir/gdk-pixbuf/.libs $$topdir/gdk-pixbuf/make-inline-pixbuf $$curdir/test-inline-pixbufs.h apple_red apple-red.png gnome_foot gnome-foot.png)
testpixbuf_DEPENDENCIES = $(DEPS) testpixbuf_DEPENDENCIES = $(DEPS)
testpixbuf_drawable_DEPENDENCIES = $(DEPS) testpixbuf_drawable_DEPENDENCIES = $(DEPS)
......
#include <errno.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <gtk/gtk.h>
#include <demos.h>
static GtkTextBuffer *info_buffer;
static GtkTextBuffer *source_buffer;
static gchar *current_file = NULL;
enum {
TITLE_COLUMN,
FILENAME_COLUMN,
FUNC_COLUMN,
ITALIC_COLUMN,
NUM_COLUMNS
};
gboolean
read_line (FILE *stream, GString *str)
{
int n_read = 0;
flockfile (stream);
g_string_truncate (str, 0);
while (1)
{
int c;
c = getc_unlocked (stream);
if (c == EOF)
goto done;
else
n_read++;
switch (c)
{
case '\r':
case '\n':
{
int next_c = getc_unlocked (stream);
if (!(next_c == EOF ||
(c == '\r' && next_c == '\n') ||
(c == '\n' && next_c == '\r')))
ungetc (next_c, stream);
goto done;
}
default:
g_string_append_c (str, c);
}
}
done:
funlockfile (stream);
return n_read > 0;
}
void
load_file (const gchar *filename)
{
FILE *file;
GtkTextIter start, end;
GString *buffer = g_string_new (NULL);
int state = 0;
gboolean in_para = 0;
if (current_file && !strcmp (current_file, filename))
return;
g_free (current_file);
current_file = g_strdup (filename);
gtk_text_buffer_get_bounds (info_buffer, &start, &end);
gtk_text_buffer_delete (info_buffer, &start, &end);
gtk_text_buffer_get_bounds (source_buffer, &start, &end);
gtk_text_buffer_delete (source_buffer, &start, &end);
file = fopen (filename, "r");
if (!file)
{
g_warning ("Cannot open %s: %s\n", filename, g_strerror (errno));
return;
}
gtk_text_buffer_get_iter_at_offset (info_buffer, &start, 0);
while (read_line (file, buffer))
{
gchar *p = buffer->str;
gchar *q;
switch (state)
{
case 0:
/* Reading title */
while (*p == '/' || *p == '*' || isspace (*p))
p++;
q = p + strlen (p);
while (q > p && isspace (*(q - 1)))
q--;
if (q > p)
{
int len_chars = g_utf8_pointer_to_offset (p, q);
end = start;
g_assert (strlen (p) >= q - p);
gtk_text_buffer_insert (info_buffer, &end, p, q - p);
start = end;
gtk_text_iter_backward_chars (&start, len_chars);
gtk_text_buffer_apply_tag_by_name (info_buffer, "title", &start, &end);
start = end;
state++;
}
break;
case 1:
/* Reading body of info section */
while (isspace (*p))
p++;
if (*p == '*' && *(p + 1) == '/')
{
gtk_text_buffer_get_iter_at_offset (source_buffer, &start, 0);
state++;
}
else
{
int len;
while (*p == '*' || isspace (*p))
p++;
len = strlen (p);
while (isspace (*(p + len - 1)))
len--;
if (len > 0)
{
if (in_para)
gtk_text_buffer_insert (info_buffer, &start, " ", 1);
g_assert (strlen (p) >= len);
gtk_text_buffer_insert (info_buffer, &start, p, len);
in_para = 1;
}
else
{
gtk_text_buffer_insert (info_buffer, &start, "\n", 1);
in_para = 0;
}
}
break;
case 2:
/* Skipping blank lines */
while (isspace (*p))
p++;
if (*p)
{
p = buffer->str;
state++;
/* Fall through */
}
else
break;
case 3:
/* Reading program body */
gtk_text_buffer_insert (source_buffer, &start, p, -1);
gtk_text_buffer_insert (info_buffer, &start, "\n", 1);
break;
}
}
gtk_text_buffer_get_bounds (source_buffer, &start, &end);
gtk_text_buffer_apply_tag_by_name (info_buffer, "source", &start, &end);
}
gboolean
button_press_event_cb (GtkTreeView *tree_view,
GdkEventButton *event,
GtkTreeModel *model)
{
if (event->type == GDK_2BUTTON_PRESS)
{
GtkTreePath *path = NULL;
gtk_tree_view_get_path_at_pos (tree_view,
event->window,
event->x,
event->y,
&path,
NULL);
if (path)
{
GtkTreeIter iter;
gboolean italic;
GVoidFunc func;
gtk_tree_model_get_iter (model, &iter, path);
gtk_tree_store_get (GTK_TREE_STORE (model),
&iter,
FUNC_COLUMN, &func,
ITALIC_COLUMN, &italic,
-1);
(func) ();
gtk_tree_store_set (GTK_TREE_STORE (model),
&iter,
ITALIC_COLUMN, !italic,
-1);
gtk_tree_path_free (path);
}
gtk_signal_emit_stop_by_name (GTK_OBJECT (tree_view),
"button_press_event");
return TRUE;
}
return FALSE;
}
static void
selection_cb (GtkTreeSelection *selection,
GtkTreeModel *model)
{
GtkTreeIter iter;
GValue value = {0, };
if (! gtk_tree_selection_get_selected (selection, NULL, &iter))
return;
gtk_tree_model_get_value (model, &iter,
FILENAME_COLUMN,
&value);
load_file (g_value_get_string (&value));
g_value_unset (&value);
}
static GtkWidget *
create_text (GtkTextBuffer **buffer,
gboolean is_source)
{
GtkWidget *scrolled_window;
GtkWidget *text_view;
PangoFontDescription *font_desc;
scrolled_window = gtk_scrolled_window_new (NULL, NULL);