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