Permalink
Browse files

Apply a cleanup patch by Kjartan Maraas (#341812)

2006-10-08  Matthias Clasen  <mclasen@redhat.com>

	* Apply a cleanup patch by Kjartan Maraas  (#341812)
  • Loading branch information...
1 parent e458186 commit 07e7719441f5927bc3c482717fc53f8529186e3a Matthias Clasen committed with Matthias Clasen Oct 8, 2006
Showing with 222 additions and 417 deletions.
  1. +1 −1 ChangeLog.pre-1-2
  2. +1 −1 ChangeLog.pre-2-0
  3. +1 −1 HACKING
  4. +51 −51 NEWS
  5. +7 −7 README
  6. +0 −6 contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib-drawable.c
  7. +1 −1 demos/gtk-demo/appwindow.c
  8. +3 −6 demos/gtk-demo/hypertext.c
  9. +1 −1 demos/testpixbuf-drawable.c
  10. +2 −2 demos/testpixbuf.c
  11. +3 −3 docs/README.linux-fb
  12. +3 −3 docs/developers.txt
  13. +2 −2 docs/dnd_internals.txt
  14. +1 −1 docs/faq/gtk-faq.sgml
  15. +1 −1 docs/faq/gtkfaq.sgml
  16. +1 −1 docs/focus_tracking.txt
  17. +3 −3 docs/generation.txt
  18. +1 −1 docs/gtk-config.txt
  19. +7 −7 docs/refcounting.txt
  20. +8 −8 docs/styles.txt
  21. +12 −12 docs/text_widget.txt
  22. +9 −9 docs/widget_system.txt
  23. +1 −1 gdk-pixbuf/gdk-pixbuf-csource.c
  24. +2 −2 gdk-pixbuf/gdk-pixdata.c
  25. +1 −1 gdk-pixbuf/queryloaders.c
  26. +0 −5 gtk/gtkaboutdialog.c
  27. +0 −1 gtk/gtkaccelmap.c
  28. +0 −6 gtk/gtkaction.c
  29. +0 −12 gtk/gtkassistant.c
  30. +1 −1 gtk/gtkbutton.c
  31. +0 −1 gtk/gtkcalendar.c
  32. +1 −3 gtk/gtkcellrendereraccel.c
  33. +1 −1 gtk/gtkcellrendererpixbuf.c
  34. +0 −1 gtk/gtkcolorsel.c
  35. +2 −2 gtk/gtkcombo.c
  36. +0 −1 gtk/gtkcombobox.c
  37. +1 −12 gtk/gtkctree.c
  38. +1 −2 gtk/gtkcurve.c
  39. +1 −1 gtk/gtkdnd.c
  40. +1 −1 gtk/gtkentrycompletion.c
  41. +4 −4 gtk/gtkfilechooserbutton.c
  42. +0 −1 gtk/gtkfilechooserdefault.c
  43. +0 −2 gtk/gtkfilechooserentry.c
  44. +1 −1 gtk/gtkfilechoosersettings.c
  45. +4 −4 gtk/gtkfilesystemunix.c
  46. +1 −1 gtk/gtkhandlebox.c
  47. +1 −1 gtk/gtkiconcache.c
  48. +2 −2 gtk/gtkiconfactory.c
  49. +2 −2 gtk/gtkicontheme.c
  50. +0 −3 gtk/gtkiconview.c
  51. +1 −1 gtk/gtkimagemenuitem.c
  52. +3 −1 gtk/gtkinputdialog.c
  53. +0 −1 gtk/gtkmenu.c
  54. +1 −1 gtk/gtkmessagedialog.c
  55. +3 −3 gtk/gtknotebook.c
  56. +0 −1 gtk/gtkpathbar.c
  57. +0 −2 gtk/gtkprinteroptionwidget.c
  58. +0 −1 gtk/gtkrange.c
  59. +1 −1 gtk/gtkrbtree.c
  60. +0 −1 gtk/gtkrecentchooserdefault.c
  61. +0 −8 gtk/gtkrecentchoosermenu.c
  62. +2 −2 gtk/gtkscrolledwindow.c
  63. +0 −1 gtk/gtkselection.c
  64. +0 −11 gtk/gtkstatusbar.c
  65. +1 −1 gtk/gtkstatusicon.c
  66. +0 −7 gtk/gtktextbuffer.c
  67. +0 −37 gtk/gtktextiter.c
  68. +35 −26 gtk/gtktextsegment.c
  69. +0 −1 gtk/gtktexttag.c
  70. +1 −1 gtk/gtktoggleaction.c
  71. +0 −6 gtk/gtktogglebutton.c
  72. +0 −61 gtk/gtktoolbar.c
  73. +0 −1 gtk/gtktoolbutton.c
  74. +2 −2 gtk/gtktooltips.c
  75. +1 −1 gtk/gtktreedatalist.c
  76. +3 −4 gtk/gtktreemodelfilter.c
  77. +0 −6 gtk/gtktreeview.c
  78. +0 −3 gtk/gtkvscale.c
  79. +0 −1 gtk/gtkwidget.c
  80. +1 −1 gtk/queryimmodules.c
  81. +1 −1 gtk/theme-bits/decompose-bits.c
  82. +18 −18 gtk/updateiconcache.c
  83. +1 −1 gtk/xdgmime/xdgmimealias.c
View
@@ -7981,7 +7981,7 @@ Thu Jun 4 02:20:42 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.h:
* gtk/gtkwidget.c: new function gtk_widget_stop_accelerator to stop
the emission of the "add-accelerator" signal on a widget. this is
- usefull to prevent accelerator installation on certain widgets.
+ useful to prevent accelerator installation on certain widgets.
* gtk/gtknotebook.c (gtk_notebook_menu_item_create): keep the menu
labels left justified, by setting their alignment. stop accelerator
View
@@ -17108,7 +17108,7 @@ Tue Jan 16 13:13:13 GMT 2001 Tony Gale <gale@gtk.org>
Use fb_mem, fb_stride, fb_width, fb_height.
Added recompute_rowstride to reset the rowstride of all windows.
Added gdk_fb_recompute_all() which recomputes rootwindow size,
- window abs positions and window rowstrides. Usefull when the
+ window abs positions and window rowstrides. Useful when the
rotation has changed.
Thu Jan 11 13:16:50 GMT 2001 Tony Gale <gale@gtk.org>
View
@@ -47,7 +47,7 @@ gtk+ and glib. You can do the following to get glib and gtk+ from cvs:
$ cvs -z3 checkout atk
$ cvs -z3 checkout gtk+
-For information about submitting patches and commiting changes
+For information about submitting patches and committing changes
to CVS, see the README and README.cvs-commits files. In particular,
don't, under any circumstances, commit anything to CVS before
reading and understanding README.cvs-commmits.
View
102 NEWS
Oops, something went wrong.
View
@@ -126,7 +126,7 @@ Release notes for 2.8
Release notes for 2.6
=====================
-* GTK+ 2.6 supports clipboard persistency. To make use of this feature,
+* GTK+ 2.6 supports clipboard persistence. To make use of this feature,
a clipboard manager following the specification at
http://www.freedesktop.org/wiki/Standards/clipboard-manager-spec
must be running. A sample implementation of such a clipboard manager
@@ -137,11 +137,11 @@ Release notes for 2.6
* Notification on clipboard ownership changes via GdkOwnerChange events
requires the XFIXES X extension. Applications can use the function
- gdk_display_supports_selection_notification() to find out if ownerchip
+ gdk_display_supports_selection_notification() to find out if ownership
change notification is available.
* The icon theme code in GTK+ 2.6 follows the freedesktop.org icon theme
- specification. Setting the XDG_DATA_DIRS environtment variable may be
+ specification. Setting the XDG_DATA_DIRS environment variable may be
necessary if your icons aren't installed in the default location
/usr/share/icons.
@@ -151,7 +151,7 @@ Release notes for 2.6
see the gtk-update-icon-cache man page or the GTK+ documentation.
* To reduce code size and improve efficiency, GTK+, when compiled
- with the GNU toolchain, has separate internal and external entry
+ with the GNU tool chain, has separate internal and external entry
points for exported functions. The internal names, which begin with
IA__, may be seen when debugging a GTK+ program.
@@ -179,7 +179,7 @@ Release notes for 2.6
compatibility are provided.
* On Unix, the assumption of GLib and GTK+ by default is that filenames on
- the filesystem are encoded in UTF-8 rather than the encoding of the locale;
+ the file system are encoded in UTF-8 rather than the encoding of the locale;
the GTK+ developers consider that having filenames whose interpretation
depends on the current locale is fundamentally a bad idea.
@@ -197,7 +197,7 @@ Release notes for 2.6
On Windows, filenames passed to GTK+ should always be in UTF-8, as
in GLib 2.6. This is different than in previous versions of GTK+
- where the system codepage was used. As in GLib, for DLL ABI
+ where the system code page was used. As in GLib, for DLL ABI
stability, applications built against previous versions of GTK+ will
use entry points providing the old semantics.
@@ -233,7 +233,7 @@ In the bug report please include:
that can be downloaded.
* If the bug was a crash, the exact text that was printed out when the
- crash occured.
+ crash occurred.
* Further information such as stack traces may be useful, but is not
necessary. If you do send a stack trace, and the error is an X error,
@@ -152,7 +152,6 @@ rgb1 (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colormap)
int xx, yy;
int width, height;
int bpl;
- guint8 *s;
register guint8 data;
guint8 *o;
guint8 *srow = image->data, *orow = pixels;
@@ -167,7 +166,6 @@ rgb1 (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colormap)
bpl = image->bytes_per_line;
for (yy = 0; yy < height; yy++) {
- s = srow;
o = orow;
for (xx = 0; xx < width; xx ++) {
@@ -191,7 +189,6 @@ rgb1a (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colormap)
int xx, yy;
int width, height;
int bpl;
- guint8 *s;
register guint8 data;
guint8 *o;
guint8 *srow = image->data, *orow = pixels;
@@ -221,7 +218,6 @@ rgb1a (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colormap)
}
for (yy = 0; yy < height; yy++) {
- s = srow;
o = orow;
for (xx = 0; xx < width; xx ++) {
@@ -988,7 +984,6 @@ convert_real_slow (XImage *image, guchar *pixels, int rowstride, xlib_colormap *
int width, height;
int bpl;
guint8 *srow = image->data, *orow = pixels;
- guint8 *s;
guint8 *o;
guint32 pixel;
Visual *v;
@@ -1011,7 +1006,6 @@ convert_real_slow (XImage *image, guchar *pixels, int rowstride, xlib_colormap *
red_prec, green_prec, blue_prec));
for (yy = 0; yy < height; yy++) {
- s = srow;
o = orow;
for (xx = 0; xx < width; xx++) {
pixel = XGetPixel (image, xx, yy);
@@ -156,7 +156,7 @@ typedef struct
GtkActionClass parent_class;
} ToolMenuActionClass;
-G_DEFINE_TYPE(ToolMenuAction, tool_menu_action, GTK_TYPE_ACTION);
+G_DEFINE_TYPE(ToolMenuAction, tool_menu_action, GTK_TYPE_ACTION)
static void
tool_menu_action_class_init (ToolMenuActionClass *class)
@@ -165,9 +165,9 @@ event_after (GtkWidget *text_view,
return FALSE;
}
-gboolean hovering_over_link = FALSE;
-GdkCursor *hand_cursor = NULL;
-GdkCursor *regular_cursor = NULL;
+static gboolean hovering_over_link = FALSE;
+static GdkCursor *hand_cursor = NULL;
+static GdkCursor *regular_cursor = NULL;
/* Looks at all tags covering the position (x, y) in the text view,
* and if one of them is a link, change the cursor to the "hands" cursor
@@ -179,12 +179,9 @@ set_cursor_if_appropriate (GtkTextView *text_view,
gint y)
{
GSList *tags = NULL, *tagp = NULL;
- GtkTextBuffer *buffer;
GtkTextIter iter;
gboolean hovering = FALSE;
- buffer = gtk_text_view_get_buffer (text_view);
-
gtk_text_view_get_iter_at_location (text_view, &iter, x, y);
tags = gtk_text_iter_get_tags (&iter);
@@ -66,7 +66,7 @@ configure_cb (GtkWidget *drawing_area, GdkEventConfigure *evt, gpointer data)
return FALSE;
}
-extern void pixbuf_init ();
+extern void pixbuf_init (void);
int
main (int argc, char **argv)
View
@@ -358,11 +358,11 @@ expose_func (GtkWidget *drawing_area, GdkEventExpose *event, gpointer data)
static void
config_func (GtkWidget *drawing_area, GdkEventConfigure *event, gpointer data)
{
+#if 0
GdkPixbuf *pixbuf;
pixbuf = (GdkPixbuf *)g_object_get_data (G_OBJECT (drawing_area), "pixbuf");
-#if 0
if (((event->width) != gdk_pixbuf_get_width (pixbuf)) ||
((event->height) != gdk_pixbuf_get_height (pixbuf)))
gdk_pixbuf_scale (pixbuf, event->width, event->height);
@@ -504,7 +504,7 @@ progressive_updated_callback (GdkPixbufLoader* loader, guint x, guint y, guint w
static int readlen = 4096;
-extern void pixbuf_init ();
+extern void pixbuf_init (void);
void size_func (GdkPixbufLoader *loader, gint width, gint height, gpointer data)
{
@@ -32,7 +32,7 @@ Freetype can be found at ftp://ftp.freetype.org
Hardware requirements:
----------------------
-You need a graphics card with an availible framebuffer driver that can
+You need a graphics card with an available framebuffer driver that can
run in 8, 16, 24 or 32 bpp. I use the matroxfb driver, but i.e. vesafb
should work too. You also need a supported mouse. Currently supported
is ps2 mouse, ms serial mouse and fidmour touchscreen.
@@ -44,7 +44,7 @@ First build and install glib and pango as usual, in that order.
Then configure Gtk by running configure (or autogen.sh if running from
cvs) with --with-gdktarget=linux-fb.
-Then compile as ususal: make; make install
+Then compile as usual: make; make install
Fonts:
------
@@ -124,7 +124,7 @@ GDK_MOUSE_TYPE:
Default is ps2.
GDK_KEYBOARD_TYPE:
- Specify keyboard type. Currently suppored is
+ Specify keyboard type. Currently supported is
xlate - normal tty mode keyboard.
Quite limited, cannot detect key up/key down events. Doesn't
handle ctrl/alt/shift for all keys. This is the default driver,
View
@@ -6,7 +6,7 @@ programming for/with Gtk, having the spirit of a developers FAQ.
It is also the correct place to list up things that programmers should
care about in general.
-In the hope that this text might be usefull to someone,
+In the hope that this text might be useful to someone,
- Tim Janik <timj@gimp.org>
1998/02/11
@@ -43,7 +43,7 @@ GDK_SELECTION_CLEAR GtkWidget::selection_clear_event
GDK_FOCUS_CHANGE GtkWidget::focus_in_event
GtkWidget::focus_out_event
-Events that are asured to have a valid GdkEvent.any.window field are
+Events that are assured to have a valid GdkEvent.any.window field are
GDK_EXPOSE GtkWidget::expose_event
@@ -61,7 +61,7 @@ Writing Gdk functions
---------------------
When writing Gdk functions that operate on GdkWindow structures in any
-maeningfull sense, that is casting to a GdkWindowPrivate structure for
+meaningful sense, that is casting to a GdkWindowPrivate structure for
access to fields other then GdkWindow.user_data, the programmer is
recommended to check for the GdkWindowPrivate.destroyed field to be ==
FALSE, especially if the GdkWindowPrivate.xwindow field is used.
@@ -112,7 +112,7 @@ Retrieves the selection that will be used to communicate
the data for the drag context (valid on both source
and dest sides)
-Cursors and window heirarchies
+Cursors and window hierarchies
==============================
The DND code, when possible (and it isn't possible over
@@ -123,7 +123,7 @@ the cursor is in _ourselves_ so we can ignore the
drag icon properly. (Oh for OutputOnly windows!)
To avoid obscene amounts of server traffic (which are only
-slighly observerable locally, but would really kill a
+slightly observable locally, but would really kill a
session over a slow link), the code in GDK does
XGetWindowAttributes for every child of the root window at
the beginning of the drag, then selects with
@@ -1636,7 +1636,7 @@ int main(int argc, char *argv[])
gtk_container_set_border_width(GTK_CONTAINER (window), 10);
#endif
- /* add a button to do something usefull */
+ /* add a button to do something useful */
button = gtk_button_new_with_label("Fork me!");
g_signal_connect(G_OBJECT (button), "clicked",
@@ -1323,7 +1323,7 @@ int main(int argc, char *argv[])
gtk_container_set_border_width(GTK_CONTAINER (window), 10);
#endif
- /* add a button to do something usefull */
+ /* add a button to do something useful */
button = gtk_button_new_with_label("Fork me!");
gtk_signal_connect(GTK_OBJECT (button), "clicked",
@@ -97,7 +97,7 @@ F2, F3: together these are exactly the cases where we get
F4: we get an LeaveNotify with the focus flag set. An
LeaveNotify with a focus flag set will also be sent if
- F==W, so we have to to explicity test for that case
+ F==W, so we have to to explicitly test for that case
using has_focus_window(W).
View
@@ -107,7 +107,7 @@ makeenums.pl can be run into two modes:
2) Generate the enumeration portion of gtk.defs.
-The enumearation portion is added to the boxed type
+The enumeration portion is added to the boxed type
declarations in gtk-boxed.defs to create gtk.defs.
The makeetypes.awk program takes the gtk.defs file, and
@@ -162,15 +162,15 @@ The possible types are:
GtkDestroyNotify Notify)
Some of these types map to multiple return values - these
-are marked above with the return types in parantheses.
+are marked above with the return types in parentheses.
NOTES
=====
When autogenerating GTK+ files, the autogenerated
files are often rebuild resulting in the same result.
-To prevent unecessary rebuilds of the entire directory, some files
+To prevent unnecessary rebuilds of the entire directory, some files
that multiple other source files depend on are not actually written
to directly. Instead, an intermediate file is written, which
is then compared to the old file, and only if it is different
View
@@ -1,7 +1,7 @@
CONFIGURING PACKAGES TO WORK WITH GTK
-------------------------------------
-Compiling a program succesfully against the GTK, GDK, and GLIB
+Compiling a program successfully against the GTK, GDK, and GLIB
libraries can require a large number of command line options
to your compiler and linker that are hard to guess correctly.
The additional libraries required may, for example, depend on the
View
@@ -22,10 +22,10 @@ GtkObjects also provide the following functions:
GdkWindow
---------
-A GdkWindow has to be explicitely destroyed with gdk_window_destroy.
+A GdkWindow has to be explicitly destroyed with gdk_window_destroy.
This will send out a request to destroy this window and all its
children, and will decrement the ref_count of the GdkWindow by one.
-Thus, it releases the inital reference created by gdk_window_new.
+Thus, it releases the initial reference created by gdk_window_new.
All GdkWindows are kept in a hash table to translate from their XId to
the actual structure and the pointer in the hash table is reflected in
@@ -62,7 +62,7 @@ GdkVisual
---------
There are no *_new or *_destroy functions and the *_ref and *_unref
-functions are noops. GdkVisuals are static structures and thus do not
+functions are no-ops. GdkVisuals are static structures and thus do not
need reference counting. The ref counting functions are only there
for extra defensive programming.
@@ -220,13 +220,13 @@ Then, when the user wants to get rid of the window:
/* The GdkWindow of `window' and all its child GdkWindows are
* destroyed.
*
- * window is unregistered from the loplevel list and its ref_count
- * drops to zero. The destroy code of `window' destroyes `option_menu'.
+ * window is unregistered from the toplevel list and its ref_count
+ * drops to zero. The destroy code of `window' destroys `option_menu'.
*
* The destroy code of `option_menu' causes the `menu' to be detached
* from it and its reference count drops to zero.
*
- * The destroy code of `menu' destroyes `menu_item'.
+ * The destroy code of `menu' destroys `menu_item'.
*
* The destruction of `menu_item' removes it from its parent, the
* menu_item->ref_count drops to zero and `menu_item' is finalized (freed).
@@ -241,7 +241,7 @@ Taking care of proper referencing
There are some cases where referencing of widgets from outside the toolkit
(on the application side) is needed.
-Once the application performes an operation on a widget that will cause
+Once the application performs an operation on a widget that will cause
its reference count to drop, if it wants to take further actions on the
widget, it needs to hold a reference to it.
Oops, something went wrong.

0 comments on commit 07e7719

Please sign in to comment.