Commit Graph

6151 Commits

Author SHA1 Message Date
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
Matthias Clasen
3c29d067a1 Emit page-added before switch-page 2006-03-29 15:20:21 +00:00
Matthias Clasen
a560c6ba97 Handle double queuing, rather than asserting that it does not happen.
2006-03-29  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserdefault.c (queue_edited_idle): Handle
	double queuing, rather than asserting that it does not
	happen.  (#330617)
2006-03-29 05:35:00 +00:00
Matthias Clasen
57e2e0d9b9 Fix docs syntax.
2006-03-28  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtknotebook.c (gtk_notebook_set_tab_detachable): Fix
	docs syntax.
2006-03-28 18:58:05 +00:00
Matthias Clasen
38994e574c Fix drag-selection after double-click. (#323862, Benjamin Berg)
2006-03-28  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktextview.c (gtk_text_view_start_selection_drag):
	(selection_motion_event_handler): Fix drag-selection after
	double-click.  (#323862, Benjamin Berg)

	* gtk/gtktextview.c (get_iter_at_pointer): Factor this out
	into a function and use it in move_mark_to_pointer_and_scroll,
	drag_scan_timeout and selection_motion_event_handler.
	(Paolo Borelli)
2006-03-28 17:28:19 +00:00
Matthias Clasen
97c07a14f3 Move the call to gtk_text_view_end_selection_drag() from
2006-03-28  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktextview.c (gtk_text_view_do_popup)
	(gtk_text_view_grab_notify): Move the call to
	gtk_text_view_end_selection_drag() from gtk_text_view_do_popup
	to gtk_text_view_grab_notify, so that it works not only
	for the text views own popup, but also for other ways in which
	we might become grab-shadowed during a selection drag.
	(#74620, Li Yuan)
2006-03-28 16:01:11 +00:00
Sven Herzberg
b815740789 reviewed by: Tim Janik
2006-03-28  Sven Herzberg  <herzi@gnome-de.org>

        reviewed by: Tim Janik

	* gtk/gtkpixmap.c: (gtk_pixmap_set): only check for equal colormaps if
	the new pixmap is not NULL; fixes a warning when gtk_pixmap_set is
	called from gtk_pixmap_finalize (bug 336254)
2006-03-27 23:01:59 +00:00
Anders Carlsson
856ee02fe4 Make the poll func work with real file descriptors. We do this by creating
2006-03-27  Anders Carlsson  <andersca@imendio.com>

        * gdk/quartz/gdkevents-quartz.c:
        (select_thread_func):
        (got_fd_activity):
        (poll_func):
        (gdk_event_translate):
        Make the poll func work with real file descriptors.
        We do this by creating a thread which calls poll and then
        signals the main thread using a run loop source.

        * gtk/gtkclipboard-quartz.c:
        (-[GtkClipboardOwner pasteboard:provideDataForType:]):
        Remove debugging output
2006-03-27 18:46:38 +00:00
Matthias Clasen
dbba8384d1 Check that the widget is viewable. (#336200, Bastian Nocera)
2006-03-27  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkmnemonichash.c (_gtk_mnemonic_hash_activate): Check that
	the widget is viewable.  (#336200, Bastian Nocera)
2006-03-27 18:30:22 +00:00
Michael Natterer
161b0a5c55 bail out if there is no need for scrolling (more obvious than adding
2006-03-27  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkmenu.c (gtk_menu_scroll_by): bail out if there is no need
	for scrolling (more obvious than adding additional conditions to
	the scroll offset calculation). Fixes bug #335912.
2006-03-27 17:00:01 +00:00
Anders Carlsson
f09810e025 Add -xobjective-c to cflags. (#335956, Lllian Angel)
2006-03-27  Anders Carlsson  <andersca@imendio.com>

        * gtk/Makefile.am:
        Add -xobjective-c to cflags.
        (#335956, Lllian Angel)

        * gtk/gtkdnd-quartz.c:
        (gtk_drag_dest_set_track_motion):
        (gtk_drag_dest_get_track_motion):
        Add stubs for new functions.
        (#335955, Lillian Angel)
2006-03-27 11:34:43 +00:00
Michael Natterer
450a117ce4 add missing ')'.
2006-03-27  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_get_property):
	add missing ')'.
2006-03-27 10:17:31 +00:00
Matthias Clasen
e35e406de3 Fix a build problem 2006-03-26 06:20:54 +00:00
Matthias Clasen
f9d99fe6ed Another leak 2006-03-26 06:15:51 +00:00
Matthias Clasen
24199c0f56 Fix leaks 2006-03-26 06:13:17 +00:00
Matthias Clasen
a22bcd66c4 Fix a leak 2006-03-26 06:10:15 +00:00
Matthias Clasen
25a56013c5 Another one 2006-03-26 06:05:57 +00:00
Matthias Clasen
0d04bd7fec Small optimization 2006-03-26 06:03:31 +00:00
Matthias Clasen
7381f806dc Don't call gdk_window_invalidate_rect() on unrealized widgets. (#335717,
2006-03-24  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktextview.c (gtk_text_view_value_changed): Don't call
	gdk_window_invalidate_rect() on unrealized widgets.  (#335717,
	Nicolas Setton)
2006-03-24 15:06:11 +00:00
Tim Janik
adebf25717 back out G_GNUC_WARN_UNUSED_RESULT on iterator functions which turned out
Fri Mar 24 14:53:20 2006  Tim Janik  <timj@imendio.com>

        * gtk/gtktreemodel.h:
        * gtk/gtktextbtree.h: back out G_GNUC_WARN_UNUSED_RESULT on iterator
        functions which turned out to cause too much trouble.
2006-03-24 14:03:45 +00:00
Matthias Clasen
ac879843d0 Support subclasses in RC files. (#142417, Todd Berman, patch based on a
2006-03-23  Matthias Clasen  <mclasen@redhat.com>

	Support subclasses in RC files.  (#142417, Todd Berman, patch
	based on a patch by Benjamin Berg)

	* gtk/gtkrc.h:
	* gtk/gtkrc.c: Support <classname> elements in widget_class paths
	in rc files which match any classes derived from named class.

	(_gtk_rc_init): Use the new syntax in the default rc string.

	* gtk/gtkbindings.c: Support the new syntax for bindings too.

	* tests/testrc.c: Tests for widget_class path matching
2006-03-23 23:21:30 +00:00
Carlos Garnacho
efbac09061 make sure that gdk_drag_event() is called when track_motion is TRUE to
2006-03-23  Carlos Garnacho  <carlosg@gnome.org>

        * gtk/gtkdnd.c (gtk_drag_dest_motion): make sure that gdk_drag_event()
        is called when track_motion is TRUE to receive drag_motion and
        drag_leave events properly.
2006-03-23 14:39:56 +00:00
Matthias Clasen
bbd8b9a51c Emit the ::page-removed signal after removing the page. (#335238,
2006-03-22  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtknotebook.c (gtk_notebook_remove): Emit the ::page-removed
	signal after removing the page.  (#335238, Christian Persch)
2006-03-22 21:11:40 +00:00
Carlos Garnacho
502d44e503 Make it to expand when hovering during DnD
2006-03-22  Carlos Garnacho  <carlosg@gnome.org>

        * gtk/gtkexpander.c: Make it to expand when hovering during DnD
2006-03-22 21:09:01 +00:00
Matthias Clasen
411d798e93 Improved DND support for GtkNotebook (#332991, Carlos Garnacho)
2006-03-22  Matthias Clasen  <mclasen@redhat.com>

	Improved DND support for GtkNotebook  (#332991, Carlos Garnacho)

	* gtk/gtk.symbols:
	* gtk/gtkdnd.h:
	* gtk/gtkdnd.c: Add a track_motion flag on GtkDragDest
	with getter and setter, for cases where the drag destination
	is interested in drag motion events independent of targets.

	* gtk/gtksettings.c (gtk_settings_class_init): Add a setting
	for the timeout used when expanding during DND.

	* gtk/gtknotebook.c: Use the track_motion flag to switch
	notebook tabs when hovering over tabs during DND.
2006-03-22 20:17:23 +00:00
Matthias Clasen
8a1478a58f Remove some accidentally committed stuff 2006-03-22 20:06:16 +00:00
Matthias Clasen
3fb3db9f7a Use fg_gc to draw the inter-row drop highlight. Also draw the line all the
2006-03-22  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_bin_expose): Use fg_gc to
	draw the inter-row drop highlight. Also draw the line all the
	way across, and flip it in RTL mode. (#334906, Ian McDonald)
2006-03-22 18:46:08 +00:00
Michael Natterer
f98506b1f3 renamed last-char-timeout to password-hint-timeout and store all its data
2006-03-22  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkentry.c: renamed last-char-timeout to
	password-hint-timeout and store all its data in a struct attached
	as QData.

	* gtk/gtkcellrendererspin.c: fix typo in #include.
2006-03-22 16:17:52 +00:00
Carlos Garnacho
f77c0fb15e send a GtkWidget** instead of a GtkNotebookPage* when doing tabs DnD, this
2006-03-22  Carlos Garnacho  <carlosg@gnome.org>

        * gtk/gtknotebook.c: send a GtkWidget** instead of a GtkNotebookPage*
        when doing tabs DnD, this allows DnD interaction with other widgets,
        added some docs for this too.
        * tests/testnotebookdnd.c: add some code to test it.
2006-03-22 16:11:48 +00:00
Matthias Clasen
0047b0b98d Add a cell renderer which uses a spinbutton to edit the value of a cell.
2006-03-22  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtk.symbols:
	* gtk/gtkcellrendererspin.h:
	* gtk/gtkcellrendererspin.c: Add a cell renderer which
	uses a spinbutton to edit the value of a cell. (#156023,
	Daniel Kasak, Lorenzo Gil Sanchez, Carlos Garnacho)

	* gtk/gtk.h:
	* gtk/Makefile.am: Glue it in.
2006-03-22 15:28:16 +00:00
Michael Natterer
eb313fc8e4 applied modified patch from maemo-gtk which allows the most recently
2006-03-22  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkentry.c: applied modified patch from maemo-gtk which
	allows the most recently entered character in a hidden entry to be
	shown for a configurable period of time. Fixes bug #334560.
2006-03-22 14:06:40 +00:00
Michael Natterer
ca658057e5 count down from G_MAXUINT to avoid clashes with application-added DND
2006-03-22  Michael Natterer  <mitch@imendio.com>

	* gtk/gtktextbuffer.h (enum GtkTextBufferTargetInfo): count down
	from G_MAXUINT to avoid clashes with application-added DND
	targets.

	* gtk/gtktextview.c (gtk_text_view_init): set an empty
	GtkTargetList on the drag_dest so it is not NULL when a derived
	class' init() function is called.

	(gtk_text_view_target_list_notify): copy the text buffer's paste
	targets into the view's destinstion target list (preserving
	application-added DND targets), instead of replacing the view's
	target list. Fixes bug #334399.
2006-03-22 10:39:51 +00:00
Anders Carlsson
0c230f6061 Add new files.
2006-03-21  Anders Carlsson  <andersca@imendio.com>

        * gtk/Makefile.am:
        Add new files.

        * gtk/gtkclipboard-quartz.c: Added.
        * gtk/gtkdnd-quartz.c: Added.
        * gtk/gtkquartz.c: Added.
        * gtk/gtkquartz.h: Added.
        Add dnd and clipboard implementations.
2006-03-21 16:50:47 +00:00
Matthias Clasen
2d12378f9e Remove an unused variable.
2006-03-20  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkdnd.c (gtk_drag_get_cursor): Remove an unused variable.
2006-03-21 03:59:44 +00:00
Matthias Clasen
7ae595b99e Don't leave page->tab_label dangling. (gtk_notebook_real_remove): Use
2006-03-20  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtknotebook.c (gtk_notebook_remove_tab_label): Don't leave
	page->tab_label dangling.
	(gtk_notebook_real_remove): Use GTK_IN_DESTRUCTION.
	(gtk_notebook_destroy): Leave the removal of the children
	to the container destroy method.  (#319032, Yevgen Muntyan)

2006-03-20  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkcombobox.c (gtk_combo_box_remove): Use the existing
	GTK_IN_DESTRUCTION flag, rather than roll our own.
2006-03-21 00:12:48 +00:00
Matthias Clasen
5e66f6aa75 Add a window-placement-set property and a gtk-scrolled-window-placement
2006-03-20  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtk.symbols:
        * gtk/gtkscrolledwindow.h:
        * gtk/gtkscrolledwindow.c: Add a window-placement-set property
        and a gtk-scrolled-window-placement setting.  (#157025, Christian
        Neumair)
2006-03-20 19:17:59 +00:00
Matthias Clasen
6aee75af24 Make sure gettext is initialized before using it. (#335129, Christian
2006-03-20  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkmain.c (gtk_get_option_group): Make sure gettext
	is initialized before using it.  (#335129, Christian Persch)
2006-03-20 05:38:37 +00:00
Matthias Clasen
2941cd5c1a Document that @cell must be one of the renderers of the icon view, warn if
2006-03-19  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkiconview.c (gtk_icon_view_set_cursor): Document that
	@cell must be one of the renderers of the icon view, warn if
	it is not, and ignore @start_editing if @cell is not set.
	(#335001, Emmanuel Rodriguez)
2006-03-20 03:16:43 +00:00
Matthias Clasen
c099397369 Fix up compiler warnings 2006-03-16 15:53:36 +00:00
Matthias Clasen
e0d9da5a19 Check for a stock icon, not a stock item, when deciding whether to use
2006-03-16  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkactiongroup.c (gtk_action_group_add_actions_full)
	(gtk_action_group_add_toggle_actions_full)
	(gtk_action_group_add_radio_actions_full): Check for a stock
	icon, not a stock item, when deciding whether to use stock-id
	or icon-name.  (#334760, Jody Goldberg)
2006-03-16 15:38:55 +00:00
Matthias Clasen
53ac490322 Update the size of the image, by swapping the implementations of
2006-03-16  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkimage.c (gtk_image_clear): Update the size of the image,
	by swapping the implementations of gtk_image_clear and
	gtk_image_reset.  (#334657)
2006-03-16 13:59:24 +00:00