first commit

This commit is contained in:
sherlock2010 2019-12-02 21:38:55 +08:00
parent 8fd1e8b660
commit 4efc252394
37 changed files with 6456 additions and 0 deletions

557
gtk+-1.2.10-ahiguti.patch Normal file
View File

@ -0,0 +1,557 @@
Return-Path: a-higuti@math.sci.hokudai.ac.jp
Delivery-Date: Thu Sep 23 14:52:43 1999
Return-Path: <a-higuti@math.sci.hokudai.ac.jp>
Received: from localhost (IDENT:otaylor@localhost [127.0.0.1])
by fresnel.labs.redhat.com (8.9.3/8.9.3) with ESMTP id OAA00891
for <otaylor@localhost>; Thu, 23 Sep 1999 14:52:41 -0400
Received: from lacrosse.redhat.com
by localhost with POP3 (fetchmail-5.0.0)
for otaylor@localhost (single-drop); Thu, 23 Sep 1999 14:52:42 -0400 (EDT)
Received: from mail.redhat.com (mail.redhat.com [199.183.24.239])
by lacrosse.corp.redhat.com (8.9.3/8.9.3) with ESMTP id OAA19205
for <otaylor@lacrosse.redhat.com>; Thu, 23 Sep 1999 14:01:27 -0400
Received: from math.sci.hokudai.ac.jp (seki.math.sci.hokudai.ac.jp [133.50.152.8])
by mail.redhat.com (8.8.7/8.8.7) with ESMTP id OAA13383
for <otaylor@redhat.com>; Thu, 23 Sep 1999 14:01:49 -0400
Received: from heathcliff (a-higuti@hilbert.math.sci.hokudai.ac.jp [133.50.152.11])
by math.sci.hokudai.ac.jp (8.8.8/3.6W01/06/98) with SMTP id DAA23889
for <otaylor@redhat.com>; Fri, 24 Sep 1999 03:01:10 +0900 (JST)
Date: Fri, 24 Sep 1999 03:01:10 +0900 (JST)
Message-Id: <199909231801.DAA23889@math.sci.hokudai.ac.jp>
From: a-higuti@math.sci.hokudai.ac.jp (Akira Higuchi)
To: otaylor@redhat.com
Subject: Adding more gdk_isw* macros
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Status: O
Lines: 528
Xref: fresnel.labs.redhat.com prog-gtk:648
Hello Owen,
I'm working on adding CJK support to gnome apps, and I need your advice.
As you know, gtk+-1.2 has some support for CJK. It's sufficient for most
gnome apps to be internationalized, but some problems remain. The most
problem is that there is no way of doing word wrapping for CJK strings.
For example, gtk-xmhtml shows Japanese text very uglily, because Japanese
sentences are recognized as very long words. (a Japanese sentence
contain any spaces in most cases.) The same problem is in gtk+ itself, too;
Word wrapping in GtkLabel and GtkText doesn't work correctly for CJK text,
because of the same reason as above.
In order to fix it, we need more gdk_isw* functions than we already have
in gdki18n.h. (I regret I didn't add them before gtk+-1.2 was released.)
I attach herewith a patch which fixes it, but I think it's not acceptable
to adding a new macro to a stable version of gtk+. (is it?)
The question I want to ask you is: what's the best way of fixing the
problem without adding these macros to gdki18n.h? A solution is to add
these macros to each *.c files (in GtkLabel, GtkText, and gtkxmhtml etc.)
rather than gtki18n.h, but it's very ugly I think.
Please don't say "wait until gscript is completed" ;-( I don't want to
wait for a long time. (Please let me know if I can help you with gscript
BTW. I've not hacked gscript yet, because it seems to be too early to be
hacked by other than you.)
Thanks,
Akira Higuchi
---------------- x8 ---------------- x8 ---------------- x8 ----------------
diff -up gtk+-1.2.10/gdk/gdki18n.h.ahiguti gtk+-1.2.10/gdk/gdki18n.h
--- gtk+-1.2.10/gdk/gdki18n.h.ahiguti 2000-01-24 03:58:21.000000000 +0100
+++ gtk+-1.2.10/gdk/gdki18n.h 2008-10-02 10:43:26.000000000 +0200
@@ -51,4 +51,32 @@
# define gdk_iswspace(c) ((wchar_t)(c) <= 0xFF && isspace(c))
#endif
+/* The following 9 macros are added in gtk+ 1.2.X. Don't use them without
+ * checking GTK_CHECK_VERSION. For example,
+ * #if GTK_CHECK_VERSION (1,2,X)
+ * ... code which uses gdk_iswalpha(), gdk_iswcntrl(), etc. ...
+ * #endif
+ */
+#if !defined(G_HAVE_BROKEN_WCTYPE) && (defined(G_HAVE_WCTYPE_H) || defined(G_HAVE_WCHAR_H)) && !defined(X_LOCALE)
+# define gdk_iswalpha(c) iswalpha(c)
+# define gdk_iswcntrl(c) iswcntrl(c)
+# define gdk_iswdigit(c) iswdigit(c)
+# define gdk_iswlower(c) iswlower(c)
+# define gdk_iswgraph(c) iswgraph(c)
+# define gdk_iswprint(c) iswprint(c)
+# define gdk_iswpunct(c) iswpunct(c)
+# define gdk_iswupper(c) iswupper(c)
+# define gdk_iswxdigit(c) iswxdigit(c)
+#else
+# define gdk_iswalpha(c) ((wchar_t)(c) <= 0xFF && isalpha(c))
+# define gdk_iswcntrl(c) ((wchar_t)(c) <= 0xFF && iscntrl(c))
+# define gdk_iswdigit(c) ((wchar_t)(c) <= 0xFF && isdigit(c))
+# define gdk_iswlower(c) ((wchar_t)(c) <= 0xFF && islower(c))
+# define gdk_iswgraph(c) ((wchar_t)(c) > 0xFF || isgraph(c))
+# define gdk_iswprint(c) ((wchar_t)(c) > 0xFF || isprint(c))
+# define gdk_iswpunct(c) ((wchar_t)(c) <= 0xFF && ispunct(c))
+# define gdk_iswupper(c) ((wchar_t)(c) <= 0xFF && isupper(c))
+# define gdk_iswxdigit(c) ((wchar_t)(c) <= 0xFF && isxdigit(c))
+#endif
+
#endif /* __GDK_I18N_H__ */
diff -up gtk+-1.2.10/gtk/gtkentry.c.ahiguti gtk+-1.2.10/gtk/gtkentry.c
--- gtk+-1.2.10/gtk/gtkentry.c.ahiguti 2001-04-02 04:14:54.000000000 +0200
+++ gtk+-1.2.10/gtk/gtkentry.c 2008-10-02 10:43:26.000000000 +0200
@@ -2036,11 +2036,21 @@ gtk_entry_move_word (GtkEditable *editab
}
}
+static gboolean
+alnum_or_ideogram (GtkEntry *entry, guint index)
+{
+ GdkWChar ch;
+ ch = entry->text[index];
+ if (entry->use_wchar)
+ return !(gdk_iswpunct (ch) || gdk_iswcntrl (ch) || gdk_iswspace (ch));
+ else
+ return !(ispunct (ch) || iscntrl (ch) || isspace (ch));
+}
+
static void
gtk_move_forward_word (GtkEntry *entry)
{
GtkEditable *editable;
- GdkWChar *text;
gint i;
editable = GTK_EDITABLE (entry);
@@ -2054,21 +2064,12 @@ gtk_move_forward_word (GtkEntry *entry)
if (entry->text && (editable->current_pos < entry->text_length))
{
- text = entry->text;
- i = editable->current_pos;
-
- if ((entry->use_wchar) ? (!gdk_iswalnum (text[i])) : (!isalnum (text[i])))
- for (; i < entry->text_length; i++)
- {
- if ((entry->use_wchar) ? gdk_iswalnum (text[i]) : isalnum (text[i]))
- break;
- }
-
+ for (i = editable->current_pos; i < entry->text_length; i++)
+ if (alnum_or_ideogram (entry, i))
+ break;
for (; i < entry->text_length; i++)
- {
- if ((entry->use_wchar) ? (!gdk_iswalnum (text[i])) : (!isalnum (text[i])))
- break;
- }
+ if (!alnum_or_ideogram (entry, i))
+ break;
editable->current_pos = i;
}
@@ -2078,7 +2079,6 @@ static void
gtk_move_backward_word (GtkEntry *entry)
{
GtkEditable *editable;
- GdkWChar *text;
gint i;
editable = GTK_EDITABLE (entry);
@@ -2092,26 +2092,19 @@ gtk_move_backward_word (GtkEntry *entry)
if (entry->text && editable->current_pos > 0)
{
- text = entry->text;
- i = editable->current_pos - 1;
- if ((entry->use_wchar) ? (!gdk_iswalnum (text[i])) : (!isalnum (text[i])))
- for (; i >= 0; i--)
+ for (i = editable->current_pos - 1; i >= 0; i--)
+ if (alnum_or_ideogram (entry, i))
+ break;
+ for (; i >= 0; i--)
+ if (!alnum_or_ideogram (entry, i))
{
- if ((entry->use_wchar) ? gdk_iswalnum (text[i]) : isalnum (text[i]))
- break;
+ i++;
+ break;
}
- for (; i >= 0; i--)
- {
- if ((entry->use_wchar) ? (!gdk_iswalnum (text[i])) : (!isalnum (text[i])))
- {
- i++;
- break;
- }
- }
-
+
if (i < 0)
i = 0;
-
+
editable->current_pos = i;
}
}
diff -up gtk+-1.2.10/gtk/gtklabel.c.ahiguti gtk+-1.2.10/gtk/gtklabel.c
--- gtk+-1.2.10/gtk/gtklabel.c.ahiguti 2001-04-02 05:12:38.000000000 +0200
+++ gtk+-1.2.10/gtk/gtklabel.c 2008-10-02 10:43:26.000000000 +0200
@@ -56,6 +56,7 @@ struct _GtkLabelWord
GtkLabelWord *next;
gint uline_y;
GtkLabelULine *uline;
+ gboolean paragraph_break;
};
struct _GtkLabelULine
@@ -396,6 +397,7 @@ gtk_label_word_alloc (void)
word->beginning = NULL;
word->next = NULL;
word->uline = NULL;
+ word->paragraph_break = FALSE;
return word;
}
@@ -441,6 +443,7 @@ gtk_label_split_text (GtkLabel *label)
if (str == label->label_wc || str[-1] == '\n')
{
/* Paragraph break */
+ word->paragraph_break = TRUE;
word->space = 0;
max_line_width = MAX (line_width, max_line_width);
@@ -488,6 +491,7 @@ gtk_label_split_text (GtkLabel *label)
{
word = gtk_label_word_alloc ();
+ word->paragraph_break = TRUE;
word->space = 0;
word->beginning = str;
word->length = 0;
@@ -500,6 +504,13 @@ gtk_label_split_text (GtkLabel *label)
return MAX (line_width, max_line_width);
}
+static gboolean
+is_ideogram (GdkWChar wc)
+{
+ return !(gdk_iswalnum (wc) || gdk_iswspace (wc) ||
+ gdk_iswpunct (wc) || gdk_iswcntrl (wc));
+}
+
/* this needs to handle white space better. */
static gint
gtk_label_split_text_wrapped (GtkLabel *label)
@@ -526,6 +537,7 @@ gtk_label_split_text_wrapped (GtkLabel *
if (str == label->label_wc || str[-1] == '\n')
{
/* Paragraph break */
+ word->paragraph_break = TRUE;
word->space = 0;
max_line_width = MAX (line_width, max_line_width);
@@ -546,24 +558,30 @@ gtk_label_split_text_wrapped (GtkLabel *
else
word->space = space_width * nspaces;
}
- else
+ else if (gdk_iswspace (str[-1]))
{
/* Regular inter-word space */
word->space = space_width;
}
+ else
+ {
+ word->space = 0;
+ }
word->beginning = str;
word->length = 0;
p = word->beginning;
while (*p && !gdk_iswspace (*p))
{
+ if (word->length > 0 && (is_ideogram (p[-1]) || is_ideogram (*p)))
+ break;
word->length++;
p++;
}
word->width = gdk_text_width_wc (GTK_WIDGET (label)->style->font, str, word->length);
str += word->length;
- if (*str)
+ if (*str && gdk_iswspace (*str))
str++;
line_width += word->space + word->width;
@@ -600,7 +618,7 @@ gtk_label_pick_width (GtkLabel *label,
width = 0;
for (word = label->words; word; word = word->next)
{
- if (word->space == 0
+ if (word->paragraph_break
|| (line_width
&& (line_width >= min_width
|| line_width + word->width + word->space > max_width)))
@@ -716,7 +734,8 @@ gtk_label_finalize_lines_wrap (GtkLabel
GtkLabelWord *word, *line, *next_line;
GtkWidget *widget;
gchar *ptrn;
- gint x, y, space, extra_width, add_space, baseline_skip;
+ gint x, y, space, num_words, extra_width, add_space, baseline_skip;
+ gboolean deliver_equivalently;
g_return_if_fail (label->wrap);
@@ -724,20 +743,24 @@ gtk_label_finalize_lines_wrap (GtkLabel
y = 0;
baseline_skip = (GTK_WIDGET (label)->style->font->ascent +
GTK_WIDGET (label)->style->font->descent + 1);
+ deliver_equivalently = FALSE;
for (line = label->words; line != 0; line = next_line)
{
- space = 0;
+ space = num_words = 0;
extra_width = max_line_width - line->width;
for (next_line = line->next; next_line; next_line = next_line->next)
{
- if (next_line->space == 0)
+ if (next_line->paragraph_break)
break; /* New paragraph */
if (next_line->space + next_line->width > extra_width)
break;
+ if (next_line->space == 0)
+ deliver_equivalently = TRUE; /* An ideogram is found. */
extra_width -= next_line->space + next_line->width;
space += next_line->space;
+ num_words++;
}
line->x = 0;
@@ -747,14 +770,18 @@ gtk_label_finalize_lines_wrap (GtkLabel
for (word = line->next; word != next_line; word = word->next)
{
- if (next_line && next_line->space)
+ if (next_line && !next_line->paragraph_break &&
+ label->jtype == GTK_JUSTIFY_FILL &&
+ (deliver_equivalently ? num_words : space) > 0)
{
- /* Not last line of paragraph --- fill line if needed */
- if (label->jtype == GTK_JUSTIFY_FILL) {
+ /* Not last line of paragraph --- fill line */
+ if (deliver_equivalently)
+ add_space = (extra_width + num_words / 2) / num_words;
+ else
add_space = (extra_width * word->space + space / 2) / space;
- extra_width -= add_space;
- space -= word->space;
- }
+ extra_width -= add_space;
+ space -= word->space;
+ num_words--;
}
word->x = x + word->space + add_space;
@@ -925,7 +952,7 @@ gtk_label_expose (GtkWidget *widget
for (word = label->words; word; word = word->next)
{
- gchar save = word->beginning[word->length];
+ GdkWChar save = word->beginning[word->length];
word->beginning[word->length] = '\0';
gtk_label_paint_word (label, x, y, word, &event->area);
word->beginning[word->length] = save;
diff -up gtk+-1.2.10/gtk/gtktext.c.ahiguti gtk+-1.2.10/gtk/gtktext.c
--- gtk+-1.2.10/gtk/gtktext.c.ahiguti 2001-03-15 21:15:12.000000000 +0100
+++ gtk+-1.2.10/gtk/gtktext.c 2008-10-02 10:43:27.000000000 +0200
@@ -101,6 +101,13 @@ enum {
ARG_WORD_WRAP
};
+typedef enum {
+ CHAR_CLASS_SPACE,
+ CHAR_CLASS_ALNUM,
+ CHAR_CLASS_IDEOGRAM,
+ CHAR_CLASS_OTHERS /* punct, cntrl */
+} CharClass;
+
typedef struct _TextProperty TextProperty;
typedef struct _TabStopMark TabStopMark;
typedef struct _PrevTabCont PrevTabCont;
@@ -300,6 +307,8 @@ static LineParams find_line_params (GtkT
const GtkPropertyMark *mark,
const PrevTabCont *tab_cont,
PrevTabCont *next_cont);
+static void find_word_wrap_position (GtkText* text, LineParams *lp);
+static CharClass char_class (GtkText* text, guint index);
static void recompute_geometry (GtkText* text);
static void insert_expose (GtkText* text, guint old_pixels, gint nchars, guint new_line_count);
static void delete_expose (GtkText* text,
@@ -4111,27 +4120,21 @@ gtk_text_move_forward_word (GtkText *tex
undraw_cursor (text, FALSE);
- if (text->use_wchar)
+ while (!LAST_INDEX (text, text->cursor_mark))
{
- while (!LAST_INDEX (text, text->cursor_mark) &&
- !gdk_iswalnum (GTK_TEXT_INDEX(text, text->cursor_mark.index)))
- advance_mark (&text->cursor_mark);
-
- while (!LAST_INDEX (text, text->cursor_mark) &&
- gdk_iswalnum (GTK_TEXT_INDEX(text, text->cursor_mark.index)))
- advance_mark (&text->cursor_mark);
+ CharClass cc = char_class (text, text->cursor_mark.index);
+ if (cc == CHAR_CLASS_ALNUM || cc == CHAR_CLASS_IDEOGRAM)
+ break;
+ advance_mark (&text->cursor_mark);
}
- else
+ while (!LAST_INDEX (text, text->cursor_mark))
{
- while (!LAST_INDEX (text, text->cursor_mark) &&
- !isalnum (GTK_TEXT_INDEX(text, text->cursor_mark.index)))
- advance_mark (&text->cursor_mark);
-
- while (!LAST_INDEX (text, text->cursor_mark) &&
- isalnum (GTK_TEXT_INDEX(text, text->cursor_mark.index)))
- advance_mark (&text->cursor_mark);
+ CharClass cc = char_class (text, text->cursor_mark.index);
+ if (cc != CHAR_CLASS_ALNUM && cc != CHAR_CLASS_IDEOGRAM)
+ break;
+ advance_mark (&text->cursor_mark);
}
-
+
find_cursor (text, TRUE);
draw_cursor (text, FALSE);
}
@@ -4143,25 +4146,19 @@ gtk_text_move_backward_word (GtkText *te
undraw_cursor (text, FALSE);
- if (text->use_wchar)
+ while (text->cursor_mark.index > 0)
{
- while ((text->cursor_mark.index > 0) &&
- !gdk_iswalnum (GTK_TEXT_INDEX(text, text->cursor_mark.index-1)))
- decrement_mark (&text->cursor_mark);
-
- while ((text->cursor_mark.index > 0) &&
- gdk_iswalnum (GTK_TEXT_INDEX(text, text->cursor_mark.index-1)))
- decrement_mark (&text->cursor_mark);
+ CharClass cc = char_class (text, text->cursor_mark.index - 1);
+ if (cc == CHAR_CLASS_ALNUM || cc == CHAR_CLASS_IDEOGRAM)
+ break;
+ decrement_mark (&text->cursor_mark);
}
- else
+ while (text->cursor_mark.index > 0)
{
- while ((text->cursor_mark.index > 0) &&
- !isalnum (GTK_TEXT_INDEX(text, text->cursor_mark.index-1)))
- decrement_mark (&text->cursor_mark);
-
- while ((text->cursor_mark.index > 0) &&
- isalnum (GTK_TEXT_INDEX(text, text->cursor_mark.index-1)))
- decrement_mark (&text->cursor_mark);
+ CharClass cc = char_class (text, text->cursor_mark.index - 1);
+ if (cc != CHAR_CLASS_ALNUM && cc != CHAR_CLASS_IDEOGRAM)
+ break;
+ decrement_mark (&text->cursor_mark);
}
find_cursor (text, TRUE);
@@ -4782,27 +4779,8 @@ find_line_params (GtkText* text,
GtkPropertyMark saved_mark = lp.end;
guint saved_characters = lp.displayable_chars;
- lp.displayable_chars += 1;
-
- if (text->use_wchar)
- {
- while (!gdk_iswspace (GTK_TEXT_INDEX (text, lp.end.index)) &&
- (lp.end.index > lp.start.index))
- {
- decrement_mark (&lp.end);
- lp.displayable_chars -= 1;
- }
- }
- else
- {
- while (!isspace(GTK_TEXT_INDEX (text, lp.end.index)) &&
- (lp.end.index > lp.start.index))
- {
- decrement_mark (&lp.end);
- lp.displayable_chars -= 1;
- }
- }
-
+ find_word_wrap_position (text, &lp);
+
/* If whole line is one word, revert to char wrapping */
if (lp.end.index == lp.start.index)
{
@@ -4850,6 +4828,54 @@ find_line_params (GtkText* text,
return lp;
}
+static CharClass
+char_class (GtkText* text, guint index)
+{
+ GdkWChar wc;
+ wc = GTK_TEXT_INDEX (text, index);
+ if (text->use_wchar)
+ {
+ if (gdk_iswspace (wc))
+ return CHAR_CLASS_SPACE;
+ else if (gdk_iswalnum (wc))
+ return CHAR_CLASS_ALNUM;
+ else if (gdk_iswpunct (wc) || gdk_iswcntrl (wc))
+ return CHAR_CLASS_OTHERS;
+ else
+ return CHAR_CLASS_IDEOGRAM;
+ }
+ else
+ {
+ if (isspace (wc))
+ return CHAR_CLASS_SPACE;
+ else if (isalnum (wc))
+ return CHAR_CLASS_ALNUM;
+ else if (ispunct (wc) || iscntrl (wc))
+ return CHAR_CLASS_OTHERS;
+ else
+ return CHAR_CLASS_IDEOGRAM;
+ }
+}
+
+static void
+find_word_wrap_position (GtkText* text, LineParams *lp)
+{
+ while (lp->end.index > lp->start.index &&
+ char_class (text, lp->end.index) != CHAR_CLASS_SPACE &&
+ char_class (text, lp->end.index) != CHAR_CLASS_IDEOGRAM &&
+ char_class (text, lp->end.index - 1) != CHAR_CLASS_IDEOGRAM)
+ {
+ decrement_mark (&lp->end);
+ lp->displayable_chars -= 1;
+ }
+
+ /* lp->end.index points the position to be cut just now. If it's not a
+ * space, move it to the next display line. */
+ if (lp->end.index > lp->start.index &&
+ char_class (text, lp->end.index) != CHAR_CLASS_SPACE)
+ decrement_mark (&lp->end);
+}
+
static void
expand_scratch_buffer (GtkText* text, guint len)
{
---------------- x8 ---------------- x8 ---------------- x8 ----------------
--------------------------------------
Akira Higuchi
Dept. of Mathematics, Hokkaido Univ.
Hokkaido, Japan
Email: a-higuti@math.sci.hokudai.ac.jp

View File

@ -0,0 +1,29 @@
--- gtk+-1.2.10/gtk/gtktypeutils.h.alignment Fri Aug 18 17:36:34 2000
+++ gtk+-1.2.10/gtk/gtktypeutils.h Tue Jul 3 21:07:40 2001
@@ -191,6 +191,13 @@
GtkTypeClass *klass;
};
+#ifdef __GNUC__
+struct _GtkTypeClassDummyAlign
+{
+ GtkType type;
+ guint *signals;
+};
+#endif /* __GNUC__ */
/* A GtkTypeClass defines the minimum structure requirements for
* a types class. Classes returned from gtk_type_class () and
@@ -203,7 +210,11 @@
* one unique identifier per class.
*/
GtkType type;
-};
+}
+#ifdef __GNUC__
+__attribute__ ((aligned (__alignof (struct _GtkTypeClassDummyAlign))))
+#endif /* __GNUC__ */
+;
struct _GtkArg

4374
gtk+-1.2.10-autotools.patch Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,11 @@
--- gtk+-1.2.10/gdk/gdk.c.bellvolume Wed Jan 15 12:32:25 2003
+++ gtk+-1.2.10/gdk/gdk.c Wed Jan 15 12:32:28 2003
@@ -989,7 +989,7 @@
void
gdk_beep (void)
{
- XBell(gdk_display, 100);
+ XBell(gdk_display, 0);
}
/*

View File

@ -0,0 +1,30 @@
Index: gtk/gtkclist.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkclist.c,v
retrieving revision 1.156.2.25
retrieving revision 1.156.2.26
diff -u -p -r1.156.2.25 -r1.156.2.26
--- gtk+-1.2.10/gtk/gtkclist.c 1 Mar 2001 00:18:20 -0000 1.156.2.25
+++ gtk+-1.2.10/gtk/gtkclist.c 14 Dec 2002 04:17:03 -0000 1.156.2.26
@@ -2800,10 +2800,6 @@ real_remove_row (GtkCList *clist,
clist->row_list_end = g_list_previous (list);
g_list_remove (list, clist_row);
- /*if (clist->focus_row >=0 &&
- (row <= clist->focus_row || clist->focus_row >= clist->rows))
- clist->focus_row--;*/
-
if (row < ROW_FROM_YPIXEL (clist, 0))
clist->voffset += clist->row_height + CELL_SPACING;
@@ -4331,7 +4327,9 @@ sync_selection (GtkCList *clist,
clist->focus_row += d;
if (clist->focus_row == -1 && clist->rows >= 1)
clist->focus_row = 0;
- else if (clist->focus_row >= clist->rows)
+ else if (d < 0 && clist->focus_row >= clist->rows - 1)
+ clist->focus_row = clist->rows - 2;
+ else if (clist->focus_row >= clist->rows) /* Paranoia */
clist->focus_row = clist->rows - 1;
}

140
gtk+-1.2.10-ctext.patch Normal file
View File

@ -0,0 +1,140 @@
--- gtk+-1.2.10/gdk/gdkselection.c.ctext Thu Jul 5 12:41:42 2001
+++ gtk+-1.2.10/gdk/gdkselection.c Thu Jul 5 12:45:25 2001
@@ -191,73 +191,6 @@
gdk_send_xevent (requestor, False, NoEventMask, (XEvent*) &xevent);
}
-
-/* The output of XmbTextPropertyToTextList may include stuff not valid
- * for COMPOUND_TEXT. This routine tries to correct this by:
- *
- * a) Canonicalizing CR LF and CR to LF
- * b) Stripping out all other non-allowed control characters
- *
- * See the COMPOUND_TEXT spec distributed with X for explanations
- * what is allowed.
- */
-static gchar *
-sanitize_ctext (const char *str,
- gint *length)
-{
- gchar *result = g_malloc (*length + 1);
- gint out_length = 0;
- gint i;
- const guchar *ustr = (const guchar *)str;
-
- for (i=0; i < *length; i++)
- {
- guchar c = ustr[i];
-
- if (c == '\r')
- {
- result[out_length++] = '\n';
- if (i + 1 < *length && ustr[i + 1] == '\n')
- i++;
- }
- else if (c == 27 /* ESC */)
- {
- /* Check for "extended segments, which can contain arbitrary
- * octets. See CTEXT spec, section 6.
- */
-
- if (i + 5 < *length &&
- ustr[i + 1] == '%' &&
- ustr[i + 2] == '/' &&
- (ustr[i + 3] >= 48 && ustr[i + 3] <= 52) &&
- ustr[i + 4] >= 128 &&
- ustr[i + 5] >= 128)
- {
- int extra_len = 6 + (ustr[i + 4] - 128) * 128 + ustr[i + 5] - 128;
- extra_len = MAX (extra_len, *length - i);
-
- memcpy (result + out_length, ustr + i, extra_len);
- out_length += extra_len;
- i += extra_len - 1;
- }
- else
- result[out_length++] = c;
- }
- else if (c == '\n' || c == '\t' || c == 27 /* ESC */ ||
- (c >= 32 && c <= 127) || /* GL */
- c == 155 /* CONTROL SEQUENCE INTRODUCER */ ||
- (c >= 160 && c <= 255)) /* GR */
- {
- result[out_length++] = c;
- }
- }
-
- result[out_length] = '\0';
- *length = out_length;
-
- return result;
-}
-
gint
gdk_text_property_to_text_list (GdkAtom encoding, gint format,
guchar *text, gint length,
@@ -266,32 +199,16 @@
XTextProperty property;
gint count = 0;
gint res;
- gchar *sanitized_text = NULL;
if (!list)
return 0;
property.encoding = encoding;
property.format = format;
-
- if (encoding == gdk_atom_intern ("COMPOUND_TEXT", FALSE) && format == 8)
- {
- gint sanitized_text_length = length;
-
- property.value = sanitized_text = sanitize_ctext (text, &sanitized_text_length);
- property.nitems = sanitized_text_length;
- }
- else
- {
- property.value = text;
- property.nitems = length;
- }
-
+ property.value = text;
+ property.nitems = length;
res = XmbTextPropertyToTextList (GDK_DISPLAY(), &property, list, &count);
- if (sanitized_text)
- g_free (sanitized_text);
-
if (res == XNoMemory || res == XLocaleNotSupported ||
res == XConverterNotFound)
return 0;
@@ -314,8 +231,6 @@
{
gint res;
XTextProperty property;
- gint sanitized_text_length;
- gchar *sanitized_text;
res = XmbTextListToTextProperty (GDK_DISPLAY(),
(char **)&str, 1, XCompoundTextStyle,
@@ -334,17 +249,10 @@
*encoding = property.encoding;
if (format)
*format = property.format;
-
- sanitized_text_length = property.nitems;
- sanitized_text = sanitize_ctext (property.value, &sanitized_text_length);
-
if (ctext)
- *ctext = sanitized_text;
- else
- g_free (sanitized_text);
-
+ *ctext = g_strdup (property.value);
if (length)
- *length = sanitized_text_length;
+ *length = property.nitems;
if (property.value)
XFree (property.value);

188
gtk+-1.2.10-deletedir.patch Normal file
View File

@ -0,0 +1,188 @@
--- gtk+-1.2.10/gtk/gtkfilesel.c.deletedir Thu Feb 15 23:36:19 2001
+++ gtk+-1.2.10/gtk/gtkfilesel.c Wed Apr 17 20:36:25 2002
@@ -325,7 +325,8 @@
static void gtk_file_selection_populate (GtkFileSelection *fs,
gchar *rel_path,
- gint try_complete);
+ gboolean try_complete,
+ gboolean reset_entry);
static void gtk_file_selection_abort (GtkFileSelection *fs);
static void gtk_file_selection_update_history_menu (GtkFileSelection *fs,
@@ -522,7 +523,7 @@
}
else
{
- gtk_file_selection_populate (filesel, "", FALSE);
+ gtk_file_selection_populate (filesel, "", FALSE, TRUE);
}
gtk_widget_grab_focus (filesel->selection_entry);
@@ -637,7 +638,7 @@
name = last_slash + 1;
}
- gtk_file_selection_populate (filesel, buf, FALSE);
+ gtk_file_selection_populate (filesel, buf, FALSE, TRUE);
if (filesel->selection_entry)
gtk_entry_set_text (GTK_ENTRY (filesel->selection_entry), name);
@@ -673,7 +674,7 @@
if (filesel->selection_entry)
gtk_entry_set_text (GTK_ENTRY (filesel->selection_entry), pattern);
- gtk_file_selection_populate (filesel, (gchar*) pattern, TRUE);
+ gtk_file_selection_populate (filesel, (gchar*) pattern, TRUE, TRUE);
}
static void
@@ -806,7 +807,7 @@
g_free (full_path);
gtk_widget_destroy (fs->fileop_dialog);
- gtk_file_selection_populate (fs, "", FALSE);
+ gtk_file_selection_populate (fs, "", FALSE, FALSE);
}
static void
@@ -903,7 +904,7 @@
g_free (full_path);
gtk_widget_destroy (fs->fileop_dialog);
- gtk_file_selection_populate (fs, "", FALSE);
+ gtk_file_selection_populate (fs, "", FALSE, TRUE);
}
static void
@@ -1009,8 +1010,9 @@
g_free (new_filename);
g_free (old_filename);
+ gtk_file_selection_populate (fs, "", FALSE, FALSE);
+ gtk_entry_set_text (GTK_ENTRY (fs->selection_entry), file);
gtk_widget_destroy (fs->fileop_dialog);
- gtk_file_selection_populate (fs, "", FALSE);
}
static void
@@ -1112,7 +1114,7 @@
text = g_strdup (text);
- gtk_file_selection_populate (fs, text, TRUE);
+ gtk_file_selection_populate (fs, text, TRUE, TRUE);
g_free (text);
@@ -1124,7 +1126,6 @@
return FALSE;
}
-
static void
gtk_file_selection_history_callback (GtkWidget *widget, gpointer data)
{
@@ -1142,7 +1143,7 @@
if (callback_arg->menu_item == widget)
{
- gtk_file_selection_populate (fs, callback_arg->directory, FALSE);
+ gtk_file_selection_populate (fs, callback_arg->directory, FALSE, FALSE);
break;
}
@@ -1272,7 +1273,7 @@
gpointer user_data)
{
GtkFileSelection *fs = NULL;
- gchar *filename, *temp = NULL;
+ gchar *filename = NULL;
g_return_if_fail (GTK_IS_CLIST (widget));
@@ -1280,39 +1281,23 @@
g_return_if_fail (fs != NULL);
g_return_if_fail (GTK_IS_FILE_SELECTION (fs));
- gtk_clist_get_text (GTK_CLIST (fs->dir_list), row, 0, &temp);
- filename = g_strdup (temp);
-
- if (filename)
- {
- if (bevent)
- switch (bevent->type)
- {
- case GDK_2BUTTON_PRESS:
- gtk_file_selection_populate (fs, filename, FALSE);
- break;
-
- default:
- gtk_entry_set_text (GTK_ENTRY (fs->selection_entry), filename);
- break;
- }
- else
- gtk_entry_set_text (GTK_ENTRY (fs->selection_entry), filename);
-
- g_free (filename);
- }
+ gtk_clist_get_text (GTK_CLIST (fs->dir_list), row, 0, &filename);
+
+ if (filename && bevent && bevent->type == GDK_2BUTTON_PRESS)
+ gtk_file_selection_populate (fs, filename, FALSE, FALSE);
}
static void
gtk_file_selection_populate (GtkFileSelection *fs,
gchar *rel_path,
- gint try_complete)
+ gboolean try_complete,
+ gboolean reset_entry)
{
CompletionState *cmpl_state;
PossibleCompletion* poss;
gchar* filename;
gint row;
- gchar* rem_path = rel_path;
+ gchar* rem_path;
gchar* sel_text;
gchar* text[2];
gint did_recurse = FALSE;
@@ -1323,6 +1308,8 @@
g_return_if_fail (fs != NULL);
g_return_if_fail (GTK_IS_FILE_SELECTION (fs));
+
+ rem_path = rel_path = g_strdup (rel_path);
cmpl_state = (CompletionState*) fs->cmpl_state;
poss = cmpl_completion_matches (rel_path, &rem_path, cmpl_state);
@@ -1422,7 +1409,7 @@
did_recurse = TRUE;
- gtk_file_selection_populate (fs, dir_name, TRUE);
+ gtk_file_selection_populate (fs, dir_name, TRUE, TRUE);
g_free (dir_name);
}
@@ -1441,7 +1428,7 @@
gtk_entry_set_text (GTK_ENTRY (fs->selection_entry), rem_path);
}
}
- else
+ else if (reset_entry)
{
if (fs->selection_entry)
gtk_entry_set_text (GTK_ENTRY (fs->selection_entry), "");
@@ -1466,8 +1453,9 @@
{
gtk_file_selection_update_history_menu (fs, cmpl_reference_position (cmpl_state));
}
-
}
+
+ g_free (rel_path);
}
static void

View File

@ -0,0 +1,30 @@
Index: gdk/gdkdnd.c
===================================================================
RCS file: /cvs/gnome/gtk+/gdk/gdkdnd.c,v
retrieving revision 1.25.2.7
retrieving revision 1.25.2.9
diff -u -p -r1.25.2.7 -r1.25.2.9
--- gtk+-1.2.10/gdk/gdkdnd.c 13 Mar 2000 23:41:53 -0000 1.25.2.7
+++ gtk+-1.2.10/gdk/gdkdnd.c 14 May 2002 22:14:15 -0000 1.25.2.9
@@ -275,12 +275,16 @@ gdk_window_cache_filter (GdkXEvent *xev,
GUINT_TO_POINTER (xce->above));
if (above_node && node->prev != above_node)
{
+ /* Put the window above (before in the list) above_node
+ */
cache->children = g_list_remove_link (cache->children, node);
- node->next = above_node->next;
- if (node->next)
- node->next->prev = node;
- node->prev = above_node;
- above_node->next = node;
+ node->prev = above_node->prev;
+ if (node->prev)
+ node->prev->next = node;
+ else
+ cache->children = node;
+ node->next = above_node;
+ above_node->prev = node;
}
}
}

298
gtk+-1.2.10-encoding.patch Normal file
View File

@ -0,0 +1,298 @@
--- gtk+-1.2.10/gtk/gtkrc.iso88593.encoding Fri Jul 26 16:47:04 2002
+++ gtk+-1.2.10/gtk/gtkrc.iso88593 Fri Jul 26 16:47:04 2002
@@ -0,0 +1,8 @@
+style "gtk-default-iso-8859-3" {
+ fontset = "-*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-1,\
+ -*-arial-medium-r-normal--12-*-*-*-*-*-iso8859-1,\
+ -*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-3,\
+ -*-arial-medium-r-normal--12-*-*-*-*-*-iso8859-3,*-r-*"
+}
+class "GtkWidget" style "gtk-default-iso-8859-3"
+
--- gtk+-1.2.10/gtk/Makefile.am.encoding Fri Feb 2 12:09:02 2001
+++ gtk+-1.2.10/gtk/Makefile.am Fri Jul 26 16:47:04 2002
@@ -374,10 +374,12 @@
gtkconfdir = $(sysconfdir)/gtk
-gtkconf_DATA = gtkrc.az gtkrc.el gtkrc.eo gtkrc.he gtkrc.hy gtkrc.ja \
- gtkrc.ko gtkrc.ru gtkrc.tr gtkrc.th gtkrc.uk gtkrc.iso-8859-2 \
- gtkrc.iso-8859-5 gtkrc.iso-8859-13 gtkrc.iso-8859-14 \
- gtkrc.iso-8859-15 gtkrc.zh_CN gtkrc.zh_TW.big5 \
+gtkconf_DATA = gtkrc.az gtkrc.he gtkrc.hy gtkrc.ja \
+ gtkrc.ko gtkrc.ru gtkrc.th gtkrc.uk \
+ gtkrc.utf8 gtkrc.iso88592 \
+ gtkrc.iso88593 gtkrc.iso88595 gtkrc.iso88597 \
+ gtkrc.iso88599 gtkrc.iso885913 gtkrc.iso885914 \
+ gtkrc.iso885915 gtkrc.zh_CN gtkrc.zh_TW.big5 \
gtkrc.ka_GE.georgianacademy gtkrc.ka_GE.georgianps \
gtkrc.vi_VN.tcvn gtkrc.vi_VN.viscii gtkrc.cp1251 gtkrc.cp1255
@@ -390,11 +392,11 @@
cd $(DESTDIR)$(gtkconfdir) && \
for i in cs hr hu pl ro sk sl sq sr ; do \
rm -f gtkrc.$$i ; \
- ln -s gtkrc.iso-8859-2 gtkrc.$$i ; \
+ ln -s gtkrc.iso88592 gtkrc.$$i ; \
done ; \
for i in bg_BG.iso88595 mk sp ru_RU.iso88595 ; do \
rm -f gtkrc.$$i ; \
- ln -s gtkrc.iso-8859-5 gtkrc.$$i ; \
+ ln -s gtkrc.iso88595 gtkrc.$$i ; \
done ; \
for i in he_IL.cp1255 he_IL.microsoftcp1255 yi ; do \
rm -f gtkrc.$$i ; \
@@ -403,12 +405,12 @@
rm -f gtkrc.lt gtkrc.lv gtkrc.cy gtkrc.ga gtkrc.et gtkrc.ka \
gtkrc.vi_VN.viscii111 gtkrc.vi_VN.tcvn5712 gtkrc.vi \
gtkrc.be gtkrc.bg gtkrc.mi ; \
- ln -s gtkrc.iso-8859-13 gtkrc.mi ; \
- ln -s gtkrc.iso-8859-13 gtkrc.lt ; \
- ln -s gtkrc.iso-8859-13 gtkrc.lv ; \
- ln -s gtkrc.iso-8859-14 gtkrc.cy ; \
- ln -s gtkrc.iso-8859-14 gtkrc.ga ; \
- ln -s gtkrc.iso-8859-15 gtkrc.et ; \
+ ln -s gtkrc.iso885913 gtkrc.mi ; \
+ ln -s gtkrc.iso885913 gtkrc.lt ; \
+ ln -s gtkrc.iso885913 gtkrc.lv ; \
+ ln -s gtkrc.iso885914 gtkrc.cy ; \
+ ln -s gtkrc.iso885914 gtkrc.ga ; \
+ ln -s gtkrc.iso885915 gtkrc.et ; \
ln -s gtkrc.ka_GE.georgianps gtkrc.ka ; \
ln -s gtkrc.vi_VN.viscii gtkrc.vi_VN.viscii111 ; \
ln -s gtkrc.vi_VN.tcvn gtkrc.vi ; \
--- gtk+-1.2.10/gtk/gtkrc.c.encoding Thu Mar 15 13:41:40 2001
+++ gtk+-1.2.10/gtk/gtkrc.c Fri Jul 26 16:49:24 2002
@@ -33,6 +33,7 @@
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
+#include <langinfo.h>
#include "gtkrc.h"
#include "gtkbindings.h"
@@ -440,7 +441,7 @@
void
gtk_rc_init (void)
{
- static gchar *locale_suffixes[3];
+ static gchar *locale_suffixes[8];
static gint n_locale_suffixes = 0;
gint i, j;
@@ -449,9 +450,7 @@
if (!initted)
{
- gint length;
-
- char *locale = setlocale (LC_CTYPE, NULL);
+ char *locale = g_strdup (setlocale (LC_CTYPE, NULL));
char *p;
initted = TRUE;
@@ -470,39 +469,88 @@
* We normalize the charset into a standard form,
* which has all '-' and '_' characters removed,
* and is lowercase.
+ *
+ * the search is done in that order:
+ * gtkrc.ll_cc.lowercasecodeset
+ * gtkrc.ll_cc.normalizedcodeset
+ * gtkrc.ll.lowercasecodeset
+ * gtkrc.ll.normalizedcodeset
+ * gtkrc.lowercasecodeset
+ * gtkrc.normalizedcodeset
+ * gtkrc.ll_cc
+ * gtkrc.ll
+ *
*/
- gchar *normalized_locale;
+ char *codeset = NULL;
+ char *normalized_codeset = NULL;
+ char *cc = NULL;
+ char *ll;
p = strchr (locale, '@');
- length = p ? (p -locale) : strlen (locale);
+ if (p)
+ *p = '\0';
+ codeset = nl_langinfo (CODESET);
+
p = strchr (locale, '.');
+ if (!codeset && p)
+ codeset = p + 1;
if (p)
+ *p = '\0';
+
+ if (codeset)
{
- gchar *tmp1 = g_strndup (locale, p - locale + 1);
- gchar *tmp2 = _gtk_normalize_codeset (p + 1, length - (p - locale + 1));
+ codeset = g_strdup (codeset);
- normalized_locale = g_strconcat (tmp1, tmp2, NULL);
- g_free (tmp1);
- g_free (tmp2);
-
- locale_suffixes[n_locale_suffixes++] = g_strdup (normalized_locale);
- length = p - locale;
+ p = codeset;
+ while (*p)
+ {
+ /* tolower not used, because some locales are not
+ * compatible with C locale in lowercasing ascii
+ */
+ if (*p >= 'A' && *p <= 'Z')
+ *p = (*p) - 'A' + 'a';
+ p++;
+ }
+
+ normalized_codeset = _gtk_normalize_codeset(codeset, strlen (codeset));
+ if (strcmp (normalized_codeset, codeset) == 0)
+ {
+ g_free (normalized_codeset);
+ normalized_codeset = NULL;
+ }
}
- else
- normalized_locale = g_strndup (locale, length);
- p = strchr (normalized_locale, '_');
+ p = strchr (locale, '_');
if (p)
{
- locale_suffixes[n_locale_suffixes++] = g_strndup (normalized_locale, length);
- length = p - normalized_locale;
+ cc = p + 1;
+ *p = '\0';
}
-
- locale_suffixes[n_locale_suffixes++] = g_strndup (normalized_locale, length);
- g_free (normalized_locale);
+ ll = locale;
+
+ if (cc && codeset)
+ locale_suffixes[n_locale_suffixes++] = g_strconcat (ll, "_", cc, ".", codeset, NULL);
+ if (cc && normalized_codeset)
+ locale_suffixes[n_locale_suffixes++] = g_strconcat (ll, "_", cc, ".", normalized_codeset, NULL);
+ if (codeset)
+ locale_suffixes[n_locale_suffixes++] = g_strconcat (ll, ".", codeset, NULL);
+ if (normalized_codeset)
+ locale_suffixes[n_locale_suffixes++] = g_strconcat (ll, ".", normalized_codeset, NULL);
+ if (codeset)
+ locale_suffixes[n_locale_suffixes++] = g_strdup (codeset);
+ if (normalized_codeset)
+ locale_suffixes[n_locale_suffixes++] = g_strdup (normalized_codeset);
+ if (cc)
+ locale_suffixes[n_locale_suffixes++] = g_strconcat (ll, "_", cc, NULL);
+ locale_suffixes[n_locale_suffixes++] = g_strdup (ll);
+
+ g_free (normalized_codeset);
+ g_free (codeset);
}
+
+ g_free (locale);
}
i = 0;
--- gtk+-1.2.10/gtk/gtkrc.iso88599.encoding Fri Jul 26 16:47:04 2002
+++ gtk+-1.2.10/gtk/gtkrc.iso88599 Fri Jul 26 16:47:04 2002
@@ -0,0 +1,8 @@
+style "gtk-default-iso-8859-9" {
+ fontset = "-*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-1,\
+ -*-arial-medium-r-normal--12-*-*-*-*-*-iso8859-1,\
+ -*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-9,\
+ -*-arial-medium-r-normal--12-*-*-*-*-*-iso8859-9,*-r-*"
+}
+class "GtkWidget" style "gtk-default-iso-8859-9"
+
--- gtk+-1.2.10/gtk/gtkrc.utf8.encoding Fri Jul 26 16:47:04 2002
+++ gtk+-1.2.10/gtk/gtkrc.utf8 Fri Jul 26 16:47:04 2002
@@ -0,0 +1,7 @@
+style "default-text" {
+ fontset = "-*-helvetica-medium-r-normal--*-120-*-*-p-*-*-*"
+
+}
+
+class "GtkWidget" style "default-text"
+
--- gtk+-1.2.10/gtk/gtkrc.iso885913.encoding Fri Jul 26 16:47:04 2002
+++ gtk+-1.2.10/gtk/gtkrc.iso885913 Fri Jul 26 16:47:04 2002
@@ -0,0 +1,7 @@
+style "gtk-default-iso-8859-13" {
+ fontset = "-*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-1,\
+ -*-arial-medium-r-normal--12-*-*-*-*-*-iso8859-1,\
+ -*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-13,\
+ -*-arial-medium-r-normal--12-*-*-*-*-*-iso8859-13,*-r-*"
+}
+class "GtkWidget" style "gtk-default-iso-8859-13"
--- gtk+-1.2.10/gtk/gtkrc.iso885914.encoding Fri Jul 26 16:47:04 2002
+++ gtk+-1.2.10/gtk/gtkrc.iso885914 Fri Jul 26 16:47:04 2002
@@ -0,0 +1,8 @@
+style "gtk-default-iso-8859-14" {
+ fontset = "-*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-1,\
+ -*-arial-medium-r-normal--12-*-*-*-*-*-iso8859-1,\
+ -*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-14,\
+ -*-arial-medium-r-normal--12-*-*-*-*-*-iso8859-14,*-r-*"
+}
+class "GtkWidget" style "gtk-default-iso-8859-14"
+
--- gtk+-1.2.10/gtk/gtkrc.iso885915.encoding Fri Jul 26 16:47:04 2002
+++ gtk+-1.2.10/gtk/gtkrc.iso885915 Fri Jul 26 16:47:04 2002
@@ -0,0 +1,8 @@
+style "gtk-default-iso-8859-15" {
+ fontset = "-*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-1,\
+ -*-arial-medium-r-normal--12-*-*-*-*-*-iso8859-1,\
+ -*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-15,\
+ -*-arial-medium-r-normal--12-*-*-*-*-*-iso8859-15,*-r-*"
+}
+class "GtkWidget" style "gtk-default-iso-8859-15"
+
--- gtk+-1.2.10/gtk/gtkrc.iso88592.encoding Fri Jul 26 16:47:04 2002
+++ gtk+-1.2.10/gtk/gtkrc.iso88592 Fri Jul 26 16:47:04 2002
@@ -0,0 +1,14 @@
+#$(gtkconfigdir)/gtkrc.iso-8859-2
+#
+# This file defines the fontsets for iso-8859-2 encoding
+# make symliks or hardlinks to gtkrc.$LANG if your language uses iso-8859-2
+# and a gtkrc.$LANG doesn't exist yet.
+
+style "gtk-default-iso-8859-2" {
+ fontset = "-*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-1,\
+ -*-arial-medium-r-normal--12-*-*-*-*-*-iso8859-1,\
+ -*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-2,\
+ -*-arial-medium-r-normal--12-*-*-*-*-*-iso8859-2,*-r-*"
+}
+class "GtkWidget" style "gtk-default-iso-8859-2"
+
--- gtk+-1.2.10/gtk/gtkrc.iso88595.encoding Fri Jul 26 16:47:04 2002
+++ gtk+-1.2.10/gtk/gtkrc.iso88595 Fri Jul 26 16:47:04 2002
@@ -0,0 +1,14 @@
+#$(gtkconfigdir)/gtkrc.iso-8859-5
+#
+# This file defines the fontsets for iso-8859-5 encoding
+# make symliks or hardlinks to gtkrc.$LANG if your language uses iso-8859-5
+# and a gtkrc.$LANG doesn't exist yet.
+
+style "gtk-default-iso-8859-5" {
+ fontset = "-*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-1,\
+ -*-arial-medium-r-normal--12-*-*-*-*-*-iso8859-1,\
+ -*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-5,\
+ -*-arial-medium-r-normal--12-*-*-*-*-*-iso8859-5,*-r-*"
+}
+class "GtkWidget" style "gtk-default-iso-8859-5"
+
--- gtk+-1.2.10/gtk/gtkrc.iso88597.encoding Fri Jul 26 16:47:04 2002
+++ gtk+-1.2.10/gtk/gtkrc.iso88597 Fri Jul 26 16:47:04 2002
@@ -0,0 +1,8 @@
+style "gtk-default-iso-8859-7" {
+ fontset = "-*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-1,\
+ -*-arial-medium-r-normal--12-*-*-*-*-*-iso8859-1,\
+ -*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-7,\
+ -*-arial-medium-r-normal--12-*-*-*-*-*-iso8859-7,*-r-*"
+}
+class "GtkWidget" style "gtk-default-iso-8859-7"
+

42
gtk+-1.2.10-expose.patch Normal file
View File

@ -0,0 +1,42 @@
--- gtk+-1.2.10/gdk/gdkevents.c.expose Sun Dec 3 11:02:49 2000
+++ gtk+-1.2.10/gdk/gdkevents.c Wed Jul 11 15:54:18 2001
@@ -383,6 +383,7 @@
struct _GdkExposeInfo
{
Window window;
+ GdkWindowPrivate *toplevel_window;
gboolean seen_nonmatching;
};
@@ -400,10 +401,21 @@
* we'll get a whole bunch of them interspersed with
* expose events.
*/
- if (xevent->xany.type != Expose &&
- xevent->xany.type != GravityNotify)
+ switch (xevent->xany.type)
{
+ case Expose:
+ case GravityNotify:
+ break;
+ case ConfigureNotify:
+ if (xevent->xconfigure.window != info->toplevel_window->xwindow)
+ break;
+ if (xevent->xconfigure.width == info->toplevel_window->width &&
+ xevent->xconfigure.height == info->toplevel_window->height)
+ break;
+ /* Fall through */
+ default:
info->seen_nonmatching = TRUE;
+ break;
}
if (info->seen_nonmatching ||
@@ -429,6 +441,7 @@
GdkEvent event;
info.window = xevent->xany.window;
+ info.toplevel_window = (GdkWindowPrivate *) gdk_window_get_toplevel (window);
info.seen_nonmatching = FALSE;
rect1.x = xevent->xexpose.x;

17
gtk+-1.2.10-focus.patch Normal file
View File

@ -0,0 +1,17 @@
--- gtk+-1.2.10/gtk/gtkwindow.c.focus Fri Mar 9 18:39:16 2001
+++ gtk+-1.2.10/gtk/gtkwindow.c Thu Jul 5 10:34:00 2001
@@ -985,7 +985,13 @@
break;
case EnterNotify:
case LeaveNotify:
- if (xev->xcrossing.detail != NotifyInferior &&
+ /* We only track the actual destination of keyboard events for real
+ * toplevels, not for embedded toplevels such as GtkPlug. The reason for
+ * this is that GtkPlug redirects events so the widget may effectively not
+ * have the focus even if it actually has the focus.
+ */
+ if (gdk_window_get_parent (GTK_WIDGET (window)->window) == GDK_ROOT_PARENT () &&
+ xev->xcrossing.detail != NotifyInferior &&
xev->xcrossing.focus && !window->window_has_focus)
{
window->window_has_pointer_focus = (xev->xany.type == EnterNotify) ? TRUE : FALSE;

View File

@ -0,0 +1,24 @@
--- gtk+-1.2.10/gdk/gdkfont.c.fontwarning Fri Apr 12 17:33:55 2002
+++ gtk+-1.2.10/gdk/gdkfont.c Fri Apr 12 17:36:52 2002
@@ -27,6 +27,7 @@
#include <X11/Xlib.h>
#include <X11/Xos.h>
#include <langinfo.h>
+#include <locale.h>
#include "gdk.h"
#include "gdkprivate.h"
@@ -187,9 +188,11 @@
if (g_strcasecmp (codeset, "utf-8") != 0 &&
g_strcasecmp (codeset, "utf8") != 0)
{
- g_warning ("Missing charsets in FontSet creation\n");
+ g_printerr ("The font \"%s\" does not support all the required character sets for the current locale \"%s\"\n",
+ fontset_name, setlocale (LC_ALL, NULL));
for (i=0;i<missing_charset_count;i++)
- g_warning (" %s\n", missing_charset_list[i]);
+ g_printerr (" (Missing character set \"%s\")\n",
+ missing_charset_list[i]);
}
XFreeStringList (missing_charset_list);

20
gtk+-1.2.10-format.patch Normal file
View File

@ -0,0 +1,20 @@
--- gtk+-1.2.10/gtk/gtkthemes.c
+++ gtk+-1.2.10/gtk/gtkthemes.c
@@ -90,7 +90,7 @@ gtk_theme_engine_get (const gchar *name)
g_free(engine_path);
if (!library)
{
- g_warning (g_module_error());
+ g_warning ("%s", g_module_error());
return NULL;
}
else
@@ -107,7 +107,7 @@ gtk_theme_engine_get (const gchar *name)
!g_module_symbol (library, "theme_exit",
(gpointer *)&result->exit))
{
- g_warning (g_module_error());
+ g_warning ("%s", g_module_error());
g_free (result);
return NULL;
}

View File

@ -0,0 +1,13 @@
--- gtk+-1.2.10/gtk/Makefile.am.gtkgdkdep 2003-10-15 15:20:27.000000000 -0400
+++ gtk+-1.2.10/gtk/Makefile.am 2003-10-15 15:22:50.000000000 -0400
@@ -23,6 +23,10 @@
# libtool stuff: set version and export symbols for resolving
libgtkincludedir = $(includedir)/gtk-1.2/gtk
+
+libgtk_la_DEPENDENCIES = $(top_builddir)/gdk/libgdk.la
+libgtk_la_LIBADD = $(top_builddir)/gdk/libgdk.la
+
libgtk_la_LDFLAGS = @STRIP_BEGIN@ \
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
-release $(LT_RELEASE) \

52
gtk+-1.2.10-kpenter.patch Normal file
View File

@ -0,0 +1,52 @@
--- gtk+-1.2.10/gtk/gtkentry.c.kpenter Sat Jul 21 20:27:08 2001
+++ gtk+-1.2.10/gtk/gtkentry.c Sat Jul 21 20:27:16 2001
@@ -1184,6 +1184,7 @@
}
break;
case GDK_Return:
+ case GDK_KP_Enter:
return_val = TRUE;
gtk_widget_activate (widget);
break;
--- gtk+-1.2.10/gtk/gtktext.c.kpenter Sat Jul 21 20:28:56 2001
+++ gtk+-1.2.10/gtk/gtktext.c Sat Jul 21 20:29:17 2001
@@ -2055,6 +2055,7 @@
case GDK_Up: scroll_int (text, -KEY_SCROLL_PIXELS); break;
case GDK_Down: scroll_int (text, +KEY_SCROLL_PIXELS); break;
case GDK_Return:
+ case GDK_KP_Enter:
if (event->state & GDK_CONTROL_MASK)
gtk_signal_emit_by_name (GTK_OBJECT (text), "activate");
else
@@ -2161,6 +2162,7 @@
gtk_editable_insert_text (editable, "\t", 1, &position);
break;
case GDK_Return:
+ case GDK_KP_Enter:
if (event->state & GDK_CONTROL_MASK)
gtk_signal_emit_by_name (GTK_OBJECT (text), "activate");
else
--- gtk+-1.2.10/gtk/gtkmenushell.c.kpenter Sat Jul 21 20:27:59 2001
+++ gtk+-1.2.10/gtk/gtkmenushell.c Sat Jul 21 20:28:05 2001
@@ -258,6 +258,11 @@
GTK_TYPE_BOOL,
TRUE);
gtk_binding_entry_add_signal (binding_set,
+ GDK_KP_Enter, 0,
+ "activate_current", 1,
+ GTK_TYPE_BOOL,
+ TRUE);
+ gtk_binding_entry_add_signal (binding_set,
GDK_space, 0,
"activate_current", 1,
GTK_TYPE_BOOL,
--- gtk+-1.2.10/gtk/gtknotebook.c.kpenter Sat Jul 21 20:28:30 2001
+++ gtk+-1.2.10/gtk/gtknotebook.c Sat Jul 21 20:28:38 2001
@@ -1369,6 +1369,7 @@
gtk_notebook_switch_focus_tab (notebook, list);
return TRUE;
case GDK_Return:
+ case GDK_KP_Enter:
case GDK_space:
gtk_notebook_page_select (GTK_NOTEBOOK (widget));
return TRUE;

52
gtk+-1.2.10-libtool.patch Normal file
View File

@ -0,0 +1,52 @@
--- gtk+-1.2.10/configure.libtool Wed Jan 15 12:44:35 2003
+++ gtk+-1.2.10/configure Wed Jan 15 12:45:29 2003
@@ -1389,11 +1389,7 @@
echo "$ac_t""no" 1>&6
fi
-
-case "$target" in
-NONE) lt_target="$host" ;;
-*) lt_target="$target" ;;
-esac
+lt_target="$host"
# Check for any special flags to pass to ltconfig.
libtool_flags="--cache-file=$cache_file"
--- gtk+-1.2.10/aclocal.m4.libtool Wed Jan 15 12:44:47 2003
+++ gtk+-1.2.10/aclocal.m4 Wed Jan 15 12:45:42 2003
@@ -56,10 +56,7 @@
AC_REQUIRE([AC_PROG_LN_S])dnl
dnl
-case "$target" in
-NONE) lt_target="$host" ;;
-*) lt_target="$target" ;;
-esac
+lt_target="$host"
# Check for any special flags to pass to ltconfig.
libtool_flags="--cache-file=$cache_file"
--- gtk+-1.2.10/ltconfig.libtool Wed Jan 15 12:44:58 2003
+++ gtk+-1.2.10/ltconfig Wed Jan 15 12:46:15 2003
@@ -447,16 +447,16 @@
host_alias=$host
fi
+host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
case "$host_os" in
linux-gnu*) ;;
linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
esac
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
case "$host_os" in
aix3*)
# AIX sometimes has problems with the GCC collect2 program. For some

View File

@ -0,0 +1,20 @@
--- gtk+-1.2.10/gdk/gdkselection.c.localecrash Thu Aug 22 16:50:01 2002
+++ gtk+-1.2.10/gdk/gdkselection.c Thu Aug 22 17:50:46 2002
@@ -238,12 +238,14 @@
if (res != Success)
{
property.encoding = None;
- property.format = None;
+ property.format = 8;
property.value = NULL;
property.nitems = 0;
- }
- g_assert (property.encoding == gdk_atom_intern ("COMPOUND_TEXT", FALSE) && property.format == 8);
+ g_warning ("Error converting string to compound text.\n"
+ "This might mean that your locale setting is supported\n"
+ "by the C library but not by Xlib.");
+ }
if (encoding)
*encoding = property.encoding;

View File

@ -0,0 +1,33 @@
--- gtk+-1.2.10/gdk/gdkfont.c.missingchar Mon Aug 13 13:37:52 2001
+++ gtk+-1.2.10/gdk/gdkfont.c Mon Aug 13 13:39:30 2001
@@ -461,7 +461,6 @@
GdkFontPrivate *private;
XCharStruct *chars;
gint width;
- guint ch = character & 0xff; /* get rid of sign-extension */
XFontStruct *xfont;
XFontSet fontset;
@@ -474,21 +473,7 @@
case GDK_FONT_FONT:
/* only 8 bits characters are considered here */
xfont = (XFontStruct *) private->xfont;
- if ((xfont->min_byte1 == 0) &&
- (xfont->max_byte1 == 0) &&
- (ch >= xfont->min_char_or_byte2) &&
- (ch <= xfont->max_char_or_byte2))
- {
- chars = xfont->per_char;
- if (chars)
- width = chars[ch - xfont->min_char_or_byte2].width;
- else
- width = xfont->min_bounds.width;
- }
- else
- {
- width = XTextWidth (xfont, &character, 1);
- }
+ width = XTextWidth (xfont, &character, 1);
break;
case GDK_FONT_FONTSET:
fontset = (XFontSet) private->xfont;

View File

@ -0,0 +1,52 @@
diff -up gtk+-1.2.10/gtk-config.in.multilib gtk+-1.2.10/gtk-config.in
--- gtk+-1.2.10/gtk-config.in.multilib 2000-10-21 20:20:40.000000000 +0200
+++ gtk+-1.2.10/gtk-config.in 2008-10-02 09:52:59.000000000 +0200
@@ -1,12 +1,16 @@
#!/bin/sh
-glib_libs="@glib_libs@"
-glib_cflags="@glib_cflags@"
-glib_thread_libs="@glib_thread_libs@"
-glib_thread_cflags="@glib_thread_cflags@"
+[ -z "$PKG_CONFIG" ] && PKG_CONFIG="pkg-config"
-prefix=@prefix@
-exec_prefix=@exec_prefix@
+glib_libs=`${PKG_CONFIG} --libs glib gmodule`
+glib_cflags=`${PKG_CONFIG} --cflags glib gmodule`
+glib_thread_libs=`${PKG_CONFIG} --libs gthread`
+glib_thread_cflags=`${PKG_CONFIG} --cflags gthread`
+
+prefix=`${PKG_CONFIG} --variable prefix gtk+`
+exec_prefix=`${PKG_CONFIG} --variable exec_prefix gtk+`
+libdir=`${PKG_CONFIG} --variable libdir gtk+`
+includedir=`${PKG_CONFIG} --variable includedir gtk+`
exec_prefix_set=no
usage()
@@ -91,14 +95,14 @@ if test "$lib_gthread" = "yes"; then
fi
if test "$echo_cflags" = "yes"; then
- echo -I@includedir@/gtk-1.2 $glib_cflags @x_cflags@
+ echo -I${includedir}/gtk-1.2 $glib_cflags @x_cflags@
fi
if test "$echo_libs" = "yes"; then
my_glib_libs=
- libdirs=-L@libdir@
+ libdirs=-L${libdir}
for i in $glib_libs ; do
- if test $i != -L@libdir@ ; then
+ if test $i != -L${libdir} ; then
if test -z "$my_glib_libs" ; then
my_glib_libs="$i"
else
@@ -107,6 +111,6 @@ if test "$echo_libs" = "yes"; then
fi
done
- echo $libdirs @x_ldflags@ -lgtk -lgdk $my_glib_libs @INTLLIBS@ @x_libs@ @GDK_WLIBS@ -lm
+ echo $libdirs -lgtk -lgdk $my_glib_libs @INTLLIBS@ @x_libs@ @GDK_WLIBS@ -lm
fi

View File

@ -0,0 +1,20 @@
--- gtk+-1.2.10/gtk/Makefile.am.no_undefined 2006-04-08 20:58:18.000000000 -0500
+++ gtk+-1.2.10/gtk/Makefile.am 2006-04-08 20:58:59.000000000 -0500
@@ -31,6 +31,7 @@
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
-release $(LT_RELEASE) \
-export-dynamic \
+ -no-undefined -Wl,--no-undefined \
@GLIB_DEPLIBS@ \
@x_ldflags@ \
@x_libs@ \
--- gtk+-1.2.10/gdk/Makefile.am.no_undefined 2000-10-21 13:20:40.000000000 -0500
+++ gtk+-1.2.10/gdk/Makefile.am 2006-04-08 20:58:18.000000000 -0500
@@ -21,6 +21,7 @@
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
-release $(LT_RELEASE) \
-export-dynamic \
+ -no-undefined -Wl,--no-undefined \
@GLIB_DEPLIBS@ \
@x_ldflags@ \
@x_libs@ \

View File

@ -0,0 +1,14 @@
--- gtk+-1.2.10/gtk/gtkstyle.c.pixmapref Tue Feb 20 11:46:58 2001
+++ gtk+-1.2.10/gtk/gtkstyle.c Sun Aug 12 15:42:06 2001
@@ -348,8 +348,9 @@
new_style->bg[i] = style->bg[i];
new_style->text[i] = style->text[i];
new_style->base[i] = style->base[i];
-
- new_style->bg_pixmap[i] = style->bg_pixmap[i];
+
+ if (style->bg_pixmap[i] && !(style->rc_style && style->rc_style->bg_pixmap_name[i]))
+ new_style->bg_pixmap[i] = gdk_pixmap_ref (style->bg_pixmap[i]);
}
gdk_font_unref (new_style->font);

11
gtk+-1.2.10-ppc64.patch Normal file
View File

@ -0,0 +1,11 @@
--- gtk+-1.2.10/ltconfig.ppc64 2005-11-01 11:11:27.000000000 -0500
+++ gtk+-1.2.10/ltconfig 2005-11-01 11:12:42.000000000 -0500
@@ -1968,7 +1968,7 @@
shlibpath_overrides_runpath=no
deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
file_magic_cmd=/usr/bin/file
- file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
+ file_magic_test_file=`echo /lib{,64}/libc.so* /lib{,64}/libc-*.so`
if test -f /lib/ld.so.1; then
dynamic_linker='GNU ld.so'

View File

@ -0,0 +1,88 @@
--- gtk+-1.2.10/gtk/gtkwindow.c.themeswitch Mon Aug 13 13:42:05 2001
+++ gtk+-1.2.10/gtk/gtkwindow.c Mon Aug 13 13:42:05 2001
@@ -859,13 +859,60 @@
GTK_OBJECT_CLASS(parent_class)->finalize (object);
}
+
+static void
+reread_rc_files ()
+{
+ if (gtk_rc_reparse_all ())
+ {
+ /* If the above returned true, some of our RC files are out
+ * of date, so we need to reset all our widgets. Our other
+ * toplevel windows will also get the message, but by
+ * then, the RC file will up to date, so we have to tell
+ * them now.
+ */
+ GList *toplevels;
+
+ toplevels = gtk_container_get_toplevels();
+ while (toplevels)
+ {
+ gtk_widget_reset_rc_styles (toplevels->data);
+ toplevels = toplevels->next;
+ }
+ }
+}
+
static void
gtk_window_show (GtkWidget *widget)
{
GtkWindow *window = GTK_WINDOW (widget);
GtkContainer *container = GTK_CONTAINER (window);
gboolean need_resize;
+ GList *toplevels;
+ gboolean had_visible = FALSE;
+ /* If we have no windows shown at this point, then check for
+ * theme changes before showing the window. We really should
+ * be checking realized, not shown, but shown => realized,
+ * and checking in realize might cause reentrancy problems.
+ *
+ * Plus, this allows us to get the new size right before
+ * realizing.
+ */
+ toplevels = gtk_container_get_toplevels ();
+ while (toplevels)
+ {
+ if (GTK_WIDGET_VISIBLE (toplevels->data))
+ {
+ had_visible = TRUE;
+ break;
+ }
+ toplevels = toplevels->next;
+ }
+
+ if (!had_visible)
+ reread_rc_files ();
+
GTK_WIDGET_SET_FLAGS (widget, GTK_VISIBLE);
need_resize = container->need_resize || !GTK_WIDGET_REALIZED (widget);
@@ -1480,23 +1527,7 @@
}
}
- if (gtk_rc_reparse_all ())
- {
- /* If the above returned true, some of our RC files are out
- * of date, so we need to reset all our widgets. Our other
- * toplevel windows will also get the message, but by
- * then, the RC file will up to date, so we have to tell
- * them now.
- */
- GList *toplevels;
-
- toplevels = gtk_container_get_toplevels();
- while (toplevels)
- {
- gtk_widget_reset_rc_styles (toplevels->data);
- toplevels = toplevels->next;
- }
- }
+ reread_rc_files ();
}
static gint

View File

@ -0,0 +1,19 @@
Index: gtk/gtkrange.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkrange.c,v
retrieving revision 1.26.2.3
diff -u -p -r1.26.2.3 gtkrange.c
--- gtk+-1.2.10/gtk/gtkrange.c 22 Feb 2001 20:38:14 -0000 1.26.2.3
+++ gtk+-1.2.10/gtk/gtkrange.c 19 Jul 2002 15:41:58 -0000
@@ -829,7 +828,10 @@ gtk_range_expose (GtkWidget *widget
(event->area.x + event->area.width <=
widget->allocation.width - trough_border) &&
(event->area.y + event->area.height <=
- widget->allocation.height - trough_border)))
+ widget->allocation.height - trough_border)) ||
+ gtk_style_get_prop_experimental (widget->style,
+ "GtkRange::always_draw_trough",
+ 0))
gtk_range_draw_trough (range);
}
else if (event->window == widget->window)

27
gtk+-1.2.10-ukfont.patch Normal file
View File

@ -0,0 +1,27 @@
--- gtk+-1.2.10/gtk/gtkrc.uk.ukfont Wed Apr 10 19:20:40 2002
+++ gtk+-1.2.10/gtk/gtkrc.uk Wed Apr 10 19:20:56 2002
@@ -7,10 +7,10 @@
#
style "gtk-default-uk" {
- fontset = "-adobe-helvetica-medium-r-normal--14-*-*-*-*-*-iso8859-*,\
+ fontset = "-adobe-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-*,\
-*-arial-medium-r-normal--12-*-*-*-*-*-iso8859-1,\
- -*-helvetica-medium-r-normal--14-*-*-*-*-*-koi8-u,\
- -*-arial-medium-r-normal--14-*-*-*-*-*-koi8-u,*-r-*"
+ -*-helvetica-medium-r-normal--12-*-*-*-*-*-koi8-u,\
+ -*-arial-medium-r-normal--12-*-*-*-*-*-koi8-u,*-r-*"
}
class "GtkWidget" style "gtk-default-uk"
--- gtk+-1.2.10/gtk/gtkrc.ru.ukfont Thu Apr 11 10:22:15 2002
+++ gtk+-1.2.10/gtk/gtkrc.ru Mon May 8 14:49:18 2000
@@ -1,7 +1,7 @@
style "gtk-default-ru" {
fontset = "-adobe-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-*,\
-*-arial-medium-r-normal--12-*-*-*-*-*-iso8859-1,\
- -cronyx-helvetica-medium-r-normal--12-*-*-*-*-*-koi8-r,\
+ -*-helvetica-medium-r-normal--12-*-*-*-*-*-koi8-r,\
-*-arial-medium-r-normal--12-*-*-*-*-*-koi8-r,*-r-*"
}
class "GtkWidget" style "gtk-default-ru"

View File

@ -0,0 +1,28 @@
--- gtk+-1.2.10/gdk/Makefile.am 2009-04-17 17:02:02.000000000 +0100
+++ gtk+-1.2.10/gdk/Makefile.am 2009-04-17 17:05:49.000000000 +0100
@@ -22,10 +22,9 @@
-release $(LT_RELEASE) \
-export-dynamic \
-no-undefined -Wl,--no-undefined \
- @GLIB_DEPLIBS@ \
+ $(filter-out -lgmodule -ldl, @GLIB_DEPLIBS@) \
@x_ldflags@ \
@x_libs@ \
- -lm \
@STRIP_END@
#
--- gtk+-1.2.10/gtk/Makefile.am 2009-04-17 20:46:56.000000000 +0100
+++ gtk+-1.2.10/gtk/Makefile.am 2009-04-17 20:52:24.000000000 +0100
@@ -32,9 +32,9 @@
-release $(LT_RELEASE) \
-export-dynamic \
-no-undefined -Wl,--no-undefined \
- @GLIB_DEPLIBS@ \
+ $(filter-out -ldl, @GLIB_DEPLIBS@) \
@x_ldflags@ \
- @x_libs@ \
+ $(filter-out -lXi -lXext, @x_libs@) \
-lm \
@STRIP_END@
# $(top_builddir)/gdk/libgdk.la

View File

@ -0,0 +1,38 @@
--- gtk+-1.2.10/gdk/gdkfont.c.utf8fontset Sun Apr 1 22:31:25 2001
+++ gtk+-1.2.10/gdk/gdkfont.c Tue Jul 10 11:31:54 2001
@@ -26,6 +26,7 @@
#include <X11/Xlib.h>
#include <X11/Xos.h>
+#include <langinfo.h>
#include "gdk.h"
#include "gdkprivate.h"
@@ -173,9 +174,24 @@
if (missing_charset_count)
{
gint i;
- g_warning ("Missing charsets in FontSet creation\n");
- for (i=0;i<missing_charset_count;i++)
- g_warning (" %s\n", missing_charset_list[i]);
+ const char *codeset;
+
+ codeset = nl_langinfo (CODESET);
+
+ /* Hack - UTF-8 is likely to be rendered with a list of
+ * possible legacy fallback charsets, so a failure here
+ * shouldn't be warned about. But we don't want to suppress
+ * this warning in general, since for other character sets
+ * it gives a useful indication of what went wrong.
+ */
+ if (g_strcasecmp (codeset, "utf-8") != 0 &&
+ g_strcasecmp (codeset, "utf8") != 0)
+ {
+ g_warning ("Missing charsets in FontSet creation\n");
+ for (i=0;i<missing_charset_count;i++)
+ g_warning (" %s\n", missing_charset_list[i]);
+ }
+
XFreeStringList (missing_charset_list);
}

BIN
gtk+-1.2.10.tar.gz Normal file

Binary file not shown.

View File

@ -0,0 +1,16 @@
--- gtk+-1.2.8/gtk/gtklabel.c.alnum Wed Jan 24 05:56:00 2001
+++ gtk+-1.2.8/gtk/gtklabel.c Wed Jan 24 07:44:22 2001
@@ -507,8 +507,11 @@
static gboolean
is_ideogram (GdkWChar wc)
{
- return !(gdk_iswalnum (wc) || gdk_iswspace (wc) ||
- gdk_iswpunct (wc) || gdk_iswcntrl (wc));
+ if (gdk_iswalpha (wc) && (!gdk_iswupper (wc) && !gdk_iswlower (wc)))
+ return TRUE;
+
+ return !(gdk_iswspace (wc) || gdk_iswalnum (wc) ||
+ gdk_iswpunct (wc) || gdk_iswcntrl (wc));
}
/* this needs to handle white space better. */

BIN
gtk+-pofiles.tar.gz Normal file

Binary file not shown.

11
gtk+-underquoted.patch Normal file
View File

@ -0,0 +1,11 @@
--- gtk+-1.2.10/gtk.m4.underquoted 2004-08-15 22:20:34.253447389 +0100
+++ gtk+-1.2.10/gtk.m4 2004-08-15 22:20:47.874844660 +0100
@@ -4,7 +4,7 @@
dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
dnl
-AC_DEFUN(AM_PATH_GTK,
+AC_DEFUN([AM_PATH_GTK],
[dnl
dnl Get the cflags and libraries from the gtk-config script
dnl

140
gtk+.spec Normal file
View File

@ -0,0 +1,140 @@
%global _install install -p -m0644
Name: gtk+
Version: 1.2.10
Epoch: 1
Release: 90
Summary: A toolkit for creating graphical user interfaces
License: LGPLv2+
URL: http://www.gtk.org/
Source0: http://download.gimp.org/pub/gtk/v1.2/gtk+-%{version}.tar.gz
Source1: gtkrc-default
Source2: gtk+-pofiles.tar.gz
Source3: gtkrc.ja.utf8
Source4: gtkrc.ko.utf8
Source5: gtkrc.zh_CN.utf8
Source6: gtkrc.zh_TW.utf8
Provides: gtk1 = %{version}-%{release}
Patch0001: gtk+-1.2.10-ahiguti.patch
Patch0002: gtk+-1.2.8-wrap-alnum.patch
Patch0003: gtk+-1.2.10-alignment.patch
Patch0004: gtk+-1.2.10-expose.patch
Patch0005: gtk+-1.2.10-focus.patch
Patch0006: gtk+-1.2.10-encoding.patch
Patch0007: gtk+-1.2.10-ctext.patch
Patch0008: gtk+-1.2.10-utf8fontset.patch
Patch0009: gtk+-1.2.10-kpenter.patch
Patch0010: gtk+-1.2.10-themeswitch.patch
Patch0011: gtk+-1.2.10-pixmapref.patch
Patch0012: gtk+-1.2.10-missingchar.patch
Patch0013: gtk+-1.2.10-ukfont.patch
Patch0014: gtk+-1.2.10-deletedir.patch
Patch0015: gtk+-1.2.10-fontwarning.patch
Patch0016: gtk+-1.2.10-troughpaint.patch
Patch0017: gtk+-1.2.10-localecrash.patch
Patch0018: gtk+-1.2.10-dndorder.patch
Patch0019: gtk+-1.2.10-clistfocusrow.patch
Patch0020: gtk+-1.2.10-bellvolume.patch
Patch0021: gtk+-1.2.10-libtool.patch
Patch0022: gtk+-1.2.10-gtkgdkdep.patch
Patch0023: gtk+-underquoted.patch
Patch0024: gtk+-1.2.10-ppc64.patch
Patch0025: gtk+-1.2.10-no_undefined.patch
Patch0026: gtk+-1.2.10-multilib.patch
Patch0027: gtk+-1.2.10-unused-deps.patch
Patch0028: gtk+-1.2.10-autotools.patch
Patch0029: gtk+-1.2.10-format.patch
BuildRequires: make coreutils gettext glib-devel >= 1:%{version} glibc-common
BuildRequires: libtool libX11-devel libXext-devel libXi-devel libXt-devel
%description
GTK, or the GIMP Toolkit, is a multi-platform toolkit for creating graphical
user interfaces. Offering a complete set of widgets, GTK is suitable for
projects ranging from small one-off tools to complete application suites.
%package devel
Summary: Development for GTK+ applications
Provides: gtk1-devel = %{version}-%{release}
Requires: %{name} = %{epoch}:%{version}-%{release} glib-devel
Requires: libX11-devel libXext-devel libXi-devel libXt-devel
%description devel
Libraries, header files and other related documents for development of GTK+ applications.
%package help
Summary: Documents for gtk+
Provides: gtk1-help = %{version}-%{release}
Buildarch: noarch
%description help
Man pages and other related documents.
%prep
%autosetup -p1 -a 2
cp -p /usr/lib/rpm/config.{guess,sub} .
%build
%configure --disable-static --with-xinput=xfree --with-native-locale LIBTOOL=/usr/bin/libtool
%make_build LIBTOOL=/usr/bin/libtool
%install
%make_install LIBTOOL=/usr/bin/libtool
./mkinstalldirs tmpdocs/tutorial
%_install docs/html/gtk_tut.html docs/html/gtk_tut-[0-9]*.html docs/html/*.gif tmpdocs/tutorial
for dir in examples/*; do
if [ -d $dir ]; then
./mkinstalldirs tmpdocs/$dir
for file in $dir/* ; do
case $file in
*pre1.2.7)
;;
*)
%_install $file tmpdocs/$dir
;;
esac
done
fi
done
%_install -D %{SOURCE1} %{buildroot}/etc/gtk/gtkrc
for source in %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6}; do
%_install $source %{buildroot}/etc/gtk/
done
rm -rf %{buildroot}%{_infodir} %{buildroot}%{_libdir}/lib*.la %{buildroot}%{_libdir}/lib*.a
%find_lang %{name}
%check
make check LIBTOOL=/usr/bin/libtool
%files -f %{name}.lang
%license COPYING
%{_libdir}/libg{d,t}k-1.2.so.*
%{_datadir}/themes/Default/
%dir %{_sysconfdir}/gtk/
%config(noreplace) %{_sysconfdir}/gtk/gtkrc*
%files devel
%{_bindir}/gtk-config
%{_includedir}/gtk-1.2/
%{_libdir}/libg{d,t}k.so
%{_libdir}/pkgconfig/g{d,t}k*.pc
%{_datadir}/aclocal/gtk.m4
%files help
%doc AUTHORS ChangeLog NEWS README TODO
%doc tmpdocs/tutorial/
%doc tmpdocs/examples/
%{_mandir}/man1/gtk-config.1*
%changelog
* Mon Dec 02 2019 zhouyihang <zhouyihang1@huawei.com> - 1.2.10-90
- Package init

13
gtkrc-default Normal file
View File

@ -0,0 +1,13 @@
style "gtk-tooltips-style" {
bg[NORMAL] = "#ffffc0"
fg[NORMAL] = "#000000"
}
widget "gtk-tooltips" style "gtk-tooltips-style"
style "gtk-progressbar-style" {
bg[NORMAL] = "#ffffff"
bg[PRELIGHT] = "#a0a0a0"
}
class "GtkProgressBar" style "gtk-progressbar-style"

7
gtkrc.ja.utf8 Normal file
View File

@ -0,0 +1,7 @@
style "gtk-default-ja-utf8" {
fontset = "-misc-fixed-medium-r-normal--14-*-*-*-*-*-jisx0208.1983-0,\
-adobe-helvetica-medium-r-normal--14-100-100-100-p-76-iso8859-1,\
*-r-*"
}
class "GtkWidget" style "gtk-default-ja-utf8"

10
gtkrc.ko.utf8 Normal file
View File

@ -0,0 +1,10 @@
style "gtk-default-ko-utf8" {
fontset = "-*-gulim*-medium-r-normal--*-120-*-*-*-*-ksc5601.1987-0,\
-*-gulim*-medium-r-normal--*-120-*-*-*-*-ksc5601.1987-0,\
-*-kodig-medium-r-normal--*-120-*-*-*-*-ksc5601.1987-0,\
-*-*-medium-r-normal--*-120-*-*-*-*-ksc5601.1987-0,\
-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*,\
*"
}
class "GtkWidget" style "gtk-default-ko-utf8"

14
gtkrc.zh_CN.utf8 Normal file
View File

@ -0,0 +1,14 @@
# $(gtkconfigdir)/gtkrc.zh_CN
#
# This file defines the fontsets for Chinese language (zh) using
# the simplified chinese standard GuoBiao as in mainland China (CN)
#
# 1999, Pablo Saratxaga <pablo@mandrakesoft.com>
#
style "gtk-default-zh-cn-utf8" {
fontset = "-adobe-helvetica-medium-r-normal--16-*-*-*-*-*-iso8859-1,\
-*-*-medium-r-normal--16-*-*-*-*-*-gb2312.1980-0,*-r-*"
}
class "GtkWidget" style "gtk-default-zh-cn-utf8"

18
gtkrc.zh_TW.utf8 Normal file
View File

@ -0,0 +1,18 @@
# $(gtkconfigdir)/gtkrc.zh_TW
#
# This file defines the fontsets for Chinese language (ch) using
# the traditional chinese Big5 encoding as used in Taiwan (TW)
#
# 1999, Pablo Saratxaga <pablo@mandrakesoft.com>
#
# IMPORTANT NOTE: The name of this file *MUST* be "gtkrc.zh_TW.big5"
# the lowercasing of "big5" is done on purpose, if you change it it won't work
style "gtk-default-zh-tw-utf8" {
fontset = "-adobe-helvetica-medium-r-normal--16-*-*-*-*-*-iso8859-1,\
-taipei-*-medium-r-normal--*-*-*-*-*-*-big5-0,\
-*-*-medium-r-normal--16-*-*-*-*-*-big5-0,*-r-*"
}
class "GtkWidget" style "gtk-default-zh-tw-utf8"