Commit Graph

6191 Commits

Author SHA1 Message Date
Matthias Clasen
6afcd45024 Reorganize to avoid a possible NULL dereference. (Coverity)
2006-04-12  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtknotebook.c (gtk_notebook_page_allocate): Reorganize
        to avoid a possible NULL dereference.  (Coverity)
2006-04-12 21:22:42 +00:00
Matthias Clasen
374c855496 Handle _gtk_text_line_get_data() returning NULL in all cases. (Coverity)
2006-04-12  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktextlayout.c (gtk_text_layout_validate_yrange):
	Handle _gtk_text_line_get_data() returning NULL in all
	cases.  (Coverity)
2006-04-12 16:28:54 +00:00
Matthias Clasen
5977f7f027 Make find_menu_position and find_toolbar_position void. (#338100)
2006-04-12  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkuimanager.c: Make find_menu_position and
	find_toolbar_position void.  (#338100)
2006-04-12 13:32:47 +00:00
Matthias Clasen
e0e24d0313 Don't pass a negative value as string length to get_child_node().
2006-04-12  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkuimanager.c (start_element_handler): Don't pass
        a negative value as string length to get_child_node().  (Coverity)
2006-04-12 04:49:18 +00:00
Matthias Clasen
d13554a35c Better fix 2006-04-12 04:22:51 +00:00
Matthias Clasen
4906bd0fad Fix another Coverity bug 2006-04-12 04:20:28 +00:00
Matthias Clasen
5585ce9e91 Silently do nothing if the widget is not a child. (Coverity)
2006-04-12  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtknotebook.c (gtk_notebook_remove): Silently do nothing
        if the widget is not a child.  (Coverity)
2006-04-12 04:13:06 +00:00
Matthias Clasen
e12d6657ee Remove some unused variables.
2006-04-11  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtktextview.c (selection_motion_event_handler): Remove
        some unused variables.

        * gtk/gtktreeview.c ((gtk_tree_view_search_position_func): Apply
        a patch from David Trowbridge to improve the positioning of the
        search popup.  (#338047)
2006-04-12 02:48:43 +00:00
Emmanuele Bassi
82cda93923 Remove the unneeded setting of the storage file inside the constructor.
2006-04-11  Emmanuele Bassi  <ebassi@cvs.gnome.org>

	* gtk/gtkrecentmanager.c (gtk_recent_manager_init)
	(gtk_recent_manager_new): Remove the unneeded setting of the
	storage file inside the constructor. (Murray Cumming)
	(build_recent_items_list): Reset the dirty bit when done rebuilding
	the list from the storage file.
2006-04-11 21:04:15 +00:00
Matthias Clasen
4e2069f779 Silence compiler warnings.
2006-04-11  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkscale.c (gtk_scale_get_layout_offsets): Silence
	compiler warnings.
2006-04-11 16:41:25 +00:00
Matthias Clasen
371ce39cfc Don't dereference info before checking it for NULL. (Coverity)
2006-04-11  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkinputdialog.c (gtk_input_dialog_set_mapping_mode): Don't
	dereference info before checking it for NULL.  (Coverity)
2006-04-11 16:26:26 +00:00
Michael Natterer
99722bec2c pasted rich text should not be affected by tags that are active at the
2006-04-10  Michael Natterer  <mitch@imendio.com>

	* gtk/gtktextbufferrichtext.c (gtk_text_buffer_deserialize):
	pasted rich text should not be affected by tags that are active at
	the insertion point. Therefore, remove and remember all active
	tags, and re-apply them left and right of the inserted text after
	pasting. Fixes bug #337653.
2006-04-10 20:18:31 +00:00
Hans Breuer
0c6e0e4085 updated
2006-04-07  Hans Breuer  <hans@breuer.org>

	* gtk/makefile.msc.in tests/makefile.msc : updated
2006-04-07 17:18:08 +00:00
Matthias Clasen
993ffce842 More accidental commits 2006-04-06 03:29:48 +00:00
Matthias Clasen
4fc90e0973 Revert accidental changes 2006-04-06 03:12:04 +00:00
Matthias Clasen
9320076962 Lower the window, to prevent late-constructed text windows from covering
2006-04-05  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktextview.c (text_window_realize): Lower the window, to
	prevent late-constructed text windows from covering child
	widgets.  (#336796, Yevgen Muntyan)
2006-04-06 02:48:40 +00:00
Matthias Clasen
4af02533bf One more optimization 2006-04-06 02:18:57 +00:00
Matthias Clasen
12704a67bc Rework the code which emits ::grab-notify signals to ensure that we emit
2006-04-05  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkmain.c (gtk_grab_add, gtk_grab_remove, gtk_grab_notify)
	(gtk_grab_notify_foreach): Rework the code which emits ::grab-notify
	signals to ensure that we emit enough signals. Also optimize the
	code to not do unnecessary tree walking.

	* gtk/gtkwidget.c (gtk_widget_class_init): Document ::grab-notify.
2006-04-06 01:58:38 +00:00
Paolo Borelli
f58c7f1ae8 handle the case of \r and \n split across lines. Bug #337022. add unit
2006-04-05  Paolo Borelli  <pborelli@katamail.com>

	* gtk/gtktextiter.c (gtk_text_iter_ends_line): handle the case of \r
	and \n split across lines. Bug #337022.
	* tests/testtextbuffer.c: add unit test.
2006-04-05 18:30:46 +00:00
Matthias Clasen
9c0f0bb451 Small savings 2006-04-04 04:14:17 +00:00
Matthias Clasen
8862bf9233 Make gtk_args const 2006-04-04 03:52:36 +00:00
Matthias Clasen
c7f1892ef8 Move a constant string to rodata 2006-04-04 03:49:32 +00:00
Matthias Clasen
8c8a4c89b8 No point in making the error path fast by caching quarks.
2006-04-03  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkrecentchooser.c (gtk_recent_chooser_error_quark):
        * gtk/gtkrecentmanager.c (gtk_recent_manager_error_quark):
        * gtk/gtkfilechooser.c (gtk_file_chooser_error_quark):
        * gtk/gtkfilesystem.c (gtk_file_system_error_quark):
        * gtk/gtkicontheme.c (gtk_icon_theme_error_quark): No point
        in making the error path fast by caching quarks.
2006-04-04 03:25:16 +00:00
Matthias Clasen
c53db1264b Avoid relocation 2006-04-04 03:06:39 +00:00
Matthias Clasen
80cd74fd0e Mention that %NULL is allowed. (#336937, Christian Neumair)
2006-04-03  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkprogressbar.c (gtk_progress_bar_set_text): Mention
	that %NULL is allowed.  (#336937, Christian Neumair)
2006-04-03 18:09:05 +00:00
Matthias Clasen
6ff309a95c Get rid of an unnecessary static variable.
2006-04-03  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkmain.c: Get rid of an unnecessary static variable.
2006-04-03 16:21:41 +00:00
Matthias Clasen
8de7c8b761 Fix a warning.
* gtk/gtktextlayout.c: Fix a warning.

	* gtk/gtktextsegment.h:
	* gtk/gtktextsegment.c:
	* gtk/gtktextchild.c:
	* gtk/gtktextbtree.c:
	* gtk/gtktextmark.c:
	* gtk/gtktexttypes.h: Make the segment class pointers const.

	* gtk/gtktextbufferserialize.c: Make parser struct const.

	* gtk/gtkuimanager.c: Make parser struct const.
2006-04-03 15:50:30 +00:00
Matthias Clasen
0351d5671d Make the default colors const.
2006-04-03  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtklinkbutton.c: Make the default colors const.
2006-04-03 15:06:41 +00:00
Matthias Clasen
58fb752214 Avoid relocations.
2006-04-03  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkuimanager.c: Avoid relocations.
2006-04-03 05:19:42 +00:00
Matthias Clasen
8f95967b76 Reduce size of static buffer.
2006-04-03  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkxembed.c (_gtk_xembed_message_name): Reduce size of static
	buffer.
2006-04-03 04:50:18 +00:00
Matthias Clasen
5cc8fbf8fe Avoid relocations.
2006-04-03  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktext.c (gtk_text_key_press): Avoid relocations.
2006-04-03 04:41:05 +00:00
Matthias Clasen
e40a3b0e3b Allocate the gtk_rc_default_files array dynamically.
2006-04-03  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkrc.c (gtk_rc_add_initial_default_files)
	(gtk_rc_add_default_file): Allocate the gtk_rc_default_files array
	dynamically.
2006-04-03 04:17:10 +00:00
Matthias Clasen
168e2d2590 Avoid relocations for the array of symbol names.
2006-04-02  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkrc.c: Avoid relocations for the array of symbol names.
2006-04-03 03:57:29 +00:00
Matthias Clasen
58daa1a3f2 Remove unused strings from the ruler_metrics structs, to avoid
2006-04-02  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkruler.c: Remove unused strings from the ruler_metrics
        structs, to avoid relocations.  (#336917, Stephane Chauveau)
2006-04-03 01:41:38 +00:00
Emmanuele Bassi
d86b57208f Build the items list after setting the storage file.
2006-04-02  Emmanuele Bassi  <ebassi@cvs.gnome.org>

	* gtk/gtkrecentmanager.c (gtk_recent_manager_set_filename): Build
	the items list after setting the storage file.

	* gtk/gtkrecentmanager.c (display_closed): Use the right string
	for unsetting the default manager object from the screen.
2006-04-02 21:33:43 +00:00
Behdad Esfahbod
8ca2113e4d Oops. (#336784)
2006-04-01  Behdad Esfahbod  <behdad@gnome.org>

        * gtk/gtkfilesel.c (gtk_file_selection_get_filename): Oops. (#336784)
2006-04-02 01:40:26 +00:00
Behdad Esfahbod
6da22af993 Use a GString instead of static buffer to reduce .bss by 8kb. (#336784)
2006-04-01  Behdad Esfahbod  <behdad@gnome.org>

        * gtk/gtkfilesel.c (gtk_file_selection_get_filename): Use a GString
        instead of static buffer to reduce .bss by 8kb. (#336784)
2006-04-01 20:06:15 +00:00
Behdad Esfahbod
103c3781a3 Convert filenames to UTF-8 before printing them out in warning messages.
2006-03-31  Behdad Esfahbod  <behdad@gnome.org>

        * gtk/gtkrecentmanager.c: Convert filenames to UTF-8 before printing
        them out in warning messages. (#336770, Morten Welinder)
2006-04-01 04:48:31 +00:00
Behdad Esfahbod
5e3fbe78cc Update last_stamp inside the look. (#336771, Morten Welinder)
2006-03-31  Behdad Esfahbod  <behdad@gnome.org>

        * gtk/gtkrecentmanager.c (gtk_recent_info_last_application): Update
        last_stamp inside the look. (#336771, Morten Welinder)
2006-04-01 00:44:55 +00:00
Behdad Esfahbod
0ef457c730 Add missing break. (#336769, Morten Welinder)
2006-03-31  Behdad Esfahbod  <behdad@gnome.org>

        * gtk/gtkrecentchoosermenu.c (gtk_recent_chooser_menu_get_property):
        Add missing break. (#336769, Morten Welinder)
2006-04-01 00:28:27 +00:00
Behdad Esfahbod
13bcd2c002 Return NULL instead of FALSE in g_return_val_if_fail in a
2006-03-31  Behdad Esfahbod  <behdad@gnome.org>

        * gtk/gtkfilesystem.c (gtk_file_system_get_bookmark_label):
        * gtk/gtklinkbutton.c (gtk_link_button_new_with_label): Return NULL
        instead of FALSE in g_return_val_if_fail in a pointer-returning
        function. (#336764, Morten Welinder)
2006-04-01 00:25:00 +00:00
Matthias Clasen
e20b86320a Don't assert that the age is positive. (#336773, Morten Welinder)
2006-03-31  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkrecentmanager.c (gtk_recent_info_get_age): Don't
	assert that the age is positive.  (#336773, Morten Welinder)
2006-03-31 21:20:14 +00:00
Matthias Clasen
082d4176d5 Don't leak the keyfile parser in the error case.
2006-03-31  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkicontheme.c (load_icon_data): Don't leak the keyfile
	parser in the error case.

	* gtk/gtkicontheme.c (load_icon_data, free_unthemed_icon)
	(icon_data_free, load_themes):
	* gtk/gtkiconcache.c (_gtk_icon_cache_get_icon_data): Use the slice
	allocator for GtkIconData and UnthemedIcon structs.
2006-03-31 05:17:56 +00:00
Behdad Esfahbod
1d4c765db0 Fix translation comments for localizable digit formats. (fixes bug
2006-03-30  Behdad Esfahbod  <behdad@gnome.org>

        * gtk/gtkcalendar.c: Fix translation comments for localizable
        digit formats. (fixes bug #336650)
2006-03-30 22:56:09 +00:00
Matthias Clasen
6205777cda Fix the doc comment format.
2006-03-30  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkrecentmanager.h (struct _GtkRecentData): Fix the doc
	comment format.

	* gtk/gtkrecentmanager.c (gtk_recent_manager_has_item)
	(gtk_recent_manager_purge_items, gtk_recent_manager_lookup_item)
	(gtk_recent_manager_get_limit, gtk_recent_manager_add_full)
	(gtk_recent_manager_get_items, gtk_recent_manager_remove_item):

	* gtk/gtkrecentfilter.c (gtk_recent_filter_add_age):
	* gtk/gtkrecentchooser.c (gtk_recent_chooser_set_show_numbers)
	(gtk_recent_chooser_set_sort_func):
	* gtk/gtknotebook.h (gtk_notebook_set_tab_detachable): Sync
	parameter names between .c and .h files to help gtk-doc.
2006-03-30 21:30:37 +00:00
Matthias Clasen
bbec8800a4 Make sure to get an icon window when constructing the fallback_icon. This
2006-03-30  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkdnd.c (gtk_drag_get_icon): Make sure to get an
	icon window when constructing the fallback_icon. This
	fixes a crash when dragging icons between screens in
	nautilus.  (#325751, Hylke van der Schaaf)
2006-03-30 18:22:39 +00:00
Matthias Clasen
8910e9333d Fix some symbol aliasing glitches 2006-03-29 21:08:06 +00:00
Emmanuele Bassi
58caa5c095 Make gtkalias.h the last included file.
2006-03-29  Emmanuele Bassi  <ebassi@cvs.gnome.org>

	* gtk/gtkrecentchoosermenu.c: Make gtkalias.h the last included file.
2006-03-29 21:01:36 +00:00
Emmanuele Bassi
51846f9d39 Fix a typo that broke aliasing rules.
2006-03-29  Emmanuele Bassi  <ebassi@cvs.gnome.org>

	* gtk/gtk.symbols: Fix a typo that broke aliasing rules.
2006-03-29 20:48:56 +00:00
Emmanuele Bassi
056f6db533 Import GtkRecent* from libegg.
2006-03-29  Emmanuele Bassi  <ebassi@cvs.gnome.org>

	Import GtkRecent* from libegg.

	* gtk/gtkrecentmanager.[ch]: Add GtkRecentManager, an object
	for managing a list of recently used resources.

	* gtk/gtkrecentchooser.[ch]:
	* gtk/gtkrecentchooserdefault.[ch]:
	* gtk/gtkrecentchooserdialog.[ch]:
	* gtk/gtkrecentchoosermenu.[ch]:
	* gtk/gtkrecentchooserprivate.h:
	* gtk/gtkrecentchooserutils.[ch]:
	* gtk/gtkrecentchooserwidget.[ch]: Add GtkRecentChooser, a
	GTypeInterface for widgets implementing viewers for recently
	used resources.

	* gtk/gtkrecentfilter.[ch]: GtkRecentFilter, a filter object
	for GtkRecentChooser implementations.

	* gtk/gtk.h:
	* gtk/gtk.symbols:
	* gtk/Makefile.am: Build glue for GtkRecent*.
2006-03-29 20:16:44 +00:00