Commit Graph

5631 Commits

Author SHA1 Message Date
Kristian Rietveld
a9f39e4d6d new function (fixes #169961, reported by Morten Welinder).
2005-07-14  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeviewcolumn.[ch] (gtk_tree_view_column_queue_resize): new
	function (fixes #169961, reported by Morten Welinder).
2005-07-14 00:05:49 +00:00
Kristian Rietveld
a6ecb70b14 new function. (fixes #105252, suggestion from Mikael Hallendal).
2005-07-14  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.[ch] (gtk_tree_view_get_visible_range): new
	function. (fixes #105252, suggestion from Mikael Hallendal).
2005-07-13 23:05:27 +00:00
Kristian Rietveld
ae61f443f3 new function. (#160879, Stefan Kost).
2005-07-13  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreemodel.[ch] (gtk_tree_row_reference_get_model): new
	function. (#160879, Stefan Kost).
2005-07-13 21:27:03 +00:00
Kristian Rietveld
7a02c5b508 paint a flat box on the area the treeview got allocated extra vertically
2005-07-13  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.c (gtk_tree_view_bin_expose): paint a flat box
	on the area the treeview got allocated extra vertically (fixes
	#142063, reported by Brian Bober).

	* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_process_action):
	make this function calculate real_cell_area and real_background_area
	correctly. (fixes #309249, reported by Bernd Demian).
2005-07-13 19:14:15 +00:00
Matthias Clasen
a1e39dc5f7 Fix an unintentional case of width-for-height... (#310133, Luis Villa)
2005-07-13  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkcalendar.c (calendar_realize_arrows): Fix an
	unintentional case of width-for-height... (#310133, Luis Villa)
2005-07-13 17:24:02 +00:00
Kristian Rietveld
faf2d31864 let's take the MIN of width and max_width here, not width and max_width !=
2005-07-13  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.c (gtk_tree_view_new_column_width): let's take
	the MIN of width and max_width here, not width and max_width != -1.
	(fixes #144480, reported by Mikael Magnusson).
2005-07-13 14:28:02 +00:00
Matthias Clasen
c251818ca0 Don't keep the caches for unthemed directories in a separate list, instead
2005-07-13  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkicontheme.c (load_themes): Don't keep the caches
	for unthemed directories in a separate list, instead append
	them at the end of the dir_mtimes list, so that we can check
	them for staleness like the other caches.  (#310221, Mark
	McLoughlin)
2005-07-13 14:07:10 +00:00
Kristian Rietveld
22554a161f when !separator, don't add the focus_line_width to width/height (happens
2005-07-13  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.c (validate_row): when !separator, don't add
	the focus_line_width to width/height (happens in
	_column_cell_get_size), but do add the vertical-separator to height,
	we weren't taking this into account before.

	* gtk/gtkentrycompletion.c (_gtk_entry_completion_resize_popup):
	take vertical-separator into account. (#309137, Ross Burton).
2005-07-13 11:57:10 +00:00
Matthias Clasen
06e735a652 Add Copyright/License information. 2005-07-13 05:44:22 +00:00
Matthias Clasen
b03e0f2ffb Add a warning about unreffing icon themes. (#310163, Rodney Dawes)
2005-07-13  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkicontheme.c (gtk_icon_theme_get_default)
	(gtk_icon_theme_get_for_screen): Add a warning about
	unreffing icon themes.  (#310163, Rodney Dawes)
2005-07-13 04:53:49 +00:00
Kristian Rietveld
ed5fe67f0e quit maintaining the iter on every iteration, only get the iter when we
2005-07-13  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeselection.c (gtk_tree_selection_selected_foreach): quit
	maintaining the iter on every iteration, only get the iter when
	we are about to call the foreach_func. Gives us a 10x speedup,
	since maintaining iters is a lot more expensive than maintaining
	paths. We lose a bit of sanity checking though. Thanks go to
	Billy Biggs for pointing this out.
2005-07-12 23:01:17 +00:00
Matthias Clasen
5eb87a0d3e Follow the Nautilus change and rename "Filesystem" to "File System",
2005-07-12  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilesystemunix.c
	(gtk_file_system_unix_volume_get_display_name): Follow
	the Nautilus change and rename "Filesystem" to "File System",
	string change.  (#310047, Vincent Noel)
2005-07-12 16:28:06 +00:00
Matthias Clasen
5f72921cc1 Add Copyright/License information. 2005-07-12 05:09:13 +00:00
Matthias Clasen
37ae912e62 Remove the runtime warning about the invisible property, add a warning
2005-07-11  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktexttag.c (gtk_text_tag_class_init)
	(gtk_text_tag_set_property): Remove the runtime warning about
	the invisible property, add a warning about possible remaining
	problems to the documentation of the property.  (#66194)
2005-07-11 19:58:33 +00:00
Matthias Clasen
eac5b1561f Don't ever go unconditionally to the buffer ends; that doesn't work if the
2005-07-11  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktextview.c (gtk_text_view_move_cursor_internal): Don't
	ever go unconditionally to the buffer ends; that doesn't work
	if the initial or final portion of the buffer are invisible.
2005-07-11 19:46:43 +00:00
Kristian Rietveld
78c52d7141 add binding entry for ctrl + backspace (move focus to parent without
2005-07-11  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.c (gtk_tree_view_class_init): add binding entry
	for ctrl + backspace (move focus to parent without affecting
	selection),
	(gtk_tree_view_real_select_cursor_parent): implement ctrl+backspace
	and simplify the function a bit. (#309296, Kathy Fernandes).
2005-07-11 18:52:33 +00:00
Matthias Clasen
e5f444e9a8 Make gdk_window_present() move the window to the current desktop, instead
2005-07-11  Matthias Clasen  <mclasen@redhat.com>

	Make gdk_window_present() move the window to the current
	desktop, instead of letting the WM change the current
	desktop to where the window is.  (#166379, Elijah Newren)

	* gdk/gdk.symbols:
	* gdk/x11/gdkx.h:
	* gdk/x11/gdkwindow-x11.c (gdk_x11_window_move_to_current_desktop):
	New function to move a window to the current desktop.

	* gtk/gtkwindow.c (gtk_window_present_with_time): Move the
	window to the current desktop before giving it focus.
2005-07-11 18:28:23 +00:00
Matthias Clasen
13a341e0e9 When dragging text, use a drag icon showing the (ellipsized) text that is
2005-07-11  Matthias Clasen  <mclasen@redhat.com>

	When dragging text, use a drag icon showing the (ellipsized)
	text that is being dragged: (#161132, Kevin Duffus, patch
	by Carlos Garnacho Parro)

	* gtk/gtktextutil.h:
	* gtk/gtktextutil.c (_gtk_text_util_create_drag_icon): Add
	a function to create a pixmap for use when dragging text.

	* gtk/gtktextview.c (gtk_text_view_start_selection_dnd):
	* gtk/gtklabel.c (gtk_label_motion):
	* gtk/gtkentry.c (gtk_entry_motion_notify): Use a drag icon
	showing the text being dragged.

2005-07-11  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkentry.c (gtk_entry_move_forward_word)
	(gtk_entry_move_backward_word): Match the text view change
	to allow selecting whitespace with double-click.
2005-07-11 17:51:54 +00:00
Matthias Clasen
7912643e8f Make double-clicking between words select whitespace. (#309860, Mike
2005-07-11  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktextview.c (extend_selection): Make double-clicking
	between words select whitespace.  (#309860, Mike Miller, patch
	by Paolo Borelli)
2005-07-11 16:39:44 +00:00
Matthias Clasen
06e72275e8 Documentation improvements. (#309946, Torsten Schoenfeld)
2005-07-11  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkiconview.c: Documentation improvements.  (#309946,
	Torsten Schoenfeld)
2005-07-11 13:14:04 +00:00
Kristian Rietveld
4b28e78a48 remove unneeded check for negative window_y.
2005-07-10  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.c (gtk_tree_view_move_cursor_page_up_down): remove
	unneeded check for negative window_y.
2005-07-10 17:19:01 +00:00
Kristian Rietveld
53db7cc902 also move to the next match when ctrl+g is pressed. (#156657, Matt T.
2005-07-10  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.c (gtk_tree_view_search_key_press_event): also move
	to the next match when ctrl+g is pressed. (#156657, Matt T. Proud).
2005-07-10 15:55:10 +00:00
Kristian Rietveld
2ebd7d1567 rework function to make page up/down behave the same as in GtkTextView.
2005-07-10  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.c (gtk_tree_view_move_cursor_page_up_down): rework
	function to make page up/down behave the same as in GtkTextView.
	(Fixes #101220, Owen Taylor).
2005-07-10 15:47:18 +00:00
Kristian Rietveld
7039dc6102 Fix #305737, patch from Tomislav Jonjic. This makes the
2005-07-09  Kristian Rietveld  <kris@gtk.org>

	Fix #305737, patch from Tomislav Jonjic. This makes the
	gtk_tree_store_insert* family of functions emit row_has_child_toggled
	when needed (they didn't do that before).

	* gtk/gtktreestore.c (gtk_tree_store_insert): emit
	row_has_child_toggled when needed,
	(gtk_tree_store_insert_before): fix a possible memleak,
	emit row_has_child_toggled when needed,
	(gtk_tree_store_insert_after): ditto.
2005-07-09 20:31:36 +00:00
Kristian Rietveld
6a5ac16898 when open_all is TRUE, traverse the newly built tree to emit row_expanded
2005-07-09  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.c (gtk_tree_view_real_expand_row): when
	open_all is TRUE, traverse the newly built tree to emit
	row_expanded for the subitems. (rev 1.444, patch in #172319
	broke this). Fixes #305582, reported by Billy Biggs.
2005-07-09 13:20:10 +00:00
Tor Lillqvist
c0dace5fd9 Look for windres on Win32.
2005-07-09  Tor Lillqvist  <tml@novell.com>

	* configure.in: Look for windres on Win32.

	* gdk-pixbuf/Makefile.am
	* gdk/win32/rc/Makefile.am
	* gdk/Makefile.am
	* gtk/Makefile.am: Don't use the scripts in build/win32 to compile
	the rc files into resource object files. (This means we lose the
	build number increment magic, but I doubt it was that useful
	anyway.) Instead use windres directly. To pass a normal .o file
	produced by windres through libtool, which would want a .lo file,
	pass it directly to the linker using a -Wl option.

	* gdk-pixbuf/gdk_pixbuf.rc.in
	* gdk/win32/rc/gdk.rc.in
	* gtk/gtk-win32.rc.in: Replace BUILDNUMBER with 0.
2005-07-09 00:10:12 +00:00
Kristian Rietveld
7f5b9100ed Fixes #165034, reported by Jorn Baayen.
2005-07-08  Kristian Rietveld  <kris@gtk.org>

	Fixes #165034, reported by Jorn Baayen.

	* gtk/gtkrbtree.[ch] (_gtk_rbtree_set_fixed_height): add a
	mark_valid parameter (so we can mark all nodes as valid when we
	are setting them to the fixed height).

	* gtk/gtktreeview.c (initialized_fixed_height_mode): mark all
	nodes as valid when setting the fixed height,
	(do_validate_rows): update call to _set_fixed_height,
	(gtk_tree_view_row_inserted): mark node as valid when fixed
	height mode is enabled and a height has been set,
	(gtk_tree_view_build_tree): if fixed height mode is enabled,
	mark new nodes as valid in addition to setting the height.
2005-07-08 19:17:10 +00:00
Matthias Clasen
92da84155f 2.7.2 2005-07-08 18:52:47 +00:00
Matthias Clasen
b53a336e11 Pass a GdkDragAction to gtk_drag_get_cursor. (#309784, Sebastian Bacher)
2005-07-08  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkdnd.c (gtk_drag_update_cursor): Pass a GdkDragAction to
	gtk_drag_get_cursor.  (#309784, Sebastian Bacher)
2005-07-08 14:36:31 +00:00
Tor Lillqvist
cacfdbc2ae Use g_get_host_name().
2005-07-08  Tor Lillqvist  <tml@novell.com>

	* gtk/gtkfilesel.c: Use g_get_host_name().
2005-07-08 14:35:31 +00:00
Matthias Clasen
b37d8bf8a6 Add some additional docs on precision here too. (#309238, Steve Chaplin)
2005-07-07  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkhscale.c (gtk_hscale_new_with_range):
	(gtk_vscale_new_with_range): Add some additional docs on
	precision here too.  (#309238, Steve Chaplin)
2005-07-08 03:21:02 +00:00
Matthias Clasen
1df38871e1 Implement Drag-and-Drop to the file list. (#145121, Sven Neumann)
2005-07-07  Matthias Clasen  <mclasen@redhat.com>

	Implement Drag-and-Drop to the file list.  (#145121, Sven Neumann)

	* gtk/gtkfilechooserdefault.c (file_list_drag_data_received_cb)
	(file_list_drag_drop_cb, file_list_drag_motion_cb): New functions
	to handle drag-and-drop on the file list.
	(create_file_list): Set up drag-and-drop handlers on the file list.
2005-07-07 17:11:26 +00:00
Matthias Clasen
8cc4fe41ff Fix #157787, reported by Jonathan Blandford:
2005-07-07  Matthias Clasen  <mclasen@redhat.com>

	Fix #157787, reported by Jonathan Blandford:

	* gtk/gtkfilechooserdefault.c
	(gtk_file_chooser_default_set_current_folder): Don't leave a
	"trail" behind when set_current_folder is called explicitly.
	(gtk_file_chooser_default_update_current_folder): New function
	that is called to update the current folder in response to
	user actions.

	* gtk/gtkpathbar.c (_gtk_path_bar_set_path): Add a boolean
	keep_trail argument, and don't leave a "trail" behind unless
	it is set.
2005-07-07 12:40:50 +00:00
Matthias Clasen
d28d674a66 Add some additional docs on precision. (#309238, Steve Chaplin)
2005-07-05  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkspinbutton.c (gtk_spin_button_new_with_range): Add some
	additional docs on precision.  (#309238, Steve Chaplin)
2005-07-06 03:45:13 +00:00
Tor Lillqvist
db343ee03d Add comment about the current named cursor implementation, and what it
2005-07-06  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkcursor-win32.c: Add comment about the current named
	cursor implementation, and what it maybe really should do.
	(gdk_win32_icon_to_pixbuf_libgtk_only): New function, code moved
	here from gtk/gtkfilesystemwin32.c:extract_icon().
	(gdk_cursor_get_image): Use
	gdk_win32_icon_to_pixbuf_libgtk_only().

	* gdk/gdk.symbols
	* gdk/win32/gdkwin32.h: Declare gdk_win32_icon_to_pixbuf_libgtk_only().

	* gtk/gtkfilesystemwin32.c (extract_icon): Use
	gdk_win32_icon_to_pixbuf_libgtk_only().
2005-07-05 22:50:54 +00:00
Matthias Clasen
8821161c38 Take window groups into account. (#309473, Diego Gonzalez)
2005-07-05  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkmenu.c (gtk_menu_grab_notify): Take window
        groups into account.  (#309473, Diego Gonzalez)

        * gtk/gtkwindow.[hc]: Add a non-exported function to
        get the grab widget of a window group.
2005-07-05 22:34:07 +00:00
Kristian Rietveld
45c7c2b0ca in the 'main' expose loop, add back the calls to _set_cell_data removed
2005-07-05  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.c (gtk_tree_view_bin_expose): in the
	'main' expose loop, add back the calls to _set_cell_data
	removed earlier. (#309221, Matthias Clasen).
2005-07-05 21:11:32 +00:00
Matthias Clasen
126fdc82d3 Fix a Since: marker 2005-07-05 16:08:51 +00:00
Matthias Clasen
bf9bfd06ca Add a GtkAboutDialog::wrap-license property 2005-07-05 14:53:37 +00:00
Matthias Clasen
8ee1ebf819 Queue a resize on the contained menuitems as well.
2005-07-04  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkmenubar.c (gtk_menu_bar_set_pack_direction)
	(gtk_menu_bar_set_child_pack_direction): Queue a resize
	on the contained menuitems as well.
2005-07-04 06:51:57 +00:00
Hans Breuer
19e9165d64 updated <io.h> for open() use G_PI instead of M_PI
2005-07-03  Hans Breuer  <hans@breuer.org>

	* **/makefile.msc[.in] : updated
	* gtk/gtkiconcache.c : <io.h> for open()
	* gtk/gtkstyle.c : use G_PI instead of M_PI

	* gdk/win32/gdkcursor-win32.c : implement gdk_cursor_new_from_name()
	by mapping the lower case win32 api name to the respective cursor.
	E.g. pass "wait" to get the IDC_WAIT cursor. Also allows to load
	cursors from named resources in the executable.
	(gdk_cursor_get_image) : just return NULL for now.

	* gdk/win32/gdkgeometry-win32.c : implement gdk_window_move_region()
	by delegation to ScollWindowEx(), untested.

	* gdk/win32/gdkwindow-win32.c : stub for gdk_window_set_urgency_hint()
2005-07-03 15:47:42 +00:00
Matthias Clasen
1d1b9c7abe Hmm, when committing my vertical menubar patch, I forgot the
2005-07-03  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkimagemenuitem.c: Hmm, when committing my vertical
	menubar patch, I forgot the GtkImageMenuItem changes. And I
	managed to do 2 releases without noticing that...
2005-07-03 06:24:04 +00:00
Matthias Clasen
1d6b47e3fa Correct the blurb for the icon-sizes setting. String change. (#309355,
2005-07-03  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtksettings.c (gtk_settings_class_init): Correct the
	blurb for the icon-sizes setting. String change.
	(#309355, Benjamin Berg)
2005-07-03 04:52:46 +00:00
Matthias Clasen
2bd25d8f45 2.7.1 2005-07-01 19:24:05 +00:00
Matthias Clasen
7dc4d68410 Prevent an infinite loop when G_FILENAME_ENCODING is invalid. (#309280,
2005-07-01  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilesel.c (cmpl_init_state): Prevent an infinite
	loop when G_FILENAME_ENCODING is invalid.  (#309280, Padraig Brady)
2005-07-01 15:51:30 +00:00
Manish Singh
5cc0696de6 declare _gdk_xgrab_check_button_event.
Thu Jun 30 14:17:24 2005  Manish Singh  <yosh@gimp.org>

        * gdk/x11/gdkprivate-x11.h: declare _gdk_xgrab_check_button_event.

        * gtk/gtkbutton.c: fix signature of gtk_button_grab_broken.
2005-06-30 21:18:34 +00:00
Matthias Clasen
58824aa9bb Clarify the code, gcc 4 complains about predecrement in MAX().
2005-06-30  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreemodelfilter.c (gtk_tree_model_filter_fetch_child):
	Clarify the code, gcc 4 complains about predecrement in MAX().
2005-06-30 19:07:16 +00:00
Matthias Clasen
87cafe5b4b Handle broken grabs.
2005-06-29  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkbutton.c (gtk_button_grab_broken): Handle broken
        grabs.

        * gtk/gtkrange.c (gtk_range_grab_broken): Handle broken
        grabs.

        * gdk/gdkevents.h: Add a boolean to specify wether the broken
        grab was implicit.

        * gdk/x11/gdkdisplay-x11.c (gdk_display_pointer_is_grabbed):
        As the documentation states, don't return TRUE for
        implicit grabs.

        * gdk/x11/gdkdisplay-x11.h (struct _GdkDisplayX11): Add
        a boolean field to store wether a pointer grab is implicit.

        * gdk/x11/gdkmain-x11.c (_gdk_xgrab_check_button_event):
        Track implicit grabs.

        * gdk/x11/gdkevents-x11.c (gdk_event_translate): Call
        _gdk_xgrab_check_button_event for button events.
2005-06-30 03:35:30 +00:00
Matthias Clasen
88e3584814 Make sure that cell boxes are always completely inside the item area.
2005-06-28  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkiconview.c (gtk_icon_view_calculate_item_size2):
	Make sure that cell boxes are always completely inside
	the item area.
2005-06-28 06:25:18 +00:00
Matthias Clasen
86e4f7d1f3 Fix positioning at the end of the line for lines ending in invisible
2005-06-27  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktextlayout.c (gtk_text_layout_move_iter_to_line_end):
	Fix positioning at the end of the line for lines ending
	in invisible characters.
	(gtk_text_layout_get_line_display): Set display->layout
	to a PangoLayout, even for totally invisible lines.
2005-06-28 02:46:11 +00:00
Matthias Clasen
b2343762b1 Ignore GrabBroken events which are caused by overgrabbing inside the
2005-06-27  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkmenushell.c (gtk_menu_shell_grab_broken): Ignore
	GrabBroken events which are caused by overgrabbing inside
	the application; menus rely on these for their operation.

	* gdk/gdkevents.h (struct _GdkEventGrabBroken): Add a
	grab_window field.

	* gdk/win32/gdkevents-win32.c (gdk_event_translate): Set
	grab_window to NULL when generating GrabBroken events for
	WM_KILLFOCUS messages.

	* gdk/x11/gdkmain-x11.c (_gdk_xgrab_check_unmap)
	(_gdk_xgrab_check_destroy): Set grab_window to NULL when
	generating GrabBroken events when the grab window becomes
	unviewable or is destroyed.

	* gdk/x11/gdkmain-x11.c (gdk_pointer_grab, gdk_keyboard_grab):
	Generate GrabBroken events when overriding a grab inside
	the application. In this case, set grab_window to the new
	grab_window.
2005-06-27 21:06:33 +00:00
Matthias Clasen
f49eab1248 Continue to activate even if we can't grab the keyboard.
2005-06-27  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkbutton.c (gtk_real_button_activate): Continue
	to activate even if we can't grab the keyboard.
	(gtk_button_finish_activate): Only ungrab when we have
	a keyboard grab.  (#172998, William Jon McCann)
2005-06-27 20:04:33 +00:00
Matthias Clasen
ddd27f21a6 Cancel menus when they are grab-shadowed by something thats not a submenu.
2005-06-27  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkmenu.c (gtk_menu_grab_notify): Cancel menus when
        they are grab-shadowed by something thats not a
        submenu.  (#145416, Euan MacGregor)
2005-06-27 17:36:34 +00:00
Owen Taylor
3b1269f500 Fix indentation.
2005-06-27  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtk[hv]ruler.c (gtk_[hv]ruler_draw_ticks):
        Fix indentation.
2005-06-27 15:13:08 +00:00
Kjartan Maraas
8eb4666ffe Fix leaks Same Closes bug #308953.
2005-06-27  Kjartan Maraas  <kmaraas@gnome.org>

	* gtk/gtkhruler.c: (gtk_hruler_draw_ticks): Fix leaks
	* gtk/gtkvruler.c: (gtk_vruler_draw_ticks): Same
	Closes bug #308953.
2005-06-27 14:38:19 +00:00
Matthias Clasen
d4c43a42ad Use GMappedFile.
2005-06-27  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkiconcache.c (_gtk_icon_cache_new_for_path): Use
	GMappedFile.

	* configure.in: Require GLib 2.7.1
2005-06-27 04:49:03 +00:00
Matthias Clasen
92e3227043 Pay attention to the scroll offset when drawing the box. (#308834, Tom von
2005-06-26  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkmenu.c (gtk_menu_paint): Pay attention to the
	scroll offset when drawing the box.  (#308834, Tom von
	Schwerdtner)
2005-06-27 02:07:35 +00:00
Tor Lillqvist
98a17d1462 gdk/Makefile.am Current GNU tools do understand the PRIVATE keyword, so no
2005-06-26  Tor Lillqvist  <tml@novell.com>

	* gdk/Makefile.am
	* gtk/Makefile.am: Current GNU tools do understand the PRIVATE
	keyword, so no need to remove those entries from the import
	library. libtool installs the .dll.a import library itself, so no
	need to do it here. Install the .def file.
2005-06-26 19:01:33 +00:00
Manish Singh
2f330b7737 add GDK_GRAB_BROKEN to the switch cases.
Sun Jun 26 00:04:36 2005  Manish Singh  <yosh@gimp.org>

        * gdk/gdkevents.c (gdk_event_get_time, gdk_event_get_state): add
        GDK_GRAB_BROKEN to the switch cases.

        * gtk/gtkmenushell.c (gtk_menu_shell_grab_broken): remove unused
        variables.

        * gtk/gtkpaned.c (gtk_paned_grab_broken): return TRUE.
2005-06-26 07:06:13 +00:00
Matthias Clasen
6cc79068cf Stop column header drag operations if the grab is broken.
2005-06-26  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_grab_broken): Stop column
	header drag operations if the grab is broken.
2005-06-26 06:51:55 +00:00
Matthias Clasen
5fb7f69dd8 Stop the drag if the grab is broken.
2005-06-26  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkhsv.c (gtk_hsv_grab_broken): Stop the drag if
	the grab is broken.
2005-06-26 06:39:19 +00:00
Matthias Clasen
d45263d5fa Don't do explicitly ungrab pointer and keyboard. We're unmapping the grab
2005-06-26  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkcombobox.c (gtk_combo_box_popdown): Don't do
	explicitly ungrab pointer and keyboard. We're unmapping
	the grab window anyway.
	(gtk_combo_box_popup): Handle grab failures.
2005-06-26 06:26:47 +00:00
Matthias Clasen
9b356ea0d8 Add a GrabBroken event to GDK, and a grab-broken-event signal to
2005-06-25  Matthias Clasen  <mclasen@redhat.com>

	Add a GrabBroken event to GDK, and a grab-broken-event
	signal to GtkWidget.  (#107320, Simon Cooke, initial patch
	by John Ehresman)

	* gdk/gdkevents.h: Add a GDK_GRAB_BROKEN event type,
	define a GdkEventGrabBroken event struct.

	* gdk/win32/gdkevents-win32.c (gdk_event_translate):
	Generate GrabBroken events in response to WM_KILLFOCUS.

	* gdk/x11/gdkmain-x11.c: Generate GrabBroken events
	when a grab is broken by the window becoming unviewable,
	or by another grab from the same client.

	* gtk/gtkwidget.h (GtkWidgetClass): Add grab_broken_event.

	* gtk/gtkwidget.c (gtk_widget_event_internal): Translate
	GrabBroken events into grab_broken_event signals.

	* gtk/gtkmain.c (gtk_main_do_event): Propagate GrabBroken
	events.

	* gtk/gtkmenushell.c (gtk_menu_shell_grab_broken): Deactivate
	the menu when the grab is broken.

	* gtk/gtkcolorsel.c (gtk_color_selection_grab_broken): Stop
	the color picker if the grab is broken.

	* gtk/gtkpaned.c (gtk_paned_grab_broken): Stop the drag if
	the grab is broken.
2005-06-25 07:10:40 +00:00
Matthias Clasen
effe3785cf Add some new stock items. (#166480, Kristof Vansant)
2005-06-25  Matthias Clasen  <mclasen@redhat.com>

	Add some new stock items.  (#166480, Kristof Vansant)

	* gtk/stock-icons/stock_fullscreen_16.png:
	* gtk/stock-icons/stock_fullscreen_24.png:
	* gtk/stock-icons/stock_leave_fullscreen_16.png:
	* gtk/stock-icons/stock_leave_fullscreen_24.png:
	* gtk/stock-icons/stock_info_16.png:
	* gtk/stock-icons/stock_info_24.png: New icons.

	* gtk/stock-icons/Makefile.am: Add new icons.

	* gtk/gtkstock.h: Define names for the new icons.

	* gtk/gtkstock.c (builtin_items): Register new stock items.

	* gtk/gtkiconfactory.c (get_default_icons): Register new
	stock icons.
2005-06-25 05:06:47 +00:00
Matthias Clasen
458d71a96a Make movement by paragraphs up/down symmetric. (#307055, Behnam Esfahbod)
2005-06-24  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktextview.c
	(gtk_text_view_move_cursor_internal): Make movement by
	paragraphs up/down symmetric.  (#307055, Behnam Esfahbod)
2005-06-24 17:42:17 +00:00
Matthias Clasen
47ab9b2dc9 Don't jump to the next line if we are at the end of the line.
2005-06-24  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktextview.c (gtk_text_view_scroll_hpages): Don't
	jump to the next line if we are at the end of the line.
2005-06-24 13:49:34 +00:00
Matthias Clasen
31bc1dec02 Fix an error in the cache timeout logic. (#166601, Morten Welinder)
2005-06-23  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilesystemunix.c (gtk_file_system_unix_get_folder):
	Fix an error in the cache timeout logic.  (#166601, Morten
	Welinder)
2005-06-23 20:44:27 +00:00
Matthias Clasen
a7c8b44628 Change the keynav for header reordering and resizing to Alt-arrows and
2005-06-23  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_key_press): Change the
	keynav for header reordering and resizing to Alt-arrows and
	Shift-Alt-arrows, following a proposal by the keynav
	authority. (#308666, Calum Benson)
2005-06-23 20:19:21 +00:00
Matthias Clasen
350a050c77 Remove a leftover debugging envvar.
2005-06-23  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkiconcache.c (_gtk_icon_cache_new_for_path): Remove
	a leftover debugging envvar.
2005-06-23 17:05:17 +00:00
Matthias Clasen
3be3d84b6a Don't trigger warnings if there are extra references to the hbox.
2005-06-23  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkbutton.c (gtk_button_construct_child): Don't
	trigger warnings if there are extra references to the
	hbox.  (#308677, Dan Winship)
2005-06-23 04:24:24 +00:00
Matthias Clasen
af1c6bb05e Use g_file_set_contents(). (#308722, Morten Welinder)
2005-06-23  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilesystemunix.c (bookmark_list_write): Use
	g_file_set_contents().  (#308722, Morten Welinder)
2005-06-23 04:14:17 +00:00
Matthias Clasen
a3acf689ea Remove gratitious differences between the stable branch and HEAD, which
* gtk/gtkfilesystemunix.c: Remove gratitious differences
	between the stable branch and HEAD, which sneaked in with
	the bookmark renaming.
2005-06-22 15:09:35 +00:00
Kjartan Maraas
f1ff6e0e1c Don't leak the cairo context Closes bug #308581.
2005-06-22  Kjartan Maraas  <kmaraas@gnome.org>

	* gtk/gtkhsv.c: (gtk_hsv_expose): Don't leak the cairo context
	Closes bug #308581.
2005-06-21 22:46:30 +00:00
Matthias Clasen
2ef6d354d1 Modify all of the GtkMisc widgets to round down on centering calculations
2005-06-21  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkarrow.c:
	* gtk/gtkimage.c:
	* gtk/gtklabel.c:
	* gtk/gtkpixmap.c: Modify all of the GtkMisc widgets to round down
	on centering calculations to match the behaviour of other parts
	of GTK+. (#307419, Ryan Lortie)
2005-06-21 15:38:40 +00:00
Matthias Clasen
d6ef11469b Connect to button-release-event as well, to handle touchscreen scenarios
2005-06-21  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkdnd.c (gtk_drag_source_set): Connect to
	button-release-event as well, to handle touchscreen
	scenarios better.  (#171490, Markku Vire)
2005-06-21 05:54:11 +00:00
Matthias Clasen
b33e3c06c8 Fix the build 2005-06-21 05:49:49 +00:00
Matthias Clasen
3845ca6eea Trivial cleanups. (#169647, #303455, Fabricio Barros Cabral, Benoit
2005-06-21  Matthias Clasen  <mclasen@redhat.com>

	* gtk/*.h: Trivial cleanups. (#169647, #303455,
	Fabricio Barros Cabral, Benoit Carpentier)
2005-06-21 05:35:43 +00:00
Matthias Clasen
15a5ee96af Consistently use gchar. (#303455, Benoit Carpentier)
2005-06-21  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtklabel.h: Consistently use gchar.  (#303455,
	Benoit Carpentier)
2005-06-21 05:15:06 +00:00
Matthias Clasen
a4768daec1 Handle missing MAP_FAILED. (#308449, Georg Schwarz)
2005-06-20  Matthias Clasen  <mclasen@redhat.com>

	* xdgmimecache.c: Handle missing MAP_FAILED.  (#308449, Georg
	Schwarz)
2005-06-21 03:36:52 +00:00
Matthias Clasen
58a1af804c 2.7.0 2005-06-20 22:06:27 +00:00
Matthias Clasen
6e30650fe4 Variant of gtk_window_present which takes a timestamp. (#166379, Elijah
2005-06-20  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtk.symbols:
	* gtk/gtkwindow.h:
	* gtk/gtkwindow.c (gtk_window_present_with_time): Variant of
	gtk_window_present which takes a timestamp.  (#166379, Elijah Newren)
2005-06-20 18:19:34 +00:00
Matthias Clasen
dc9f9f982f Add a forgotten symbol 2005-06-20 05:14:46 +00:00
Kristian Rietveld
d7cfee4b16 added a check which avoids processing updates on bin_window and scrolling
2005-06-19  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.c (gtk_tree_view_clamp_node_visible): added a
	check which avoids processing updates on bin_window and scrolling
	if the node is already visible. (#170600, Billy Biggs).
2005-06-19 19:22:46 +00:00
Kristian Rietveld
1bdf71943f only keep the row at the same position if the full row is visible.
2005-06-19  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.c (validate_visible_area): only keep the
	row at the same position if the full row is visible. (#304623,
	Jorn Baayen).
2005-06-19 18:40:35 +00:00
Kristian Rietveld
9d1a05c3b9 set dy to zero if treeview's height is smaller than the current page_size
2005-06-19  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.c (gtk_tree_view_size_allocate): set dy to zero
	if treeview's height is smaller than the current page_size (just
	like we do elsewhere).
2005-06-19 18:00:56 +00:00
Kristian Rietveld
e02fe68aeb Make mousewheel scrolling possible in typeahead mode, suggestion from
2005-06-19  Kristian Rietveld  <kris@gtk.org>

	Make mousewheel scrolling possible in typeahead mode, suggestion
	from Reinout van Schouwen (#307898).

	* gtk/gtktreeview.c (gtk_tree_view_ensure_interactive_directory):
	connect treeview search window to scroll_event signal,
	(gtk_tree_view_search_scroll_event): implement.
2005-06-19 17:37:07 +00:00
Kristian Rietveld
afc4b03c73 pass the event on to treeview, so it has a change of selecting a row, etc.
2005-06-19  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.c (gtk_tree_view_search_button_press_event): pass
	the event on to treeview, so it has a change of selecting a row, etc.
	(#169677, Kirk Bridger).
2005-06-19 13:42:13 +00:00
Kristian Rietveld
d4fdc6b7a9 This commit includes a fix for #169463, Stefan Kost.
2005-06-19  Kristian Rietveld  <kris@gtk.org>

	This commit includes a fix for #169463, Stefan Kost.

	* gtk/gtkcellrendererprogress.c (gtk_cell_renderer_progress_get_size):
	when cell_area is set, return cell_area width/height as width/height,
	so the focus rectangle will be drawn correctly.

	* gtk/gtktreeview.c (gtk_tree_view_bin_expose): drop unneeded get
	of focus-line-width property,
	(validate_row): take focus_line_width into account.

	* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_process_action):
	also take focus_line_width into account when calculating the cell_area
	y and height (before, we only took it into account when calculating
	x and width).
2005-06-19 12:44:12 +00:00
Matthias Clasen
a2ea759334 Fix a warning 2005-06-19 04:44:44 +00:00
Matthias Clasen
b6e4e4cb0c Add an ignore-hidden property with getter and setter. (#171612, Christian
2005-06-19  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtk.symbols:
	* gtk/gtksizegroup.[hc]: Add an ignore-hidden property
	with getter and setter.  (#171612, Christian Neumair)
2005-06-19 04:16:28 +00:00
Matthias Clasen
e109b31b0a Make this work for inserting before/after an existing menuitem or
2005-06-18  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkuimanager.c (gtk_ui_manager_add_ui): Make this
	work for inserting before/after an existing menuitem or
	toolitem.  (#155946, Christian Persch)

	* tests/testmerge.c (delayed_toggle_dynamic): Test the
	"insert after" functionality of gtk_ui_manager_add_ui.
2005-06-19 03:55:12 +00:00
Matthias Clasen
64bfd86b5b Allow to construct menu tool buttons.
2005-06-18  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkuimanager.c: Allow to construct menu tool buttons.

	* demos/gtk-demo/appwindow.c: Demonstrate menu tool buttons
	constructed with GtkUIManager.
2005-06-19 03:20:07 +00:00
Matthias Clasen
58a30d5f5a Make this function public. (#64792, Havoc Pennington)
2005-06-18  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtk.symbols:
	* gtk/gtkimage.h:
	* gtk/gtkimage.c (gtk_image_clear): Make this function
	public.  (#64792, Havoc Pennington)
2005-06-19 02:02:09 +00:00
Kristian Rietveld
6db99a9b8f undo merging of the separate loop setting cell data with cell drawing loop
2005-06-18  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.c (gtk_tree_view_bin_expose): undo merging
	of the separate loop setting cell data with cell drawing loop
	(introduced in revision 1.280), since this breaks focus handling
	wrt special cells.
2005-06-18 12:11:26 +00:00
Manish Singh
2122756189 remove unused variable height_old.
Sat Jun 18 04:21:58 2005  Manish Singh  <yosh@gimp.org>

        * gtk/gtktreeview.c (do_presize_handler): remove unused variable
        height_old.
2005-06-18 11:22:44 +00:00
Matthias Clasen
7645a361ba Typo fixes 2005-06-18 05:33:55 +00:00
Matthias Clasen
28e712df0a Fix 308111 2005-06-18 04:26:47 +00:00
Matthias Clasen
fb6ce33533 Fix nl_langinfo() use 2005-06-18 04:19:29 +00:00
Matthias Clasen
23fabedc9d Support the ICCCM urgency hint. (#61858, Havoc Pennington)
2005-06-17  Matthias Clasen  <mclasen@redhat.com>

	Support the ICCCM urgency hint.  (#61858, Havoc Pennington)

	* gtk/gtk.symbols:
	* gtk/gtkwindow.[hc]: Add a GtkWindow::urgency-hint property
	with getter and setter.

	* gdk/gdk.symbols:
	* gdk/gdkwindow.h:
	* gdk/x11/gdkwindow-x11.c (gdk_window_set_urgency_hint):
	Add a setter for the urgency hint.

	* gdk/x11/gdkwindow-x11.h (struct _GdkToplevelX11): Store
	urgency hint here.

	* gdk/x11/gdkwindow-x11.c (update_wm_hints): Set the urgency
	hint in the WM_HINTS property when appropriate.
2005-06-17 20:19:32 +00:00
Kristian Rietveld
015b3c5671 Fix #160281, testcase from Peter Bloomfield.
2005-06-17  Kristian Rietveld  <kris@gtk.org>

	Fix #160281, testcase from Peter Bloomfield.

	* gtk/gtktreeview.c (do_presize_handler): always size request
	and update adjustments in fixed height mode,
	(gtk_tree_view_build_tree): if a fixed height is set, set this
	height on newly added nodes.
2005-06-17 19:44:53 +00:00
Matthias Clasen
c06b5609d2 Document several button signals as not useful. `
2005-06-17  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkbutton.c (gtk_button_class_init): Document
	several button signals as not useful.
`
2005-06-17 18:42:49 +00:00
Matthias Clasen
7535bc04f8 Resize the popup if necessary. (#308076, Vincent Noel)
2005-06-17  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkentrycompletion.c (gtk_entry_completion_complete):
	Resize the popup if necessary.  (#308076, Vincent Noel)
2005-06-17 18:26:25 +00:00
Matthias Clasen
7f47f6b10a Queue a draw on the old and new focus widgets, if their defaultness
2005-06-17  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkwindow.c (gtk_window_real_set_focus): Queue a
	draw on the old and new focus widgets, if their defaultness
	changes.  (#305607, Billy Biggs)
2005-06-17 17:36:47 +00:00
Kristian Rietveld
0771297449 make sure the row above 'above_path' is always in a validated state, so it
2005-06-17  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.c (validate_visible_area): make sure the row
	above 'above_path' is always in a validated state, so it does
	not mess up scrolling. (#303319, testcase from Billy Biggs).
2005-06-17 17:34:40 +00:00
Kristian Rietveld
b060f6e12d don't try to update the top_row rowref ourselves here, but just have
2005-06-17  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.c (validate_visible_area): don't try to update
	the top_row rowref ourselves here, but just have _dy_to_top_row()
	do it,
	(gtk_tree_view_scroll_to_cell): handle scrolling via
	validate_visible_area() if the treeview is not visible or needs
	reallocation. (#165246, Nickolay V. Shmyrev).
2005-06-17 14:11:19 +00:00
Kristian Rietveld
51f11dd497 Fixes #307914 (Alexander Larsson), fixing some breakage caused by my
2005-06-17  Kristian Rietveld  <kris@gtk.org>

	Fixes #307914 (Alexander Larsson), fixing some breakage caused
	by my previous commit.

	* gtk/gtktreeview.c (validate_visible_area): force dy to be zero
	when it fits on a single page,
	(scroll_sync_handler): same here.
2005-06-17 11:38:22 +00:00
Manish Singh
be53636ec1 remove unused variable.
Thu Jun 16 15:33:42 2005  Manish Singh  <yosh@gimp.org>

        * gdk/x11/gdkcursor-x11.c (update_cursor): remove unused variable.

        * gdk/x11/gdkwindow-x11.c (_gdk_x11_window_get_cursor): use
        g_return_val_if_fail.

        * gtk/gtkdnd.c (gtk_drag_get_cursor): initialize hot_x and hot_y
        for all cases.

        * gtk/gtkfilechooserdefault.c (button_new): gtk_button_set_image
        takes a GtkWidget, not a GtkImage.
2005-06-16 22:35:45 +00:00
Matthias Clasen
2ee17f4875 Simplify the code and respect the show-button-images setting. (#307941,
2005-06-16  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserdefault.c (button_new): Simplify
	the code and respect the show-button-images setting.
	(#307941, Vincent Noel)
2005-06-16 16:44:08 +00:00
Matthias Clasen
17441e5e7c Update the RGBA cursor if an icon is set after the cursor has been
* gtk/gtkdnd.c: Update the RGBA cursor if an
	icon is set after the cursor has been constructed.
	Also handle repeated setting of icons correctly.
2005-06-16 16:06:54 +00:00
Matthias Clasen
8f95bb18f6 Add some more docs. (#307818, Christian Persch)
2005-06-16  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkbutton.c (gtk_button_set_image): Add some more
	docs.  (#307818, Christian Persch)
2005-06-16 12:51:00 +00:00
Matthias Clasen
c693180a1a Forgotten file 2005-06-16 12:49:46 +00:00
Matthias Clasen
5870262ac3 Fox doc formatting, pointed out by Kjartan Maraas.
2005-06-15  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkwindow.c (gtk_window_parse_geometry): Fox doc
	formatting, pointed out by Kjartan Maraas.
2005-06-15 20:36:27 +00:00
Matthias Clasen
df517cb1d5 Add two new settings, gtk-cursor-theme-name and gtk-cursor-theme-size to
2005-06-15  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtksettings.c: Add two new settings,
	gtk-cursor-theme-name and gtk-cursor-theme-size to
	control the cursor theme.

	* gdk/x11/gdkevents-x11.c: Add two new X settings,
	Gtk/CursorThemeName and Gtk/CursorThemeSize, and map
	these to the gtk settings.

	* tests/testgtk.c (create_cursors): Add a cursor theme
	testcase.
2005-06-15 19:25:49 +00:00
Matthias Clasen
f5bf23dafd Fix some docs 2005-06-15 04:20:11 +00:00
Matthias Clasen
eee3d97477 Fix 307689 2005-06-15 03:54:10 +00:00
Federico Mena Quintero
cd3c641ce4 Merged from gtk-2-6:
2005-06-14  Federico Mena Quintero  <federico@ximian.com>

	Merged from gtk-2-6:

	Fix #302087:

	* gtk/gtkfilechooserdefault.c (list_selection_changed): Emit
	"selection-changed" and do the normal housekeeping even if we are
	in SAVE mode and there is nothing selected.  We didn't emit that
	signal if we were in SAVE mode and unselect_all() got called.
	(gtk_file_chooser_default_unselect_all): Call
	pending_select_paths_free() so that we cancel any asynchronous
	selections.
	(gtk_file_chooser_default_set_current_name): Likewise.
2005-06-15 01:03:21 +00:00
Federico Mena Quintero
fb323cfb0c Merged from gtk-2-6:
2005-06-14  Federico Mena Quintero  <federico@ximian.com>

	Merged from gtk-2-6:

	Fixes #307640:

	* gtk/gtkfilechooserdefault.c
	(gtk_file_chooser_default_should_respond): Oops, I broke SAVE
	mode.  If the parent path is a folder, only create a subfolder if
	we are in CREATE_FOLDER mode; if we are in SAVE mode, just return
	and respond.  Also, pick up the case where the user types
	"dirname/" instead of "dirname".
	(check_save_entry): Make the return type void.  Add some return
	parameters so that we can do more thorough checking.
	(gtk_file_chooser_default_get_paths): If the file part is empty
	and we are in SAVE mode, return an empty selection.
2005-06-14 23:30:12 +00:00
Kristian Rietveld
5641d252be Patch for #163214 (reported by Tommi Komulainen) and fixes some other
2005-06-15  Kristian Rietveld  <kris@gtk.org>

	Patch for #163214 (reported by Tommi Komulainen) and fixes some
	other scrolling/validation related bugs along the why.

	* gtk/gtktreeview.c (gtk_tree_view_size_request): run
	do_validate_rows once and don't queue a size request there,
	(gtk_tree_view_size_allocate): don't update vadj value without
	reason, sync top_row/dy after the window sizes and adjustments
	are in sync again,
	(validate_visible_area): always update dy when scrolling,
	manually set top_row here after changing the vadj (don't depend
	on _adjustment_changed and top_row/dy sync to do this), since we
	now always set top_row here correctly, we can always free
	scroll_to_path at the end which avoids infinite expose loops,
	(do_validate_rows): add queue_resize boolean, remove top_row/dy
	sync here, we cannot do it safely at this place since the
	window sizes and adjustments are out of sync,
	(validate_rows), (validate_rows_handler): update call to
	do_validate_rows().
2005-06-14 22:26:04 +00:00
Matthias Clasen
920b5749b3 Use named cursors for the DND cursors, the names are "dnd-none",
2005-06-14  Matthias Clasen  <mclasen@redhat.com>

	Use named cursors for the DND cursors, the names are "dnd-none",
	"dnd-copy", "dnd-link", "dnd-move" and "dnd-ask". Also use an RGBA
	cursor instead of cursor+window when possible. This saves
	roundtrips during the drag operation, and makes translucent icons
	possible.

	* gtk/gtkdndcursors.h: New file, containing inlined pixbufs
	for the default dnd cursors.

	* gtk/gtkdnd.c (struct _GtkDragSourceInfo): Store the cursors
	used during the drag here, also store the icon pixbuf here.

	* gtk/gtkdnd.c (drag_cursors): Store the cursor names here. Also
	switch the default cursors from xbm to inlined pixbufs.

	* gtk/gtkdnd.c (gtk_drag_get_cursor): This function now takes the
	GtkDragSourceInfo as well, since it has to composite the
	drag-specific cursors. The cursors combined from the image of
	the themed cursor and the icon_pixbuf stored in the info.

	* gtk/gtkdnd.c (gtk_drag_begin_internal): Don't set the default
	icon if there is an icon_pixbuf, which will be composited into
	the cursor later.

	* gtk/gtkdnd.c (set_icon_stock_pixbuf): If appropriate, store
	the pixbuf in the info struct for later compositing into the
	cursor instead of creating an icon window.

	* gtk/gtkdnd.c (gtk_drag_drop_finished): If we used an
	RGBA cursor for the drag, and need to display the cancel
	animation, construct the icon window here.

	* gtk/gtkdnd.c (gtk_drag_source_info_destroy): Unref the
	drag-specific cursors and the icon_pixbuf when done with
	the drag.
2005-06-14 19:58:10 +00:00
Matthias Clasen
d1f2cb63d9 Use a named cursor with the name "color-picker", when available.
2005-06-14  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkcolorsel.c (make_picker_cursor): Use a named cursor
	with the name "color-picker", when available.
2005-06-14 17:16:15 +00:00
Matthias Clasen
60113bedc9 Rework the way in which rerooting of the path bar is done, implementing
2005-06-13  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkpathbar.[hc]: Rework the way in which rerooting of the
	path bar is done, implementing the following principles:
	(#137289, patch by Benjamin Otte)

	1. Re-root only if $HOME is an ancestor of the current path.

	2. When re-rooting, make sure the Left arrow appears in the path
	bar, so that you can navigate up from $HOME to /.  In that case,
	make sure the Right arrow doesn't appear if the sub-hierarchy from
	$HOME to the cwd fits in the window.

	3. Make sure that hitting Alt-Up takes you always one folder up,
	even when the path bar is re-rooted.
2005-06-13 19:18:54 +00:00
Matthias Clasen
9962a15cba Try harder not to modify readonly strings. (#307541, Torsten Schoenfeld)
2005-06-13  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkaccellabel.c (_gtk_accel_label_class_get_accelerator_label):
	Try harder not to modify readonly strings. (#307541, Torsten Schoenfeld)
2005-06-13 19:09:06 +00:00
Matthias Clasen
ae1e9866d0 Free the data of the row before overwriting it. (#307490, Kjartan Maraas)
2005-06-13  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserbutton.c (model_update_current_folder):
	Free the data of the row before overwriting it.  (#307490,
	Kjartan Maraas)
2005-06-13 13:50:49 +00:00
Kjartan Maraas
58b9aed17a Don't leak the cairo context. Closes bug #307426.
2005-06-13  Kjartan Maraas  <kmaraas@gnome.org>

	* gtk/gtkcalendar.c: (calendar_paint_arrow): Don't
	leak the cairo context. Closes bug #307426.
2005-06-13 07:57:02 +00:00
Matthias Clasen
4b14b2d4bd Make invisible text work a bit better (#66194, patch by Jeroen
2005-06-13  Matthias Clasen  <mclasen@redhat.com>

	Make invisible text work a bit better (#66194, patch by
	Jeroen Zwartepoorte)

	* gtk/gtk.symbols:
	* gtk/gtktextiter.[hc]: Add function to move by
	visible lines.

	* gtk/gtktextview.c (gtk_text_view_move_cursor_internal):
	Skip invisible text when moving by paragraphs.

	* gtk/gtktextlayout.c (gtk_text_layout_move_iter_visually):
	Skip invisible lines here too.
2005-06-13 05:15:10 +00:00
Matthias Clasen
8cdee385b9 Don't leak the format names. (#307190, Morten Welinder)
2005-06-12  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkselection.c (gtk_target_list_add_image_targets):
	Don't leak the format names.  (#307190, Morten Welinder)
2005-06-12 21:01:21 +00:00
Matthias Clasen
605073b0b9 Allow localization of the format in which the year is displayed. (#135451,
2005-06-12  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkcalendar.c (calendar_paint_header):
	(gtk_calendar_size_request): Allow localization of the
	format in which the year is displayed.  (#135451, Paisa
	Seeluangsawat)
2005-06-12 06:59:43 +00:00
Matthias Clasen
793591fcf0 Check start_button_mask before starting a drag. (#149058, Andreas Volz)
2005-06-12  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_maybe_begin_dragging_row):
	Check start_button_mask before starting a drag.  (#149058,
	Andreas Volz)
2005-06-12 05:13:54 +00:00
Matthias Clasen
7c631d5cb0 Support .hidden files. (#129170, Sayamindu Dasgupta, patch by Jan Arne
2005-06-12  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilesystemunix.c: Support .hidden files.  (#129170,
	Sayamindu Dasgupta, patch by Jan Arne Petersen)
2005-06-12 04:48:16 +00:00
Matthias Clasen
8cc74c3911 More docs provided by Owen Taylor.
2005-06-11  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkwidget.c (gtk_widget_set_app_paintable): More docs
	provided by Owen Taylor.
2005-06-11 05:51:55 +00:00
Matthias Clasen
50830412b0 Add a function to determine what parts of the model are visible. (#306726,
2005-06-11  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtk.symbols:
	* gtk/gtkiconview.h:
	* gtk/gtkiconview.c (gtk_icon_view_get_visible_range):
	Add a function to determine what parts of the model are
	visible.  (#306726, Jonathan Blandford)
2005-06-11 05:15:10 +00:00
Matthias Clasen
9d274e0e56 Treat backup files the same way as hidden files, to be closer to what
2005-06-11  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilesystemunix.c (create_file_info): Treat backup
	files the same way as hidden files, to be closer to what
	Nautilus does.  (#136196, Sean Middleditch)
2005-06-11 04:38:43 +00:00
Matthias Clasen
fb023e8c09 Don't modify strings returned from gettext().
2005-06-10  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkaccellabel.c (_gtk_accel_label_class_get_accelerator_label):
	Don't modify strings returned from gettext().
2005-06-11 02:27:19 +00:00
Manish Singh
5a01db227e don't use deprecated gdk_gc_unref function.
Fri Jun 10 19:06:03 2005  Manish Singh  <yosh@gimp.org>

        * gtk/gtktextdisplay.c (render_para): don't use deprecated
        gdk_gc_unref function.
2005-06-11 02:06:56 +00:00
Matthias Clasen
43f263a031 Allow setting paragraph background. (#81045, Gustavo Carneiro, patch by
2005-06-10  Matthias Clasen  <mclasen@redhat.com>

	Allow setting paragraph background.  (#81045, Gustavo
	Carneiro, patch by Jeroen Zwartepoorte)

	* gtk/gtktextlayout.c (set_para_values): Propagate
	pg_bg_color to the display struct.
	(gtk_text_layout_free_line_display): Free it here.

	* gtk/gtktextdisplay.c (render_para): If pg_bg_color
	is set, draw a rectangle in that color behind
	the paragraph.

	* gtk/gtktexttag.c (gtk_text_tag_class_init): Add
	paragraph-background, paragraph-background-gdk and
	paragraph-background-set properties.
	(set_pg_bg_color): A setter for paragraph-background.

	* gtk/gtktextlayout.h (struct _GtkTextLineDisplay): Add
	pg_bg_color.

	* gtk/gtktexttag.h (struct _GtkTextAttributes): Add
	pg_bg_color.
	(struct _GtkTextTag): Add pg_bg_color_set.
2005-06-10 20:05:08 +00:00
Michael Natterer
e4384dcadb gtk/gtk.symbols new function to get an action's accel_closure (Fixes
2005-06-10  Michael Natterer  <mitch@imendio.com>

	* gtk/gtk.symbols
	* gtk/gtkaction.[ch] (gtk_action_get_accel_closure): new function
	to get an action's accel_closure (Fixes #141750 and #148106).
2005-06-10 19:11:31 +00:00
Matthias Clasen
79d82223a2 Generate N_() calls for translatable key names.
2005-06-10  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gen-keyname-table.pl: Generate N_() calls for
	translatable key names.

	* gdk/keynames.txt: Mark some key names as translatable.

	* gdk/keyname-table.h: Regenerated.

	* gtk/gtkaccellabel.c (gtk_accel_label_class_init): Add
	some context to the msg ids for keyboard modifiers and
	key names.
	(_gtk_accel_label_class_get_accelerator_label): Try to
	translate key names.  (#300224, Christian Rose)
2005-06-10 06:41:04 +00:00
Federico Mena Quintero
ab44ea2b8c Merged from gtk-2-6:
2005-06-10  Federico Mena Quintero  <federico@ximian.com>

	Merged from gtk-2-6:

	Fixes #162358:

	* gtk/gtkfilechooserdefault.c (update_chooser_entry): Don't return
	immediately if we are in CREATE_FOLDER mode, so that we can fill
	the entry with the newly-selected folder.
	(gtk_file_chooser_default_set_property): Warn against turning on
	multiple selection for CREATE_FOLDER mode, or about setting that
	action while multiple selection is on.
	(update_chooser_entry): Change the entry's contents as well if we
	are in CREATE_FOLDER mode.  If nothing is selected, clear the
	chooser entry.
	(trap_activate_cb): Don't trap enter/space if modifiers are
	pressed.  This lets one use Ctrl-space to toggle rows in multiple
	selection mode.
	(gtk_file_chooser_default_should_respond): Clean up the if-chain
	mess of special cases by using an array to determine what to do.
	Also, for the save-entry case in CREATE_FOLDER mode, actually fix
	the bug where the file chooser would switch to an existing folder
	rather than confirming with it, and create the folder ourselves.
	(error_creating_folder_over_existing_file_dialog): New function.

	* gtk/gtkfilechooserentry.c (check_completion_callback): Only
	insert the common prefix if we are in an "open" mode.  Use a
	helper function.
	(append_common_prefix): New helper function; code moved over from
	check_completion_callback().
	(find_common_prefix): New helper function.
	(gtk_file_chooser_entry_focus): Append the common prefix if the
	user requests it explicitly.
2005-06-10 05:54:28 +00:00
Federico Mena Quintero
252e7dfa84 Pass the correct size to realloc(). Fixes
2005-06-10  Federico Mena Quintero  <federico@ximian.com>

	* xdgmime.c (xdg_mime_init_from_directory): Pass the correct size
	to realloc().  Fixes https://bugs.freedesktop.org/show_bug.cgi?id=3506.
2005-06-10 05:33:58 +00:00
Matthias Clasen
c733db4515 More doc fixes. 2005-06-10 04:57:18 +00:00
Matthias Clasen
80bf176f06 2005-06-10 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_set_expand):
	* gtk/gtktoolbar.c (gtk_toolbar_get_show_arrow):
	* gtk/gtktextview.c (gtk_text_view_get_iter_at_position):
	* gtk/gtkstock.c (gtk_stock_set_translate_func):
	* gtk/gtkspinbutton.c (gtk_spin_button_get_adjustment):
	* gtk/gtkscrolledwindow.h:
	* gtk/gtkmenushell.c (gtk_menu_shell_get_take_focus):
2005-06-10 04:45:40 +00:00
Matthias Clasen
1a15d98cd4 Doc fixes.
2005-06-10  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkiconview.c (gtk_icon_view_set_margin):
	* gtk/gtkicontheme.c (gtk_icon_info_load_icon):
	* gtk/gtkcalendar.c (gtk_calendar_thaw): Doc fixes.
2005-06-10 04:25:33 +00:00
Matthias Clasen
abf069c08c Add docs. (#306212, Steve Chaplin, docs provided by Billy Biggs)
2005-06-09  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkwidget.c (gtk_widget_set_app_paintable): Add docs.
	(#306212, Steve Chaplin, docs provided by Billy Biggs)
2005-06-10 03:17:00 +00:00
Matthias Clasen
4a6e34d3de Don't declare errno, including errno.h is enough. (#304164, Joerg
2005-06-09  Matthias Clasen  <mclasen@redhat.com>

	* xdgmimemagic.c: Don't declare errno, including errno.h
	is enough.  (#304164, Joerg Sonnenberger)
2005-06-09 19:54:06 +00:00
Matthias Clasen
e09c960885 Small cleanup. (#305539, Paolo Borelli)
2005-06-09  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktextbtree.c (_gtk_text_btree_char_is_invisible): Small
	cleanup.  (#305539, Paolo Borelli)
2005-06-09 18:36:58 +00:00
Matthias Clasen
54935477ea New function to scroll to a path. (#306838, Jonathan Blandford)
2005-06-09  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtk.symbols:
	* gtk/gtkiconview.h:
	* gtk/gtkiconview.c (gtk_icon_view_scroll_to_path): New function
	to scroll to a path.  (#306838, Jonathan Blandford)
2005-06-09 06:07:57 +00:00
Matthias Clasen
70c0c38ff8 Scroll to the item. (#306839, Jonathan Blandford)
2005-06-08  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkiconview.c (gtk_icon_view_set_cursor): Scroll to the
	item.  (#306839, Jonathan Blandford)
2005-06-08 20:47:11 +00:00
Matthias Clasen
92cc6c4cbc Check for negative before appending the index, to avoid double error
2005-06-08  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreemodel.c (gtk_tree_path_new_from_string): Check for
	negative before appending the index, to avoid double error
	message.  (#306393, Morten Welinder)
2005-06-08 20:25:21 +00:00
Matthias Clasen
d53bffc04d Don't crash if search_window is NULL. (#304914, Victor Osadci, testcase by
2005-06-08  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_real_start_interactive_search):
	Don't crash if search_window is NULL.  (#304914, Victor Osadci,
	testcase by Olaf Vitters)
2005-06-08 20:14:03 +00:00
Matthias Clasen
e413007784 Make the file property readable. (#170674, Lorenzo Gil Sanchez)
2005-06-08  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkimage.c: Make the file property readable.
	(#170674, Lorenzo Gil Sanchez)
2005-06-08 17:38:25 +00:00