* gtk/gtktextview.c (gtk_text_view_paint): If additional areas got
invalidated, don't try to add them to the paint region: in an expose
handler, we cannot paint outside the area that was passed in, since
drawing will be clipped. So stealing the update region from the
window causes lost draws.
Patch by Owen Taylor
svn path=/trunk/; revision=22442
GtkNotebook tabs
* gtk/gtkwidget.c (_gtk_widget_synthesize_crossing): Be a little
more careful when navigating up the parent chain.
* gdk/gdkwindow.c (_gdk_window_destroy_hierarchy): Reset the
pointer window thats stored on the screen when it is destroyed.
svn path=/trunk/; revision=22420
* gtk/gtkiconview.c
(gtk_icon_view_item_accessible_image_set_image_description): Copy
the right string. Pointed out by Tommi Rantala
svn path=/trunk/; revision=22417
2009-02-27 David Zeuthen <davidz@redhat.com>
Bug 573383 – GtkMountOperation fixes for ask_password()
* gtk/gtkmountoperation.c (gtk_mount_operation_ask_password):
Split the message from GMountOperation into primary/secondary like
we also do in gtk_mount_operation_ask_question()
svn path=/trunk/; revision=22415
2009-02-27 Michael Natterer <mitch@imendio.com>
Bug 573383 – Setting a textview's buffer to NULL doesn't do a
complete job
* gtk/gtktextview.c (gtk_text_view_set_buffer): always set
text_view->layout's buffer, also if it's NULL.
svn path=/trunk/; revision=22414
Bug 572904 – GtkRadioAction broken in trunk
* gtk/gtkradioaction.c: When setting non active state always
notify the action's active state (this prevents toggle type proxies
used with radio actions from deactivating when pressed a second time).
svn path=/trunk/; revision=22409
2009-02-25 Xan Lopez <xan@gnome.org>
Bug 495320 - GtkRange does not use gdk_event_request_motions
* gtk/gtkrange.c:
(gtk_range_motion_notify): Use gdk_event_request_motions to
request more motion events, as suggested in the docs for widgets
using motion hints.
svn path=/trunk/; revision=22407
* gtk/gtkfilechooserdefault.c (shortcuts_list_create): Never scroll
the places horizontally. Instead, ellipsize the text.
svn path=/trunk/; revision=22397
2009-02-19 Michael Hasselmann <michaelh@openismus.com>
* gtk/gtkcombobox.c (gtk_combo_box_set_active_internal):
Added a check to not emit a "changed" signal when an already
invalid selection was set to invalid.
svn path=/trunk/; revision=22390
* gtk/gtk.symbols:
* gtk/gtkactivatable.[hc]: Rename gtk_activatable_reset to
gtk_activatable_sync_action_properties, since the previous name
was deemed too generic. Update all implementations.
svn path=/trunk/; revision=22389
2009-02-19 Michael Natterer <mitch@imendio.com>
* gtk/gtkmountoperation.c: sort functions so their order is more
"standard", some cosmetic cleanup (not changing any code).
svn path=/trunk/; revision=22377
2009-02-19 Michael Natterer <mitch@imendio.com>
* gtk/gtkscalebutton.c: make the orientation flipping much simpler
by using the GtkOrientable features of the involved widgets:
(gtk_scale_button_init): create the frame, box and scale here,
they never need to be recreated because they implement GtkOrientable.
(gtk_scale_button_constructor): remove their construction here.
(gtk_scale_button_set_orientation): don't destroy and re-create
anything. Instead, simply set the orientation of the above created
widgets and fiddle a bit with the "plus" and "minus" buttons'
packing and the scale's "inverted" state.
Remove separate internal GtkScaleButtonHScale and
GtkScaleButtonVScale subclasses and simply have a
GtkScaleButtonScale directly inherited from GtkScale.
svn path=/trunk/; revision=22375
* gtk/gtkassistant.c (gtk_assistant_accessible_ref_child): Set
the object name to the page title. Proposed by Eitan Isaacson
svn path=/trunk/; revision=22345
selecting a cell in a non-sortable column
* gtk/gtktreeview.c (gtk_tree_view_header_focus): Don't grab
focus to a header button if it is not focusable. Problem reported
by Joanmarie Diggs
svn path=/trunk/; revision=22316
* gtk/gtkvolumebutton.[hc]: Move the _GtkVolumeButton definition
into the header to make it possible to derive from GtkVoumeButton.
Reported by Chris Lord.
svn path=/trunk/; revision=22315
* 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
* 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-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 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
* 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
* gtk/gtkrecentchooser.c (gtk_recent_chooser_set_use_action_appearance):
Avoid a compiler warning. Patch by Magnus Boman.
svn path=/trunk/; revision=22261
* 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-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
* 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
* 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-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
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 Claudio Saavedra <csaavedra@igalia.com>
* gtk/gtktreeview.c: Use gtk-doc syntax to refer to properties in
the docstrings.
svn path=/trunk/; revision=22213
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
* 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
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
* 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-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-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
(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
(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
(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
(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
(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
(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-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-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
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
* 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 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 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
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
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
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-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
* 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 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
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
* 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
* 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
* 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
* 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
* 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 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-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
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
* 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
* 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
* 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 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
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 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
* 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-12 Paolo Borelli <pborelli@katamail.com>
Bug 492794 – Pasting external text at end of view yields wrong
scrolling to mark
* gtk/gtktextbuffer.[ch]:
* gtk/gtktextview.c:
Add a "paste-done" signal and use it to propelry scroll the
view at the end of the pasted text in the case of an async
paste. Patch by Ignacio Casal Quintero based on a patch by
Yevgen Muntyan.
svn path=/trunk/; revision=22100
2009-01-12 Claudio Saavedra <csaavedra@igalia.com>
Bug 567468 – no check for trailing != NULL in
gtk_text_layout_get_iter_at_position()
* gtk/gtktextlayout.c: (gtk_text_layout_get_iter_at_position):
Check for trailing to be non-NULL.
* gtk/gtktextview.c: (gtk_text_view_get_iter_at_position): document
that trailing may be NULL.
svn path=/trunk/; revision=22090
* gtk/gtktoolbutton.c: Properly create a menu proxy from a GIcon.
Patch by Christian Persch
* tests/testtoolbar.c: Add an example with a GIcon
svn path=/trunk/; revision=22084
* gtk/gtkaction.c: Add a ::gicon property to GtkAction and set the
icon from it if specified. The stock icon is preferred if a stock id
is given. Based on a patch by A. Walton
svn path=/trunk/; revision=22079
* gtk/gtkaboutdialog.c: Make setting website, website-label and
url hook work independent of their order. Reported by Steven
Sheehy.
svn path=/trunk/; revision=22060
* gtk/gtkentry.c: Code cleanups; get rid of get_text_area_size,
replace get_icon_allocation by get_icon_allocations, don't
pass allocation to place_windows; other stylistic changes to
the icon-related code.
svn path=/trunk/; revision=22020
2008-12-26 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkentry.c: Don't emit ::icon-pressed on nonactivatable
icons. Fix up docs to match actual api.
* tests/testentryicons.c: Reshuffle tests a bit. Add a DND test.
svn path=/trunk/; revision=21942
2008-12-23 Li Yuan <li.yuan@sun.com>
* gtk/gtkiconview.c: (gtk_icon_view_accessible_model_row_changed):
Bug #549251. No need to set name if there is no a11y item object.
svn path=/trunk/; revision=21926
2008-12-21 Yair Hershkovitz <yairhr@gmail.com>
Bug 565203: RTL locales: icons are misplaced when horizontal
gtkiconview is contained in a gtkscrolledwindow.
* gtk/gtkiconview.c (gtk_icon_view_layout_single_row):
Fix horizontal icon positions when in RTL locale.
svn path=/trunk/; revision=21918
2008-12-19 Cody Russell <bratsche@gnome.org>
Bug 85292 – add an icon to gtkentry
* gtk/gtkmarshalers.list: Add VOID:INT,BOXED
* tests/testentryicons.c: Initial icon entry test
* tests/Makefile.am: Add testentryicons
* gtk/gtkentry.[ch]: Add API for setting primary/secondary icons
and other features related to them.
svn path=/trunk/; revision=21914
2008-12-19 Marek Kasik <mkasik@redhat.com>
Bug 339318 - Allow page rendering to (optionally) happen in a thread
* gtk/gtk.symbols: API change
* doc/reference/gtk/gtk-sections.txt: API change
* gtk/gtkprintoperation-private.h
* gtk/gtkprintoperation.h
* gtk/gtkprintoperation.c: Adds 2 new functions
gtk_print_operation_set_defer_drawing()
- Sets up the GtkPrintOperation to wait for calling of
gtk_print_operation_draw_page_finish() from application. It can
be used for drawing page in another thread.
This function must be called in the callback of "draw-page"
signal.
gtk_print_operation_draw_page_finish()
- Signalize that drawing of particular page is complete.
It is called after completion of page drawing (e.g. drawing
in another thread).
If gtk_print_operation_set_defer_drawing() was called before,
then this function has to be called by application. In another
case it is called by the library itself.
svn path=/trunk/; revision=21913
* gtk/gtkfilechooserdefault.c (update_current_folder_get_info_cb):
Mount the enclosing volume if the folder we're switching to is not
mounted. Patch by Tomas Bzatek, based on work by Carlos Garnacho
svn path=/trunk/; revision=21899
* gtk/gtkfilesystem.[hc] (_gtk_file_info_consider_as_directory):
Privately export this method. It classifies directories and mountables
the same.
* gtk/gtkfilesystem.c (enclosing_volume_mount_cb): Silently drop
G_IO_ERROR_ALREADY_MOUNTED error for gvfs backends without visible
mounts.
* gtk/gtkfilesystemmodel.c:
* gtk/gtkfilechooserbutton.c:
* gtk/gtkfilechooserentry.c:
* gtk/gtkfilechooserdefault.c: Use the new function instead of
direct checks for G_FILE_TYPE_DIRECTORY throughout.
svn path=/trunk/; revision=21898
* gtk/gtkfilechooserdefault.c (update_current_folder_get_info_cb):
Don't show an error dialog when changing to a non-existing folder,
since this is ususally just an annoyance.
svn path=/trunk/; revision=21894
* gtk/gtkcellrendererprogress.c (gtk_cell_renderer_progress_set_pulse):
Don't try to keep state in a cell renderer between two paint
calls. It doesn't work. Patch by Kristian Mueller
svn path=/trunk/; revision=21890
* gtk/gtkiconview.c (gtk_icon_view_accessible_model_row_changed):
Handle separate append/set for rows. Patch by Li Yuan
svn path=/trunk/; revision=21884
2008-12-11 Sven Herzberg <sven@imendio.com>
Document the "set-scroll-adjustments" signal
Reviewed by Kristian Rietveld.
* gtk/gtkiconview.c,
* gtk/gtklayout.c,
* gtk/gtktextview.c,
* gtk/gtktreeview.c,
* gtk/gtkviewport.c: added proper documentation for the signal
svn path=/trunk/; revision=21871
* gtk/gtkimcontext.h: Add public/private markers.
* gtk/gtkimcontext.c: Add section documentation which explains how
to add a new input method module to GTK+. Document the signals and
virtual functions of GtkIMContextClass.
* gtk/gtkimmodule.c: Document struct GtkIMContextInfo.
* docs/reference/gtk/gtk-sections.txt: Add GtkIMContextClass and
GtkIMContextInfo to section GtkIMContext.
* docs/reference/gtk/Makefile.am (IGNORE_HFILES): Remove
gtkimmodule.h from the list in order to pick up GtkIMContextInfo.
* docs/reference/gtk/tmpl/gtkimcontext.sgml: Remove file from
repository since all the hand-edited content has been migrated to
source file comments.
svn path=/trunk/; revision=21870
2008-12-10 Matthias Clasen <mclasen@redhat.com>
Bug 563991 – gtk_file_chooser_button_new_with_backend is deprecated
-- but what should be used instead?
* gtk/gtkfilechooserbutton.c: Enhanced deprecation annotation.
svn path=/trunk/; revision=21868
* gtk/gtkbuilderparser.c: Make gtk_builder_get_translation_domain()
useful for subparsers.
* gtk/gtkcontainer.c: Make the child property parser support
translatable child properties.
svn path=/trunk/; revision=21855
2008-12-05 Michael Natterer <mitch@imendio.com>
Bug 546285 – Allow GtkEntry to draw progress
* gtk/gtkentry.[ch]: add new API similar to GtkProgressBar which
allows to set the entry's progress_fraction, its progress_pulse_step
and to let the entry's progress pulse.
* gtk/gtk.symbols: updated.
* tests/testgtk.c: add progress demo code to the "Entry" window.
svn path=/trunk/; revision=21846
2008-12-03 Sven Herzberg <sven@imendio.com>
Bug 562998 – GtkFontButton documentation improvements
* gtk/gtkfontbutton.c: mention the way the font string should be used.
Patch by Sven Herzberg and Nelson Benitez
svn path=/trunk/; revision=21842
2008-12-03 Marek Kasik <mkasik@redhat.com>
Bug 559914 – eog doesn't apply paper setup.
* gtk/gtkpapersize.c: Call the gtk_paper_size_new_from_ppd() with width
and height in points.
svn path=/trunk/; revision=21841
2008-12-02 Carlos Garcia Campos <carlosgc@gnome.org>
Bug 562878 – password save incorrectly set in gtkmountoperation
* gtk/gtkmountoperation.c (remember_button_toggled),
(gtk_mount_operation_ask_password): Remember the password save
flags only when the radio button becomes active. Set also the
default state of the radio buttons depending on the current value
of password save flags.
svn path=/trunk/; revision=21840
2008-11-29 Matthias Clasen <mclasen@redhat.com>
Bug 554453 – "typeahead find" widget of GtkTreeView appears on
wrong monitor in a multi-head environment
* gtk/gtktreeview.c (gtk_tree_view_ensure_interactive_directory):
Make sure the typeahead window follows screen changes of the
treeview. Noticed by Rainer Stransky
svn path=/trunk/; revision=21835
2008-11-29 Federico Mena Quintero <federico@novell.com>
* gtk/gtktreeview.c (gtk_tree_view_bin_expose): If tree lines are
enabled, flip them around for the right-to-left case. Fixes
https://bugzilla.novell.com/show_bug.cgi?id=447004. Patch by
Ricardo Cruz <rpmcruz@alunos.dcc.fc.up.pt>
Signed-off-by: Federico Mena Quintero <federico@novell.com>
svn path=/trunk/; revision=21829
2008-11-25 Johan Dahlin <jdahlin@async.com.br>
Bug 559947 – Unchecked dependency on python>=2.4
* gtk/gtk-builder-convert:
Avoid using sorted() which is only present in python 2.
svn path=/trunk/; revision=21807
2008-11-12 Christian Dywan <christian@imendio.com>
Bug 560139 – GtkEntry doesn't paint with the right state
* gtk/gtkentry.c (gtk_entry_class_init), (gtk_entry_draw_frame),
(gtk_entry_expose): Reflect the right state if state-hint is set
svn path=/trunk/; revision=21787
2008-11-12 Richard Hult <richard@imendio.com>
* gtk/gtkdnd-quartz.c: (gtk_drag_set_icon_pixmap): Implement,
patch from Paul Davis.
svn path=/trunk/; revision=21785
2008-11-11 Michael Natterer <mitch@imendio.com>
Bug 553765 – Add orientation API to GtkRange
* gtk/gtkrange.[ch]: implement the GtkOrientable interface. Add
evil code that makes sure that the stepper_detail and slider_detail
set in GtkRangeClass continue to work with the hacked subclasses
below.
* gtk/gtkscale.[ch]: swallow all code from GtkHScale and GtkVScale
and add gtk_scale_new() and gtk_scale_new_with_range() which take
a GtkOrientation argument. Set slider_detail to "Xscale" so above
evil code works.
* gtk/gtkscrollbar.[ch]: add gtk_scrollbar_new() which takes a
GtkOrientation argument. Set stepper_detail to "Xscrollbar" so
above evil code works.
* gtk/gtkhscale.c
* gtk/gtkvscale.c
* gtk/gtkhscrollbar.c
* gtk/gtkvscrollbar.c: remove all code except the constructor and
call gtk_orientable_set_orientation() in init().
* gtk/gtk.symbols: changed accordingly.
svn path=/trunk/; revision=21780
2008-11-11 Michael Natterer <mitch@imendio.com>
Bug 553765 – Add orientation API to GtkRange
* gtk/gtkrange.[ch]: implement the GtkOrientable interface. Add
evil code that makes sure that the stepper_detail and slider_detail
set in GtkRangeClass continue to work with the hacked subclasses
below.
* gtk/gtkscale.[ch]: swallow all code from GtkHScale and GtkVScale
and add gtk_scale_new() and gtk_scale_new_with_range() which take
a GtkOrientation argument. Set slider_detail to "Xscale" so above
evil code works.
* gtk/gtkscrollbar.[ch]: add gtk_scrollbar_new() which takes a
GtkOrientation argument. Set stepper_detail to "Xscrollbar" so
above evil code works.
* gtk/gtkhscale.c
* gtk/gtkvscale.c
* gtk/gtkhscrollbar.c
* gtk/gtkvscrollbar.c: remove all code except the constructor and
call gtk_orientable_set_orientation() in init().
* gtk/gtk.symbols: changed accordingly.
svn path=/trunk/; revision=21779
2008-11-10 Marek Kasik <mkasik@redhat.com>
Bug 560135 - Print when the user double clicks a printer
* gtk/gtkprintunixdialog.c: add handling of double click to
GtkPrintUnixDialog.
svn path=/trunk/; revision=21775
2008-11-07 Michael Natterer <mitch@imendio.com>
* gtk/gtkpaned.c: argh, actually call the newly added private
gtk_paned_calc_position() instead of the deprecated public
version.
svn path=/trunk/; revision=21774
2008-11-07 Michael Natterer <mitch@gimp.org>
Bug 553586 – Add orientation API to GtkPaned
* gtk/gtkpaned.[ch]: implement the GtkOrientable interface
and swallow all code from GtkHPaned and GtkVPaned. Add
gtk_paned_new() which takes a GtkOrientation argument. Deprecate
gtk_paned_compute_position() for good (also for GTK_COMPILATION).
* gtk/gtkhpaned.[ch]
* gtk/gtkvpaned.[ch]: remove all code except the constructor and
call gtk_orientable_set_orientation() in init().
* gtk/gtk.symbols: add gtk_box_new().
svn path=/trunk/; revision=21772
2008-11-07 Michael Natterer <mitch@imendio.com>
* gtk/gtkscrollbar.c: remove bogus newlines in the middle of
function calls, fix broken indentation and remove trailing
whitespace.
svn path=/trunk/; revision=21769
* gtk/gtkmenuitem.c: Made buildable and added support for adding children
of type "submenu"
* gtk/gtkwindow.c: Added support for custom tag "accel-groups" to add GtkAccelGroups
to the window.
* gtk/gtkcontainer.c: Added builder contextual warnings in buildable_add_child()
* gtk/tests/builder.c: Added tests for buildable menus (test that accelerators are
properly connected on stock items, test the menu hierarchy, test permission to
add alien/custom menuitem children).
* docs/reference/gtk/tmpl/gtkbuilder.sgml, docs/reference/gtk/tmpl/gtkwindow.sgml,
docs/reference/gtk/tmpl/gtkmenuitem.sgml: Updated docs for buildable submenus
and accel groups.
svn path=/trunk/; revision=21767
2008-11-06 Tristan Van Berkom <tvb@gnome.org>
* gtk/gtkmenuitem.[ch]: added new apis gtk_menu_item_[set/get]_label() and
gtk_menu_item_[set/get]_use_underline() with "label" and "use-underline"
properties, constructors cleaned up to use g_object_new().
GtkMenuItemClass take new vfuncs ->get/set_label().
* gtk/gtkcheckmenuitem.c: constructors cleaned up to use g_object_new().
* gtk/gtkimagemenuitem.[ch]: added new apis gtk_image_menu_item_[get/set]_use_stock()
and gtk_image_menu_item_set_accel_group() with "use-stock" and write-only
"accel-group" properties. constructors cleaned up to use g_object_new().
svn path=/trunk/; revision=21766
* gtk/gtklabel.c: gtk_label_set_attributes() now applies attributes
on top of any markup or mnemonic attributes (bug 558409).
* README: Updated and added release notes for 2.16
svn path=/trunk/; revision=21764
2008-11-05 Christian Dywan <christian@imendio.com>
Bug 559404 – gtk_editable_insert_text counts length in bytes
* gtk/gtkeditable.c:
Document new_text_length as the number of bytes
svn path=/trunk/; revision=21760
2008-11-02 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkimagemenuitem.c: Make it possible to overrule the
gtk-menu-images setting.
* gtk/gtkaction.c (connect_proxy): Show the image before adding
it to the image menu item.
svn path=/trunk/; revision=21751
* gtk/gtkmenu.c (gtk_menu_size_request): Use consistent padding
regardless of imagees or checks being in the menu. Also add
padding on the right edge.
Proposal by Luca Ferretti, patch by Jon McCann
svn path=/trunk/; revision=21745