Commit Graph

11210 Commits

Author SHA1 Message Date
Behdad Esfahbod
6141b63749 Bug 569635 – fontchooser should reload list of families/styles on theme
2009-02-01  Behdad Esfahbod  <behdad@gnome.org>

        Bug 569635 – fontchooser should reload list of families/styles on
        theme change

        * gtk/gtkfontsel.c (gtk_font_selection_class_init),
        (gtk_font_selection_init), (gtk_font_selection_finalize),
        (gtk_font_selection_ref_family), (gtk_font_selection_ref_face),
        (gtk_font_selection_reload_fonts),
        (gtk_font_selection_screen_changed),
        (gtk_font_selection_style_set),
        (gtk_font_selection_scroll_to_selection),
        (gtk_font_selection_scroll_on_map),
        (gtk_font_selection_select_font),
        (gtk_font_selection_show_available_fonts),
        (gtk_font_selection_show_available_styles),
        (gtk_font_selection_select_style),
        (gtk_font_selection_select_font_desc),
        (gtk_font_selection_set_font_name):
        Reload Pango families and faces in style_set.  Installing/uninstalling
        fonts shows up immediately in an open font chooser now.  


svn path=/trunk/; revision=22269
2009-02-01 05:26:54 +00:00
Matthias Clasen
17f8a2c23a Bug 162726 – Multiple Latin layouts in XKB break keyboard shortcuts
* gtk/gtkkeyhash.c (_gtk_key_hash_lookup): Change the handling of
        fuzzy matches: As long there are any exact matches, only exact
        matches are returned. If there are no exact matches, fuzzy matches
        will be returned, as long as they are not shadowing a possible exact
        match. This means that fuzzy matches won't be considered if their
        keyval is present in the current group. Problem reported by
        many people, patch by Simos Xenitellis.


svn path=/trunk/; revision=22266
2009-01-31 20:32:06 +00:00
Matthias Clasen
fd1ba235fb Updates
svn path=/trunk/; revision=22265
2009-01-31 19:58:32 +00:00
Fridrich Strba
eef208fcf9 allow static jasper gdk-pixbuf loader
svn path=/trunk/; revision=22264
2009-01-31 11:41:12 +00:00
Matthias Clasen
e380d4143d Be more careful with the beeps
svn path=/trunk/; revision=22262
2009-01-31 05:52:58 +00:00
Matthias Clasen
dbb97978a8 Avoid a compiler warning. Patch by Magnus Boman.
* gtk/gtkrecentchooser.c (gtk_recent_chooser_set_use_action_appearance):
        Avoid a compiler warning. Patch by Magnus Boman.



svn path=/trunk/; revision=22261
2009-01-31 02:28:40 +00:00
Matthias Clasen
6a8c49a43e Make sure we queue at least one resize. This fixes a problem with
* gtk/gtktoolbar.c (slide_idle_handler): Make sure we queue
        at least one resize. This fixes a problem with toolitems remaining
        invisible when they shouldn't that was reported by Christian Weiske.


svn path=/trunk/; revision=22260
2009-01-31 02:21:27 +00:00
Matthias Clasen
0eb4425c39 Always show images.
* gtk/gtkrecentchoosermenu.c (gtk_recent_chooser_menu_create_item):
        Always show images.


svn path=/trunk/; revision=22259
2009-01-31 02:17:00 +00:00
Tor Lillqvist
3f4c73d0d5 Bug 559408 - Transparency lost when images are copied between GTK+ and the
2009-01-29  Tor Lillqvist  <tml@novell.com>

	Bug 559408 - Transparency lost when images are copied between GTK+
	and the clipboard on Windows

	The code in gdkselection-win32.c is simplified quite a lot. When
	an image is stored on the clipboard from GTK+, only the "PNG" and
	CF_DIB formats are advertised. PNG is our preferred format because
	it can losslessly represent any image that gdk-pixbuf can handle,
	even with alpha, unambiguously. CF_DIB is also advertised because
	of its ubiquitous support in Windows software.

	Delayed rendering is used as before, so for other data than text
	nothing is actually stored on the clipboard until some app asks
	for it.

	It's pointless to advertise images formats like "image/png" or
	"image/x-MS-bmp" that no other Windows application is going to
	look for anyway. Likewise it's pointless to store text under
	formats like "text/plain" or "UTF8_STRING". Just store
	CF_UNICODETEXT. CF_TEXT will be available as a synthesized format
	anyways.

	Office 2007 offers and asks for images in PNG format using the
	registered clipboard format name "PNG", so we do likewise. If the
	"PNG" format is available that is preferred when copying to GTK+
	from the clipboard.

	Unfortunately Word 2007 still uses CF_DIB without handling
	alpha. But PowerPoint 2007 uses PNG if available and handles alpha
	correctly. Both Word and Powerpoint offer PNG with alpha nicely.

	Firefox and IE7 offer images that contain alpha as 32-bit version
	3 BI_RGB DIBs with the undocumented "extra" bytes actually being
	alpha. Also, alpha is premultiplied into the RGB bytes, presumably
	because that is how AlphaBlend() wants such DIBs. That is also
	taken care of. At least for Firefox it easy to be sure that a
	CF_DIB on the clipboard is from Firefox.

	Also some general stylistic cleanup, comment improvements, and
	improvements of debugging printout especially in the clipboard
	handling. Those are not detailled below.

	* gdk/win32/gdkprivate-win32.h
	* gdk/win32/gdkglobals-win32.c
	* gdk/win32/gdkgmain-win32.c: Move some globals that were used
	only in gdkselection-win32.c to be local to that file.

	* gdk/win32/gdkproperty-win32.c (gdk_property_change): Don't
	bother checking if text to be placed on the clipboard consists of
	only ASCII.

	* gdk/win32/gdkselection-win32.c: Add static variables for a list
	of GdkPixbuf-supported formats, well-known registered clipboard
	formats for images, and for GdkAtoms for well-known image and text
	formats.

	(_gdk_win32_selection_init): Initialize above static variables.

	(selection_property_store) (gdk_selection_property_get)
	(_gdk_selection_property_delete): Don't use a FIFO of GdkSelProps
	for a window after all, it breaks testtext. See bug #163844.

	(gdk_selection_convert): When converting to the TARGETS format,
	i.e. when the caller wants to know what clipboard formats are
	available, if PNG is available we report just that and skip
	CF_DIB, JPEG and GIF even if advertised.

	If CF_UNICODETEXT is available, report only UTF8_STRING.

	When converting to the UTF8_STRING format, i.e. when the caller
	wants text from the clipboard, try just CF_UNICODETEXT. There is
	no point in trying CF_TEXT as Windows will synthesize
	CF_UNICODETEXT from CF_TEXT anyway, if some app has stored just
	CF_TEXT.

	When converting to the image/bmp format, i.e. when the caller
	wants an CF_DIB image from the clipboard, we check if the DIB is a
	version 3 32-bit BI_RGB one that is likely to actually contain
	alpha in the "extra" bytes. Such a DIB is likely to have
	premultiplied alpha even, at least in the case of Firefox 3 and
	IE7. We then edit the DIB in-place into a version 5 one in
	BI_BITFIELDS format and undo the alpha premultiplication.

	In any case, prepend a BMP file header before letting go of the
	data which will be fed to the gdk-pixbuf bmp loader by upper
	levels.

	(gdk_win32_selection_add_targets): If some kind of pixmap image
	format is being added, actually advertise just PNG and
	CF_DIB. Note that alpha won't be stored on the clipboard through
	CF_DIB. This is because gdk-pixbuf's bmp loader doesn't save
	alpha. Furthermore, few if any non-GTK+ Windows apps seem to
	understand a version 5 DIB with proper alpha anyway.

	(_gdk_win32_selection_convert_to_dib): Simplified muchly.



svn path=/trunk/; revision=22255
2009-01-30 01:16:47 +00:00
Tor Lillqvist
934014af3d Bug 145058 - Inputting "^^" requires four keystrokes on Win32, differs
2009-01-29  Tor Lillqvist  <tml@novell.com>

	Bug 145058 - Inputting "^^" requires four keystrokes on Win32,
	differs from platform default behaviour

	* gtk/gtkimcontextsimple.c
	(check_win32_special_case_after_compact_match): New
	function. Called from check_compact_table() after a table-based
	match has committed a character. In case there was two identical
	dead accents in the input, another copy of the spacing accent that
	was already committed is committed. This fixes #145058.

	(check_win32_special_cases): New function. Called first from
	gtk_im_context_simple_filter_keypress(). This fixes another
	problem: a dead accent followed by a space should commit the
	corresponding spacing accent. The compose tables from X commit
	another character in two cases and we want to override that on
	Windows.

	Add GTK_NOTE (MISC) debugging output to this code.


svn path=/trunk/; revision=22253
2009-01-29 13:43:42 +00:00
Claudio Saavedra
6f468ac715 Bug 569435 – make maintainer-clean removes non-generated sources
2009-01-29  Claudio Saavedra  <csaavedra@igalia.com>

	Bug 569435 – make maintainer-clean removes non-generated sources

	* gdk/Makefile.am: Do not remove gdkprivate.h and gdkwindowimpl.h
	during make maintainer-clean, as these files are not generated.


svn path=/trunk/; revision=22248
2009-01-29 07:35:33 +00:00
Philip Withnall
b33a3d925e Small documentation fix.
2009-01-28  Philip Withnall  <philip@tecnocode.co.uk>

	* gtk/gtktreeview.c: Small documentation fix.


svn path=/trunk/; revision=22247
2009-01-28 20:35:35 +00:00
Matthias Clasen
8437d89566 Fix alignment and icons in spin buttons
svn path=/trunk/; revision=22242
2009-01-27 19:22:56 +00:00
Matthias Clasen
5cbb3eae97 Add bug ref
svn path=/trunk/; revision=22241
2009-01-27 15:08:28 +00:00
Matthias Clasen
8626d2ffa9 Don't chain up blindly
svn path=/trunk/; revision=22240
2009-01-27 14:59:53 +00:00
Matthias Clasen
bf8c7774f1 Bump version
svn path=/trunk/; revision=22233
2009-01-27 05:53:32 +00:00
Matthias Clasen
b447ac1be4 2.15.2
svn path=/trunk/; revision=22231
2009-01-27 05:51:23 +00:00
Matthias Clasen
9e86472a65 Bug 322932 – Always show icons on panel menus
* gtk/gtk.symbols:
        * gtk/gtkimagemenuitem.[hc]: Add a property to override the
        show-menu-images setting for individual menuitems. Patch by
        William Jon McCann.


svn path=/trunk/; revision=22230
2009-01-27 03:56:03 +00:00
Matthias Clasen
2d0c9e81be Activate the action in a regular clicked handler instead of the default
* gtk/gtkbutton.c: Activate the action in a regular clicked
        handler instead of the default handler, to make it work with
        derived classes which don't chain up their clicked handler.


svn path=/trunk/; revision=22227
2009-01-27 02:55:02 +00:00
Matthias Clasen
67273372cd Add bug ref
svn path=/trunk/; revision=22226
2009-01-27 01:22:29 +00:00
Matthias Clasen
95caf23ddd Block the previous action when calling reset() to prevent accidental
* gtk/gtkactivatable.c (gtk_activatable_do_set_related_action):
        Block the previous action when calling reset() to prevent
        accidental activation of the previous action.

        * gtk/gtkaction.c (gtk_action_activate): Don't compare booleans.

        * gtk/gtktoggleaction.c (gtk_toggle_action_set_active): Remove
        extraneous braces.


svn path=/trunk/; revision=22225
2009-01-27 00:25:21 +00:00
Bastien Nocera
b7d09a2750 Bug 569240 - Crasher when using markers
2009-01-26  Bastien Nocera  <hadess@hadess.net>

	Bug 569240 - Crasher when using markers

	* gtk/gtkrange.c (gtk_range_destroy): Avoid crashes when destroying
	a GtkRange with markers


svn path=/trunk/; revision=22224
2009-01-26 20:47:00 +00:00
Richard Hult
14f26357e1 Bug 566628 – gdk_display_close always asserts on win32 and quartz
2009-01-26  Richard Hult  <richard@imendio.com>

	Bug 566628 – gdk_display_close always asserts on win32 and quartz

	* gdk/quartz/gdkdisplay-quartz.c
	(_gdk_windowing_set_default_display): Copy fix for bug #566628
	from the win32 backend: Allow also a NULL parameter in the
	g_assert().

svn path=/trunk/; revision=22223
2009-01-26 20:31:18 +00:00
Matthias Clasen
49061dd178 More action-related fixes
svn path=/trunk/; revision=22218
2009-01-26 03:01:01 +00:00
Matthias Clasen
cea413caa1 Set draw-as-radio to TRUE
svn path=/trunk/; revision=22217
2009-01-25 23:54:27 +00:00
Matthias Clasen
b9905c8fb5 Revert changes for bug 567124. Instead of trying to avoid
setting up the im context before the widget is realized, just
        reset it when the client window is set.

        * gtk/gtkimmulticontext.c: Reset the slave when a client window
        is set.

        * gtk/gtkimmodule.c
        * gtk/gtktextview.c: Revert changes for bug 567124.

svn path=/trunk/; revision=22214
2009-01-25 03:38:27 +00:00
Claudio Saavedra
08b4777ae6 Use gtk-doc syntax to refer to properties in the docstrings.
2009-01-25  Claudio Saavedra  <csaavedra@igalia.com>

	* gtk/gtktreeview.c: Use gtk-doc syntax to refer to properties in
	the docstrings.


svn path=/trunk/; revision=22213
2009-01-24 22:54:53 +00:00
Claudio Saavedra
2fa86adfe3 More docstrings improvements regarding reorderable property.
2009-01-25  Claudio Saavedra  <csaavedra@igalia.com>

	* gtk/gtkiconview.c: More docstrings improvements
	regarding reorderable property.


svn path=/trunk/; revision=22212
2009-01-24 22:42:05 +00:00
Claudio Saavedra
42f7d03907 Bug 559420 – gtk_icon_view_enable_model_drag_[source|dest] docs wrt.
2009-01-24  Claudio Saavedra  <csaavedra@igalia.com>

	Bug 559420 – gtk_icon_view_enable_model_drag_[source|dest] docs
	wrt. reorderable property

	* gtk/gtkiconview.c: Improve docstrings regarding reorderable
        property. Based on a patch by Björn Lindqvist.


svn path=/trunk/; revision=22211
2009-01-24 22:22:35 +00:00
Matthias Clasen
1db176de7f Fallback from stock ids to icon names like the old GtkAction code did
svn path=/trunk/; revision=22210
2009-01-24 22:00:07 +00:00
Matthias Clasen
a8c2a3eb9f Test icon names in actions with toolitems
svn path=/trunk/; revision=22209
2009-01-24 21:53:29 +00:00
Matthias Clasen
a576e0c9fa Don't update blank cursors
svn path=/trunk/; revision=22208
2009-01-24 21:29:36 +00:00
Claudio Saavedra
758cb60ee4 improve ::search-column property description.
2009-01-24  Claudio Saavedra  <csaavedra@igalia.com>

	* gtk/gtktreeview.c: (gtk_tree_view_class_init):
	improve ::search-column property description.


svn path=/trunk/; revision=22207
2009-01-24 21:00:12 +00:00
Matthias Clasen
1c1002c77d bump version
svn path=/trunk/; revision=22204
2009-01-23 23:05:41 +00:00
Matthias Clasen
3bb7c153f8 2.15.1
svn path=/trunk/; revision=22202
2009-01-23 23:03:59 +00:00
Matthias Clasen
d0113d2712 Doc fixes
svn path=/trunk/; revision=22201
2009-01-23 17:51:15 +00:00
Matthias Clasen
1c4e394b48 Fix the section docs
svn path=/trunk/; revision=22199
2009-01-23 17:29:11 +00:00
Matthias Clasen
33d5c3d696 Fix pltcheck issues
svn path=/trunk/; revision=22198
2009-01-23 17:10:08 +00:00
Matthias Clasen
6e0378f8e1 Updates
svn path=/trunk/; revision=22196
2009-01-23 15:46:12 +00:00
Matthias Clasen
bb72b647f6 i Bug 560228 – Add "action-controller" property to GtkWidgetClass
Rework the way actions and proxies interact, to make the
        interaction less ad hoc, more extensible, and better suited
        for support in GUI builders like glade.

        To be used as a proxy, a widget must now implement the
        GtkActivatable interface, and GtkActivatable implementations
        are responsible for syncing their appearance with the action
        and for activating the action.

        All the widgets that are commonly used as proxies implement
        GtkActivatable now.

        Patch by Tristan van Berkom.

        * gtk/gtkactivatable.[hc]: The GtkActivatable interface.

        * gtk/gtkbutton.c:
        * gtk/gtktogglebutton.c:
        * gtk/gtktoolitem.c:
        * gtk/gtktoolbutton.c:
        * gtk/gtktoggletoolbutton.c:
        * gtk/gtkmenuitem.c:
        * gtk/gtkcheckmenuitem.c:
        * gtk/gtkimagemenuitem.c:
        * gtk/gtkradiomenuitem.c:
        * gtk/gtkrecentchooserprivate.h:
        * gtk/gtkrecentchooser.c:
        * gtk/gtkrecentchooserdefault.c:
        * gtk/gtkrecentchoosermenu.c: Implement GtkActivatable.
        * gtk/gtkaction.[hc]: Move appearance synchronization to
        GtkActivatable implementations.

        * gtk/gtkradioaction.c:
        * gtk/gtkrecentaction.c:
        * gtk/gtktoggleaction.c:
        * gtk/gtkactiongroup.c: Adapt.

        * gtk/gtk.h: Include gtkactivatable.h
        * gtk/gtk.symbols: Add new functions


svn path=/trunk/; revision=22195
2009-01-23 15:15:28 +00:00
Matthias Clasen
280eeb02e1 Don't set up im stuff if the widget is not realized.
* gtk/gtktextview.c: Don't set up im stuff if the widget
        is not realized.

        * gtk/gtkimmodule.c: Assert that we have a window.


svn path=/trunk/; revision=22193
2009-01-23 06:04:05 +00:00
Matthias Clasen
a220373a55 Skip Desktop if it equals the home folder
svn path=/trunk/; revision=22192
2009-01-23 06:00:44 +00:00
Matthias Clasen
4569b49bed Keep GtkPlug in sync with the global list of toplevels.
Patch by Federico Mena Quintero

        * gtk/gtkwindow.h:
        * gtk/gtkwindow.c (_gtk_window_set_is_toplevel): New internal
        function used when a GtkPlug parents/unparents itself by an
        in-process GtkSocket.  This keeps the plug's GTK_TOPLEVEL flag in
        sync with the global toplevel_list.

        * gtk/gtkplug.c (gtk_plug_set_is_child): Call
        _gtk_window_set_is_toplevel() to keep the toplevel list updated,
        instead of just setting/unsetting the GTK_TOPLEVEL flag.


svn path=/trunk/; revision=22191
2009-01-23 05:57:36 +00:00
Matthias Clasen
5c99971a67 Fix typos
svn path=/trunk/; revision=22190
2009-01-23 05:54:02 +00:00
Matthias Clasen
5c317ec762 Bug 567761 – Spellfixes in GTK+ documentation
* gdk/x11/gdkselection-x11.c:
        * gtk/gtktestutils.c: Fix typos in the docs.


svn path=/trunk/; revision=22189
2009-01-23 05:51:25 +00:00
Matthias Clasen
b71609e23e Improve docs
svn path=/trunk/; revision=22188
2009-01-23 05:43:45 +00:00
Matthias Clasen
379822c74b Use a different approach to snapshotting that is in line with what is done
* gtk/gtkwidget.c (gtk_widget_get_snapshot): Use a different approach
        to snapshotting that is in line with what is done in the client-side
        windows branch, and that works for widgets regardless if they are
        double-buffered or not. Patch by Alex Larsson.

        * gdk/gdkwindow.c (_gdk_window_calculate_full_clip_region): Clip
        to the parent.


svn path=/trunk/; revision=22187
2009-01-23 05:34:14 +00:00
Federico Mena Quintero
ba54644c38 GtkFileChooserEntry: handle slow folders by not autocompleting when the cursor is not at the end of the text
2009-01-22  Federico Mena Quintero  <federico@novell.com>

	* gtk/gtkfilechooserentry.c (autocomplete): Relax the assertion;
	just do nothing if the folder is not loaded or if the cursor position
	is not at the end of the text.  A very slow-to-load folder can get
	us into the latter state if the user starts typing first.

Signed-off-by: Federico Mena Quintero <federico@novell.com>

svn path=/trunk/; revision=22186
2009-01-23 01:52:36 +00:00
Matthias Clasen
0b2554da86 Revert the previous change
svn path=/trunk/; revision=22185
2009-01-23 01:45:46 +00:00
Federico Mena Quintero
7fde4a8542 GtkFileChooserEntry: fix the computation of 'complete but not unique' and appending a '/' to unique directory names
2009-01-22  Federico Mena Quintero  <federico@novell.com>

	Fix the computation of "complete but unique" in
	GtkFileChooserEntry.  Fix the case where "/" was not appended to a
	unique directory name during explicit Tab completion.

	* gtk/gtkfilechooserentry.c (maybe_append_separator_to_file):
	Return whether anything was appended as well as the new string
	itself.
	(find_common_prefix): Oops, only turn on
	is_complete_not_unique_ret if we had a unique match!
	(append_common_prefix): If we appended a directory separator, we
	*did* expand the common prefix, so we are not in the "nothing
	inserted" case.

Signed-off-by: Federico Mena Quintero <federico@novell.com>

svn path=/trunk/; revision=22184
2009-01-23 00:55:07 +00:00
Federico Mena Quintero
a8b06ad561 Comments for translators on the file chooser entry's completion feedback
(start_explicit_completion): Add comments for translators, to
	explain the purpose of the various feedback messages used during
	completion.

Signed-off-by: Federico Mena Quintero <federico@novell.com>

svn path=/trunk/; revision=22183
2009-01-23 00:54:52 +00:00
Federico Mena Quintero
cabc9f7f5c Pass refresh errors from the very bottom of the loading sequence up to the top
(start_loading_current_folder): Check if the folder to be loaded
	is non-native for the local_only=TRUE case; if so, return an error
	as we are configured to load only local folders.
	(reload_current_folder): Pass on errors from
	start_loading_current_folder().  Tighten the preconditions, as we
	are sure that we can only receive non-NULL folder-files to load.
	(refresh_current_folder_and_file_part): Pass on errors from
	reload_current_folder().  At the very end, assert the invariant
	described above.

Signed-off-by: Federico Mena Quintero <federico@novell.com>

svn path=/trunk/; revision=22182
2009-01-23 00:54:37 +00:00
Federico Mena Quintero
7ba4268d6b Factor out function to discard the loading process and the current folder file
(discard_loading_and_current_folder_file): Factor out function to
	cancel the cancellable and discard the current_folder_file,
	i.e. to reset the invariant to the "nothing valid is loaded" case.
	(gtk_file_chooser_entry_dispose): Use
	discard_loading_and_current_folder_file().
	(reload_current_folder): Likewise.
	(refresh_current_folder_and_file_part): Likewise, and ensure that
	the error cases result in the invariant being held.

Signed-off-by: Federico Mena Quintero <federico@novell.com>

svn path=/trunk/; revision=22181
2009-01-23 00:54:22 +00:00
Federico Mena Quintero
fe636e4be2 Process the result of refreshing the folder during autocompletion
(start_autocompletion): Process the result from refresh...().  We
	only do completion in the REFRESH_OK case.  For the error cases,
	we don't do anything, as this is autocompletion and must not
	result in non-asked-for errors popping up.

Signed-off-by: Federico Mena Quintero <federico@novell.com>

svn path=/trunk/; revision=22180
2009-01-23 00:54:08 +00:00
Federico Mena Quintero
c1205bbbb9 Don't handle errors when committing the completion
(commit_completion_and_refresh): Don't do anything with the result
	of refresh...(), since this function doesn't get called during
	completion-related interaction.

Signed-off-by: Federico Mena Quintero <federico@novell.com>

svn path=/trunk/; revision=22179
2009-01-23 00:53:53 +00:00
Federico Mena Quintero
65cd4f8df4 Process the result of refreshing the folder during explicit completion
(start_explicit_completion): Process the result from
	refresh...().  Here we present the actual feedback about only
	being able to display local folders for local_only=TRUE.

Signed-off-by: Federico Mena Quintero <federico@novell.com>

svn path=/trunk/; revision=22178
2009-01-23 00:53:38 +00:00
Federico Mena Quintero
2dd7cf4926 Return an error code when refreshing the entry from the user's input
2009-01-22  Federico Mena Quintero  <federico@novell.com>

	Return an error code when refreshing the entry from the user's
	input.  We use this in the completion code to know when completion
	can't happen due to (for example) having a non-local URI in a file
	chooser that is local_only=TRUE.

	Also, we start maintaining an invariant that
	chooser_entry->current_folder_file != NULL implies that:

		* what the user entered is valid

		* we are loading that folder (chooser_entry->load_folder_cancellable != NULL)

		* or we are done loading that folder, or we have a handle
		to it at least (chooser_entry->current_folder != NULL)

	The invariant also says that all of the above are NULL (and
	chooser_entry->current_folder_file == NULL) implies that the user
	typed something invalid.  This makes
	_gtk_file_chooser_entry_get_current_folder() not able to return
	an invalid folder.

	* gtk/gtkfilechooserentry.c (RefreshStatus): New enum.
	(refresh_current_folder_and_file_part): Return a RefreshStatus.
	We filter out incomplete hostnames here (typing
	"sftp://incompl[tab]" will error out), as well as completely
	unparsable input.

Signed-off-by: Federico Mena Quintero <federico@novell.com>

svn path=/trunk/; revision=22177
2009-01-23 00:53:23 +00:00
Matthew Barnes
ed48b5bca3 Bug 568334 – Constructor properties for GtkAction
2009-01-22  Matthew Barnes  <mbarnes@redhat.com>

	Bug 568334 – Constructor properties for GtkAction

	* gtk/gtkaction.c (gtk_action_class_init): Make all properties
	G_PARAM_CONSTRUCT except "action-group".


svn path=/trunk/; revision=22175
2009-01-22 18:00:48 +00:00
Michael Natterer
374fa4bb4a g_return_if_fail() on icon_name != NULL so we get a warning instead of a
2009-01-22  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkicontheme.c (gtk_icon_theme_has_icon): g_return_if_fail()
	on icon_name != NULL so we get a warning instead of a crash here.


svn path=/trunk/; revision=22174
2009-01-22 15:15:40 +00:00
Matthias Clasen
95b80b21ea Updates
svn path=/trunk/; revision=22170
2009-01-22 00:35:16 +00:00
Matthias Clasen
78b2971d6e Don't show nonexisting windows
svn path=/trunk/; revision=22169
2009-01-22 00:34:30 +00:00
Matthias Clasen
52f0975370 Implement select-by-words for selectable labels
svn path=/trunk/; revision=22168
2009-01-22 00:33:54 +00:00
Matthias Clasen
d2367d9403 Change the Caps Lock warning to the more neutral "Caps Lock is on".
009-01-21  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkentry.c: Change the Caps Lock warning to the more
        neutral "Caps Lock is on". Requested by Wouter Bolsterlee


svn path=/trunk/; revision=22166
2009-01-21 21:15:19 +00:00
Tor Lillqvist
1948867311 Rename static local functions and variables to not have any unnecessary _
2009-01-21  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkcursor-win32.c: Rename static local functions and
	variables to not have any unnecessary _ or _gdk_win32 prefix.

	* gdk/win32/gdkcursor-win32.c (hcursor_from_type): Implement
	creating a GDK_BLANK_CURSOR.


svn path=/trunk/; revision=22165
2009-01-21 20:51:22 +00:00
Matthias Clasen
579f457c78 Bug 568552 – gtk_combo + gtk entry in invisible mode takes 100% cpu
* gtk/gtkentry.c: Fix an expose loop caused by raising windows out
        of an expose handler. Also, don't show the 'Caps Lock' warning for
        activated input methods, since that makes it permanently shown
        for some locales. It should not be that necessary, now that we
        do show preedit text even in password entries. Pointed out by
        Frederic Crozat.


svn path=/trunk/; revision=22164
2009-01-21 20:09:49 +00:00
Federico Mena Quintero
c6f4b327e6 GtkFileChooser: only set local_only on the location entry if it exists
2009-01-21  Federico Mena Quintero  <federico@novell.com>

	* gtk/gtkfilechooserdefault.c (save_widgets_create): Set
	local_only on the location entry when we create it...
	(set_local_only): ... and set it here only if the location entry
	exists.

Signed-off-by: Federico Mena Quintero <federico@novell.com>

svn path=/trunk/; revision=22163
2009-01-21 19:12:58 +00:00
Marek Kasik
6dbb29a5d4 Bug 561801 - "scheduled printing" doesn't function as expected
2009-01-21  Marek Kasik  <mkasik@redhat.com>
	Bug 561801 - "scheduled printing" doesn't function as expected

	* gtk/gtkprintunixdialog: Add tooltip.
	* modules/printbackends/cups/gtkprintbackendcups.c: Add conversion
	  from local time to utc time for scheduled printing.

svn path=/trunk/; revision=22158
2009-01-21 15:03:14 +00:00
Federico Mena Quintero
e4bc68ba04 Don't do completion in the middle of an incomplete hostname
Fix completion so it doesn't pop up for every character in a URI
	hostname:

	* gtk/gtkfilechooser.h (GtkFileChooserError): Add a
	GTK_FILE_CHOOSER_ERROR_INCOMPLETE_HOSTNAME.

	* gtk/gtkfilesystem.c (_gtk_file_system_parse): Return an
	"incomplete hostname" error if the user has not typed a full
	hostname yet in an URI.

	* gtk/gtkfilechooserentry.c (append_common_prefix): If we get an
	incomplete hostname, just don't pop up an error, since that is a
	transient state and the user doesn't need to be notified about it.
	(refresh_current_folder_and_file_part): Don't revert to showing
	the base folder if we have an incomplete hostname.
	(reload_current_folder): Handle the passed folder being NULL, even
	if we must force a reload.  Also, reload the folder if we didn't
	have a cancellable for it (i.e. we hadn't started to load it
	before).

Signed-off-by: Federico Mena Quintero <federico@novell.com>

svn path=/trunk/; revision=22157
2009-01-21 03:17:01 +00:00
Federico Mena Quintero
2c07a59e54 Add a local_only property to GtkFileChooserEntry
Patch by Carlos Garnacho <carlos@imendio.com> - add a local_only
	property to GtkFileChooserEntry:

	* gtk/gtkfilechooserentry.c (struct _GtkFileChooserEntry): Add a
	local_only field.
	(_gtk_file_chooser_entry_init): Default to local_only being true.
	(start_explicit_completion): Don't allow completion of non-native
	files if local_only is turned on.
	(start_loading_current_folder): Don't start loading non-native
	folders if local_only is turned on.
	(_gtk_file_chooser_entry_set_local_only): New function.
	(_gtk_file_chooser_entry_get_local_only): New function.

	* gtk/gtkfilechooserentry.h (_gtk_file_chooser_entry_set_local_only,
	_gtk_file_chooser_entry_get_local_only): New prototypes.

	* gtk/gtkfilechooserdefault.c (set_local_only): Set the local_only
	property on the entry.

Signed-off-by: Federico Mena Quintero <federico@novell.com>

svn path=/trunk/; revision=22156
2009-01-21 03:16:46 +00:00
Federico Mena Quintero
92ec0276fc Factor out code to discard the current_folder
Patch by Carlos Garnacho <carlos@imendio.com>:

* gtk/gtkfilechooserentry.c (discard_current_folder): New
function, factored out for when we need to get rid of the
current_folder.
(gtk_file_chooser_entry_dispose): Use discard_current_folder().
(finished_loading_cb): Fix prototype.
(load_directory_get_folder_callback): Discard the completion
store, as well as clearing the completion feedback, if we find an
error while loading the folder.  Also, use
discard_current_folder().
(reload_current_folder): Use discard_current_folder().

Signed-off-by: Federico Mena Quintero <federico@novell.com>

svn path=/trunk/; revision=22155
2009-01-21 03:16:28 +00:00
Federico Mena Quintero
9f62525f2b bgo545980 - parse URIs in GtkFileChooserEntry
2009-01-15  Federico Mena Quintero  <federico@novell.com>

	http://bugzilla.gnome.org/show_bug.cgi?id=545980 -
	GtkFileChooserEntry should handle URIs

	* gtk/gtkfilesystem.c (_gtk_file_system_parse): Detect URI schemes
	and parse the full URI.
	(has_uri_scheme): New function, stolen from the old
	gtkfilesystemgnomevfs.c.

Signed-off-by: Federico Mena Quintero <federico@novell.com>

svn path=/trunk/; revision=22154
2009-01-21 03:16:13 +00:00
Matthias Clasen
3f18507222 Add setters and getters for GtkAction properties, in preparation for bug
* gtk/gtk.symbols:
        * gtk/gtkaction.[hc]: Add setters and getters for GtkAction
        properties, in preparation for bug 560228.


svn path=/trunk/; revision=22153
2009-01-21 02:53:45 +00:00
Christian Dywan
a8cc721e7c Bug 567413 – GtkComboBoxEntry doesn't emit "changed" signal on entry
2009-01-21  Christian Dywan  <christian@twotoasts.de>

	Bug 567413 – GtkComboBoxEntry doesn't emit "changed" signal
        on entry editing

	* gtk/gtkcombobox.c (gtk_combo_box_set_active): Return only if index
        is set. Patch by Carl-Anton Ingmarsson.

svn path=/trunk/; revision=22152
2009-01-21 00:03:00 +00:00
Torsten Schönfeld
71a975f69b Add a "Since: 2.16" tag to gtk_style_get.
svn path=/trunk/; revision=22151
2009-01-20 19:09:53 +00:00
Matthias Clasen
26490a2dd7 Bug 565656 – Add marks to scales
Bug 565656 – Add marks to scales

        * gtk/gtkrange.[hc]: Add internal api to define 'stop values'
        that have a little resistance when dragging the slider over it.

        * gtk/gtk.symbols:
        * gtk/gtkscale.[hc] (gtk_scale_add_mark): New function to add
        a 'mark' to a scale, which will draws a tick, plus optionally
        some text, and makes the value a stop value.
        (gtk_scale_clear_values): Removes all marks.

        * tests/testscale.c: Test for marks on scales
        * tests/Makefile.am: Integrate it


svn path=/trunk/; revision=22149
2009-01-20 05:10:27 +00:00
Matthias Clasen
b6b5237663 Replace several implementation of blank cursor setting by
* gtk/gtkentry.c:
        * gtk/gtkfilechooserentry.c:
        * gtk/gtktextview.c: Replace several implementation of
        blank cursor setting by GDK_BLANK_CURSOR.


svn path=/trunk/; revision=22148
2009-01-20 02:45:19 +00:00
Matthias Clasen
c98305ac00 Update docs on blank cursors
svn path=/trunk/; revision=22147
2009-01-20 02:27:57 +00:00
Matthias Clasen
1cba7387ce Cache cursors to avoid libXcursor theme lookup overhead.
Patch by David Alan Gilbert.

        * gdk/gdkcursor.h: Add a GDK_BLANK_CURSOR cursor type.

        * gdk/x11/gdkcursor-x11.c: Cache font cursors and named cursors.

        * gdk/x11/gdkprivate-x11.h:
        * gdk/x11/gdkcdisplay-x11.c: Remove cached cursors when a
        display if finalized.


svn path=/trunk/; revision=22145
2009-01-20 02:15:59 +00:00
Matthias Clasen
ab9348b98c Accept a type of TARGETS instead of ATOM, too. Based on a patch by Peng
* gtk/gtkselection.c (gtk_selection_data_get_targets): Accept
        a type of TARGETS instead of ATOM, too. Based on a patch by
        Peng Wu.


svn path=/trunk/; revision=22141
2009-01-19 05:15:57 +00:00
Matthias Clasen
3baf9b5e21 Correct some copy-and-paste mistakes in keybinding signal docs. Pointed
* gtk/gtkentry.c:
        * gtk/gtklabel.c:
        * gtk/gtktextview.c: Correct some copy-and-paste mistakes in
        keybinding signal docs. Pointed out by Pascal Terjan.


svn path=/trunk/; revision=22140
2009-01-19 05:01:35 +00:00
Matthias Clasen
92019f40eb Add properties and getters for icon tooltips.
* gtk/gtk.symbols:
        * gtk/gtkentry.[hc]: Add properties and getters for icon tooltips.


svn path=/trunk/; revision=22139
2009-01-18 20:22:10 +00:00
Matthias Clasen
4a949c0307 Solve the msgctxt problem a bit more elegantly, and add some hints about
* gtk/gtkstock.c: Solve the msgctxt problem a bit more
        elegantly, and add some hints about this to the docs of
        gtk_stock_set_translate_func. Proposed by Christian Persch


svn path=/trunk/; revision=22137
2009-01-18 19:00:18 +00:00
Matthias Clasen
6b38a991f5 Reinstate separate translation contexts for navigation and media labels
* gtk/gtkstock.c: Reinstate separate translation contexts for
        navigation and media labels (these were lost in the transition
        to msgctxt. Pointed out by Gabor Kelemen.


svn path=/trunk/; revision=22135
2009-01-18 18:40:06 +00:00
Matthias Clasen
85efb2bb61 Use the last chance to get the api right, and rename things for
* gtk/gtk.symbols:
        * gtk/gtkentry.[hc]: Use the last chance to get the api right,
        and rename things for consistency, requested by Murray Cumming.
        In detail,
        gtk_entry_get_stock -> gtk_entry_get_icon_stock
        gtk_entry_get_pixbuf -> gtk_entry_get_icon_pixbuf
        gtk_entry_get_gicon -> gtk_entry_get_icon_gicon
        gtk_entry_get_storage_type -> gtk_entry_get_icon_storage_type
        ::prelight -> ::icon-prelight
        ::pixbuf-primary -> ::primary-icon-pixbuf
        ::stock-primary -> ::primary-icon-stock
        ::icon-name-primary -> ::primary-icon-name
        ::gicon-primary-> ::primary-icon-gicon
        ::storage-type-primary -> ::primary-icon-storage-type
        ::activatable->primary -> ::primary-icon-activatable
        ::sensitive-primary -> ::primary-icon-sensitive
        (and similar for secondary properties)


svn path=/trunk/; revision=22134
2009-01-18 16:07:00 +00:00
Matthias Clasen
d4bef92ec2 Use "const gchar*" in new tooltip api. Pointed out by Torsten Schoenfeld.
* gtk/gtkstatusicon.h: Use "const gchar*" in new tooltip api.
        Pointed out by Torsten Schoenfeld.


svn path=/trunk/; revision=22133
2009-01-18 15:57:06 +00:00
Matthias Clasen
ade90af533 End the search if the window is closed.
* demos/gtk-demo/search_entry.c: End the search if the window
        is closed.

        * demos/gtk-demo/search_entry.c:
        * demos/gtk-demo/entry_completion.c: Group the entry examples
        under "Entry".


svn path=/trunk/; revision=22132
2009-01-18 15:50:29 +00:00
Christian Dywan
910aec47d9 Remove a redundant include from gtktoolbar.c
2009-01-18  Christian Dywan  <christian@twotoasts.de>

	Remove a redundant include from gtktoolbar.c

	* gtk/gtktoolbar.c: Remove second inclusion of gtktoolbar.h.
        Patch by Enrico Tröger.

svn path=/trunk/; revision=22130
2009-01-18 15:16:14 +00:00
Cody Russell
24a567924b Bug 567944 – [Win32] Sorted treeview columns can be unreadable
2009-01-16  Cody Russell  <bratsche@gnome.org>

        Bug 567944 – [Win32] Sorted treeview columns can be unreadable

        * modules/engines/ms-windows/msw_style.c: Draw selected treeview
        cells according to treeview focus, but ignore whether it is in
        a sorted column or not.  Otherwise the intersection of a selected
        row and a sorted column looks very strange if the treeview does
        not have focus.


svn path=/trunk/; revision=22126
2009-01-16 16:30:18 +00:00
Daniel Elstner
47aae53285 Remove the namespace prefix from functions defined locally only. Clean up
* modules/input/gtkimcontextmultipress.[ch]: Remove the namespace
prefix from functions defined locally only.  Clean up the code and
change indentation to match the GTK+ coding style.
(_GtkImContextMultipress::key_sequences): Replace array of pointers
by GHashTable.  Adapt the implementation accordingly.
(passthrough_enabled_for_window): Remove.  The passthrough hack is
no longer necessary thanks to the recently introduced "im-module"
property of GtkEntry and GtkTextView.
(load_config): Rework to implement an improved configuration file
format.  Just fetch all keys of the group instead of expecting the
keys to be named a certain way.  This also allows interpreting the
config key itself as the GDK key name to bind the character sequence
to, thereby making it independent of the sequence itself.

* modules/input/im-multipress.conf: New example configuration using
the new syntax.  The example sequences are now bound to the numeric
keypad and imitate the behavior of a standard mobile phone.

svn path=/trunk/; revision=22125
2009-01-16 15:02:06 +00:00
Murray Cumming
53097873ca documentation description: Mention the various properties and the
2009-01-15  Murray Cumming  <murrayc@murrayc.com>

* gtk/gtkimcontext.c: documentation description: Mention the various 
properties and the environment variable, with links to their 
 documentation.
* gtk/gtksettings.c:
* gtk/gtktextview.c: Make the im-module property documentation more 
expansive.

svn path=/trunk/; revision=22123
2009-01-15 16:53:27 +00:00
Diego Escalante Urrelo
649ac44dd9 Don't assume actions and results have equal height
This causes negative size requisitions when results are more than one
line tall.

* gtk/gtkentrycompletion.c: change the formula used to calculate
the size of the completion popup.

svn path=/trunk/; revision=22120
2009-01-15 09:51:07 +00:00
Federico Mena Quintero
d00b5cd3ee Load/save the file chooser's size
* gtk/gtkfilechooserdefault.c (save_dialog_geometry): New function.
	(settings_save): Save the dialog's geometry.
	(gtk_file_chooser_default_get_default_size): Load the geometry
	from the settings.  If it was already saved, return that instead
	of computing an ad-hoc size.

Signed-off-by: Federico Mena Quintero <federico@novell.com>

svn path=/trunk/; revision=22119
2009-01-14 20:19:10 +00:00
Federico Mena Quintero
d133ab3ac0 Don't clamp the restored size of the file chooser dialog
* gtk/gtkfilechooserdialog.c
	(file_chooser_widget_default_size_changed): Simply resize the
	dialog to the default size without any fancy clamping.  Also,
	leave in place ifdef-ed out code to restore the file chooser's
	position in addition to its size.  The code to restore the
	position doesn't quite work yet, but we'll leave it in as a
	reference.

Signed-off-by: Federico Mena Quintero <federico@novell.com>

svn path=/trunk/; revision=22118
2009-01-14 20:18:54 +00:00
Federico Mena Quintero
1d4694ec79 Avoid visibly resizing the file chooser at startup
* gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_map):
	Don't change the default size in ::map() so we don't flicker...
	(gtk_file_chooser_default_realize): ... so do it in ::realize()
	instead, when the window is not yet visible.  This avoids a
	dialog-that-resizes when you first pop up the file chooser.
	(emit_default_size_changed): Just emit the signal; don't check for
	the widget's state so we can be emitted during the initial
	::realize() when we are not mapped yet.
	(update_preview_widget_visibility): Only emit default_size_changed
	if the widget is not mapped, to avoid resizing the dialog while it
	is visible.

Signed-off-by: Federico Mena Quintero <federico@novell.com>

svn path=/trunk/; revision=22117
2009-01-14 20:18:40 +00:00
Federico Mena Quintero
b05fcd7e6b Add GtkFileChooserSettings for the dialog's geometry
2009-01-14  Federico Mena Quintero  <federico@novell.com>

	    Remember the file chooser's geometry across invocations.

	    * gtk/gtkfilechoosersettings.h (struct _GtkFileChooserSettings):
	    New fields geometry_x, geometry_y, geometry_width, geometry_height.
	    (_gtk_file_chooser_settings_get_geometry): New prototype.
	    (_gtk_file_chooser_settings_set_geometry): New prototype.

	    * gtk/gtkfilechoosersettings.c (GEOMETRY_X_KEY, GEOMETRY_Y_KEY,
	    GEOMETRY_WIDTH_KEY, GEOMETRY_HEIGTH_KEY): New key names.
	    (ensure_settings_read): Read the geometry keys.
	    (_gtk_file_chooser_settings_save): Save the geometry keys.
	    (_gtk_file_chooser_settings_init): Initialize the geometry keys to
	    "don't have this value".
	    (_gtk_file_chooser_settings_get_geometry): New public function.
	    (_gtk_file_chooser_settings_set_geometry): New public function.

Signed-off-by: Federico Mena Quintero <federico@novell.com>

svn path=/trunk/; revision=22116
2009-01-14 20:18:23 +00:00
Matthias Clasen
5d4bb27b74 Bug 450716 – New API to change global IM
Requested by Daniel Elstner.

        * gtk/gtk.symbols:
        * gtk/gtkimmulticontext.[hc] (gtk_im_multicontext_set_context_id):
        New function to set the context id on a GtkIMMulticontext.

        * gtk/gtkentry.c:
        * gtk/gtktextview.c: Add a ::im-module property that can be
        set to override the global setting for the im module to be used.


svn path=/trunk/; revision=22113
2009-01-13 19:15:42 +00:00
Christian Dywan
856279da34 Bug 566532 – GtkScaleButton implementation of GtkOrientable
2009-01-13  Christian Dywan  <christian@imendio.com>

	Bug 566532 – GtkScaleButton implementation of GtkOrientable

	* gtk/gtk.symbols:
	* gtk/gtkscalebutton.c (gtk_scale_button_class_init),
	(gtk_scale_button_set_property):
	* gtk/gtkscalebutton.h: Deprecate gtk_scale_button_get_orientation
        in favour of implementing GtkOrientable. Patch by Bruce Cowan.

svn path=/trunk/; revision=22112
2009-01-13 15:24:03 +00:00
Tor Lillqvist
e46ff83f30 Bug 164002 - query scripts don't work uninstalled on windows
2009-01-13  Tor Lillqvist  <tml@iki.fi>

	Bug 164002 - query scripts don't work uninstalled on windows

	* gtk/gtkmain.c (_gtk_get_libdir): If the gtk DLL is in a ".libs"
	folder, assume we are running uninstalled, and use the
	configure-time GTK_LIBDIR.


svn path=/trunk/; revision=22110
2009-01-13 14:04:27 +00:00
Matthias Clasen
8b9007b117 no news
svn path=/trunk/; revision=22104
2009-01-13 05:32:13 +00:00
Matthias Clasen
60523a7b8e Don't cause lots of X traffic when the icon name doesn't actually change.
* gtk/gtkwindow.c (gtk_window_set_icon_name): Don't cause lots
        of X traffic when the icon name doesn't actually change. Some
        apps like to reset their window icon frequently, without actually
        changing the icon name...


svn path=/trunk/; revision=22103
2009-01-13 03:04:52 +00:00