Use g_*gettext functions in gdk-pixbuf instead direct gettext
calls to benefit from the maybe-dont-translate functionality
in GLib. Also, replace a hand-rolled version by g_dpgettext2
in gtkbuilderparser.c. Fixes bug 585791.
The documentation for the function says that the app_exec string
should be freed, but we return a pointer to the internal string
without duplicating it. Since the app_exec string is valid as long
as the GtkRecentInfo is valid the documentation should be fixed
and the out argument should be constified. Fixes#584832.
(gtk_cell_renderer_pixbuf_set_property): add back evil code that makes
sure that the current image is only unset if the new image was created
from the same property or the new property is not NULL.
GtkFileChooserDefault actually implements a binding signal for
Backspace, to make it go to the parent directory. However,
GtkTreeView was eating our Backspace, and thus the file chooser was
not getting a chance to execute its binding signal.
GtkTreeView implements a Backspace binding itself, which it uses to
move to the parent node of the current cursor node. However, the
binding handler would return TRUE even if there was no parent to the
current node. Now the binding handler only returns TRUE if it
actually changed the cursor.
Additionally, gtk_tree_view_key_press() sees if no bindings handled a
key press; in that case, it re-sends the key press to the treeview's
search entry. However, sending a Backspace to an empty entry makes
the entry beep. Thus, we add a flag that gets set from GtkTreeView's
Backspace binding handler, to tell gtk_tree_view_key_press() when it
should *not* re-emit the key press on the search entry. Sort of,
"yeah, I didn't handle this key press, but I don't want you to send it
to the search entry, either!".
Signed-off-by: Federico Mena Quintero <federico@novell.com>
We can use this to test bugs that happen when setting a filename before the
file chooser is shown, as in bgo#161670
Signed-off-by: Federico Mena Quintero <federico@novell.com>
The previous patch for this bug was about the initial *file* not existing,
but this also handles the initial *folder* not existing
(such as /usr/nonexistent/nonexistent.txt).
Signed-off-by: Federico Mena Quintero <federico@novell.com>
In the destroyed window case in do_synthesize_crossing_event we didn't
return a value which can cause infinite "loops". Always return FALSE
to make sure the idle doesn't run again.
We now use a GtkSizeGroup to control the vertical size of the various widgets
that get put in the path bar's area: the location bar, the search entry,
the recently-used title label.
This keeps the shortcuts pane and the file list from jumping up and down
when one switches between operation modes (browse/search/recently-used).
Signed-off-by: Federico Mena Quintero <federico@novell.com>
Doing this directly had some issues with picking going recursive in
clutter-gtk. Furthermore, doing it in an idle means we can coalesce
multiple calls (which is common due to widget changes) in the same
toplevel to just one call.
You can call this if you have offscreen children and the geometry of
them changed. This will cause re-picking of the active window sending
enter and leave events as needed.
Among other things, the description mentions the problem in
bug 585024, that some settings may not be available before the
widget class has been realized.
We want to be able to map any window coordinate to a root coordinate, not
just the origin, because you can't rely anymore on a simple translation
from window coordinates to parent with offscreen windows. This lets
us e.g. pop up menus in the right place even if they are popped up from
a no-window widget.
We use the offscreen signals for getting parent, picking
children at a point and mapping coordinates between windows
embedding offscreens and offscreens.
This means we have two hierarchies more or less, one visible to apps via
the standard APIs and for drawing where the offscreens are their own
separate toplevels, and another one for event handling where embedded
offscreens appear as if they were children of the embedding window.
3 signals are for offscreen windows
get-offscreen-parent: Get the parent window an offscreen is embedded in
to-parent: Convert coordinates from offscreen to parent
from-parent: Convert coordinates from parent to offscreen
1 signal is for the window embedding offscreens:
pick-offscreen-child: This picks what (if any) offscreen is at a specific position
The last signal is only used if you call gdk_window_set_has_offscreen_children
to tell gdk that the window has embedded offscreen children.
Add get-pointer signal for offscreen window pointer getting
Apps using offscreen windows can connect to get-pointer on offscreen
windows in order to make gdk_window_get_pointer() return correct
values.
Add get-offscreen-parent signal
Add signals for from-parent and to-parent coordinate mapping
Add pick-offscreen-child signal
Add a new radio button "Selection" to the print dialog. Its presence
depends on calling of functions gtk_print_operation_set_support_selection()
and gtk_print_dialog_unix_set_support_selection().
Sensitivity of the radio depends on calling of
functions gtk_print_operation_set_has_selection() and
gtk_print_dialog_unix_set_has_selection().
There are new properties GtkPrintUnixDialog::support-selection,
GtkPrintUnixDialog::has-selection, GtkPrintOperation::support-selection
and GtkPrintOperation::has-selection. Corresponding getters are
gtk_print_dialog_unix_get_support_selection(),
gtk_print_dialog_unix_get_has_selection(),
gtk_print_operation_get_support_selection() and
gtk_print_operation_get_has_selection().
Application has to set number of pages to which the selection will be formated
in GtkPrintOperation::begin-print's callback by the
gtk_print_operation_set_n_pages() function (bug #344519).
There is also new property GtkPrintUnixDialog::manual-capabilities controled by
gtk_print_unix_dialog_set_manual_capabilities() and
gtk_print_unix_dialog_get_manual_capabilities().
Instead use passive grabs for the few keys we care about.
With a corresponding metacity change, this will allow workspace
switching and focus cycling during DND, which is very useful.
Fixes bug 390312.