Commit Graph

7257 Commits

Author SHA1 Message Date
Tor Lillqvist
36e1f67ac2 Plug memory leak on Win32.
2005-11-04  Tor Lillqvist  <tml@novell.com>

	* gtk/gtkstatusicon.c (gtk_status_icon_set_tooltip): Plug memory
	leak on Win32.
2005-11-04 00:37:31 +00:00
Tor Lillqvist
3f49474ebc Typo. 2005-11-03 13:56:13 +00:00
Tor Lillqvist
5dbd2b163a Formatting fix. 2005-11-03 13:54:10 +00:00
Tor Lillqvist
72ea12fec0 As there is only one GdkDisplay in the Win32 backend, check that
2005-11-03  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkcursor-win32.c: As there is only one GdkDisplay in
	the Win32 backend, check that GdkDisplay* parameters are equal to
	_gdk_display instead of using the unnecessarily general
	GDK_IS_DISPLAY().
2005-11-03 13:44:37 +00:00
Tor Lillqvist
5551fc6754 Rename the variables for the color bitmap to have "color" in their name,
2005-11-03  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkcursor-win32.c (pixbuf_to_hbitmaps_alpha_winxp):
	Rename the variables for the color bitmap to have "color" in their
	name, for similarity with pixbuf_to_hbitmaps_normal(). Create a
	color bitmap for the mask, too, instead of creating a b&w bitmap
	with CreateBitmap(). Set up the mask bitmap's contents, ones for
	those pixels in the color bitmap where the alpha is zero, zero for
	other pixels. We used to use an unitialized mask bitmap! This
	meant that icons and cursors created presumably worked more or
	less by accident. Totally blank icons with zero alpha everywhere
	(as used by gtktrayicon.c) definitely did not work as expected.
2005-11-03 13:29:30 +00:00
Tor Lillqvist
3d18823ae1 Include gtkstatusicon.c on all platforms.
2005-11-03  Tor Lillqvist  <tml@novell.com>

	* gtk/Makefile.am: Include gtkstatusicon.c on all platforms.

	* gtk/gtkstatusicon.c: Implement for Win32. Use code from
	gtktrayicon-win32.c as applicable. (gtktrayicon-win32.c is not
	necessary and can be removed from CVS. It has never been mentioned
	in gtk/Makefile.am.) No tray icon widget, GtkImage or GtkTooltips
	are used on Win32. One label widget is used (but never shown) as
	gtk_widget_render_icon() needs a widget.

	Ifdefs used as necessary in several places. It might be cleaner to
	split out the backend-specific parts to separate files, or at
	least collect them into separate blocks in the file.

	(wndproc): New function. Window procedure to monitor mouse events
	in the system tray icon. Call gtk_status_icon_button_press() as
	needed.
	(create_tray_observer): New function. Creates a hidden window that
	only serves as a tray icon message observer.
2005-11-03 13:17:01 +00:00
Tor Lillqvist
542aedc182 Position the dialog with GTK_WIN_POS_CENTER. (do_quit): New function, hide
2005-11-03  Tor Lillqvist  <tml@novell.com>

	* tests/teststatusicon.c (icon_activated): Position the dialog
	with GTK_WIN_POS_CENTER.
	(do_quit): New function, hide and unref the GtkStatusIcon, and
	call gtk_main_quit().
	(popup_menu): Add a Quit menu item that calls do_quit().
2005-11-03 12:09:49 +00:00
Tor Lillqvist
c2c55f8385 gdk/win32/gdkcolor-win32.c gdk/win32/gdkscreen-win32.c Whitespace
2005-11-02  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkcolor-win32.c
	* gdk/win32/gdkscreen-win32.c
	* gdk/win32/gdkwindow-win32.c: Whitespace consistency
	fixes. Remove superfluous test for GdkWindow* parameters being
	non-NULL. Testing GDK_IS_WINDOW() is enough. As there is only one
	GdkScreen and one GdkDisplay in the Win32 backend, use those
	variables instead of the getter functions. For GdkDisplay* and
	GdkScreen* parameters, check that they are equal to the
	corresponding singleton variables instead of the more general
	GDK_IS_DISPLAY() or GDK_IS_SCREEN().
2005-11-02 13:33:27 +00:00
Matthias Clasen
aa70008f0b Remove some g_return_if_fail() from static functions, replace some others
2005-11-02  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktextview.c: Remove some g_return_if_fail() from
	static functions, replace some others by g_assert().

	* gtk/gtktextview.c (selection_motion_event_handler)
	(gtk_text_view_start_selection_drag): Keep track of the original
	selection boundaries during a drag selection, in order to correctly
	decide when to extend or shrink the selection.  (#320167,
	reported by Arvind S N, patch by Paolo Borelli)
2005-11-02 06:26:07 +00:00
Matthias Clasen
6002bc6582 Replace manual offset calculations by g_utf8_offset_to_pointer().
2005-11-02  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktextbtree.c (_gtk_text_line_char_to_byte_offsets):
	* gtk/gtktextiter.c (gtk_text_iter_backward_chars): Replace
	manual offset calculations by g_utf8_offset_to_pointer().
	(#320360, Paolo Borelli)
2005-11-02 05:08:31 +00:00
Tim Janik
d6a9db9095 get rid of GAllocator usage, allocate and free nodes via the g_slice_*()
Tue Nov  1 16:18:24 2005  Tim Janik  <timj@imendio.com>

        * gtk/gtkrbtree.[hc]: get rid of GAllocator usage, allocate and free
        nodes via the g_slice_*() API.
        _gtk_rbtree_new(): fixed wrong node allocation via g_new().
2005-11-01 18:10:51 +00:00
Tor Lillqvist
4d1b5589c5 gdk/win32/gdkprivate-win32.h gdk/win32/gdkglobals-win32.c Add more
2005-11-01  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkprivate-win32.h
	* gdk/win32/gdkglobals-win32.c
	* gdk/win32/gdkmain-win32.c (_gdk_windowing_init): Add more
	pre-interned GdkAtoms and pre-registered clipboard formats. Sort
	their declarations, definitions and assignments into a more
	logical and consistent order.

	* gdk/win32/gdkmain-win32.c (_gdk_win32_cf_to_string): Include the
	CF_ prefix for the predefined clipboard format names. Put quotes
	around registered format names to distinguish them.

	* gdk/win32/gdkproperty-win32.c (gdk_property_change): Return
	immediately with a warning if the property type is STRING, TEXT,
	COMPOUND_TEXT or SAVE_TARGETS, as these are X11-specific that we
	should never pretend to handle on Win32. Handle only UTF8_STRING
	here, other formats with delayed rendering. Use \uc1 instead of
	\uc0 when generating Rich Text Format for easier testability on
	XP, where WordPad misinterprets \uc0 encoded characters. Add more
	GDK_NOTE debugging output for Clipboard operations.

	* gdk/win32/gdkselection-win32.c: Debugging printout improvements.
	(gdk_selection_convert): Don't pretent to handle STRING, just
	UTF8_STRING. Streamline error handling, don't unnecessarily have a
	GError which then isn't used for anything anyway if it gets set.
	(gdk_win32_selection_add_targets): Skip also STRING, TEXT,
	COMPOUND_TEXT and SAVE_TARGETS in addition to UTF8_STRING.
2005-11-01 15:29:59 +00:00
Tor Lillqvist
77769e2eeb Sync with what configure produces.
2005-11-01  Tor Lillqvist  <tml@novell.com>

	* config.h.win32.in: Sync with what configure produces.
2005-11-01 09:48:46 +00:00
Tor Lillqvist
b3175d1982 Don't look for X_PACKAGES unless building for x11. (#313986, John
2005-11-01  Tor Lillqvist  <tml@novell.com>

	* configure.in: Don't look for X_PACKAGES unless building for
	x11. (#313986, John Ehresman)
2005-11-01 09:26:59 +00:00
Erdal Ronahi
6f85760bb0 Added Kurdish translation to po-properties 2005-10-28 22:08:11 +00:00
Matthias Clasen
6a40c2488b Add the popup window to the toplevels window group. (#319912, Christian
2005-10-28  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkentrycompletion.c (_gtk_entry_completion_popup): Add the popup
	window to the toplevels window group.  (#319912, Christian Persch)
2005-10-28 20:35:11 +00:00
Kristian Rietveld
c50df41b52 fix stupid thinko.
2005-10-28  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreemodelfilter.c (gtk_tree_model_filter_row_deleted): fix
	stupid thinko.
2005-10-28 17:15:15 +00:00
Matthias Clasen
04f94a98f2 Fix the anchor of the default drag cursors. (#319200, Federico Mena
2005-10-28  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkdnd.c (gtk_drag_get_cursor): Fix the anchor of the default
	drag cursors.  (#319200, Federico Mena Quintero)
2005-10-28 17:06:43 +00:00
Matthias Clasen
96335d4326 Handle Shift-G to go to the previous match, like firefox. (#320061,
2005-10-28  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_search_key_press_event): Handle
	Shift-G to go to the previous match, like firefox.  (#320061, Christian
	Neumair)
2005-10-28 15:13:54 +00:00
Matthias Clasen
feb5ffb032 Fix a C99ism. (#320000, Kazuki Iwamoto)
2005-10-28  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreemodelfilter.c (gtk_tree_model_filter_build_level): Fix a
	C99ism.  (#320000, Kazuki Iwamoto)
2005-10-28 14:16:45 +00:00
Matthias Clasen
eac8eb4d99 Add the little stars. (#319985, Bastien Nocera)
2005-10-28  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkaboutdialog.c (gtk_about_dialog_init): Add the little
	stars.  (#319985, Bastien Nocera)
2005-10-28 14:04:04 +00:00
Matthias Clasen
cfaa87847a Return FALSE, so we don't flush repeatedly. (#319151, Alexander Larsson)
2005-10-28  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_search_entry_flush_timeout): Return
	FALSE, so we don't flush repeatedly.  (#319151, Alexander Larsson)
2005-10-28 13:53:16 +00:00
Michael Natterer
194e8daff9 Fix bug #319974:
2005-10-26  Michael Natterer  <mitch@imendio.com>

	Fix bug #319974:

	* gtk/gtkcellrendererpixbuf.c (gtk_cell_renderer_pixbuf_set_property):
	make sure that setting any of pixbuf/stock-id/icon-name resets the
	others because they are mutually exclusive, and that unsetting any
	of them only resets the pixbuf and nothing else. Also added
	some missing g_object_notify().

	(gtk_cell_renderer_pixbuf_get_property): simplified calls to
	g_value_set_object().

	(gtk_cell_renderer_pixbuf_create_stock_pixbuf)
	(gtk_cell_renderer_pixbuf_create_named_icon_pixbuf): added
	g_object_notify ("pixbuf").
2005-10-27 13:16:23 +00:00
Matthias Clasen
18f32d04d2 Be more careful about initializing cell_area. (#319382, Tommi Komulainen)
2005-10-27  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_button_press): Be more
	careful about initializing cell_area.  (#319382, Tommi
	Komulainen)
2005-10-27 04:51:25 +00:00
Matthias Clasen
7de0d97271 Don't eat Ctrl-PageUp/PageDown. (#318670, Christian Neumair)
2005-10-27  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkcombobox.c (gtk_combo_box_key_press): Don't eat
	Ctrl-PageUp/PageDown.  (#318670, Christian Neumair)
2005-10-27 04:38:55 +00:00
Matthias Clasen
bc41f73c4c Only set the text if it is not NULL. (#319930, Thomas Klausner)
2005-10-27  Matthias Clasen  <mclasen@redhat.com>

	* demos/gtk-demo/clipboard.c (paste_received): Only set the
	text if it is not NULL.  (#319930, Thomas Klausner)

	* gtk/gtkselection.c (gtk_selection_data_get_pixbuf): Close the
	loader before trying to get the pixbuf.  (#319930, Thomas Klausner)
2005-10-27 04:31:33 +00:00
Matthias Clasen
e80f12b676 Use G_MODULE_BIND_LAZY when dlopening modules. (#319557, Laszlo Peter)
2005-10-26  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilesystem.c (gtk_file_system_module_load):
	* gtk/gtkthemes.c (gtk_theme_engine_load):
	* gtk/gtkimmodule.c (gtk_im_module_load): Use G_MODULE_BIND_LAZY
	when dlopening modules.  (#319557, Laszlo Peter)
2005-10-27 03:16:00 +00:00
Matthias Clasen
87129bab87 Only use text segments when determining text direction. (#319065, Tommi
* gtk/gtktextbtree.c (gtk_text_btree_resolve_bidi): Only use text
	segments when determining text direction.  (#319065, Tommi Komulainen)
2005-10-26 20:47:04 +00:00
Matthias Clasen
ec76057b9b Don't crash on duplicate destroy. (#318953, Gustavo Carneiro)
2005-10-26  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_destroy): Don't crash
	on duplicate destroy.  (#318953, Gustavo Carneiro)
2005-10-26 19:47:48 +00:00
Matthias Clasen
60ec536ce3 Doc updates 2005-10-26 19:10:08 +00:00
Matthias Clasen
d2a58a39bd use $(GLIB_MKENUMS) instead of glib-mkenums. (#318582, Damien Carbery)
2005-10-26  Matthias Clasen  <mclasen@redhat.com>

        * */Makefile.am: use $(GLIB_MKENUMS) instead of
        glib-mkenums.  (#318582, Damien Carbery)
2005-10-26 18:01:05 +00:00
Matthias Clasen
87ffaabc2c Clarify docs. (#317682, Christian - Manny Calavera - Neumair)
2005-10-26  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtktreemodel.c (gtk_tree_model_rows_reordered): Clarify
        docs.  (#317682, Christian - Manny Calavera - Neumair)
2005-10-26 14:43:10 +00:00
Matthias Clasen
653a6dd9db Fix #317844 2005-10-26 13:42:53 +00:00
Matthias Clasen
15f5226ed6 Fix some issues with background drawing in RTL. (#318781, Eric Cazeaux)
2005-10-25  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_process_action):
        Fix some issues with background drawing in RTL.  (#318781,
        Eric Cazeaux)
2005-10-26 04:23:46 +00:00
Matthias Clasen
b8bc9a3ed3 Add property editors 2005-10-26 03:55:35 +00:00
Matthias Clasen
80b528bfeb Activate status icons on single click 2005-10-26 03:18:09 +00:00
Kristian Rietveld
af86cec5e1 Fixes #311955, reported by Markku Vire; and a lot more.
2005-10-25  Kristian Rietveld  <kris@gtk.org>

	Fixes #311955, reported by Markku Vire; and a lot more.

	* gtk/gtktreemodelfilter.c: Made this thing work correctly.
	Levels can now have invisible nodes cached, functions have been
	rewritten/refactored to take this into account; also the logic in
	some functions has been corrected.

	Each referenced node now references all visible children or a single
	invisible child, in order to be able to monitor all changes in the
	child model required for correct operation.

	When a virtual root is set, all nodes on the virtual root level are
	referenced.

	At last, a bunch of random bug fixes and comment updates.
2005-10-25 21:00:40 +00:00
Matthias Clasen
86b656aa52 Add some more docs. (#319722, Paolo Borelli)
2005-10-25  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktexttagtable.c (gtk_text_tag_table_foreach): Add some
	more docs.  (#319722, Paolo Borelli)
2005-10-25 18:28:35 +00:00
Matthias Clasen
f10f85793d Make the initialization of screen_x11->xft_rgba more explicit. (#319627,
2005-10-25  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkxftdefaults.c (init_xft_settings): Make the
	initialization of screen_x11->xft_rgba more explicit.  (#319627,
	Bogdan Nicula)
2005-10-25 18:11:57 +00:00
Matthias Clasen
d77bc26a82 Fix whitespace in a blurb. (#319499, Francisco Javier F. Serrador)
2005-10-25  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooser.c (gtk_file_chooser_class_init): Fix whitespace
	in a blurb.  (#319499, Francisco Javier F. Serrador)
2005-10-25 17:57:35 +00:00
Matthias Clasen
f2724a2515 Add settings to hide the input method and Unicode control character
2005-10-24  Matthias Clasen  <mclasen@redhat.com>

        Add settings to hide the input method and Unicode control character
        submenus in the context menus of GtkEntry and GtkTextView.

        * gdk/x11/gdkevents-x11.c: Map GTK+ settings to X settings.

        * gtk/gtksettings.c (gtk_settings_class_init): Declare GTK+ settings here.

        * gtk/gtktextview.c (popup_targets_received):
        * gtk/gtkentry.c (popup_targets_received): Use the settings here.
2005-10-24 20:01:57 +00:00
Kristian Rietveld
3fe6e98689 emitting row-has-child-toggled when the level is not in the cache does not
2005-10-24  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreemodelsort.c (gtk_tree_model_sort_row_inserted): emitting
	row-has-child-toggled when the level is not in the cache does not
	make sense.  (This bug probably crept in during the early stages
	of GtkTreeModelSort when there wasn't a correct row-has-child-toggled
	implementation yet),
	(gtk_tree_model_sort_real_unref_node): only get the child iter
	when we will actually also use it.
2005-10-24 19:01:36 +00:00
Michael Natterer
d25d65852f check for the widget being realized, in addition to being visible, to
2005-10-22  Michael Natterer  <mitch@imendio.com>

	* gtk/gtktreeview.c (gtk_tree_view_scroll_to_cell): check for the
	widget being realized, in addition to being visible, to avoid
	running into precondition check in gtk_tree_view_get_cell_area().
	(approved by Kris).
2005-10-22 21:08:23 +00:00
Dom Lachowicz
f9365c3747 Experimentally, scrollbar steppers can shrink to 8 pixels on Win32.
* modules/engines/ms-windows/msw_style.c (setup_msw_rc_style):
	Experimentally, scrollbar steppers can shrink to 8 pixels on
	Win32. Reflect that in the theme.
	* modules/engines/ms-windows/Theme/gtk-2.0/gtkrc: Experimentally,
	there is a 1-pixel border between a scrollbar and its child
	in ScrolledWindows on Win32. Reflect that in the theme.
2005-10-22 15:53:00 +00:00
Matthias Clasen
a086076057 Use GDK_WINDOW_CHILD for the selection window. (#318806, Alex Larsson)
2005-10-20  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtklabel.c (gtk_label_create_window): Use GDK_WINDOW_CHILD
	for the selection window.  (#318806, Alex Larsson)
2005-10-20 20:40:54 +00:00
Federico Mena Quintero
647ba5b40d Fixes bug #317999:
2005-10-18  Federico Mena Quintero  <federico@ximian.com>

	Fixes bug #317999:

	* tests/autotestfilechooser.c
	(test_button_folder_states_for_action): Test that we have either
	$cwd or the explicitly-set folder.
	(test_reload_sequence): Likewise.

	* gtk/gtkfilechooserdefault.c
	(gtk_file_chooser_default_get_current_folder): If our reload_state
	is RELOAD_EMPTY, return a GtkFilePath corresponding to $cwd.
2005-10-19 16:25:42 +00:00
Tor Lillqvist
e6fa7394ba Remove the clipboard viewer code. It didn't really do anything useful, and
2005-10-14  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkdisplay-win32.c: Remove the clipboard viewer code.
	It didn't really do anything useful, and was just confusing and
	incomplete. Comments claimed we don't do delayed rendering, but in
	fact we do, for images. (The delayed rendering code has other
	problems, though, see #168173.) The clipboard viewer code was
	probably even buggy (the WM_CHANGECBCHAIN handled didn't propagate
	the message when necessary). It was just test code, it said so in
	a comment. Add something similar back later if necessary.

	(_win32_on_clipboard_change,
	_gdk_win32_register_clipboard_notification): Remove.

	(gdk_display_supports_selection_notification,
	gdk_display_request_selection_notification): Always just return
	FALSE. We didn't generate any GDK_OWNER_CHANGE events anywhere.
2005-10-14 00:08:14 +00:00
Tor Lillqvist
d297ff329f Don't treat Alt-Enter specially. It does not have any special meaning and
2005-10-13  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkevents-win32.c (gdk_event_translate): Don't treat
	Alt-Enter specially. It does not have any special meaning and
	should be passed on to the application. (#318378, Tim Evans)
2005-10-13 07:21:00 +00:00
Tor Lillqvist
b25e6c5b05 Set visual depth to 24 for 32 bits-per-pixel devices on Win32. This allows
2005-10-13  Tor Lillqvist  <tml@novell.com>

	Set visual depth to 24 for 32 bits-per-pixel devices on
	Win32. This allows gdk_drawable_real_draw_pixbuf() to use the
	optimized composite_0888() function rather than the slower image
	dithering functions to draw pixbufs (#313993, John Ehresman)

	* gdk/win32/gdkimage-win32.c (_gdk_win32_new_image): Use
	_gdk_windowing_get_bits_for_depth() to initialize
	GdkImage::bits_per_pixel.
	(_gdk_windowing_get_bits_for_depth): Return 32 bits for depth 24.

	* gdk/win32/gdkpixmap-win32.c (gdk_pixmap_new): Use
	_gdk_windowing_get_bits_for_depth() to initialize
	BITMAPINFOHEADER::biBitCount.

	* gdk/win32/gdkvisual-win32.c (_gdk_visual_init): Set
	GdkVisual::depth to 24 even if GetDeviceCaps(BITSPIXEL) returns
	32.
2005-10-13 07:08:49 +00:00
Stefan Kost
1c0d2c75a6 use PACKAGE_VERSION,bump year (#318654)
* demos/gtk-demo/appwindow.c: (about_cb):
use PACKAGE_VERSION,bump year (#318654)
2005-10-12 13:23:10 +00:00
Matthias Clasen
a07a5ecba7 Try to match an off toggle here with the matching on toggle if it
2005-10-11  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktextbtree.c (_gtk_text_btree_delete): Try to match an off
	toggle here with the matching on toggle if it immediately follows.
	This is a common case, and handling it here prevents quadratic blowup
	in cleanup_line() below.  (#317125)

	* gtk/gtktextsegment.h:
	* gtk/gtktextsegment.c (_gtk_char_segment_new_from_two_strings): Pass
	the character counts into this function instead of computing them
	again.
2005-10-11 14:39:17 +00:00
Tommi Komulainen
8ad0abb867 Add ALREADY_EXISTS error code. Return an error code when the shortcut
2005-10-10  Tommi Komulainen  <tommi.komulainen@iki.fi>

	* gtk/gtkfilechooser.h (GtkFileChooserError): Add ALREADY_EXISTS error
	code.
	* gtk/gtkfilechooserdefault.c
	(gtk_file_chooser_default_add_shortcut_folder): Return an error code
	when the shortcut already exists in the sidebar.  (#147521)
2005-10-10 14:29:03 +00:00
Matthias Clasen
080fc7ecef Demonstrate custom widgets in a GtkComboBox. 2005-10-09 16:27:12 +00:00
Matthias Clasen
6592f00a6d fix includes 2005-10-07 20:03:36 +00:00
Federico Mena Quintero
cca9302927 Fixes bug #317999:
2005-10-07  Federico Mena Quintero  <federico@ximian.com>

	Fixes bug #317999:

	* tests/autotestfilechooser.c (test_reload_sequence): Ensure that
	the the result of gtk_file_chooser_get_folder() is NULL or
	non-NULL at the right times.  Log the tests.
	(test_button_folder_states): New test for the initial states of
	the current folder in GtkFileChooserButton.
	(main): Test that the number of warnings/errors/critical errors is
	zero.

	* gtk/gtkfilechooser.c (gtk_file_chooser_get_current_folder):
	Clarify the documentation on when this can return NULL.
	(gtk_file_chooser_get_current_folder_uri): Likewise.

	* gtk/gtkfilechooserbutton.c (struct
	_GtkFileChooserButtonPrivate): Added a folder_has_been_set flag;
	we use it to keep track of whether a folder has been set.
	(gtk_file_chooser_button_map):  Implement.  If no folder has been
	loaded before, we at least try to load $cwd here.
	(gtk_file_chooser_button_constructor): If the construct-time
	dialog already has a folder set, turn on our folder_has_been_set
	flag.
	(dialog_current_folder_changed_cb): Turn on our
	folder_has_been_set flag.
2005-10-07 19:54:32 +00:00
Michael Natterer
cab26ded6f remove some explicit #defines of PROFILE_FILE_CHOOSER because they break
2005-10-07  Michael Natterer  <mitch@gimp.org>

	* gtk/gtkfilechooserdefault.c: remove some explicit #defines of
	PROFILE_FILE_CHOOSER because they break compilation after the
	removal of <unistd.h>.
2005-10-07 18:51:30 +00:00
Matthias Clasen
5b2d546e9f Remove a redundant (and unconditional) include of unistd.h (#318211,
2005-10-07   Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkfilechooserdefault.c: Remove a redundant (and
        unconditional) include of unistd.h  (#318211, Kazuki Iwamoto)
2005-10-07 16:20:37 +00:00
Matthias Clasen
8725724e39 Use g_return_val_if_fail(), not g_return_if_fail(). (#318412, Kazuki
2005-10-07   Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtktexttag.c (gtk_text_attributes_ref): Use
        g_return_val_if_fail(), not g_return_if_fail().  (#318412,
        Kazuki Iwamoto)
2005-10-07 16:01:19 +00:00
Matthias Clasen
b863d24089 Add a has-selection property 2005-10-07 03:38:57 +00:00
Matthias Clasen
56231ad97c Start collecting release notes for 2.10.
2005-10-05  Matthias Clasen  <mclasen@redhat.com>

	* README.in: Start collecting release notes for 2.10.
2005-10-05 14:25:14 +00:00
Matthias Clasen
e479bd4321 Readd the memory leak fix, since the assertion failures were traced to an
2005-10-05  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkrc.c (gtk_rc_clear_realized_style): Readd the memory
	leak fix, since the assertion failures were traced to
	an xchat bug.  (#314696)
2005-10-05 14:11:23 +00:00
Matthias Clasen
b24876a79c Documentation improvements. (gtk_style_detach): Assert that the
2005-10-05  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkstyle.c (gtk_style_detach):
	(gtk_style_attach):  Documentation improvements.
	(gtk_style_detach): Assert that the attach_count is > 0.
2005-10-05 13:23:21 +00:00
Federico Mena Quintero
1155f0b3e5 Take a shortcut position, not a ShortcutsIndex, to make the function more
2005-10-04  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c (switch_to_shortcut): Take a
	shortcut position, not a ShortcutsIndex, to make the function more
	generic.
	(home_folder_handler): Pass the resolved index to
	switch_to_shortcut(), rather than just SHORTCUTS_HOME.
	(desktop_folder_handler): Likewise for SHORTCUTS_DESKTOP.
	(gtk_file_chooser_default_class_init): Add a "quick-bookmark"
	binding signal, and bind it to Alt-1, Alt-2. ..., Alt-0.  These
	make the respective key switch to the first, second, ..., tenth
	bookmark.
	(quick_bookmark_handler): Implement.
2005-10-05 05:05:42 +00:00
Federico Mena Quintero
5a65996333 Don't special-case Home and Desktop; just use their real names on the file
2005-10-04  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkpathbar.c (get_dir_name): Don't special-case Home and
	Desktop; just use their real names on the file system for the
	user-visible names.

	* gtk/gtkfilechooserdefault.c
	(gtk_file_chooser_default_class_init): Add a "desktop-folder"
	binding signal, and bind it to M-d by default.
	(desktop_folder_handler): Implement the default handler.
	(home_folder_handler): Use a helper function.
	(switch_to_shortcut): New helper function.
	(shortcuts_append_home): Don't special-case the name of "Home";
	just use the folder name.
2005-10-04 20:08:32 +00:00
Tor Lillqvist
de3cf6c83d Make it compile without HAVE__NL_TIME_FIRST_WEEKDAY. (#317910, Mathias
2005-10-04  Tor Lillqvist  <tml@novell.com>

	* gtk/gtkcalendar.c (gtk_calendar_init): Make it compile without
	HAVE__NL_TIME_FIRST_WEEKDAY. (#317910, Mathias Hasselmann)
2005-10-04 13:42:27 +00:00
Matthias Clasen
d42232ec19 Revert the change from yesterday, since it leads to assertion failures.
2005-10-04  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkrc.c (gtk_rc_clear_realized_style): Revert the change
	from yesterday, since it leads to assertion failures.  (#317879,
	Sebastian Bacher)
2005-10-04 04:20:02 +00:00
Matthias Clasen
3203940359 Call calendar_compute_days() after setting priv->week_start.
2005-10-03  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkcalendar.c (gtk_calendar_init): Call
	calendar_compute_days() after setting priv->week_start.
2005-10-04 03:28:36 +00:00
Matthias Clasen
1ab667fcbb Unref the style when removing it from the hash table. (#314696, Benjamin
2005-10-03  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkrc.c (gtk_rc_clear_realized_style): Unref the style when
	removing it from the hash table.  (#314696, Benjamin Berg)
2005-10-03 16:23:56 +00:00
Tor Lillqvist
ef2c2326f0 In case BitBlt() fails with ERROR_INVALID_HANDLE, the most probable cause
2005-10-01  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkdrawable-win32.c (blit_from_pixmap): In case
	BitBlt() fails with ERROR_INVALID_HANDLE, the most probable cause
	is that the the desktop isn't visible because the session has been
	switched, the screen is locked, or a terminal server session
	disconnected, so no error message necessary. (#137796)

	It is of course remotely possible that BitBlt() failing with
	ERROR_INVALID_HANDLE might also be caused by some other
	problem. We could strive for perfection and track whether the
	desktop is visible by using WTSRegisterSessionNotification() and
	handling WM_WTSESSION_CHANGE. I think that's overdoing it just for
	this issue, though. If we would track desktop visibility, we
	should then avoid even trying to update the display at all while
	the desktop isn't visible.
2005-09-30 23:56:42 +00:00
Matthias Clasen
c693b5d641 Another attempt to correct the calculations for the first week day. We may
2005-09-30  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkcalendar.c (gtk_calendar_init): Another attempt
	to correct the calculations for the first week day. We may
	just have to remove this code if too many locales turn out
	to have broken data.
2005-09-30 17:53:19 +00:00
Matthias Clasen
0d047a359d Don't leak pixbuf in some cases. (#317611, Tommi Komulainen)
2005-09-30  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkimage.c (gtk_image_expose): Don't leak pixbuf in
	some cases.  (#317611, Tommi Komulainen)
2005-09-30 15:40:55 +00:00
Matthias Clasen
51c6eb961e Prevent overflow when storing size hints in an unsigned short variable.
2005-09-30  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtksocket-x11.c (_gtk_socket_windowing_size_request):
        Prevent overflow when storing size hints in an unsigned
        short variable. Tracked down by Ray Strode and Søren Sandmann.
2005-09-30 14:57:02 +00:00
Matthias Clasen
56b4314ae9 Check arguments. (#317491, Paolo Borelli)
2005-09-29  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkbutton.c (gtk_button_set_image): Check arguments.  (#317491,
	Paolo Borelli)
2005-09-29 13:42:21 +00:00
Matthias Clasen
f6501cb4bd Stop drags when being grab shadowed. (#317332)
2005-09-29  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkpaned.c (gtk_paned_grab_notify): Stop drags when being
	grab shadowed.  (#317332)
2005-09-29 13:35:01 +00:00
Tor Lillqvist
840796dffe DLLs are always in bin nowadays, no need to test.
2005-09-29  Tor Lillqvist  <tml@novell.com>

	* gtk-zip.sh.in: DLLs are always in bin nowadays, no need to test.
2005-09-29 07:44:52 +00:00
Federico Mena Quintero
e14ad12b3f Oops, return if the unmap test fails. (test_reload_sequence): Use
2005-09-28  Federico Mena Quintero  <federico@ximian.com>

	* tests/autotestfilechooser.c (test_reload_sequence): Oops, return
	if the unmap test fails.
	(test_reload_sequence): Use gtk_widget_show_now() instead of
	gtk_widget_show() for the dialog.
	Thanks to Tim Janik for noticing these.
2005-09-29 01:56:10 +00:00
Federico Mena Quintero
3e9f549d3b New file with a set of tests for GtkCellRendererText. The idea is to run a
2005-09-28  Federico Mena Quintero  <federico@ximian.com>

	* tests/testcellrenderertext.c: New file with a set of tests for
	GtkCellRendererText.  The idea is to run a text renderer through
	most of its interesting property values to see that it works
	correctly.

	* tests/Makefile.am: Added testcellrenderertext.

	* gtk/gtkfilechooserdefault.c (load_set_model): Mark the
	entry/exit of this function for profiling.
	(gtk_file_chooser_default_style_set): Mark the start/end of the
	calls to the parent class and the the signal emission for profiling.
2005-09-29 00:19:32 +00:00
Federico Mena Quintero
77b5224967 New file with a set of tests for GtkCellRendererText. The idea is to run a
2005-09-28  Federico Mena Quintero  <federico@ximian.com>

	* tests/testcellrenderertext.c: New file with a set of tests for
	GtkCellRendererText.  The idea is to run a text renderer through
	most of its interesting property values to see that it works
	correctly.

	* tests/Makefile.am: Added testcellrenderertext.

	* gtk/gtkfilechooserdefault.c (load_set_model): Mark the
	entry/exit of this function for profiling.
	(gtk_file_chooser_default_style_set): Mark the start/end of the
	calls to the parent class and the the signal emission for profiling.
2005-09-29 00:19:15 +00:00
Tor Lillqvist
4ac3ee58b5 The locale directory is passed to bindtextdomain() which isn't
2005-09-29  Tor Lillqvist  <tml@novell.com>

	* gtk/gtkmain.c (_gtk_get_localedir): The locale directory is
	passed to bindtextdomain() which isn't UTF-8-aware, so convert to
	system codepage using g_win32_locale_filename_from_utf8().
	(#317457, Kazuki Iwamoto)
2005-09-28 23:46:10 +00:00
Matthias Clasen
d1a3c8dc1f Free mult_atoms here. (#317039, Paolo Borelli)
2005-09-28  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkselection.c (_gtk_selection_request): Free mult_atoms
	here. (#317039, Paolo Borelli)
2005-09-28 20:42:30 +00:00
Matthias Clasen
f5b53f1359 Change header too 2005-09-28 20:28:54 +00:00
Matthias Clasen
037e90b856 Return the attributes to make this function work as boxed copy function.
2005-09-28  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktexttag.c (gtk_text_attributes_ref): Return the attributes
	to make this function work as boxed copy function.  (#317455,
	Gustavo Carneiro)
2005-09-28 20:26:50 +00:00
Matthias Clasen
d52e81d599 Don't unref NULL. (#316828, Tor Lillqvist)
2005-09-28  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkclipboard.c (request_image_received_func): Don't unref
	NULL.  (#316828, Tor Lillqvist)
2005-09-28 20:06:08 +00:00
Tor Lillqvist
2f4eb8fdf4 Include <config.h>. (#317444, Kazuki Iwamoto)
2005-09-28  Tor Lillqvist  <tml@novell.com>

	* modules/input/imime.c: Include <config.h>. (#317444, Kazuki
	Iwamoto)
2005-09-28 16:03:11 +00:00
Federico Mena Quintero
72851a22cd Don't reload the current folder unnecessarily on ::map().
2005-09-27  Federico Mena Quintero  <federico@ximian.com>

	Don't reload the current folder unnecessarily on ::map().

	* gtk/gtkfilechooserprivate.h (ReloadState): New enum to represent
	the reloading state.
	(struct _GtkFileChooserDefault): Added a "reload_state" field.

	* gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_init):
	Initialize impl->reload_state.
	(gtk_file_chooser_default_map): Check the impl->reload_state; load
	a default folder if no folder has been set, or reload the current
	one only if we had been unmapped first.
	(gtk_file_chooser_default_update_current_folder): Set the
	reload_state to RELOAD_HAS_FOLDER.
	(gtk_file_chooser_default_unmap): Implement, and set the
	reload_state to RELOAD_WAS_UNMAPPED.
	(shortcuts_model_create): Don't call shortcuts_add_bookmarks()
	here; they'll get (re)loaded on ::map() anyway.

	* gtk/gtkfilechooserwidget.c
	(gtk_file_chooser_widget_constructor): Don't set a default folder here.

	* tests/autotestfilechooser.c (test_action_widgets): Don't take in
	a dialog; build it ourselves.
	(test_reload): New test to ensure that we don't load the default
	folder more than once, and that we reload it when
	unmapping/remapping.
	(get_impl_from_dialog): New utility function.
	(test_widgets_for_current_action): Use get_impl_from_dialog().
2005-09-27 23:57:09 +00:00
Federico Mena Quintero
58a2a79682 Mark the entry/exit of this function for profiling. (check_icon_theme):
2005-09-27  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c
	(gtk_file_chooser_default_constructor): Mark the entry/exit of
	this function for profiling.
	(check_icon_theme): Likewise.
	(change_icon_theme): Likewise.
	(settings_notify_cb): Likewise.
	(gtk_file_chooser_default_screen_changed): Likewise.
	(update_chooser_entry): If the selection is empty, clear the file
	name entry only if we are in CREATE_FOLDER mode.  In SAVE mode,
	nothing will be selected when the user starts typeahead in the
	treeview, and we don't want to clear the file name entry in that
	case --- the user could be typing-ahead to look for a folder name.
	Fixes bug #308332, patch by Jürg Billeter.
2005-09-27 21:33:24 +00:00
Matthias Clasen
aa79f94ac7 Pop below the entry if there's more free space below the entry than above.
* gtk/gtkentrycompletion.c (_gtk_entry_completion_resize_popup):
        Pop below the entry if there's more free space below the entry
        than above.  (#316948, Tommi Komulainen)
2005-09-27 04:48:53 +00:00
Federico Mena Quintero
e9465843db Do not create the save mode-specific widgets in the open modes, so that we
2005-09-26  Federico Mena Quintero  <federico@ximian.com>

	Do not create the save mode-specific widgets in the open modes, so
	that we don't carry their baggage around.

	* gtk/gtkfilechooserdefault.c
	(gtk_file_chooser_default_constructor): Don't create the
	save_widgets here.
	(save_widgets_create): Set the impl->save_widgets directly here,
	instead of passing the widgets back to the caller.  Also, pack
	them into the impl's box.
	(update_appearance): Create or destroy the save widgets as
	appropriate.  Set the action of the save_file_name_entry here.
	(shortcuts_add_current_folder): Set the active item in the
	save_folder_combo only if it exists.
	(gtk_file_chooser_default_set_property): Don't set the action of
	the save_file_name_entry here.
	(gtk_file_chooser_default_update_current_folder): Set the base
	folder of the save_file_name_entry only if the entry exists.
	(shortcuts_drag_data_received_cb): Cast the selection_data->data
	to (const char *) since that's what shortcuts_drop_uris() expects.
	(file_list_drag_data_received_cb): Likewise, for
	g_uri_list_extract_uris().
2005-09-27 01:34:24 +00:00
Tor Lillqvist
bca0cefe1c Set the shaped flag here, too. (#316871)
2005-09-26  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkwindow-win32.c (gdk_window_shape_combine_mask): Set
	the shaped flag here, too. (#316871)
	(gdk_window_shape_combine_region): Currently unimplemented, so
	don't do anything to the shaped flag here.
2005-09-26 20:59:31 +00:00
Matthias Clasen
4401280405 Fix #316871, reported by Dan Winship:
2005-09-26  Matthias Clasen  <mclasen@redhat.com>

	Fix #316871, reported by Dan Winship:

	* gdk/gdkwindow.h (struct _GdkWindowObject): Add a shaped flag.

	* gdk/x11/gdkwindow-x11.c (gdk_window_shape_combine_mask)
	(gdk_window_shape_combine_region): Set it here.

	* gdk/gdkwindow.c (gdk_window_invalidate_maybe_recurse): Don't
	remove the child area for shaped windows.
2005-09-26 20:27:44 +00:00
Matthias Clasen
938af0e4c3 Don't leak expander pixbufs. (#316946, Tommi Komulainen)
2005-09-23  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkcellrendererpixbuf.c (gtk_cell_renderer_pixbuf_finalize):
	Don't leak expander pixbufs.  (#316946, Tommi Komulainen)
2005-09-23 16:34:25 +00:00
Michael Natterer
080889e074 Renamed GtkCellRendererKeys to GtkCellRendererAccel to be consistent with
2005-09-22  Michael Natterer  <mitch@imendio.com>

	Renamed GtkCellRendererKeys to GtkCellRendererAccel to be
	consistent with GTK+ terminology:

	* gtk/gtkcellrendererkeys.[ch]
	* tests/testkeys.c: removed...

	* gtk/gtkcellrendereraccel.[ch]
	* tests/testaccel.c: ...and added.

	* gtk/Makefile.am
	* gtk/gtk.h
	* gtk/gtk.symbols
	* tests/Makefile.am: changed accordingly.
2005-09-22 16:33:50 +00:00
Matthias Clasen
155cfe3e9e Fix the documentation for the grab-broken-event signal, noticed by Damon
2005-09-22  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkwidget.c (gtk_widget_class_init): Fix the documentation
	for the grab-broken-event signal, noticed by Damon Chaplin.
2005-09-22 14:46:23 +00:00
Tor Lillqvist
67a0d5df3d Free return value from gdk_atom_name().
2005-09-21  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkselection-win32.c (gdk_selection_convert,
	gdk_text_property_to_text_list_for_display,
	gdk_text_property_to_utf8_list_for_display,
	gdk_win32_selection_add_targets,
	_gdk_win32_selection_convert_to_dib): Free return value from
	gdk_atom_name().
	(gdk_text_property_to_text_list_for_display): Drop GError variable
	that isn't actually used after being set.
2005-09-20 23:08:18 +00:00
Johan Dahlin
a8a097c08f Mention NULL in documentation.
* gtk/gtkentry.c (gtk_entry_set_completion): Mention NULL in
    documentation.
2005-09-20 15:20:11 +00:00
Tor Lillqvist
d46d791df0 Do return the correct owner for CLIPBOARD (i.e., the owner of the Windows
2005-09-20  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkselection-win32.c
	(gdk_selection_owner_get_for_display): Do return the correct owner
	for CLIPBOARD (i.e., the owner of the Windows Clipboard, if it is
	a window GDK knows about). The reason to return NULL seems to have
	gone when in the fix for bug #163702 the artificial
	GDK_SELECTION_CLEAR event generation was removed from
	gdk_selection_send_notify_for_display(). Fixes bug #316552.
2005-09-20 07:59:19 +00:00
Matthias Clasen
cd63ed1eb4 *** empty log message *** 2005-09-20 05:28:34 +00:00
Matthias Clasen
9b64ff7f38 More typo fixes 2005-09-19 18:56:55 +00:00
Matthias Clasen
a3b850377f Fix a typo in the docs. (#316419, Guillaume Cottenceau)
2005-09-19  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkiconview.c (gtk_icon_view_scroll_to_path): Fix a typo in the docs.  (#316419,
	Guillaume Cottenceau)
2005-09-19 18:55:02 +00:00
Matthias Clasen
0480e1298a Use g_list_nth_data() instead of g_list_nth()->data in multiple places to
2005-09-19  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkiconview.c: Use g_list_nth_data() instead of g_list_nth()->data
	in multiple places to avoid segfaults if the index is out of range.
	(#316422, Guillaume Cottenceau)
2005-09-19 18:36:04 +00:00