Commit Graph

8870 Commits

Author SHA1 Message Date
Matthias Clasen
6bd8756269 Fix emission of file-set signal
svn path=/trunk/; revision=22307
2009-02-11 06:52:43 +00:00
Matthias Clasen
89c1bb49bd Remove GTK_SIGNAL_ACTION from the file-set signal, that wasn't supposed to
* gtk/gtkfilechooserbutton.c: Remove GTK_SIGNAL_ACTION
        from the file-set signal, that wasn't supposed to have it.


svn path=/trunk/; revision=22306
2009-02-11 06:29:24 +00:00
Matthias Clasen
70b08f1e64 Make the new GtkAction code work with PolicyKit-gnome's use of actions.
* gtk/gtkaction.c (gtk_action_[un]block_activate_from): Block
        the action.

        * gtk/gtkcheckmenuitem.c (gtk_check_menu_item_activatable_reset):
        * gtk/gtktogglebutton. (gtk_toggle_button_activatable_reset):
        * gtk/gtktoggletoolbutton.c (gtk_toggle_tool_button_activatable_reset):
        Work with non-toggle actions without complaining.

        * gtk/gtktoolbutton.c (gtk_tool_button_activatable_update): Updating
        the icon-name should not remove the label.

        * gtk/gtkimagemenuitem.c (activatable_update_icon_name): Also
        update the image when the icon name is set to NULL.


svn path=/trunk/; revision=22290
2009-02-07 03:17:43 +00:00
Matthew Barnes
302cc82c71 Accept a NULL string.
2009-02-06  Matthew Barnes  <mbarnes@redhat.com>

	* gtk/gtklabel.c (gtk_label_set_label): Accept a NULL string.


svn path=/trunk/; revision=22289
2009-02-06 15:49:26 +00:00
Matthias Clasen
4995ea0fcb Set the root coordinates in the event correctly. Patch by Kristian
* gtk/gtktooltip.c (gtk_tooltip_trigger_query): Set the root
        coordinates in the event correctly. Patch by Kristian Rietveld.


svn path=/trunk/; revision=22277
2009-02-04 01:16:35 +00:00
Matthias Clasen
ebb342a246 2.15.3
svn path=/trunk/; revision=22273
2009-02-03 01:55:28 +00:00
Behdad Esfahbod
03e5467b68 Change the "gtk-fontconfig-timestamp" property from int to uint. Doesn't
2009-02-01  Behdad Esfahbod  <behdad@gnome.org>

        * gtk/gtksettings.c (gtk_settings_class_init): Change the 
        "gtk-fontconfig-timestamp" property from int to uint.  Doesn't affect
        anything in practice, except that  it overflows years later...


svn path=/trunk/; revision=22270
2009-02-01 06:04:12 +00:00
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
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
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
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
8626d2ffa9 Don't chain up blindly
svn path=/trunk/; revision=22240
2009-01-27 14:59:53 +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
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
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
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
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
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