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>
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>
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>
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.
Ellipsize labels in the Save folder's combo so they don't grow too wide.
Ellipsize labels in normal directory buttons in the pathbar, and make
their requisition's width reasonably small. Use a tooltip for buttons
that got ellipsized.
Instead of placing the down-slider directly beside the last button in
the pathbar, use the remaining space in the pathbar for the last
button. Use a different method to find the first visible button.
Walk down from the end, adding buttons until we use all free space.
Signed-off-by: Federico Mena Quintero <federico@novell.com>
Correctly handle conversion to SAVE_TARGETS as a side-effect target
with no side-effect, by returning a zero-sized property of type NULL.
See section 2.6.3 of the ICCCM.
Dup the file chooser entry string because the string may be modified
depending on what clients do in the confirm-overwrite signal and this
corrupts the pointer.
GtkPrintOperation is now able to render multiple pages per sheet by its
own. The most important changes are in these functions:
* increment_page_sequence
* prepare_data
* common_render_page
* print_pages_idle
Patch also changes set of choices for 2 pages per sheet mode when
landscape orientation is used to "Top to bottom" and "Bottom to top".
Previously we would always align the top of the text with the label's allocation-plus-padding.
However, this makes a single-line label inside a GtkButton look badly clipped when the button
has a smaller allocation than its requisition. So, for single-line labels we respect the
alignment even if it doesn't fit within the label's allocation. But for multi-line labels, we
give preference to showing the first line, to give the user some context.
Signed-off-by: Federico Mena Quintero <federico@novell.com>