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
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
* 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
* 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 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-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
* 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-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
2009-01-12 Tor Lillqvist <tml@iki.fi>
Bug 164002 - query scripts don't work uninstalled on windows
* queryloaders.c (main): Use the configure-time PIXBUF_LIBDIR if
the exe is located in a .libs folder, i.e. run in the build
directory through a libtool wrapper script or wrapper executable,
or in the source folder itself. Otherwise continue to infer the
runtime prefix from the exe's location.
2009-01-12 Tor Lillqvist <tml@iki.fi>
* queryloaders.c (main): Remove the Win9x code path. It had been
left by mistake. Win9x code is gone from the rest of GTK+ since
2.12.
svn path=/trunk/; revision=22106
2009-01-13 Christian Dywan <christian@imendio.com>
Bug 567569 – Typo in GtkFileChooser example in GTK+ documentation
* gtk/tmpl/gtkfilechooser.sgml: s/gobject_unref/g_object_unref.
Patch by Priyank Gosalia.
svn path=/trunk/; revision=22105
* 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