Commit Graph

4862 Commits

Author SHA1 Message Date
Anders Carlsson
98e2b9ea62 Rewrite clipboard handling so that the clipboard contents won't be freed
2004-10-26  Anders Carlsson  <andersca@imendio.com>

	* gtk/gtktextbuffer.c: (gtk_text_buffer_finalize),
	(create_clipboard_contents_buffer), (clipboard_get_contents_cb),
	(clipboard_clear_contents_cb), (cut_or_copy):
	Rewrite clipboard handling so that the clipboard contents won't be
	freed when the text buffer is finalized. Also add clipboard manager support.
	Fixes #95496.
2004-10-26 16:37:54 +00:00
Anders Carlsson
21ad6be6ad Really handle a NULL model, fixes #137211 for real.
2004-10-25  Anders Carlsson  <andersca@gnome.org>

	* gtk/gtkentry.c: (gtk_entry_completion_timeout):
	* gtk/gtkentrycompletion.c: (gtk_entry_completion_set_model),
	(gtk_entry_completion_get_model), (gtk_entry_completion_complete):
	Really handle a NULL model, fixes #137211 for real.

	* gtk/gtkfilechooserentry.c:
	(gtk_file_chooser_entry_maybe_update_directory):
	Remove _clear, #137211 is fixed.

	* tests/testentrycompletion.c: (main):
	Add completion with an empty model.
2004-10-26 15:53:32 +00:00
Carlos Garnacho Parro
d5ab45944d Fix for #118764, David Bordoley:
2004-10-25  Carlos Garnacho Parro  <carlosg@gnome.org>

	Fix for #118764, David Bordoley:

	* gtk/gtkmessagedialog.[ch]
	(gtk_message_dialog_format_secondary_text),
	(gtk_message_dialog_format_secondary_format): API additions to
	create HIG-like dialogs

	* demos/gtk-demo/dialog.c: Use the new API in the example

	* docs/reference/gtk/gtk-sections.txt:
	* docs/reference/gtk/tmpl/gtkmessagedialog.sgml: documented API
	additions
2004-10-26 05:06:32 +00:00
James M. Cape
ede3c39918 Rework of GtkFileChooserButton, some cleanups. Fixes #154388, #154390,
2004-10-25  James M. Cape  <jcape@ignore-your.tv>

	Rework of GtkFileChooserButton, some cleanups. Fixes #154388,
	#154390, #154390, #156272.

	* docs/reference/gtk/gtk-docs.sgml: Moved GtkFileChooserButton
	below GtkFileChooser.
	* docs/reference/gtk/gtk-sections.txt: Added
	gtk_file_chooser_button_get_width_chars(),
	gtk_file_chooser_button_set_width_chars(),
	gtk_label_set_width_chars(), gtk_label_get_width_chars().
	* docs/reference/gtk/gtk.types: Added
	gtk_cell_renderer_combo_get_type,
	gtk_cell_view_get_type,
	gtk_text_iter_get_type.
	* docs/reference/gtk/tmpl/gtkaboutdialog.sgml: Add
	"logo-icon-name" property.
	* docs/reference/gtk/tmpl/gtkcellview.sgml: Updates for
	properties
	(b/c of get_type() inclusion above).
	* docs/reference/gtk/tmpl/gtkfilechooserbutton.sgml:
	* docs/reference/gtk/tmpl/gtklabel.sgml: Add "width-chars"
	property,
	getters/setters.
	* docs/reference/gtk/tmpl/gtkcellrenderercombo.sgml: Added.
	* gtk/gtkentrycompletion.c:
	(_gtk_entry_completion_popdown): Don't show if the entry isn't
	mapped.
	* gtk/gtkfilechooserbutton.[c,h]: (*): About 45%
	rewritten, adds "width-chars" property, icons, working save
	modes, volume/Home/Desktop friendly-naming support.
	* gtk/gtklabel.[c,h]:
	(gtk_label_class_init), (gtk_label_init),
	(gtk_label_get_property), (gtk_label_set_property),
	(gtk_label_get_width_chars), (gtk_label_set_width_chars),
	(gtk_label_size_request): Add "width-chars" property.
	* tests/testfilechooserbutton.c: Update, use 4 different buttons
	for the different ACTIONs.
	* gtk/.cvsignore: Ignore gtk-update-icon-cache.
	* tests/.cvsignore: Ignore testimage.
2004-10-26 04:29:56 +00:00
Matthias Clasen
b0b24c91c8 Don't leak text. (#156325, Olivier Andrieu)
2004-10-25  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkcellrenderercombo.c (find_text): Don't leak text. (#156325,
	Olivier Andrieu)
2004-10-25 19:21:26 +00:00
Anders Carlsson
06c4bb44b1 New API to handle the clipboard manager.
2004-10-25  Anders Carlsson  <andersca@imendio.com>

	* gdk/gdk.symbols:
	* gdk/gdkdisplay.h:
	* gdk/x11/gdkdisplay-x11.c:
	(gdk_display_supports_clipboard_persistence),
	(gdk_display_store_clipboard):
	New API to handle the clipboard manager.

	* gtk/gtk.symbols:
	* gtk/gtkclipboard.c: (gtk_clipboard_class_init),
	(gtk_clipboard_finalize), (selection_clear_event_cb),
	(clipboard_unset), (gtk_clipboard_set_text),
	(gtk_clipboard_request_targets), (gtk_clipboard_wait_for_targets),
	(clipboard_peek), (gtk_clipboard_owner_change),
	(gtk_clipboard_wait_is_target_available),
	(gtk_clipboard_store_timeout), (gtk_clipboard_set_can_store),
	(gtk_clipboard_selection_notify), (gtk_clipboard_store),
	(_gtk_clipboard_store_all):
	* gtk/gtkclipboard.h:
	Add API for clipboard persistence and implement it, also add
	gtk_clipboard_wait_is_target_available.

	* gtk/gtkmain.c: (gtk_main):
	Call _gtk_clipboard_store_all before exiting.
2004-10-25 18:53:30 +00:00
Matthias Clasen
615deb5728 Support named icons as logos. (#156378, James Henstridge)
2004-10-25  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkaboutdialog.h:
	* gtk/gtkaboutdialog.c (gtk_about_dialog_set_logo_icon_name)
	(gtk_about_dialog_get_logo_icon_name): Support named icons as
	logos.  (#156378, James Henstridge)
2004-10-25 18:41:11 +00:00
Matthias Clasen
e18bbad7d7 Fix the doc formatting.
2004-10-25  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkdialog.c (gtk_dialog_set_alternative_button_order): Fix the
	doc formatting.

	* gtk/gtkcellview.[hc]: Make function parameter names consistent.
2004-10-25 15:53:46 +00:00
Matthias Clasen
8ab4fd4526 Add a public setting for button ordering (#74669, Owen Taylor)
2004-10-25  Matthias Clasen  <mclasen@redhat.com>

	Add a public setting for button ordering (#74669, Owen Taylor)

	* gtk/gtksettings.c (gtk_settings_class_init): Add a
	gtk-alternative-button-order setting.

	* gtk/gtkdialog.h:
	* gtk/gtkdialog.c (gtk_alternative_dialog_button_order): A
	getter for the alternative button order setting.
	* gtk/gtkdialog.c (gtk_dialog_set_alternative_button_order):
	New function to install an alternative button order for a
	dialog.

	* gtk/gtkfilesel.c (gtk_file_selection_init):
	* gtk/gtkfontsel.c (gtk_font_selection_dialog_init):
	* gtk/gtkmessagedialog.c (gtk_message_dialog_add_buttons):
	* gtk/gtkcolorseldialog.c (gtk_color_selection_dialog_init):
	* gtk/gtkfilechooserdefault.c (location_popup_handler):
	Set up an alternative button order.
2004-10-25 05:43:29 +00:00
Matthias Clasen
b63431c82a Add a new type GTK_IMAGE_ICON_NAME for named icons, update the size and
2004-10-25  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkimage.h:
	* gtk/gtkimage.c (gtk_image_new_from_icon_name)
	(gtk_image_set_from_icon_name, gtk_image_get_icon_name)
	(gtk_image_set_pixel_size, gtk_image_get_pixel_size):  Add a
	new type GTK_IMAGE_ICON_NAME for named icons, update the size
	and content of stock, icon set and named icon images upon style
	changes, and allow to set a fixed pixel size for named icon
	images.  (#155688, James Henstridge)

	* tests/testimage.c: Test application for theming behaviour of
	different image types and for image dnd.
2004-10-25 04:36:39 +00:00
Matthias Clasen
2b4ef0648a Use G_DEFINE_TYPE, intialize the has_entry property, ref the model and add
2004-10-24  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkcellrenderercombo.c: Use G_DEFINE_TYPE, intialize the
	has_entry property, ref the model and add a finalizer.  (#156325,
	Olivier Andrieu)
2004-10-25 03:57:25 +00:00
Matthias Clasen
ed19394c8e Use the new g_key_file api in GLib.
2004-10-24  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkicontheme.c: Use the new g_key_file api in GLib.

	* gtk/Makefile.am (gtk_c_sources): Remove gtkiconthemeparser.[hc]

	* gtk/gtkiconthemeparser.[hc]: Removed.
2004-10-24 05:48:16 +00:00
Matthias Clasen
6e95002931 Fix the build. 2004-10-24 05:13:24 +00:00
Matthias Clasen
a2997a6065 If the location dialog is brought up by typing '/', insert the slash in
2004-10-24  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserdefault.c (location_popup_handler): If the
	location dialog is brought up by typing '/', insert the slash
	in the entry.  (#155370, Warren Togami)

2004-10-23  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserdefault.c (tree_view_keybinding_cb)
	(trap_activate_cb): Accept shift-/ for bringing up the location
	popup, since German and French keyboards generate such
	events.  (#154163, Frederic Crozat)
2004-10-24 04:27:44 +00:00
Matthias Clasen
ff9e1e7ac4 Invalidate the window if the tree is empty, to avoid resizing artifacts
2004-10-23  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_size_allocate): Invalidate
	the window if the tree is empty, to avoid resizing artifacts
	from the focus rectangle.  (#155881, Vincent Noel, patch by
	Billy Biggs)
2004-10-24 00:43:48 +00:00
Søren Sandmann
3c89907d55 Remove assertion that can get triggered by broken sort functions.
Sat Oct 23 16:14:37 2004  Søren Sandmann  <sandmann@redhat.com>

	* gtk/gtksequence.c (_gtk_sequence_node_insert_sorted): Remove
	assertion that can get triggered by broken sort functions.
2004-10-23 20:16:22 +00:00
Søren Sandmann
38df3fec77 Replace broken, overly clever implementation with one that works.
Sat Oct 23 16:07:46 2004  Søren Sandmann  <sandmann@redhat.com>

	* gtk/gtksequence.c (_gtk_sequence_swap): Replace broken, overly
	clever implementation with one that works.

	* gtk/gtkliststore.c (gtk_list_store_swap): emit "rows_reordered"
	instead of "changed" twice.

	Bug 153479
2004-10-23 20:10:40 +00:00
Søren Sandmann
8ebef872f3 Remove check for previous state being ACTIVE. Bug 153876.
Sat Oct 23 15:17:55 2004  Søren Sandmann  <sandmann@redhat.com>

	* gtk/gtkmenutoolbutton.c (button_state_changed_cb): Remove check
	for previous state being ACTIVE. Bug 153876.
2004-10-23 19:18:51 +00:00
Matthias Clasen
a811584d01 Use the new file DND api.
2004-10-22  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserbutton.c (gtk_file_chooser_button_drag_data_received)
	(gtk_file_chooser_button_init): Use the new file DND api.

	* gtk/gtkdnd.h:
	* gtk/gtkdnd.c (gtk_drag_dest_add_uri_targets)
	(gtk_drag_source_add_uri_targets):

	* gtk/gtkselection.h:
	* gtk/gtkselection.c (gtk_target_list_add_uri_targets):
	(gtk_selection_data_set_uris):
	(gtk_selection_data_get_uris): New functions to allow
	handling file DND "without knowing jack shit".

	* configure.in: Bump glib requirement to 2.5.4.

	* gtk/gtkfilechooserdefault.c (shortcuts_drop_uris): Use
	g_uri_list_extract_uris().
2004-10-22 22:50:32 +00:00
Owen Taylor
ad955c8196 ri Oct 22 13:25:25 2004 Owen Taylor <otaylor@redhat.com>
* gtk/gtktextbuffer.c (gtk_text_buffer_backspace): Fix
        backspacing on the empty last line of a buffer
        (https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=136840,
        Dan Williams)
2004-10-22 17:30:43 +00:00
Matthias Clasen
81229a1b0b Document how to use info with text/image targets.
2004-10-22  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkdnd.c: Document how to use info with text/image
	targets.

	* gtk/gtkselection.h:
	* gtk/gtkselection.c (gtk_target_list_add_text_targets):
	(gtk_target_list_add_image_targets): Add info argument.

	* gtk/gtkcalendar.c (gtk_calendar_motion_notify):
	* gtk/gtkentry.c (gtk_entry_init):
	* gtk/gtktextview.c (gtk_text_view_init): Adjust all callers.
2004-10-22 17:27:06 +00:00
Anders Carlsson
53afb2a593 GdkBitmap is a GObject, not a boxed type.
2004-10-22  Anders Carlsson  <andersca@gnome.org>

	* gtk/gtktexttag.c: (gtk_text_tag_get_property):
	GdkBitmap is a GObject, not a boxed type.
2004-10-21 23:16:44 +00:00
Owen Taylor
e0ad07e0b4 #155952
Thu Oct 21 15:01:09 2004  Owen Taylor  <otaylor@redhat.com>

        #155952

        * gtk/gtkentry.c: Fix checking the wrong position for
        the backspace_deletes_character PangoLogAttr.

        * gtk/gtktextbuffer.[ch] gtk/gtk.symbols (gtk_text_buffer_backspace):
        Move backspace logic from GtkTextView to here, check
        backspace_deletes_char.

        * gtk/gtktextview.c: Use gtk_text_buffer_backspace().
2004-10-21 19:13:17 +00:00
Matthias Clasen
92b3cda495 *** empty log message *** 2004-10-21 19:01:29 +00:00
Matthias Clasen
a34d841d79 Implement for cached themes.
2004-10-21  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkicontheme.c (gtk_icon_theme_has_icon): Implement for
	cached themes.

	* gtk/gtkiconcache.h:
	* gtk/gtkiconcache.c (_gtk_icon_cache_has_icon): New function.

	* gtk/updateiconcache.c (scan_directory): Don't skip .icon
	files which are listed before their images.
	(foreach_remove_func): Instead filter lonely .icon files out
	here.

	* gtk/gtkicontheme.c (theme_dir_get_icon_suffix): Filter out
	the HAS_ICON_FILE flag.
2004-10-21 18:44:08 +00:00
Matthias Clasen
1cf454c93b Make it compile without mmap() and add some more checks. (#155973, Morten
2004-10-21  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkiconcache.c: Make it compile without mmap() and
	add some more checks.  (#155973, Morten Welinder)
2004-10-21 05:19:27 +00:00
Matthias Clasen
968b192fec Add convenience api for image dnd (#150165):
2004-10-21  Matthias Clasen  <mclasen@redhat.com>

	Add convenience api for image dnd (#150165):

	* gtk/gtkselection.h:
	* gtk/gtkselection.c (gtk_target_list_add_image_targets)
	(gtk_selection_data_set_pixbuf, gtk_selection_data_get_pixbuf):
	New functions to handle the image formats readable/writable
	by gdk-pixbuf.

	* gtk/gtkdnd.h:
	* gtk/gtkdnd.c (gtk_drag_dest_add_image_targets)
	(gtk_drag_source_add_text_targets): New functions to handle
	the image formats readable/writable by gdk-pixbuf.
2004-10-21 04:53:23 +00:00
Matthias Clasen
bfb64fa04f Make the code clearer. (#155239, Murray Cumming)
2004-10-20  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreemodelfilter.c (gtk_tree_model_filter_new): Make
	the code clearer.  (#155239, Murray Cumming)
2004-10-21 02:51:50 +00:00
Matthias Clasen
73fd5538d2 Small fixes.
2004-10-20  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkicontheme.c: Small fixes.
2004-10-20 17:23:02 +00:00
Matthias Clasen
6c8b6025d6 Include gtkmodules.h. (#155885, Kazuki IWAMOTO)
2004-10-20  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkrc.c: Include gtkmodules.h.  (#155885, Kazuki IWAMOTO)

	* gtk/gtktoolbar.h: Add _gtk_toolbar_rebuild_menu(). (#155885)
2004-10-20 05:20:01 +00:00
Matthias Clasen
3363b6e35e Fix a wrong blurb. (#155838, Morten Welinder)
2004-10-20  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_class_init):
	Fix a wrong blurb.  (#155838, Morten Welinder)
2004-10-20 05:15:44 +00:00
Matthias Clasen
6fc2b8118a Implement icon theme caching. (#154034, Martijn Vernooij, caching schema
2004-10-19  Matthias Clasen  <mclasen@redhat.com>

	Implement icon theme caching.  (#154034, Martijn Vernooij,
	caching schema proposed by Owen Taylor, initial implementation
	by Anders Carlsson)

	* gtk/gtkdebug.h:
	* gtk/gtkmain.c: Add a "icontheme" debug flag.

	* gtk/Makefile.am (gtk_c_sources): Add gtkiconcache.c
	(gtk_private_h_sources): Add gtkiconcache.h
	(bin_PROGRAMS): Add gtk-update-icon-cache

	* gtk/gtkicontheme.c: Use icon caches if they are available.
	Currently, GTK+ uses the cache to get information about the
	available sizes, image file formats and .icon files. The
	actual image data, and the .icon file contents are not
	cached yet.

	* gtk/updateiconcache.c: A cmdline utility for generating
	icon cache files.

	* gtk/gtkiconcache.h:
	* gtk/gtkiconcache.c: The glue code to mmap an icon cache
	file and manage the information it contains.
2004-10-19 18:45:41 +00:00
Matthias Clasen
d41ae98e9b Destroy secondary dialogs if the main dialog is hidden. (#155084, Paolo
2004-10-17  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkaboutdialog.c (gtk_about_dialog_new): Destroy secondary
	dialogs if the main dialog is hidden. (#155084, Paolo Borelli)
2004-10-17 06:38:35 +00:00
Matthias Clasen
62fa88e473 Don't leak the secondary dialogs. (#155084, Paolo Borelli)
2004-10-16  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkaboutdialog.c (gtk_about_dialog_destroy): Don't leak
	the secondary dialogs.  (#155084, Paolo Borelli)
2004-10-16 05:10:55 +00:00
Matthias Clasen
47eb4aae6d Fix redraw issues with the focus on the ring.
2004-10-16  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkhsv.c (gtk_hsv_expose): Fix redraw issues with the
	focus on the ring.
2004-10-16 04:27:08 +00:00
Matthias Clasen
63ffb56f1e Unset GTK_REQUEST_NEEDED before emitting ::size-request, following this
2004-10-15  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtksizegroup.c (do_size_request): Unset GTK_REQUEST_NEEDED
	before emitting ::size-request, following this weeks discussion
	on gtk-devel-list@gnome.org.
2004-10-15 05:25:56 +00:00
Matthias Clasen
d0cc5dee2b Restore the size info for the current row after measuring another row.
2004-10-15  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkcellview.c (gtk_cell_view_get_size_of_row): Restore
	the size info for the current row after measuring another
	row.  (#154945, William Jon McCann)
2004-10-15 04:59:03 +00:00
Matthias Clasen
98019f4880 (shortcuts_add_current_folder): Don't leak volume. (#155400,
Morten Welinder)
2004-10-14 19:42:31 +00:00
Matthias Clasen
47666976ca (gtk_file_chooser_default_finalize): Don't forget to
unref the tooltips.  (#155412, Morten Welinder)
2004-10-14 19:23:41 +00:00
Matthias Clasen
817f3b94a8 Don't get text unnecessarily. (#155384, Morten Welinder)
2004-10-14  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserdefault.c (shortcuts_remove_rows): Don't
	get text unnecessarily.  (#155384, Morten Welinder)
2004-10-14 14:14:12 +00:00
Matthias Clasen
34e1d6d70b Acknowledge the fact that invariants are broken and loop all the way up to
* gtk/gtkcontainer.c (_gtk_container_queue_resize): Acknowledge the fact        that invariants are broken and loop all the way up to the resize container.
2004-10-13 03:41:00 +00:00
4
3f32a4da46 don't queue the widget for resize or emit change notification if the usize
Tue Oct 12 17:11:02 2004    <timj@birnet.org>

        * gtk/gtkwidget.c (gtk_widget_set_usize_internal): don't queue the
        widget for resize or emit change notification if the usize didn't
        change. this works around a buggy signal connection in #155139.
2004-10-12 15:12:44 +00:00
Jonathan Blandford
0d12c6ad0d add /*< private >*/ markings.
Sun Oct 10 11:24:56 2004  Jonathan Blandford  <jrb@redhat.com>

        * gtk/gtkcontainer.h (struct _GtkContainer): add /*< private >*/
        markings.
2004-10-10 15:25:52 +00:00
Matthias Clasen
1488c49339 Add docs.
2004-10-09  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkcellview.c: Add docs.
2004-10-09 05:39:22 +00:00
Matthias Clasen
ff44b010bc Fix doc comment.
2004-10-09  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkmenutoolbutton.c (gtk_menu_tool_button_get_menu): Fix
	doc comment.
2004-10-09 04:52:32 +00:00
Matthias Clasen
6b7f5ada66 Reinstate the accidentally lost addition of
2004-10-09  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkactiongroup.h:
	* gtk/gtkactiongroup.c: Reinstate the accidentally lost addition
	of gtk_action_group_translate_string().
2004-10-09 04:26:11 +00:00
Matthias Clasen
4ef4bd0c27 Declare gtk_accelerator_get_label.
2004-10-09  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkaccelgroup.h: Declare gtk_accelerator_get_label.
2004-10-09 04:05:07 +00:00
Matthias Clasen
724a8865d2 forgotten commit 2004-10-08 19:01:30 +00:00
Matthias Clasen
0caefdebc0 Don't start a drag if we loose the grab.
2004-10-08  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_grab_notify): Don't start a
	drag if we loose the grab.
2004-10-08 19:00:57 +00:00
Matthias Clasen
356c249aab Set the cell renderer to inert mode to avoid bug #154921. This fixes a
* gtk/gtkfilechooserdefault.c (renderer_edited_cb): Set the cell
	renderer to inert mode to avoid bug #154921.  This fixes a crash
	which would otherwise occur if the editing is stopped for the second
	time.  (#154767, Manuel Baena García)
2004-10-08 17:09:18 +00:00