Commit Graph

9408 Commits

Author SHA1 Message Date
Michael Natterer
6ee228a363 gtk_widget_set_property(): use accessors instead of setting flags
Use the newly added accessors to set the "can-focus", "can-default"
and "receives-default" properties.
2009-09-04 15:18:24 +02:00
Michael Natterer
026bea2293 gtk_widget_set_property(): use gtk_widget_set_visible()
Use the new API instead of show() and hide().
2009-09-04 14:54:13 +02:00
Michael Natterer
b81079d898 Bug 69872 - GTK_WIDGET_SET_FLAGS should be deprecated
Add gtk_widget_set_receives_default() and
gtk_widget_get_receives_default() as accessors for
GTK_RECEIVES_DEFAULT.
2009-09-04 14:50:35 +02:00
Kristian Rietveld
dc3fb714a0 Improve unsetting old buffer in gtk_text_view_set_buffer()
When unsetting the old buffer always set the buffer on the layout to
NULL.  More importantly, clear the pending scroll.  (The scroll is
handled in an idle, when not cleared an idle handler might touch the
layout later on, possibly corrupting the BTree).  Unref the buffer after
removing the selection from the clipboard, not before.  Patch merged
from maemo-gtk.
2009-09-04 14:06:59 +02:00
Kristian Rietveld
7a3d98324d Fail to scroll if the given mark is not in text view's current buffer
In gtk_text_view_queue_scroll() we need to verify if the given mark
exists in the text view's current buffer.  When not done, this can
result in corruption of the BTree data structure.  Patch merged from
maemo-gtk.
2009-09-04 14:06:58 +02:00
Kristian Rietveld
3a917a2a67 Update IM spot location before running _validate_onscreen()
Updating the IM spot location in gtk_text_view_value_changed() might
invalidate the layout, so we need to make sure that we update it before
validating the layout again.  Otherwise, the layout will be invalidated
right after validating it (possibly resulting in a failed
onscreen_validated assertion).  Patch merged from maemo-gtk.
2009-09-04 14:06:58 +02:00
Kristian Rietveld
4f219692ed Make toggle cell renderer follow insensitive state of widget
Likewise to other cell renderers, GtkCellRendererToggle now properly
follows the insensitive state of the widget requesting rendering.  It
does this by checking the state of the widget pointer, not by using
GtkCellRendererFlags (there exists an insensitive flags).  Later on, I
think we should move to using GtkCellRendererFlags and not the state of
the widget requesting rendering.  Patch merged from maemo-gtk.
2009-09-04 14:06:58 +02:00
Kristian Rietveld
6f20cf691e Propagate insensitive state to cell renderers in GtkCellView
If the cell view is insensitive, it needs to properly propagate this
insensitive state to the cell renderers using cell renderer flags.
Merged from maemo-gtk.
2009-09-04 14:06:58 +02:00
Kristian Rietveld
3f306a4042 Have tree view process exposes after adjustments have been updated
This was removed long ago by the patch in bug 101235.  On a hindsight,
all other scrollable widgets are processing exposes at this point, which
completely makes sense to me, so I am putting it back.
2009-09-04 14:06:58 +02:00
Christian Dywan
6b9a3c9057 Bug 584638 - Build of gtkupdateiconcache without NLS breaks
Wrap textdomain calls in updateiconcache.c in NLS conditionals.
2009-09-03 11:30:12 +02:00
Matthias Clasen
05d39e4085 Add a missing include
This was reported in bug 593606.
2009-09-02 22:14:47 -04:00
Paolo Borelli
f97a33ad9c Move timer removal in dispose
Move removal of timer function in dispose to prevent potentially running
them on a diposed-but-not-finalized tooltip
2009-09-01 15:50:42 +02:00
Paolo Borelli
582b281761 Make sure the paper dialog is destroyed with the parent 2009-08-31 21:56:14 +02:00
Paolo Borelli
0bb51bca9b Remove unneeded call of begin/end user action
delete_interactive already uses them so no need to wrap the call.
2009-08-31 21:47:49 +02:00
Matthias Clasen
13147323d7 Forgotten part of the lpi change 2009-08-30 11:11:46 -04:00
Paolo Borelli
2d8b8e054a buffer_backspace should delete \r\n in one go
Special case \r\n in gtk_text_buffer_backspace since \r should not be
reinserted even if we are deleting one char at a time. Also add
corresponding unit test. Fixes bug #544724.
2009-08-29 21:29:57 -04:00
Marek Kasik
f7cfe2bfea Emit "update-custom-widget" when the page setup changes
Previously, the signal was only emitted when the user selected
another printer. Bug 593001.
2009-08-29 21:19:44 -04:00
Christian Persch
2105d946cf Plug a mem leak
GtkWindow was leaking the startup_id, reported in bug 593317.
2009-08-29 21:19:44 -04:00
Davyd Madeley
44adf811ea [GtkSizeGroup] don't recurse into yourself 2009-08-30 10:47:52 +10:00
Christian Persch
a2420c7db5 Plug a mem leak
The filechooser was leaking tooltips. Reported in bug bug 593080.
2009-08-29 20:40:50 -04:00
Carlos Garcia Campos
c51830f453 Do not emit action-activated signal when there are not actions selected
This was causing problems for epiphanys location entry, reported
in bug 593481.
2009-08-29 20:36:28 -04:00
Pascal Terjan
047a91322c Show the icon window back after changing pixbuf
Otherwise, there is no way to get icons to show again after calling
_clear() once. Reported in bug 593135.
2009-08-29 20:27:23 -04:00
Michael Natterer
cc8927a589 Add gtk_widget_set_window()
New function as replacement for setting widget->window directly.
Should only be used in GtkWidget::realize().
2009-08-28 16:51:48 +02:00
Michael Natterer
0e52286d53 Bug 69872 - GTK_WIDGET_SET_FLAGS should be deprecated
Add gtk_widget_is_toplevel() for GTK_WIDGET_TOPLEVEL()
and gtk_widget_is_drawable() for GTK_WIDGET_DRAWABLE()
2009-08-28 16:27:26 +02:00
Kristian Rietveld
44469e4684 Make gtk_tree_view_real_set_cursor() handle non-existing paths
Such paths (eg. a child node that is collapsed) should be ignored.  This
is fixed by checking the return value of _gtk_tree_view_find_node(),
which returns a partial return value (the parent node) when it returns
TRUE.  Also added a unit test.
2009-08-28 11:04:54 +02:00
Michael Natterer
591b37d7ce Add accessors for sealed member "flippable"
One step closer to makes GtkRange properly subclassable, but still
quite some accessors missing.
2009-08-27 21:14:21 +02:00
Michael Natterer
d30c31d6e1 marks_start_element(): initialize "value" to get rid of a compiler warning 2009-08-27 21:14:21 +02:00
Michael Natterer
6a278af6d2 Fix casts in calls to g_utf8_validate()
The "end" parameter is (const gchar **), not (const gchar *).
2009-08-27 21:14:21 +02:00
Kristian Rietveld
ec7187e039 Bug 543310 - set_enable_tree_lines doesn't work when a cellrenderer...
Reorder drawing in gtk_tree_view_bin_expose() so that the tree lines are
drawn after the cells have been drawn.  This is because cell-background
is handled in the cell renderer, so the tree lines need to be drawn
after this.
2009-08-27 18:12:54 +02:00
Kristian Rietveld
786b3914cd Bug 588199 - GtkTreeView rendering glitch while using a default ...
Contrary to what was believed before, do_validate_rows() does need to
queue a normal resize (including a redraw) when it has to.  The redraw
is required because of the size of the tree has changed because new
row(s) have been validated.
2009-08-27 18:12:54 +02:00
Kristian Rietveld
de1c79c721 Bug 592883 - Spin cell rendererer problem with double click
Block 2BUTTON and 3BUTTON press events using a button press event
handler in GtkCellRendererSpin, so that they won't be eaten and
processed by tree view.
2009-08-27 18:12:54 +02:00
Dan Winship
05b246accc fix gtk-doc syntax on GtkWidget:double-buffered, so Since gets picked up 2009-08-27 10:49:16 -04:00
Benjamin Otte
51f140bfdc Document ownership for return value of gtk_file_chooser_get_file() 2009-08-27 11:53:24 +02:00
Benjamin Otte
4a0f78b72f Bug 592606 - Activate the default button in a respose-request callback
Previously the rightmost button with a proper response id was activated,
this is now only done if there is no default button set.

With this patch the right widget gets activated when there are multiple
widgets wth response ids conforming to is_stock_accept_response_id() as
the selected widget is made the new default widget before showing the
overwrite confirmation dialog.
2009-08-27 11:51:43 +02:00
Matthias Clasen
9bad2f70a4 Documentation fixes 2009-08-24 18:17:54 -04:00
Christian Persch
e8dcf330cc Preserve errno, and always use g_strerror()
Bug #592461.
2009-08-24 15:30:00 +02:00
Kristian Rietveld
4449acbb82 Remove broken logic in backwards walks in validate_visible_area()
In validate_visible_area() it was assumed that gtk_tree_path_prev()
would always return the correct path of the preceding node.  This is
obviously not true.  The if-clause has been removed so that we now
always use _gtk_tree_view_find_path() to get the path from the tree,
node.
2009-08-23 22:06:16 +02:00
Kristian Rietveld
7b4f09a589 Add a scrolling test case involving creating new rows in tree stores
Based on a bug report from Miroslav Rajcic, details are in the tree view
scrolling suite source code.
2009-08-23 22:06:16 +02:00
Kristian Rietveld
105e0be70e Rework naming of tests to make better use of path matching feature 2009-08-23 22:06:16 +02:00
Kristian Rietveld
a4a5d3da0e Change prefix of tree view scrolling tests into TreeView 2009-08-23 22:06:16 +02:00
Kristian Rietveld
ebc6a00015 Clean up code in gtk_tree_store_set_n_columns()
Clean up GtkTreeStore likewise as Benjamin Otte has done for
GtkListStore in commit 3c97f037.
2009-08-23 22:06:15 +02:00
Kristian Rietveld
9976554c6e Bug 528283 - Problems when using PageUp & PageDown to navigate...
Patch from Jonathan Matthew to make focus grabbing of page up/down,
home/end and left/right movements consistent with up/down.
2009-08-23 22:06:15 +02:00
Kristian Rietveld
6320b12e8c Bug 526149 - GtkCellRendererAccel editing conflicts with mnemonics
GtkCellRendererAccel also needs to acquire the GTK+ grab in addition to
a GDK keyboard grab.  With the GDK keyboard grab, KeyPress and
KeyRelease events are delivered as usual, although we only want to
receive them for our grab widget.
2009-08-23 08:59:34 +02:00
Kristian Rietveld
f84df976a7 Bug 478519 - GtkTooltip segfaults on NULL gdk-display-current-tooltip
Make the tooltip code a bit more robust for a case that only occurs when
GTK+ is used from a language binding.  It looks like this case appears
because the memory management / ref counting is handled differently in
some of the language bindings.  Instead of asserting, we will fail
silently.  Also fix a think-o in gtk_tooltip_start_delay().  Patch from
O. Andrieu.
2009-08-22 23:21:44 +02:00
Shixin Zeng
02457e3a93 Return value from non-void function 2009-08-20 23:56:52 +03:00
Michael Natterer
9c151ba3e1 Shut up warning about calling gtk_object_get_type() having no effect 2009-08-18 12:10:03 +02:00
Matthias Clasen
270a95f12e Handle accelerators involving virtual modifiers better
The previous code would trigger on an unmodified 'S' key for a
'Super+S' accel. The current code avoids that at the cost of breaking
combinations like 'Mod4+Super+S' which are too exotic to worry about...
Bug 591526
2009-08-17 13:46:30 -04:00
Paolo Borelli
30ffad76f5 Bug 592003 - Shift+click should always modify selection
Shift-click inside an existing selection reduces the selection to the
range from the insert mark to the clicked point instead of removing the
selection. This makes GtkTextView more consistent with GtkEntry.
2009-08-17 17:07:50 +02:00
Paolo Borelli
03018f1d01 Fix memory leaks when using add_objects 2009-08-14 15:56:44 +02:00
Paolo Borelli
0696bc8e86 Fix memory leaks in unit tests 2009-08-14 15:56:44 +02:00
Paolo Borelli
6cfb23d185 Fix duplicated id detection in gtkbuilder
Fix memory handling of duplicated id hashtable and add unit test
2009-08-14 15:56:44 +02:00
Cody Russell
a5f6b812be Add gtk_widget_set_allocation to gtkwidget.h and gtk.symbols 2009-08-13 11:22:57 -05:00
Cody Russell
5c89bbf3de Make the allocation parameter const 2009-08-13 11:21:15 -05:00
Cody Russell
2ba836defb Add widget->allocation setter method
Add gtk_widget_set_allocation() to be used by size_allocate() methods,
since widget->allocation is now sealed.  Bug #585211
2009-08-13 11:14:55 -05:00
Matthias Clasen
9ec4fb60f2 Don't return uninitialized pointers
This was giving me segfaults somewhere else.
2009-08-13 09:47:20 -04:00
Benjamin Otte
e3bdf9291f Bug 590959 - Set child_has_focus flag properly (second try)
Previously, this flag wasn't cleared properly when the notebook lost
focus, but only when the notebook was focussed again later.
As this flag is only used to advance correctly focus pages by grabbing
focus to the new page after switching the page, this is not good.
In particular, it can cause a focus grab when programmatically switching
the notebook page and the focus is inside a completely different widget.

A previous attempt at this fix in
6e0af6c252 has been reverted in
dfe0c8c0ca because it didn't work
correctly.
2009-08-12 14:49:02 +02:00
Matthias Clasen
f96d9132d6 Fix make check 2009-08-11 14:18:13 -04:00
Marek Kasik
70efa73311 Print when Enter pressed in certain GtkEntries of the print dialog
Print when Enter pressed in Name entry or Command Line entry in the
print dialog (#564695).
Add gtk_printer_option_set_activates_default() function and
gtk_printer_option_get_activates_default() function to control
behaviour of GtkPrinterOptionWidget.
2009-08-11 09:24:18 +02:00
Marek Kasik
d878dc8e1a Increment page sequence before print of the page, not after
When printing, increment page sequence before rendering of the page,
not after (#590084).
In opposite case it runs "end_page" function with wrong parameters when
drawing a page in another thread.
2009-08-10 11:37:32 +02:00
Javier Jardón
ec7c24d227 Remove some unused variables (GnomeBug:591218) 2009-08-10 11:06:54 +02:00
Matthias Clasen
54863bbba6 Correct a doc comment
Add 'papi' to the list of possible print backends, and mention 'file'
instead of 'pdf'.
2009-08-08 22:43:16 -04:00
Xan Lopez
dfe0c8c0ca Revert "Bug 590959 - Set child_has_focus flag properly"
This reverts commit 6e0af6c252.

The patch seems to break focus handling in some applications, like
Epiphany.
2009-08-07 15:51:17 +03:00
Michael Natterer
8296bf7035 Bug 69872 – GTK_WIDGET_SET_FLAGS should be deprecated
Add gtk_widget_has_grab() as replacement for GTK_WIDGET_HAS_GRAB().
2009-08-07 14:48:00 +02:00
Carlos Garcia Campos
c775906e4a Add gtk_print_operation_get_n_pages_to_print()
It returns the number of pages that will be printed to allow tracking
the progress of a print operation. Fixes bgo#582964.
2009-08-07 09:42:03 +02:00
Michael Natterer
eb0a5721d9 Bug 69872 – GTK_WIDGET_SET_FLAGS should be deprecated
Add gtk_widget_get_visible(). For symmetry reasons and for convenience
when a widget's visibility state is available as a boolean condition,
also add gtk_widget_set_visible() (which simply calls show()/hide()).
2009-08-07 08:53:32 +02:00
Matthias Clasen
549ffcbf5c Add a GtkIconView::item-padding property
The property can be used to fine-tune who much space each column
needs. See bug 586100.
2009-08-06 23:56:30 -04:00
Matthias Clasen
ae37d2097e Emit GtkAssistant::apply before computing the next step
This fixes bug 589745.
2009-08-06 23:52:18 -04:00
Matthias Clasen
00c439dfcb Fix a typo
This was reported in bug 586347.
2009-08-06 23:44:00 -04:00
Pascal Terjan
f8171ce092 Update tooltip if no removable one is selected 2009-08-06 23:28:49 +02:00
Benjamin Otte
6e0af6c252 Bug 590959 - Set child_has_focus flag properly
Previously, this flag wasn't cleared properly when the notebook lost
focus, but only when the notebook was focussed again later.
As this flag is only used to advance correctly focus pages by grabbing
focus to the new page after switching the page, this is not good.
In particular, it can cause a focus grab when programmatically switching
the notebook page and the focus is inside a completely different widget.
2009-08-06 16:39:19 +02:00
Marek Kasik
c44b0d2f7a Check for details request before print
Checks for details request before sending a job to a printer.
Shows busy state indication (cursor + status field).
This avoids printing to wrong printer (bug #576601).
2009-08-06 09:11:31 +02:00
Kristian Rietveld
d743b2fbea Bug 586374 – code does not follow documentation
Properly invalidate iterators in iter_next, iter_children,
iter_nth_child and iter_parent when FALSE is returned.  ListStore was
actually already mostly in order as the GSequence pointers are very
strictly checked, but to be a little stricter we've added stamp = 0
lines.  TreeStore did not invalidate its iterators, so stamp = 0 lines
were added where appropriate.  Unit tests have been added to check this.

Fixes bug 586374, reported by Mike Gemunde.
2009-07-30 21:23:47 +02:00
Kristian Rietveld
a79ef0866b Bug 555109 – selection broken when typeahead active
gtk_tree_view_enter_notify() now "ignores" the synthesized crossing
events.  The synthesized crossing events always have (0, 0) as
coordinates, which messes things up.  This patch does not fix all issues,
at least it makes the behavior much more reasonable again.  Watch bug
555109 for further discussion on the issue.
2009-07-30 20:24:31 +02:00
Kristian Rietveld
bce2a5173d Bug 573321 – additional check in gtk_tree_model_filter_convert_*
Added checks to see whether the passed iterators are not the same in
convert_child_iter_to_iter() and iter_to_child_iter() functions in both
the sort and filter models.

Fixes bug 573321, suggestion by Vadim Godunko.
2009-07-30 20:24:31 +02:00
Kristian Rietveld
069a593b0f Bug 539377 – Unnecessary warnings when GtkTreeView is not realized
Adapt gtk_tree_view_get_path_at_pos() and
gtk_tree_view_get_drag_dest_row() to just return FALSE when bin_window
is NULL and not hit a warning.  Makes this case consistent with the tree
view not having a model.  Documentation has been updated to clarify
this, unit test has been added.

Fixes bug 539377, based on a patch by Bjorn Lindqvist.
2009-07-30 20:24:31 +02:00
Kristian Rietveld
ff10f9ce02 Bug 498010, 546005 - fix assertion in gtk_tree_view_set_cursor_on_cell
Instead of failing with warning on !tree_view->priv->tree, return
silently when tree_view->priv->model is NULL.  Clarified in the
documentation that for invalid paths (and every path is invalid when no
model is set), the function will fail silently although the current
cursor will be unset.

Fixes bugs 498010 and 546005.
2009-07-30 20:24:31 +02:00
Kristian Rietveld
531c7e535b Start general GtkTreeView unit tests
Includes a test case for bug 546005 to start with, logic provided by
Paul Pogonyshev and Bjorn Lindqvist.  In the future, we should maybe
merge treeview-scrolling.c with this one to create one large monolithic
tree view tester.
2009-07-30 20:24:31 +02:00
Pascal Terjan
a4514f993e Allow disabling New Folder button in File Choser
Bug #570516. Add a new property "create-folders" meaning that the
"New Folder" button should be displayed in the modes where it used
to be.
2009-07-30 16:58:42 +02:00
Emmanuele Bassi
2d79405118 Bug #514260 – Better filtering for "Recently Used" files
Instead of refiltering the recently used files we should rebuild
the list altogether when the current GtkFileFilter changes; this
allows us to keep showing the maximum amount of recently used
files.

Fixes bug:

  http://bugzilla.gnome.org/show_bug.cgi?id=514260
2009-07-30 11:16:29 +01:00
Kristian Rietveld
c035c122e2 Remove unused dirty iter discovery functions
gtk_tree_view_discover_dirty_iter() and gtk_tree_view_discover_iter()
have been in the tree forever, but unused since 1.3.8 or so.  I guess we
no longer need them, so removed them.  Fixes a compiler warning as well.
2009-07-30 12:02:18 +02:00
Michael Natterer
6007761549 Fix gtk_widget_get_allocation()
- add it to the header
- add the symbol to gtk.symbols
- fix coding style and check for allocation != NULL
2009-07-30 11:49:47 +02:00
Cody Russell
4a73b41a34 add getter function for widget->allocation
Add gtk_widget_get_allocation() to retrieve a widget's allocation.
Needed as a step to enable GSEAL building.

This fixes bug #585211
2009-07-29 22:28:17 -05:00
Stefan Kost
ed58c1028a docs: inline see_also to sections docs and add missing <variablelist>
This fixes docbook validation for the file.
2009-07-28 11:20:22 +03:00
Federico Mena Quintero
d55ff39ad0 bgo#161489 - In the file chooser, let the left/right arrow keys switch focus between the file list and shortcuts
Based on a patch by Christian Neumair <cneumair@gnome.org>

Signed-off-by: Federico Mena Quintero <federico@novell.com>
2009-07-27 19:24:42 -05:00
Federico Mena Quintero
b50548e350 From the shortcuts pane, focus the GtkEntry and redirect unhandled keystrokes to it
This lets us do this:

1. click on a folder in the shortcuts pane
2. start typing a filename

Then, the typed filename will actually go to the filename entry, like
the user expects.  (Or to the search entry, in case the user clicked
on the Search shortcut.)

Also, removed the obsolete callback that made "/" and "~" typed in the
shortcuts pane bring up the location entry.

Signed-off-by: Federico Mena Quintero <federico@novell.com>
2009-07-27 19:12:41 -05:00
Federico Mena Quintero
0f5f7539f3 bgo#534462: Disable interactive search in the file chooser's shortcuts pane
People often do this:
1. Bring up a SAVE dialog
2. Click on a folder in the shortcuts pane
3. Start typing a filename
4. Oops!  The interactive-search entry in the shortcuts pane appears.

With this, the shortcuts pane will not bring up the interactive-search entry.  Then it
will be clear that you are not typing in the right place.

Signed-off-by: Federico Mena Quintero <federico@novell.com>
2009-07-27 19:12:41 -05:00
Philip Withnall
f9a1bfb7b9 Bug 589336 – Add GtkTreeViewColumn:sort-column-id property
Add the property, change notifications and documentation stubs.
2009-07-26 10:52:30 +01:00
Matthias Clasen
9660bfe9da Fix issues with resize handles
The resize handles were not correctly redrawn and not positioned
correctly, initially.
2009-07-24 00:47:09 -04:00
Paolo Borelli
c564b3ef2b Microoptimization in interactive search handling 2009-07-20 15:54:48 +02:00
Paolo Borelli
48f1b45b62 Bug 588943 – set correct selection before emitting cursor-changed when searching
Make sure the correct selection is set when emitting cursor-changed
during an interactive search
2009-07-20 15:54:35 +02:00
Xan Lopez
3484246dc3 g_strdup_print does not exist, the function is g_strdup_printf. 2009-07-20 09:58:22 +03:00
Matthias Clasen
267d209441 Remove markup from translatable strings
Pointed out in bug 588964. String change !
2009-07-20 01:10:52 -04:00
Matthias Clasen
d6afa6eff2 Fix a typo in the startup-id property definition
As well as some new GtkPrintOperation properties, which were not
correctly set up. This was noticed in bug 588958.
2009-07-19 23:52:58 -04:00
Matthias Clasen
4f49287659 Add a translator comment
This fixes bug 589035.
2009-07-19 23:21:52 -04:00
Hans Breuer
1e765d2df0 Use perl to make gtkalias.h without warnings 2009-07-18 13:31:51 +02:00
Michael Natterer
40408e74dd Two more getters for flags plus one new property
More stuff based on patches from Christian Dywan:
- gtk_widget_get_app_paintable()
- gtk_widget_get_double_buffered()
- r/w property "double-buffered"
2009-07-17 21:51:47 +02:00
Benjamin Otte
33ada9e938 Bug 588273 - Make number of validated rows depend on time, not row count
Previously, do_validate_rows() validated 300 rows per iteration. While
this is usually not problematic, as the typical tree view contains less
than 100 rows. Tree views with a lot of columns or complex cell
renderers could take inacceptably long, like:
- Epiphany's location bar entry completion has multiline and marked up
  text in every cell. Validating a single row took ~1.5ms here.
- In the list view in Nautilus, When enabling all columns, validating a
  single row would take ~3ms.
With 300 rows per iteration, that made those examples take 500ms/1s in a
signle main loop callback, and this obviously caused responsiveness
problems.

Now the code uses a timer and limits the time for validating rows to
30ms. This can cause less lines to be invalidated per call, so the
function might be called more often, but generally results in more
responsive applications.
2009-07-17 21:35:32 +02:00
Michael Natterer
74ca4e2482 Add API for more widget flags
Add the following functions based on a patch from Christian Dywan:
- gtk_widget_set/get_can_focus()
- gtk_widget_set/get_can_default()
- gtk_widget_has_default()
2009-07-17 21:20:14 +02:00
Matthias Clasen
c28d6b84fa Correct property types 2009-07-17 15:16:38 -04:00
Matthias Clasen
20dc8509f8 Complete the get_buffer() conversion
There was one direct buffer access in gtk_entry_real_delete_text
leftover, and it promptly made our testsuite fail.
2009-07-17 15:09:35 -04:00
Matthias Clasen
b2c8cb55c2 Fix DND onto an empty icon view
This did not work due to a copy and paste bug from the time when
the treeview DND code was turned into iconview DND code. Fixes
bug 599484.
2009-07-17 13:30:37 -04:00
Marek Kasik
98cdcce349 Change position of paper's dimensions according to reading direction
Change position of paper's dimensions in GtkPrintUnixDialog according
to reading direction.
2009-07-17 16:33:16 +02:00
Tristan Van Berkom
51149246c0 Fixed crashes when GtkEntry's internal buffer is not available (bug 588395)
To fix this I replaced the code that creates an internal buffer
at init and construction time with code that creates a buffer
at _get_buffer() time, this is the same as GtkTextView does and
fixes the crashes for me.
2009-07-16 23:52:46 -04:00
Matthias Clasen
7f83be8595 Make suitable GtkAssistant buttons default
We grab the default to the apply, forward or close buttons, as
appropriate. Also, make sure that the logic for setting the focus
to the best place on page change is applied to the initial page.
2009-07-16 22:06:40 -04:00
Murray Cumming
249be999a6 Fixed a typo that I didn't see until now, strangely. 2009-07-16 19:27:20 +02:00
Murray Cumming
eb76666f1c GtkToolPalette: Use gtk-toolbar-style and gtk-toolbar-icon-size settings.
* gtk/gtksettings.c: (settings_install_property_parser): Handle enums too.
	* gtk/gtktoolbar.c (gtk_toolbar_class_init): Move the gtk-toolbar-style and
	gtk-toolbar-icon-size settings into GtkSettings because we now use it in
	GtkToolPalette too.

	* gtk/gtktoolpalette.[h|c]: Add gtk_tool_palette_unset_style() and
	gtk_tool_palette_unset_icon_size(), and use the toolbar-style and
	icon-size from GtkSettings if these are not set via the set functions.

	* demos/gtk-demo/toolpalette.c (on_combo_style_changed),
	(do_toolpalette): Add and handle a -1 value to mean the desktop "Default"
	toolbar style.
2009-07-16 17:51:55 +02:00
Matthias Clasen
143b55c3cb Add a tooltip to the save folder combo
Add a tooltip that shows the full path of the current folder, to avoid
ambiguity. We only show the tooltip when the expander is collapsed to
avoid cluttering the full file chooser.
2009-07-15 19:17:36 -04:00
Matthias Clasen
a47c0754d7 Use G_CONST_RETURN for const return values 2009-07-15 18:29:13 -04:00
Matthias Clasen
9a3af66a21 Avoid gratitious behaviour change
gtk_entry_set_text() used to emit the ::delete-text, ::insert-text
signals. Changing to GtkEntryBuffer should not change this.
2009-07-15 18:25:02 -04:00
Matthias Clasen
b5dab96b45 Make GtkEntryBuffer::max-length and int property
This avoid a behaviour change in a corner case and should not make
any difference.
2009-07-15 16:12:09 -04:00
Michael Natterer
548f3a8c69 Add API for sealed member "visible" 2009-07-15 03:22:22 +02:00
Murray Cumming
a14e05fa59 GtkToolItemGroup now has label and label-widget properties.
* demos/gtk-demo/toolpalette.c (load_special_items): Demonstrate
	gtk_tool_item_group_set_label_widget().
	* gtk/gtktoolitemgroup.[h|c]: Rename the "item-group-name" property to
	"label" because that is what it is. Likewise rename the functions.
	Add a "label-widget" propert and get/set_label_widget() functions,
	based on the same code/API in GtkExpander.
2009-07-14 23:46:49 +02:00
Murray Cumming
fc226767eb GtkToolItemGroup: Rename the name property. GtkToolPalette: Added class padding.
* gtk/gtktoolitemgroup.[h|c]: Rename the name property to item-group-name
and rename get/set_name() to get/set_item_group_name(), to avoid a clash with
GtkWidget::name.
* gtk/gtktoolpalette.h: GtkToolPaletteClass: Add padding for future use.
2009-07-14 19:53:28 +02:00
Murray Cumming
ac7b0c91ae ToolPalette: Implement GtkOrientable.
* gtk/gtktoolpalette.[h|c]: Remove gtk_tool_palette_get/set_property(),
implementing GtkOrientable instead.
* gtk/gtktoolitemgroup.c:
* demos/gtk-demo/toolpalette.c: Use gtk_orientable_* instead.
2009-07-14 19:11:20 +02:00
Michael Natterer
2686930bfd Add gtk_widget_get_state() for accessing the sealed member "state" 2009-07-14 02:45:42 +02:00
Michael Natterer
8f60176229 Add API for some sealed widget flags
- gtk_widget_has_focus() for GTK_WIDGET_HAS_FOCUS()
- gtk_widget_get_sensitive() for GTK_WIDGET_SENSITIVE()
- gtk_widget_is_sensitive() for GTK_WIDGET_IS_SENSITIVE()
2009-07-14 02:12:40 +02:00
Michael Natterer
66ae394eb5 Add API for the sealed member "activatable" 2009-07-14 01:53:56 +02:00
Michael Natterer
dffc1bf19d Add API for sealed members xpad, ypad, xalign, yalign and sensitive 2009-07-14 01:45:03 +02:00
Michael Natterer
9e5b3a46b1 No need to have single-include guards in a private header 2009-07-14 01:33:52 +02:00
Matthias Clasen
0e8fe66f09 Fix some problems with prelighting of icons in entries 2009-07-13 14:48:10 -04:00
Matthias Clasen
ea3184f129 Make gtk_editable_get_chars work as before
It used to return actual entry contents, regardless of visiblity.
Make it do that again. This was reported in bug 588461.
2009-07-13 13:37:35 -04:00
Murray Cumming
2976f4d98c GtkTool*: Removed the HAVE_EXTENDED_TOOL_SHELL_SUPPORT_BUG_535090 ifdefs. This gives us nicer text alignment among other things. 2009-07-13 19:37:25 +02:00
Murray Cumming
dad6e7343c ToolShell: Add ellipsize, text-orientation, text-alignment and size-group.
* gtk/gtktoolshell.c: Added vfuncs to get/set ellipsize, text-orientation,
	text-alignment and size-group plus getter/setters to invoke these vfuncs.
	* gtk/gtktoolitem.[h|c]: Added getters and setters to get/set these from the
	parent GtkToolShell. This is in the style of the existing "properties".
	* gtk/gtktoolbutton.c: Updated to use the extra properties.

	* docs/reference/gtk/gtk-sections.txt
	* gtk/gtk.symbols: Updated to mention the new functions.

	These new "properties" are used by GtkToolPalette.
2009-07-13 19:13:59 +02:00
Murray Cumming
8a294b8bb7 Added missing files that I thought I had already added. 2009-07-13 19:11:12 +02:00
Johannes Schmid
5a1415feda Added GtkToolPalette.
* gtk/gtktoolpallete.[h|cc]:
        * gtk/gtktoolitemgroup.[h|cc]: Added a tool pallete container widget,
        with groups of toolbar items that can be shown as a grid of icons
        or a list of names.
        * gtk/Makefile.am:
        * gtk/gtk.h:
        * gtk/gtkmarshal.list: Mentioned the new files.

        Bug #567729
2009-07-13 17:38:34 +02:00
Hans Breuer
52941c5089 Mark gtk_custom_paper_unix_dialog_get_type() unix only 2009-07-13 09:45:06 +02:00
Hans Breuer
fcdeab5456 Fix gccism - pointer arithmetic with void pointers 2009-07-13 09:45:01 +02:00
Hans Breuer
c6f9e39762 Fix c99ism - declaration in the mid of a block 2009-07-13 09:45:00 +02:00
Hans Breuer
b97ccecd5d Update msvc build 2009-07-13 09:45:00 +02:00
Matthias Clasen
26e67850a7 Revert 8031432c09
We can't disallow single-includes unconditionally because gtkentrybuffer.h
is included in gtkentry.h.
2009-07-12 23:04:57 -04:00
Matthias Clasen
c25ef64c70 Exclude GtkEntry::buffer from default value testing 2009-07-10 18:12:42 -04:00
Matthias Clasen
66f108874b Make pltcheck pass 2009-07-10 18:12:22 -04:00
Michael Natterer
b664c328b4 Create a buffer in init() so subclasses can use the entry in their init() 2009-07-10 20:27:33 +02:00
Marek Kasik
0ef74c936f Add paper size combo and orientation combo to print dialog
Paper size combo and orientation combo can be added by
gtk_print_operation_set_embed_page_setup_dialog() to GtkPrinUnixDialog
now. This function induce calling of
gtk_print_unix_dailog_set_embed_page_setup_dialog() after creation of
dialog. These two functions control embed-page-setup-dialog properties
in GtkPrintOperation and in GtkPrintUnixDialog.
There is also new function gtk_print_unix_dialog_get_page_setup_set()
which says whether page setup was set by user.
Selected page setup is stored as default page setup in
GtkPrintOperation.
New class is added, its name is GtkCustomPaperUnixDialog. The class
manages custom sizes. It is derived from GtkPageSetupUnixDialog's
CustomPaperDialog structure.
Page layout preview is modified, so, it shows dimensions of current
page setup (mm or inch - depends on locale). It also shows the name of
actual paper if page setup dialog is not embedded (paper size combo is
not visible).
gtk-demo is actualized to include this new feature.
2009-07-10 11:28:31 +02:00
Matthias Clasen
2bb2820272 Make link coloring in labels optional
Turns out that link coloring is expected for actual hypertext-like
use, but when using links just as 'mutant button', then it gets
in the way.
2009-07-09 13:59:35 -04:00
Alexander Larsson
305979d5a1 Remove accidentally added debug spew 2009-07-09 17:10:56 +02:00
Alexander Larsson
9044ec9bb9 Correctly set enter/leave events as detail=nonlinear
If we get a nonlinear enter/leave notify on the toplevel we need
to set nonlinear in all the events we send, even if the in-toplevel
tree is linear.

This fixes combobox menus popping down immediately when you click
(not hold). (bug #587559)
2009-07-09 17:06:46 +02:00
Michael Natterer
8031432c09 Disallow single-include unconditionally because this is a new file 2009-07-09 16:31:27 +02:00
Michael Natterer
becb5057fc Add single-include guard 2009-07-09 16:30:52 +02:00
Stef Walter
eab02f697a GtkEntryBuffer holds text for GtkEntry
Adds a 'model' type buffer for GtkEntry in which the actual
textual data is stored. GtkEntryBuffer can be subclassed.

Among other things, this allows GtkEntry to be used for secrets
that need to be stored in non-pageable memory. It also allows
buffers to be shared by entries.

See bug #576801.
2009-07-08 20:41:53 -05:00
Alexander Larsson
8ebf278ebb Fix defaultvalue test due to csw
Initialize GdkWindowAttr required fields. This makes sure toplevel
windows are not accidentally larger than 16bit.
2009-07-08 18:47:43 +02:00
Benjamin Otte
a0ab93ca13 Remove unused variable 2009-07-08 17:57:30 +02:00
Michael Natterer
2de23ea6cf Fix the remaining issues that broke the PLT check
Add internal API for the default button box layouts to so we don't
need to call deprectated GTK+ functions (which are invisible with
GTK_DISABLE_DEPRECATED).
2009-07-08 17:01:32 +02:00
Alexander Larsson
6fc6903c16 Move get_cells implementation from deprecated function
This way the deprecated function calls the new one instead of the other
way around, which fixes pltcheck.sh
2009-07-08 16:46:26 +02:00
Alexander Larsson
fb1aeab052 Move get_cells implementation from deprecated function
This way the deprecated function calls the new one instead of the other
way around, which fixes pltcheck.sh
2009-07-08 16:46:26 +02:00
Michael Natterer
11ec2ede56 Some indentation fixes and minor cleanup 2009-07-08 16:37:29 +02:00
Andre Klapper
a338c0f5ea Improve translator comment. Fixes bug #569393. 2009-07-07 16:37:07 +01:00
Matthias Clasen
3b1a673ccd Reenable tests 2009-07-07 01:08:01 -04:00
Matthias Clasen
b3969a3d75 2.17.3 2009-07-07 01:05:29 -04:00
Matthias Clasen
27f972cd34 Fix some distcheck issues 2009-07-07 00:29:14 -04:00
Matthias Clasen
1c6cd91b64 Temporarily turn of tests
Since there are some csw regressions.
2009-07-07 00:14:31 -04:00
David Zeuthen
200d5dde04 Bug 587485 – GMountOperation::show-processes support
- Add support for GMountOperation::show-processes

 - Implement process look up for the X11 target
2009-07-06 14:23:03 -04:00
Matthias Clasen
dab552dc22 Use gdk_display_sync instead of XSync 2009-07-06 02:03:21 -04:00
Matthias Clasen
42e7318b62 Fix redraw issues in GtkInfoBar
This was reported in bug 587716. I have no idea why this used
to work just fine for me...
2009-07-06 01:56:05 -04:00
Alexander Larsson
0e07d8b189 Hack that works around firefox plugin crash
It turns out that mozilla, as per the gtk2xt code selects for input on
the socket with a mask of 0x0fffff (for god knows why) which includes
ButtonPressMask, causing a BadAccess if someone else also selects for
this. As per the client-side windows merge we always normally selects
for button press so we can emulate it on client side children that
selects for button press. However, we don't need this for GtkSocket,
so we unselect it here, fixing the crashes in firefox.
2009-07-04 20:21:26 +02:00
Hans Breuer
cd58baa7e3 Updated msvc build 2009-07-04 12:19:13 +02:00
Hans Breuer
fbf0f2d0ec Fix includes for missing prototypes 2009-07-04 12:19:09 +02:00
Hans Breuer
37957aea34 Use G_PI rather than M_PI 2009-07-04 12:19:08 +02:00
Hans Breuer
b11c4d9fae gtk_status_icon_get_title() must return a value 2009-07-04 12:19:06 +02:00
Hans Breuer
fbf73aada9 Updated msvc build 2009-07-04 12:19:05 +02:00
Matthias Clasen
584c9c8a02 Make stock buttons have mnemonics again
We used to treat stock buttons as having an implicit use-underline.
A recent but fix lost that.
2009-07-01 19:02:45 -04:00
Cody Russell
6060dab77a fix wrap width calculations that caused item height to be wrong
Fix by logari81 to the wrap width calculations fir GtkIconView. #490724
2009-07-01 13:17:51 -05:00
Alexander Larsson
0111030586 Merge branch 'client-side-windows' 2009-07-01 16:15:03 +02:00
Benjamin Otte
3c97f037a9 clean up code in gtk_list_store_set_n_columns()
Previous code's messiness noted by Francisco Javier Taboada Aguado
in http://mail.gnome.org/archives/gtk-devel-list/2009-June/msg00001.html
2009-07-01 10:57:11 +02:00
Matthias Clasen
8cca80d6a2 Improve handling of print-to-file uri
Going from print-to-file to a real printer and back used to nuke
an app-provided uri; now we keep the initial settings around to
avoid that.  Fixes bug 587086.
2009-06-28 16:14:21 -04:00
Matthias Clasen
1a42be00b4 Whitespace cleanups 2009-06-28 16:13:33 -04:00
Benjamin Otte
271a635a2f make the size column resizable 2009-06-27 11:33:23 +02:00
Benjamin Otte
02ac8ea3af make sure the "Create folder" button doesn't get shown accidentally
Switching to search or recent files mode and back to browse mode made
the button visible previously
2009-06-27 11:32:57 +02:00
Benjamin Otte
6c18c25adb check for allowed NULL inside g_return_if_fail() statements
This patch replaces

if (foo != NULL)
  g_return_if_fail (GTK_IS_FOO (foo));

with

g_return_if_fail (foo == NULL || GTK_IS_FOO (foo));
2009-06-27 11:31:13 +02:00
Benjamin Otte
adf8db68c7 clarify the init value for the default sort column id
The patch is basically s/-2/GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID/
2009-06-27 11:30:06 +02:00
Benjamin Otte
655e0d8ddc unconditionally set right alignment for the size column 2009-06-27 11:29:36 +02:00
Benjamin Otte
4d49843317 remove unused variables 2009-06-27 11:28:07 +02:00
David Zeuthen
a92c9ce9a5 Bug 586691 – Better GtkInfoBar defaults
Signed-off-by: David Zeuthen <davidz@redhat.com>
2009-06-25 15:23:40 -04:00
Michael Natterer
f35c317b68 Fix warning about uninitialized variable plus spacing and indentation cleanup 2009-06-25 13:30:15 +02:00
Matthias Clasen
724ab58244 Add a way to turn off toggle spacing in menus
Reserving toggle space is nice for consistency in main menus
and context menus, but it gets in the way in special situations,
such as combo boxes, tabular menus, etc.
2009-06-24 01:01:51 -04:00
Stanislav Brabec
a39b2dcee4 bgo#529908 - Sanitize handling of motion events in GtkNotebook
GtkNotebook used gdk_window_get_pointer() incorrectly, as it already
had coordinates from various GdkEvents.  Using get_pointer() means
that you get pointer positions *after* the event has happened, which
leads to visual out-of-sync results, or inadvertently detached tabs if
you click on them while your machine is being slow.

Signed-off-by: Federico Mena Quintero <federico@novell.com>
2009-06-23 14:36:22 -05:00
Bastien Nocera
b436f5b8a3 Bug 461944 – pressing the volume icon in full screen shuts down the sound
Don't pass the click on the button through to the scale when the
dock popup will be moved, otherwise we could end up changing the
sound in unexcepted ways (to zero for vertical popups at the bottom
of the screen for example).
2009-06-22 17:25:21 +01:00
Tristan Van Berkom
515a0b61a1 Accelerators failed for submenus (GNOME bug 582025)
gtk/gtkmenuitem.c: Override custom_tag_finished() for "accelerator" and search
the correct toplevel GtkWindow to attach accelerators to menu items.

gtk/gtkwidget.[ch]: Added _gtk_widget_buildable_finish_accelerator() to allow
subclasses to specify a toplevel window to associate with when parsing <accelerator>
tags
2009-06-22 12:19:56 -04:00
Matthias Clasen
d3ae855ce6 Forgotten header file 2009-06-22 11:46:03 -04:00
Matthias Clasen
af219b818f Don't force toggle size for tabular menus either 2009-06-22 10:00:19 -04:00
Matthias Clasen
8f57c91766 Remove extra padding from comboboxes
We do want to have consistent padding in menus in menubars and context
menus, but the menus used in comboboxes don't need the extra padding.
Add private GtkMenu API for turning this off. Bug 564063
2009-06-22 00:53:14 -04:00
Matthias Clasen
823151ba8c Fix 'Add to bookmarks' initial sensitivity
Make sure that we always call bookmarks_check_add_sensitivity() at
least once before popping up a newly created menu. Fixes bug 585858.
2009-06-21 23:30:27 -04:00
Matthias Clasen
0f00d3fdb0 Reduce roundtrips
Setting a tooltip on a widget unfortunately triggers several roundtrips
to the X server. We reduce this overhead by only doing it if the
widget is visible, and by deferring to an idle. See bug 585626.
2009-06-20 16:34:54 -04:00
Matthias Clasen
374aa04954 Add a title property to GtkStatusIcon
This can be used to give ATs a string to display for tray icons.
See bug 585802.
2009-06-20 13:53:32 -04:00
Federico Mena Quintero
3d527afadb bgo#586315 - gtk_file_chooser_list_shortcut_folders() was crashing
The virtual method list_shortcut_folders returns a GSList * of GFile *.
In turn, gtk_file_chooser_list_shortcut_folders() converts those to strings.

However, the delegate in gtkfilechooserutils.c was calling
gtk_file_chooser_list_shortcut_folders() every time, so we were trying
to convert invalid data.

Now we have an internal function that deals with GFile *.  That
function is called by the delegate, and the conversion is done only
once by the API entry points.

Signed-off-by: Federico Mena Quintero <federico@novell.com>
2009-06-18 21:57:54 -05:00
Matthias Clasen
6382eac6d8 Fix an oversight in mnemonic handling
In some situations, GtkButton would ignore the use-underline
property. This was reported in bug 586330.
2009-06-18 22:12:26 -04:00
Federico Mena Quintero
68171b506f Show the size column by default in the file chooser
Signed-off-by: Federico Mena Quintero <federico@novell.com>
2009-06-18 19:48:38 -05:00
Ryan Lortie
6fe357965a Use g_mapped_file_unref()
- drop deprecated use of g_mapped_file_free()
  - bump glib version requirement
2009-06-18 15:11:57 -04:00
Federico Mena Quintero
3c75004474 Don't set the sort column when there is no model
We can't set the sort column when we load the GtkFileChooser's settings, as the
file models may not have been created yet.  Wait until the models are actually
present; then we can set the sort column.

Signed-off-by: Federico Mena Quintero <federico@novell.com>
2009-06-17 20:33:57 -05:00
Alexander Larsson
7303f3c9fd Merge branch 'master' into client-side-windows
This updates client-side-windows to the the latest soname
change for easier testing.

Conflicts:
	gdk/x11/gdkwindow-x11.c
	tests/Makefile.am
2009-06-17 12:56:05 +02:00
Benjamin Otte
1a385c50f0 fix compile warnings
Fallout from running make CFLAGS="-Werror"; mostly missing casts and
constness issues.
2009-06-17 10:28:03 +02:00
Vincent Untz
d50cfd192b Use g_return_val_if_fail instead of g_return_if_fail 2009-06-16 18:40:01 +02:00
Matthias Clasen
3bf1c7adad More uses of the get_cell_renderers functions 2009-06-16 12:37:33 -04:00
Matthias Clasen
c12a8388f6 More instances of those deprecated functions 2009-06-16 12:21:36 -04:00
Matthias Clasen
d51132e584 Don't use deprecated api internally 2009-06-16 11:27:06 -04:00
Matthias Clasen
f02dedde6d Don't export a private function 2009-06-15 20:05:49 -04:00
Matthias Clasen
f6890e3b35 Fix docs build 2009-06-15 20:05:24 -04:00
Matthias Clasen
23fa53f1bc Properly export gtk_info_bar_response
Also fix up its docs.
2009-06-15 20:04:48 -04:00
Matthias Clasen
de3cc27706 Cleanup some translation handling
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.
2009-06-15 18:25:04 -04:00
Matthias Clasen
362127c33c Fix the docs for gtk_recent_info_get_application_info()
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.
2009-06-15 18:25:04 -04:00
Matthias Clasen
b6fc50c855 Add some more font sizes
Make 15 and 17 available in the list. See bug 585371
2009-06-15 18:25:04 -04:00
Matthias Clasen
6abc52a29d Deprecate get_cell_renderers implementations
These have been superseded by gtk_cell_layout_get_cells.
Fixes bug 562335.
2009-06-15 18:25:04 -04:00
Daniel Elstner
21594f5574 Terminate case with break in switch statement
* gtk/gtkstatusicon.c (gtk_status_icon_set_property): Add missing
break statements to unterminated case blocks inside switch.
2009-06-15 22:07:50 +02:00
Matthias Clasen
ed33a20b29 Bug 565317 - Resulting image of GtkCellRendererPixbuf depends on order of set properties
(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.
2009-06-15 21:10:34 +02:00
Federico Mena Quintero
2b3de3dd75 bgo#580560 - Make Backspace work in the file chooser to to to the parent directory
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>
2009-06-15 12:37:07 -05:00
Davyd Madeley
0532056349 Merge branch 'button-box-orientable-584598' 2009-06-15 09:48:14 +08:00
Davyd Madeley
2901695dfd Support GtkOrientable for GtkButtonBox
Edit: Update for coding style
2009-06-15 09:14:17 +08:00
Benjamin Gramlich
1d4cba6876 bgo#484922 - Remember the sort column and order in the file chooser
Signed-off-by: Federico Mena Quintero <federico@novell.com>
2009-06-12 17:31:28 -05:00
Benjamin Gramlich
69a0611391 Add load/save functions for the sort column order in GtkFileChooserSettings
Signed-off-by: Federico Mena Quintero <federico@novell.com>
2009-06-12 16:40:25 -05:00
Federico Mena Quintero
2accf2fd21 Fix compiler warnings
Signed-off-by: Federico Mena Quintero <federico@novell.com>
2009-06-12 13:59:29 -05:00
Milan Bouchet-Valat
67632a578b bgo#562579 - Don't show errors when the initial folder does not exist
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>
2009-06-12 13:25:26 -05:00
Milan Bouchet-Valat
d87dbd66d6 bgo#171416 - Don't create a folder with the default name 'Type name of new folder'
Signed-off-by: Federico Mena Quintero <federico@novell.com>
2009-06-12 11:45:43 -05:00
Matthias Clasen
3f20ccd710 Add a missing newline
There was a missing newline in one of the g_printerr messages
in updateiconcache.c. String change.
2009-06-12 10:21:42 -04:00
Milan Bouchet-Valat
a27e748586 bgo#355851 - Hide backup files in the file chooser
Backup files are hidden along with dotfiles, just like Nautilus.

Signed-off-by: Federico Mena Quintero <federico@novell.com>
2009-06-11 19:58:51 -05:00
Milan Bouchet-Valat
de280cc5c8 bgo#486839 - The path bar's area shouldn't change vertical size to avoid the browse widgets jumping
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>
2009-06-11 18:50:05 -05:00
Alexander Larsson
89e187e7c1 Use gdk_window_get_root_cords to get popup position for combobox
This makes us handle transformed offscreen widgets much better.
2009-06-08 20:01:05 +02:00
Matthias Clasen
a01a4df697 Update docs to match actual API
Remove references to gtk_info_bar_set_contents(), and update
the example to use gtk_info_bar_get_content_area().
2009-06-08 10:16:51 -04:00
Marek Kasik
a12a583c99 Add ability to print selection
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().
2009-06-08 15:37:32 +02:00
Matthias Clasen
c981ddf92f Don't grab the keyboard during DND
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.
2009-06-07 22:19:52 -04:00
Matthias Clasen
dccfd423ca Don't unselect when resizing
This was causing problems in Epiphany. Fixes bug 584805.
2009-06-05 20:11:44 -04:00
Matthias Clasen
a85fac7145 Add a message area widget
It is called GtkInfoBar. See bug 555344.
2009-06-05 18:00:26 -04:00
Denis Chertykov
4d7bbd058e bgo#327152 - Ellipsize long directory names in GtkPathBar, and better layout for the pathbar
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>
2009-06-05 14:13:03 -05:00
Matthias Clasen
64b8f4e039 Avoid assertions due to invalid page sequence
It is much nicer to handle this gracefully in compute_last_button_state.
Fixes bug 584125.
2009-05-30 02:14:03 -04:00
Cody Russell
47db0f0020 Improve GtkEntry handling of invalid stock ids
Instead of silently showing no icon, show a "missing image"
icon, like GtkImage does in the same situation. Fixes bug 579590.
2009-05-30 00:10:14 -04:00
Matthias Clasen
d2ac65c8ba Fix a typo in the ::update-custom-widget docs 2009-05-29 18:47:23 -04:00
Matthias Clasen
7b49379b55 Fix a typo in the docs 2009-05-29 18:40:10 -04:00
Eitan Isaacson
8166a0e1af Fix GtkAssistant's accessible children. Fixes bug #575319. 2009-05-29 19:25:43 +02:00
Lin Ma
d0f887ddb1 Fix GtkTooltip destroy the custom widget
Fixed 576091, Custom_widget does not get destroyed when the tooltip
goes away. Add a release note for this fix.
2009-05-25 10:01:04 +08:00
Carlos Garcia Campos
7437a79b85 Fix a crash when printing with defer drawing enabled
Fixes bgo#582963
2009-05-23 11:12:56 +02:00
Matthias Clasen
e18a4fa047 Improve gtk_combo_box_get_active_text() docs
Make it more explicit that the return value needs to be freed.
Fixes bug 583050.
2009-05-23 01:20:39 -04:00
Carlos Garcia Campos
9b7fa7a904 Use nr_of_pages_to_print instead of nr_of_pages when updating printing progress
Fixes bgo#582950.
2009-05-18 09:43:13 +02:00
Matthias Clasen
122e0b40ba Improve GtkNotbook behaviour with too little space
This fixes bug 582488. The patch was provided by Morten Welinder.
2009-05-17 23:47:30 -04:00
Davyd Madeley
f64ef8ea51 Fix broken compile: s/gtk_selection_atom/gtk_selection_atoms
Introduced in 94b63ec9b7
2009-05-18 10:48:21 +08:00
Matthias Clasen
94b63ec9b7 Avoid a warning when persisting clipboards
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.
2009-05-17 20:41:50 -04:00
Martin Nordholts
f253b6927c Avoid memory corruption on complicated confirm-overwrite logic
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.
2009-05-15 22:20:30 +02:00
Marek Kasik
91190ce281 Add ability to print in number-up mode for file backend and lpr backend
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".
2009-05-13 18:28:42 +02:00
Federico Mena Quintero
26c10075f9 Merge fix for bgo#315462 - Make GtkLabel deal with too-small height allocations gracefully
Merge branch 'gtk-2-16'
2009-05-12 19:13:33 -05:00
Federico Mena Quintero
67e0a44100 bgo#315462 - Make GtkLabel deal with too-small height allocations gracefully
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>
2009-05-12 19:12:55 -05:00
Federico Mena Quintero
4134c346f9 Merge fix for bgo#463773 - Handle a NULL display in gtk_clipboard_get_for_display() so Flash won't hang 2009-05-12 13:50:45 -05:00
Federico Mena Quintero
e2bce0d630 bgo#463773 - Handle a NULL display in gtk_clipboard_get_for_display() so Flash won't hang 2009-05-12 13:44:04 -05:00
gheet
c57fc80465 Adding PAPI printbackend
Adding a new print backend module using libpapi detals see GNOME#382676.
(gheet)
2009-05-11 18:33:08 +01:00
Matthias Clasen
2e9385efe2 Make gtk-update-icon-cache not fall over leftover temp files
When called with the --force option, try to remove the .icon-theme.cache
file before giving up. This fixes rh#500163.
2009-05-11 12:05:35 -04:00
Matthias Clasen
0fd185fa6d Make gtk-update-icon-cache not fall over leftover temp files
When called with the --force option, try to remove the .icon-theme.cache
file before giving up. This fixes rh#500163.
2009-05-11 12:02:06 -04:00
Matthias Clasen
ae94c371d1 Add a separate keybinding signal for activating links
Keeping the keybinding signal and the regular signal separate is
cleaner and allows us to pass the uri as a parameter to the
activate-link signal.
2009-05-11 02:44:12 -04:00
Matthias Clasen
9dbb30482b Add link support to GtkLabel
This patch is based on SexyUrlLabel, but with significantly enhanced
functionality: keynav, tooltips, context menu, theming.
2009-05-11 01:23:13 -04:00
Behdad Esfahbod
a398c840be Add git.mk to generate .gitignore files
Add four new doc templates that were not in repository.
2009-05-04 14:29:21 -04:00
Matthias Clasen
cc4cf97d62 GTK+ 2.17.0 2009-05-04 01:54:06 -04:00
Matthias Clasen
44c6b24fc7 Avoid double browser windows from the about dialog. 2009-05-03 23:49:24 -04:00
Matthias Clasen
b125eeae9d Make GtkAssistant keep its padding when built with GtkBuilder 2009-05-03 23:44:01 -04:00
Matthias Clasen
6eb95098b1 Don't leak RequiresInfo when parsing GtkBuilder files
This fixes bug 579366.
2009-05-03 23:32:33 -04:00