summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKaroly Lorentey <lorentey@elte.hu>2006-02-03 13:58:41 +0000
committerKaroly Lorentey <lorentey@elte.hu>2006-02-03 13:58:41 +0000
commit0a7114a4e535e70b237b15817988344a03fe7ab1 (patch)
tree62203ebf84b3070c638cbea265d25fe542514cc0 /src
parenteb2bfdae0a1b6579908f072ab57aec0d80d6c6ec (diff)
parentc36f1e67800423383832447c45e6125bf46efc7a (diff)
downloademacs-0a7114a4e535e70b237b15817988344a03fe7ab1.tar.gz
Merged from
Patches applied: * emacs@sv.gnu.org/emacs--devo--0--patch-32 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-33 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-34 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-35 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-36 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-37 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-8 Merge from emacs--devo--0 * emacs@sv.gnu.org/gnus--rel--5.10--patch-9 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-10 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-11 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-12 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-13 Merge from emacs--devo--0 git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-504
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog10
-rw-r--r--src/coding.c4
-rw-r--r--src/gtkutil.c64
3 files changed, 45 insertions, 33 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index c85a6e78e73..056bb851f4a 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,13 @@
+2006-02-02 Kenichi Handa <handa@m17n.org>
+
+ * coding.c (decode_composition_emacs_mule): Fix handling of
+ incorrect format data.
+
+2006-01-31 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
+
+ * gtkutil.c (update_frame_tool_bar): Use new tool bar functions
+ (gtk_toolbar_insert) so we can have tool bars of different sizes.
+
2006-01-30 Luc Teirlinck <teirllm@auburn.edu>
* data.c (Flistp): Doc fix.
diff --git a/src/coding.c b/src/coding.c
index 14f8fd33285..2358f3e13f3 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -868,7 +868,7 @@ decode_composition_emacs_mule (coding, src, src_end,
component[ncomponent] = c;
}
}
- else
+ else if (c >= 0x80)
{
/* This may be an old Emacs 20 style format. See the comment at
the section 2 of this file. */
@@ -920,6 +920,8 @@ decode_composition_emacs_mule (coding, src, src_end,
else
return 0;
}
+ else
+ return 0;
if (buf == bufp || dst + (bufp - buf) <= (dst_bytes ? dst_end : src))
{
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 065adeb4937..67288cab33f 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -3359,9 +3359,7 @@ xg_tool_bar_help_callback (w, event, client_data)
Lisp_Object help, frame;
if (! GTK_IS_BUTTON (w))
- {
- return FALSE;
- }
+ return FALSE;
if (! f || ! f->n_tool_bar_items || NILP (f->tool_bar_items))
return FALSE;
@@ -3596,54 +3594,56 @@ update_frame_tool_bar (f)
if (! wicon)
{
GtkWidget *w = xg_get_image_for_pixmap (f, img, x->widget, NULL);
+ GtkToolItem *ti = gtk_tool_button_new (w, "");
gtk_misc_set_padding (GTK_MISC (w), hmargin, vmargin);
+ gtk_toolbar_insert (GTK_TOOLBAR (x->toolbar_widget),
+ ti,
+ i);
/* The EMACS_INT cast avoids a warning. */
- gtk_toolbar_append_item (GTK_TOOLBAR (x->toolbar_widget),
- 0, 0, 0,
- w,
- GTK_SIGNAL_FUNC (xg_tool_bar_callback),
- (gpointer) (EMACS_INT) i);
+ g_signal_connect (GTK_WIDGET (ti), "clicked",
+ GTK_SIGNAL_FUNC (xg_tool_bar_callback),
+ (gpointer) (EMACS_INT) i);
+
+ gtk_widget_show (GTK_WIDGET (ti));
+ gtk_widget_show (GTK_WIDGET (w));
/* Save the image so we can see if an update is needed when
this function is called again. */
g_object_set_data (G_OBJECT (w), XG_TOOL_BAR_IMAGE_DATA,
(gpointer)img->pixmap);
+ g_object_set_data (G_OBJECT (ti), XG_FRAME_DATA, (gpointer)f);
+
/* Catch expose events to overcome an annoying redraw bug, see
comment for xg_tool_bar_item_expose_callback. */
- g_signal_connect (G_OBJECT (w),
+ g_signal_connect (G_OBJECT (ti),
"expose-event",
G_CALLBACK (xg_tool_bar_item_expose_callback),
0);
- /* We must set sensitive on the button that is the parent
- of the GtkImage parent. Go upwards until we find the button. */
+ gtk_widget_set_sensitive (GTK_WIDGET (ti), enabled_p);
+ gtk_tool_item_set_homogeneous (GTK_TOOL_ITEM (ti), FALSE);
+
while (! GTK_IS_BUTTON (w))
w = gtk_widget_get_parent (w);
- if (w)
- {
- /* Save the frame in the button so the xg_tool_bar_callback
- can get at it. */
- g_object_set_data (G_OBJECT (w), XG_FRAME_DATA, (gpointer)f);
- gtk_widget_set_sensitive (w, enabled_p);
-
- /* Use enter/leave notify to show help. We use the events
- rather than the GtkButton specific signals "enter" and
- "leave", so we can have only one callback. The event
- will tell us what kind of event it is. */
- /* The EMACS_INT cast avoids a warning. */
- g_signal_connect (G_OBJECT (w),
- "enter-notify-event",
- G_CALLBACK (xg_tool_bar_help_callback),
- (gpointer) (EMACS_INT) i);
- g_signal_connect (G_OBJECT (w),
- "leave-notify-event",
- G_CALLBACK (xg_tool_bar_help_callback),
- (gpointer) (EMACS_INT) i);
- }
+ g_object_set_data (G_OBJECT (w), XG_FRAME_DATA, (gpointer)f);
+
+ /* Use enter/leave notify to show help. We use the events
+ rather than the GtkButton specific signals "enter" and
+ "leave", so we can have only one callback. The event
+ will tell us what kind of event it is. */
+ /* The EMACS_INT cast avoids a warning. */
+ g_signal_connect (G_OBJECT (w),
+ "enter-notify-event",
+ G_CALLBACK (xg_tool_bar_help_callback),
+ (gpointer) (EMACS_INT) i);
+ g_signal_connect (G_OBJECT (w),
+ "leave-notify-event",
+ G_CALLBACK (xg_tool_bar_help_callback),
+ (gpointer) (EMACS_INT) i);
}
else
{