Commit Graph

19151 Commits

Author SHA1 Message Date
Timm Bäder
01d278a74f gtk_list_box_set_focus: Handle ist_box == NULL
Rows without a parent GtkListBox can happen in Glade and its previewer.
2013-10-03 14:05:12 +02:00
Bastien Nocera
744b790fdb iconhelper: Fix leak when rendering to cairo surface
https://bugzilla.gnome.org/show_bug.cgi?id=709264
2013-10-02 17:21:48 +02:00
Bastien Nocera
e53bb1bf1b iconhelper: Use g_clear_* helpers
https://bugzilla.gnome.org/show_bug.cgi?id=709264
2013-10-02 17:21:48 +02:00
Bastien Nocera
8938f3c47d icon-theme: Fix 2 memory leaks in GtkIconInfo
https://bugzilla.gnome.org/show_bug.cgi?id=709264
2013-10-02 17:21:48 +02:00
Bastien Nocera
7c595bcc53 icon-theme: Use g_clear_* helpers in finalize
https://bugzilla.gnome.org/show_bug.cgi?id=709264
2013-10-02 17:21:48 +02:00
William Jon McCann
e9b9fd20b9 notebook: Add a style property for whether to draw a tab gap
Add a has-tab-gap style property to GtkNotebook so that we can
disable drawing the gap between tabs and the page in the Adwaita
theme without breaking existing themes.

https://bugzilla.gnome.org/show_bug.cgi?id=707920
2013-10-02 10:51:16 -04:00
William Jon McCann
b609377e3e notebook: Fix rounding error in vertical alignment of arrow
https://bugzilla.gnome.org/show_bug.cgi?id=707920
2013-10-02 10:51:16 -04:00
William Jon McCann
e07fec3e83 notebook: Make notebook scroll arrows honor initial gap setting
So that they can be styled so they are not right on the edge.

https://bugzilla.gnome.org/show_bug.cgi?id=707920
2013-10-02 10:51:16 -04:00
William Jon McCann
8dd100d9b0 notebook: Improve the style of the default arrows
https://bugzilla.gnome.org/show_bug.cgi?id=707920
2013-10-02 10:51:15 -04:00
William Jon McCann
81b0808849 notebook: Use initial-gap on both edges of the tab header
https://bugzilla.gnome.org/show_bug.cgi?id=707920
2013-10-02 10:51:15 -04:00
Alexander Larsson
79e5069dff GtkTextView: Fix horizontal scrolling
We didn't properly invalidate when scrolling horizontally.

https://bugzilla.gnome.org/show_bug.cgi?id=708019
2013-10-02 16:23:41 +02:00
Alexander Larsson
1ac13435b7 GtkTextView: Fix regression in GtkSourceView drawing
GtkSourceView draws before chaining upo to GtkTextView and assumes
that this will be visible, but the pixelcache will just overdraw
that with background.

So, we stop drawing the background to the pixel cache and instead
make it an CAIRO_CONTENT_COLOR_ALPHA surface to make the previously
drawn content see through.

This is slower, but more backwards compatible.

https://bugzilla.gnome.org/show_bug.cgi?id=708423
2013-10-02 16:23:41 +02:00
Matthias Clasen
5abff7bd4c Improve gtk_container_add docs
Mention that some containers add intermediate children automatically.
2013-09-30 20:53:19 -04:00
Matthias Clasen
c02a12a746 Make it possible to hide custom titlebars
Previously, we were showing and hiding the custom titlebar
widget in response to state changes such as maximization.
Instead, use gtk_widget_set_child_visible() and leave
show/hide to applications. This makes it possible to set
a custom titlebar and hide it, for a titlebar-less appearance.

https://bugzilla.gnome.org/show_bug.cgi?id=707132
2013-09-30 20:19:08 -04:00
William Jon McCann
41b9a17dfc Fix typo in gtk-win32-base.css 2013-09-30 18:27:13 -04:00
Cosimo Cecchi
3d602f5b0a icontheme: use g_file_load_contents() for symbolic icons
When loading a symbolic icon, g_file_get_contents() is currently used
with the icon pathname, to load its SVG data. This won't work when the
icon is not a local file, for instance when a symbolic icon is loaded
from a GFileIcon with a GResource path.
Fortunately GtkIconInfo already holds a GFile, so we can just use
g_file_load_contents() to load the data instead.

https://bugzilla.gnome.org/show_bug.cgi?id=709056
2013-09-30 09:45:22 -07:00
Tristan Van Berkom
28a3638448 gtk-doc fixup for gtk_widget_class_bind_template_child_full()
Updated documentation to specify that '0' should be specified if
one does not need to automatically assign a bound child to a public
or private instance member (now that negative values are private
structure offsets).
2013-09-30 17:29:22 +02:00
Ryan Lortie
e3b9ea5ab6 GtkTreeViewColumn: start padding at 0
If we start with a padding of -1 then it can leak out of the size
allocation request for the column when the treeview is empty.  The
GtkTreeView will then collect these -1 values and add them together,
returning -n where 'n' is the number of columns.

This is usually not a problem because treeviews tend to be used with a
scrollbar and the width of the scrollbar will be added to this number
bringing it into positive territory again.  On Ubuntu, with overlay
scrollbars, this is not the case, however.

https://bugzilla.gnome.org/show_bug.cgi?id=703062
2013-09-30 09:23:00 -04:00
Behdad Esfahbod
b0e168d58f Bug 467720 - Useless use of const qualifier 2013-09-28 14:14:31 -04:00
John Ralls
124e814f47 Bug 651224 - Potential NULL display ptr from quartz gtk_clipboard_wait_for_contents 2013-09-28 10:55:22 -07:00
John Ralls
133a0c7426 Clarify Cursor Theme GDK Warning 2013-09-28 10:05:29 -07:00
Matthias Clasen
3f6a1dc9a9 More formatting style adjustments
Lose a whole bunch of unnecessary 'real', shortening
excessively long function names.
2013-09-27 22:00:38 -04:00
Matthias Clasen
c31a34d5ee Some coding style improvements
Use g_return_if_fail in GTK+ style in all public APIs,
avoid dereferencing variables early, shorten some
function names.
2013-09-27 21:39:10 -04:00
Matthias Clasen
58621b00de Trivial: remove an unused declaration
_gtk_list_box_accessible_update_selected is not used and
does not exist.
2013-09-27 20:32:39 -04:00
Bastien Nocera
f5291660e0 Fix possible crash in header bar
When the header bar's top-level widget is not a GtkWindow,
don't try to get the inexistant "decoration-button-layout"
property.
2013-09-27 17:27:31 +02:00
Matthias Clasen
377c124446 csd: Avoid jumping windows
The size of the shadow and invisible borders can (and usually
will) change between backdrop and focused windows, while the
overall window size remains unchanged. This causes the visible
window to visually 'jump'. We can avoid this by always reserving
the maximum of the focused and unfocused border sizes. The code
for positioning the input-only windows making up the invisible
border is adjusted to deal with this. We now always place the
invisible border right outside the visible content, even if the
shadow extends out much farther.

https://bugzilla.gnome.org/show_bug.cgi?id=707524
2013-09-26 23:19:29 -04:00
Cosimo Cecchi
71ad9a8fdd notebook: render a frame and background in the header
And use the "header" style class to do that.
This allows themes to set e.g. the background of the tab header
differently.

Themes will need slight adjustment to make things appear
as before.

https://bugzilla.gnome.org/show_bug.cgi?id=643914
2013-09-26 19:27:54 -04:00
Cosimo Cecchi
a2ed88b3ee Allow active tab children to be styled
This allows one to style the children of an active
tab label from CSS.

https://bugzilla.gnome.org/show_bug.cgi?id=691163
2013-09-26 19:19:53 -04:00
Matthias Clasen
bd1df33798 Trivial: correct vfunc signatures
Harmless confusion between gint and gboolean
https://bugzilla.gnome.org/show_bug.cgi?id=697031
2013-09-26 19:16:14 -04:00
Sébastien Wilmet
f75aa5fdb4 GtkTextView: add create_buffer virtual method pointer
This allows subclasses of GtkTextView that require a corresponding
subclass of GtkTextBuffer to automatically do the right thing when
constructed with a NULL buffer. An example of this is GtkSourceView
which requires a GtkSourceBuffer.

https://bugzilla.gnome.org/show_bug.cgi?id=708584
2013-09-26 18:36:20 +02:00
Matthias Clasen
7439e03f3d Fixups to GtkStack
The GtkStack and GtkStackSwitcher code did not really
follow GTK+ conventions for includes. Fix that, and also
fix up a case of gpointer vs gpointer* confusion
in gtkstack.c.
2013-09-25 23:54:31 -04:00
Matthias Clasen
5315661721 Use a stack in GtkAboutDialog
This lets us slide the credits and license sections up and down,
instead of just popping them into existence abruptly.
2013-09-25 23:54:31 -04:00
Matthias Clasen
98b78ed5da GtkStack: Add more transition types
This adds new 'over' and 'under' transitions which work by moving
the new page over the previous one, or moving the previous page off
to reveal the new one. We also add an over/under combination that
is going to be used in GtkAboutDialog.

https://bugzilla.gnome.org/show_bug.cgi?id=707187
2013-09-25 23:54:12 -04:00
Matthias Clasen
17aae0477f GtkAboutDialog: prevent unintended visibility
Some of the labels were not marked as no-show-all. But the
code clearly tries to manage their visibility, so gtk_widget_show_all()
should not affect them.

https://bugzilla.gnome.org/show_bug.cgi?id=681484
2013-09-25 22:51:33 -04:00
Paolo Borelli
e59c28743a Add a needs-attention child property to GtkStack
The child property is watched by the StackSwicther which in turns sets a
needs-attention css class on the corresponding button, so that the theme
can for instance show a throbbing animation if one of the hidden pages
needs the user attention.

https://bugzilla.gnome.org/show_bug.cgi?id=707153
2013-09-25 22:34:22 -04:00
Mario Sanchez Prada
8d83d989bb a11y: don't shutdown accessibility, so the atk bridge is always valid
This will fix issues in applications that for some reason make
several and not nested calls to gtk_main() during their lifetime,
effectively initializing a11y when the first, top most, main loop
is being run and shutting it down then that loop is quit.

https://bugzilla.gnome.org/show_bug.cgi?id=708024

https://bugzilla.gnome.org/show_bug.cgi?id=684076
2013-09-25 20:14:04 -04:00
Cosimo Cecchi
6f9fed45ef entrycompletion: set the GtkWindow as attached to the GtkEntry
This way themes can easily select that window to apply custom styles.

https://bugzilla.gnome.org/show_bug.cgi?id=708414
2013-09-25 20:06:43 -04:00
Alexander Larsson
68c450468e icon-theme: Better handling of unscaled icon directories
If an icon is in a Fixed or Threshold directory we normally don't
scale it. However, in the case of HiDPI scaling we *do* want to
scale it, to avoid different layouts in Lo/HiDPI. We look up whatever
the size of the icon would have been in LoDPI and scale to that
in the no-scaling case, thus getting the same layout as the
unscaled case.

https://bugzilla.gnome.org/show_bug.cgi?id=708384
2013-09-23 12:45:34 +02:00
Alexander Larsson
a001dc0ec7 icon-theme: Make icon_info_new() have some args
This gets rid of a bunch of duplicated code.
2013-09-23 12:45:34 +02:00
Matthias Clasen
e5317f0f9a Improve struct packing in various places 2013-09-21 23:50:55 -04:00
Matthias Clasen
d137f74fe9 Remove priv pointer from GtkStackSwitcher
This is a new widget, so lets avoid the unnecessary
priv pointer while we still can.
2013-09-21 23:50:55 -04:00
Matthias Clasen
f0aba21fd2 Small cleanup for the previous commit
When setting an accessible type, we don't need to
set an accessible row anymore.
2013-09-21 20:56:46 -04:00
Matthias Clasen
c22e27f986 Add a GtkListBoxRow accessible
This lets us do two things:
1. Set the list-item role
2. Set selectable and selected states as appropriate

https://bugzilla.gnome.org/show_bug.cgi?id=692258
2013-09-21 20:51:22 -04:00
Matthias Clasen
bdd4d65e85 Small improvement to GtkLinkButton a11y
ATK has a visited state, so propagate the visited property
of GtkLinkButton to that state.
2013-09-21 20:51:21 -04:00
Federico Mena Quintero
1e5dde7eab places sidebar: Don't activate the bookmark if Eject was clicked
This should really fix https://bugzilla.gnome.org/show_bug.cgi?id=704087 ...

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-09-20 21:14:00 -05:00
Matthias Clasen
9f3627cd7c Trivial typo fix 2013-09-20 20:17:25 -04:00
Matthias Clasen
dab146fe30 Add accessible names to csd buttons
Its the right thing to do.
2013-09-20 15:02:17 -04:00
Florian Müllner
f081552da1 icontheme: Make sure icon_info->scale doesn't end up 0
GdkPixbuf will fail returning %NULL if we try to scale a pixbuf to (0, 0),
which will then trigger an assertion in gtk_icon_info_load_icon_finish();
we never want a scale of 0, so ensure it is at least 1.

https://bugzilla.gnome.org/show_bug.cgi?id=708384
2013-09-20 14:42:41 +02:00
Joshua Lock
24751cba8e places sidebar: don't open a bookmark when clicking eject
Trying to open a bookmark which is being ejected is at best confusing.

https://bugzilla.gnome.org/show_bug.cgi?id=704087
2013-09-19 18:05:49 -05:00
Alexander Larsson
7b7b8eaaff listbox: Don't crash if cursor_row is NULL in real_focus
https://bugzilla.gnome.org/show_bug.cgi?id=708320
2013-09-19 22:38:41 +02:00
Timm Bäder
e6ac9b0862 ListBox: Update docs of GtkListBoxUpdateHeaderFunc
before is always NULL for the first row.
2013-09-19 22:05:08 +02:00
Benjamin Otte
20696b1057 cssimage: Report filename of file failing to load 2013-09-18 17:07:41 +02:00
Cosimo Cecchi
fd581236d2 Revert "appchooserwidget: check for g_app_info_should_show()"
This reverts commit 84922d3317.

https://bugzilla.gnome.org/show_bug.cgi?id=702681
2013-09-17 11:01:36 -07:00
Cosimo Cecchi
b561e176fb Revert "appchooserbutton: filter out applications not supposed to be visible"
This reverts commit 5568dcb53c.

https://bugzilla.gnome.org/show_bug.cgi?id=702681
2013-09-17 11:01:30 -07:00
Benjamin Otte
8c0516a5f1 window: Fix child wfh size request
We need to subtract border_width from the size we're passing to the
children hfw functions as those are added by ourselves.

Fixes the window-border-width.ui reftest.
2013-09-17 15:52:27 +02:00
Matthias Clasen
6aa56979dc More documentation fixes 2013-09-17 01:28:39 -04:00
Matthias Clasen
dbbb9c8f8f Plug a memory leak in the css parser
color_value_parse was leaking a GtkCssSymbolicValue.
Reported in

https://bugzilla.gnome.org/show_bug.cgi?id=702034
2013-09-16 23:30:57 -04:00
Philip Chimento
c298c7acce Don't activate GtkExpander if mouse dragged away
Previously, when you clicked and held the button down on a
GtkExpander's label or disclosure triangle, then moved the mouse
away and released the button, the expander would still activate.
This brings the behavior in line with the more generally expected
behavior, as exhibited by GtkButton for example.

https://bugzilla.gnome.org/show_bug.cgi?id=706345
2013-09-16 22:43:02 -04:00
Matthias Clasen
f503d4debd Clarify GtkH/VBox documentation
Make it clearer that GtkBox still has uses.

https://bugzilla.gnome.org/show_bug.cgi?id=706269
2013-09-16 22:38:49 -04:00
Matthias Clasen
58e9e9d316 Improve gtk_widget_insert_action_group docs
Mention that group can be NULL. Related to

https://bugzilla.gnome.org/show_bug.cgi?id=708150
2013-09-16 21:13:00 -04:00
Matthias Clasen
eab0b3a59c Improve headerbar docs slightly
Explain how to achieve the same title lable style when using
a custom title.
2013-09-16 20:24:48 -04:00
Matthias Clasen
54773ba45b Allow theme to set close button position in headerbars
This allows GTK+ applications with headerbars to fit in
better in platforms that have window controls on the left.

To use this, set -GtkWindow-decoration-button-layout: 'close:'
in the theme.

https://bugzilla.gnome.org/show_bug.cgi?id=706708
2013-09-16 16:13:07 -04:00
Matthias Clasen
aa1435b741 Include CSD titlebar in focus chain
At least for header bars, there's often application controls
in this area, which should be included in the focus chain.
We make it so that the initial focus avoids the titlebar,
but tabbing around will eventually get there.

https://bugzilla.gnome.org/show_bug.cgi?id=708067
2013-09-16 14:38:38 -04:00
Matthias Clasen
d632474b74 Don't pass NULL to gdk_window_set_title
That is not allowed. This is fallout from a recent change
that makes GtkWindow listen for title changes in its
headerbar.
2013-09-16 13:07:18 -04:00
Benjamin Otte
45d896a6b5 Revert "a11y: Remove AtkSelection implementation from combobox"
This reverts commit 7cecc8e524.

It is impossible to use the selection object of the menu while it is
collapsed (collapsed menus deselect everything for a start), so even
though the original patch was correct, the followup issues are too big
to solve this quickly to a release.

https://bugzilla.gnome.org/show_bug.cgi?id=707786
2013-09-16 15:41:15 +02:00
Murray Cumming
98ca9a865f GtkWidget: Improve drag-leave and drag-data-received docs.
* gtk/gtkwidget.c: drag-leave signal: Document that it is called before
      drag-drop.
      drag-data-received signal: Document that it is up to the application
      to know why the data was requested (e.g. drag motion or drop).
    * demos/gtk-demo/toolpalette.c: interactive_canvas_drag_drop():
      Do not transform the drop_item created in the drag-motion handler.
      Instead caused drag-data-received to be called, remembering why,
      and create a new item there.
      interactive_canvas_drag_leave(): Remove the idle-handler hack,
      now that we do not need to keep the drag-motion drop_item alive until
      the drop.

I noticed that this patch was sitting in bug #605611 from 2009
though it had been approved. I do not remember much about why I
created it.
2013-09-16 14:06:14 +02:00
Kalev Lember
5f62785d41 listbox: Jump over insensitive rows with keynav
https://bugzilla.gnome.org/show_bug.cgi?id=708128
2013-09-16 11:43:26 +02:00
Alexander Larsson
247c4cecfc Don't ever return BASELINE from gtk_widget_get_halign
This is the same behaviour as gtk_widget_get_valign, except
we have no gtk_wiget_get_halign_with_baseline, as baselines make
no sense for halign.

Without this some widgets (like e.g. GtkOverlay) crash if you accidentally
set a BASELINE halign.
2013-09-16 12:33:56 +02:00
Sébastien Wilmet
310179176c Improve doc of gtk_text_buffer_paste_clipboard()
It didn't explain the behavior when there is a non-empty buffer
selection.

https://bugzilla.gnome.org/show_bug.cgi?id=339539
2013-09-16 09:48:24 +02:00
Sébastien Wilmet
8e916815bb textbuffer: fix selection replacement when pasting
It is more logical to first delete the selection and then pasting the
text. When the selection and the text contain tags, the new behavior is
more natural.

A segfault in paste_from_buffer() is also avoided. The segfault occurs when
the text to paste is deleted because it is the selection.

https://bugzilla.gnome.org/show_bug.cgi?id=339539
2013-09-16 09:48:24 +02:00
Sébastien Wilmet
a78fc4a9c5 Doc: small fixes in GtkTextView
Move GtkWrapMode from GtkTextTag to the GtkTextView section. The wrap
mode property is in the text view.

Links to the "mark-set" and "mark-deleted" signals.

Add a precision about gtk_text_buffer_get_iter_at_line().

Fix typo in gtk_text_tag_set_priority().

https://bugzilla.gnome.org/show_bug.cgi?id=708076
2013-09-14 21:45:00 +02:00
Alejandro Piñeiro
5045e1a91b GtkWindow: keep sync the title with own titlebar
Before this change, both titles were synced only if
gtk_window_set_title was called. Now both are synced
also calling gtk_header_bar_set_title
2013-09-13 18:08:58 +02:00
Alejandro Piñeiro
94d52f99f8 a11y: Set proper role for GtkHeaderBar
https://bugzilla.gnome.org/show_bug.cgi?id=707981
2013-09-13 11:02:11 +02:00
Alejandro Piñeiro
c6943fcbcf a11y: set ATK_ROLE_LIST_ITEM to GtkListBoxRow
https://bugzilla.gnome.org/show_bug.cgi?id=707915
2013-09-13 11:01:44 +02:00
Alejandro Piñeiro
ef41c2a60f a11y: Remove default description from GtkSwitch
https://bugzilla.gnome.org/show_bug.cgi?id=707926
2013-09-12 11:52:51 +02:00
Alejandro Piñeiro
a86c665398 a11y: not using default name for switch
A proper name or label is required. In the same way, if the
widget is labelled, ATs uses to expose both the label and the
name, making the final output not really user-friendly.

https://bugzilla.gnome.org/show_bug.cgi?id=707872
2013-09-10 22:46:35 -04:00
Matthias Clasen
096f2db4b0 Make logos in GtkAboutDialog bigger
When available, choose a size of up to 128 in GtkAboutDialog.
A 48x48 icon just looks too small in there.
2013-09-10 22:45:06 -04:00
Phil Clayton
59c4fb9d6a Add missing introspection annotations
https://bugzilla.gnome.org/show_bug.cgi?id=707519
2013-09-10 17:20:15 -04:00
Alexander Larsson
90383300d2 listbox: Set activate_signal on listboxrow class
keyboard navigation didn't support activation since we moved
the keynav to the child row widgets. We fix this by adding a
activate signal handler for the row and setting
widget_class->activate_signal to it.

https://bugzilla.gnome.org/show_bug.cgi?id=707778
2013-09-10 16:20:56 +02:00
Benjamin Otte
6d344b2c6b Revert "pango: Handle case where pango_layout_get_text() returns NULL"
This reverts commit 70ac2b24c3.

It turns out the correct fix is to make pango_layout_get_text() not
return NULL. This has been done, so we can drop this patch.

I won't bump the Pango dependency in configure.ac for this as I don't
consider the crash critical enough.
2013-09-09 17:19:28 +02:00
Benjamin Otte
70ac2b24c3 pango: Handle case where pango_layout_get_text() returns NULL
Fixes crashers with accessibility

https://bugzilla.gnome.org/show_bug.cgi?id=707659
2013-09-09 16:53:13 +02:00
Alexander Larsson
92edb76500 Pixel cache: Add no-pixel-cache debug flag
This is useful for benchmarking comparisons, and to verify if bugs
happend with or without the pixel cache.
2013-09-09 11:07:50 +02:00
Christian Hergert
9a45712ad6 textview: use pixelcache rendered area to inform invalidation region.
Use the pixelcache rendered area to inform what part of the cache should
be invalidated upon changes to the underlying textlayout.

By rendering the background to the pixelcache, we can avoid the need to
use RGBA content.

Also, we're using the pixel cache on the text windows bin_window (see
gtk_text_view_get_window) so we need to register the invalidation handler
on that, otherwise the region passed to the invalidate handler will get
clipped to the visible region.

https://bugzilla.gnome.org/show_bug.cgi?id=707244
2013-09-09 10:47:30 +02:00
Christian Hergert
7fabc94d3c pixelcache: add getter for extra width and height. 2013-09-06 15:57:22 -07:00
Christian Hergert
0eb8479256 textview: only set invalidate handler for text window. 2013-09-06 15:57:22 -07:00
Matthias Clasen
fc7d26860a Fix config dir <> data dir confusion
We added code to look for settings.ini in system config dirs,
and then proceeded to move it to /usr/share/gtk-3.0 :-(. So,
look in that location as well.
2013-09-06 09:43:16 -04:00
Benjamin Otte
e6e99c4f9f css: Change currentColor handling
We now pass NULL when the current color should be the default value of
the "color" property and we haven't looked up any value yet. This way we
don't need to look it up all the time and more importantly we can
resolve the default color, which is required because it's a
GtkCssColorValue and not a GtkCssRgbaValue.

Fixes assertions triggering at Polari startup.
2013-09-06 03:04:09 +02:00
Benjamin Otte
04b7c8e24e cssimage: Remove unused variables 2013-09-06 03:04:09 +02:00
Alexander Larsson
854f5818f8 Sync with changes in the cairo device-scale handling
The version of device scale that landed in upstream cairo
master already inherits the device scale in cairo_create_similar,
so no need to do that in gtk anymore.
2013-09-05 19:30:23 +02:00
Benjamin Otte
fa3b803de9 cellrendererpixbuf: Don't eat states
Even when not following states, blacklist the states we don't follow
instead of whitelisting the ones we do. This way, we don't accidentally
eat new ones like the text direction flags.

Fixes a bug where text direction wasn't available when rendering stock
items.

https://bugzilla.gnome.org/show_bug.cgi?id=702423
2013-09-05 18:48:47 +02:00
Benjamin Otte
502d7644fe cellrendererpixbuf: Follow state even when insensitive 2013-09-05 18:48:47 +02:00
Benjamin Otte
c417bf6d73 cellrendererpixbuf: Always follow state
... not just in PRELIT | SELECTED.
2013-09-05 18:48:46 +02:00
Matthias Clasen
930f580857 Trivial formatting fixes 2013-09-04 20:59:56 -04:00
Jiro Matsuzawa
e2036a3986 Fix a typo in an error message
https://bugzilla.gnome.org/show_bug.cgi?id=707488
2013-09-04 19:40:59 -04:00
Alexander Larsson
5ed8db986f GtkListBox: ref_sink new object in set_header and set_adjustment
These are taking ownership of the object in the hierarchy, so should
sink any floating refs to make it easy to use in C code.
2013-09-04 21:01:50 +02:00
Jasper St. Pierre
d6559251fb gtkwidget: Fix issues with baseline alignment comparison 2013-09-03 17:59:19 -04:00
Giovanni Campagna
ed9f55d521 wayland: restore support for the application menu
If the compositor supports the gtk-shell interface, use it to
export the application ID, dbus name and paths that can be used
for the application menu.

https://bugzilla.gnome.org/show_bug.cgi?id=707129
2013-09-03 17:03:43 +02:00
Paolo Borelli
fa3a0963ee textview: Use guint since we specify ": 1" 2013-09-01 12:16:27 +02:00
Mike Gorse
3f2aacca52 a11y: Check whether a widget is mapped before querying its parent
Call gtk_widget_get_mapped() in a couple of places before looking at the
widget's parent, since it might be set to a widget that has been
finalized, causing an invalid read.
2013-08-31 16:42:07 -05:00
Cosimo Cecchi
89214cad5b pathbar: fix positioning of the down slider button
So that it's always linked with the rest of the pathbar.

https://bugzilla.gnome.org/show_bug.cgi?id=706722
2013-08-31 17:25:49 -04:00
Cosimo Cecchi
c9cc58de49 pathbar: remove unused spacing private member
It's always zero.

https://bugzilla.gnome.org/show_bug.cgi?id=706722
2013-08-31 17:25:49 -04:00
Matthias Clasen
68b34b1bba GtkPathBar: Don't make current dir bold
This is closer to the nautilus path bar.

https://bugzilla.gnome.org/show_bug.cgi?id=706451
2013-08-31 17:25:49 -04:00
Matthias Clasen
5c90b46722 Revert "a11y: Check whether a widget is mapped before querying its parent"
This reverts commit 7e3db6fdd3.

It broke the testsuite.
2013-08-31 16:27:38 -04:00
Jasper St. Pierre
de1f5b8bb3 gtkwindow: Don't set an opaque region if the window is app-paintable
This means the background is effectively unused. This fixes bad drawing
errors with cc-rr-labeller and potentially also notify-osd.
2013-08-31 15:53:10 -04:00
Aleksander Morgado
90de3c4fc0 win32: use the input locale to decide the default input method
GTK+ tries to automatically assign the best input module based on the
'system locale'. In the specific case of the IME input method, it will
be the default for the whole GTK+ application if the system locale is
either Japanese (ja), Korean (ko) or Chinese (zh). Other defaults are
equally applicable, e.g. if system locale is Catalan (ca), the special
'Cedilla' input module is chosen.

System locale can be changed (e.g. Win7) through the following sequence
(reboot required):
  Control Panel
    Region and Language
      Administrative
        Language for non-Unicode Programs
          Change system locale...

The problem with this behaviour is that changing the 'default input
language' (e.g. from English to Japanese+IME) doesn't affect the GTK+
application. Therefore, I can have an English system locale (where GTK+
will choose Simple IM by default) but then have Japanese+IME as input
language.

Default input language can be changed (e.g. Win7) through the following
sequence (no reboot required):
  System locale can be changed (e.g. Win7) through:
    Control Panel
      Region and Language
        Keyboards and Languages
          Keyboards and other input languages
            Change keyboards...

Default input language can also be changed using the language bar directly.

So, instead of using the system-wide default locale to decide which input
method to use as default, better use the input language specified by the
user, which may be the same as the system-wide default locale, or different.
Following the previous example, with an English system locale and a
Japanese+IME input language, the default input method will now be IME
instead of Simple, which is closer to what's expected by the user.

This change only affects the application during startup; i.e. if the user
changes the input language while the application is running, we wouldn't be
changing the default input method to use. We could do this processing the
WM_INPUTLANGCHANGE messages, though.

https://bugzilla.gnome.org/show_bug.cgi?id=700428
2013-08-31 14:28:10 -04:00
Pavel Vasin
2df6174038 GtkClipboardWayland: Fix memory leak
https://bugzilla.gnome.org/show_bug.cgi?id=706493
2013-08-31 12:28:19 -04:00
Pavel Vasin
1f2ed31f28 css shadow: Fix memory leak
https://bugzilla.gnome.org/show_bug.cgi?id=706493
2013-08-31 12:28:17 -04:00
Arnel A. Borja
0c19be899d printsettings: Add missing docs for output constants
GTK_PRINT_SETTINGS_OUTPUT_DIR and GTK_PRINT_SETTINGS_OUTPUT_BASENAME
doesn't have documentation.

https://bugzilla.gnome.org/show_bug.cgi?id=706802
2013-08-31 12:27:50 -04:00
Matthias Clasen
445204acca Fix an age-old typo
GtkIconView was not properly propagating key release events,
since forever.

https://bugzilla.gnome.org/show_bug.cgi?id=706740
2013-08-31 12:27:31 -04:00
Matthias Clasen
3442933dd7 Revert "Deprecate and ignore gtk-entry-password-hint-timeout"
This reverts commit 4b5a389e88.

This change caused considerable concern about accidental
leaking of passwords, see e.g.

https://bugzilla.gnome.org/show_bug.cgi?id=706563
https://bugzilla.gnome.org/show_bug.cgi?id=706873
https://bugzilla.redhat.com/show_bug.cgi?id=994237

We may have to do something else for password entries, such
as the windows-style 'peekabo' icon.
2013-08-31 00:16:28 -04:00
Matthias Clasen
350569124d Don't mark a space as translatable
There is no point in translating a string that consists just
of a single space. Pointed out in

https://bugzilla.gnome.org/show_bug.cgi?id=706778
2013-08-30 23:45:08 -04:00
Mike Gorse
7e3db6fdd3 a11y: Check whether a widget is mapped before querying its parent
Call gtk_widget_get_mapped() in a couple of places before looking at the
widget's parent, since it might be set to a widget that has been
finalized, causing an invalid read.
2013-08-30 09:42:41 -05:00
Mike Gorse
d7e07a8470 Don't access memory after freeing it when destroying a tick callback
https://bugzilla.gnome.org/show_bug.cgi?id=704278
2013-08-30 09:42:41 -05:00
Stefano Facchini
d59c9429de Remove leftover from commit 889e63faed 2013-08-30 14:47:17 +02:00
Paolo Borelli
798c2b60ec [headerbar] Do not hardcode title and subtititle style
Let the css theme define them

https://bugzilla.gnome.org/show_bug.cgi?id=707051
2013-08-29 15:59:53 +02:00
Emmanuele Bassi
889e63faed headerbar: Remove hpadding and vpadding properties
We really want these to be set by the theme, not programmatically.

https://bugzilla.gnome.org/show_bug.cgi?id=706929
2013-08-29 14:39:38 +01:00
Stefan Sauer
d4679c0a13 frame: annotate the @label params with (allow-none) 2013-08-29 09:06:31 +02:00
Claudio Saavedra
343a259e4a gtkwindow: fix a critical warning
Do not map the title box if it's not visible.
2013-08-28 20:10:38 +03:00
Matthias Clasen
13f92834f7 Fix a regression in GtkAssistant child property handling
GtkAssistant is bending the rules about child properties
of non-direct children, and the recent fix to accomodate
GtkInfoBar changes broke things. The effect was that child
properties of assistant pages in ui files were just not
applied, so all pages ended up without titles and with
the normal page type, leading to broken assistants all
over the place.

https://bugzilla.gnome.org/show_bug.cgi?id=706756
2013-08-28 11:51:19 -04:00
Jasper St. Pierre
3c2c3ab6f9 gtkwindow: Calculate the opaque window based off of the style
https://bugzilla.gnome.org/show_bug.cgi?id=706922
2013-08-28 10:33:58 -04:00
Jasper St. Pierre
64cf8b731e gtkwindow: Consistently set the style classes for window-frame
In one place, we forgot to remove the BACKGROUND style class before
adding window-frame. Add a helper method so these are all the same.

https://bugzilla.gnome.org/show_bug.cgi?id=706922
2013-08-28 10:33:57 -04:00
Stefano Facchini
b2b8c4d4bc revealer: clamp minimum size to natural one
Instead of just setting them equal.

https://bugzilla.gnome.org/show_bug.cgi?id=706938
2013-08-28 10:34:11 +02:00
Matthias Clasen
a9dae69b51 Fix anonymous assistants
GtkAssistant supports not showing the sidebar with the page
titles (if the page have no titles). Unfortunately, we were
hiding the sidebar in this case, but still rendering the frame
behind it, leading to a broken appearance.
2013-08-27 23:14:14 -04:00
Kristian Høgsberg
459e6a35cd clipboard: Fix text mime type handling on Wayland 2013-08-27 16:03:55 +02:00
Alexander Larsson
de1f551271 GtkTextView: Use *some* extra size for horizontal scrolling
Horizontal scrolling is unusual, but specifying some extra offscreen
space for it in free in the normal case where the viewport is the
same width as the canvas anyway, so lets do it.
2013-08-26 21:17:45 +02:00
Alexander Larsson
2d0bdee075 pixel cache: Allow growing of cache surface
If the new requested surface size is enough larger than the previous
one (but the old is still larger than the absolute minimum),
reallocate it anyway.

This fixes an issue where the text view initially requested a really
small extra size which was then increased but that didn't "take".
2013-08-26 21:17:45 +02:00
Christian Hergert
d96882bc16 textview: use pixelcache to indirectly renderer to widget.
This patch uses GtkPixelCache to render the contents of the widget,
and typically a bit more, to an offscreen surface. The pixel cache in
turn manages rendering to the actual surface for the widget.

The current strategy for the size to render is the size of the widget
plus half the height.

https://bugzilla.gnome.org/show_bug.cgi?id=701125
2013-08-26 21:17:45 +02:00
Christian Hergert
b1745d68cd pixelcache: allow specifying content type and extra size.
Allow forcing the cairo_content_t of the surface as well as the
amount of extra size to render.

https://bugzilla.gnome.org/show_bug.cgi?id=706728
2013-08-26 21:17:45 +02:00
Carlos Garcia Campos
247ebbd17c iconview: Respect the fixed item width when adjusting the wrap width
Restore the code the way it was in GTK2.

https://bugzilla.gnome.org/show_bug.cgi?id=680953
2013-08-26 18:23:55 +02:00
Chun-wei Fan
c8cad49108 gtk/gtkwindow.c: Fix build on non-X11
There were some code added to this file that is meant for the X11 backend,
but they are being unconditionally built.  Add build-time checks for the
X11 backend for these to fix the build on non-X11 platforms.
2013-08-26 21:32:09 +08:00
Chun-wei Fan
0e01f9cc9c GDK/GTK on Windows: Fix build
Due to the work on gdk_cursor_new_from_surface (commit b2113b73),
get_cursor_for_pixbuf() in GdkDisplayClass was converted to
get_cursor_for_surface(), which means the GDK Win32 backend needs to be
updated for the code to build and run on Windows, plus some function
prototypes and declarations/calls need to be updated as well.

https://bugzilla.gnome.org/show_bug.cgi?id=705980
2013-08-26 10:29:23 +08:00
Kristian Høgsberg
2ffcc8a453 wayland: Set type for GtkSelectionData for incoming contents
This is set from the incoming property type under X11.  Under Wayland
it will always be what we requested, so we can just set it to the target.
2013-08-23 23:15:54 -07:00
Kristian Høgsberg
8e8951df72 wayland: Only set wayland selection for GDK_SELECTION_CLIPBOARD
Wayland only has one selection, which corresponds to GDK_SELECTION_CLIPBOARD.
2013-08-23 23:15:54 -07:00
Matthias Clasen
7e4bcf9102 Add workspace handling to the window menu
The reimplements the current mutter window menu for
workspace changes.

https://bugzilla.gnome.org/show_bug.cgi?id=706323
2013-08-24 00:53:00 -04:00
Matthias Clasen
8f69721ed4 Add an 'Always on Top' item to the csd window menu
We want to make the csd window menu as similar as possible to the
mutter window menu.

https://bugzilla.gnome.org/show_bug.cgi?id=706323
2013-08-23 22:46:04 -04:00
Cosimo Cecchi
6928aedb2c window: add a style class when we automatically create the titlebar
To distinguish it from custom titlebars added from applications.

https://bugzilla.gnome.org/show_bug.cgi?id=706592
2013-08-23 20:17:24 -04:00
Cosimo Cecchi
fde3d5afe8 window: don't change bottom margin for automatic CSD
We'll use a style class to be able to give this a different appearance,
but for the time being we don't really need to give this such different
margin.

https://bugzilla.gnome.org/show_bug.cgi?id=706592
2013-08-23 20:17:24 -04:00
Benjamin Otte
4787a1ac61 label: Initialize lines value to -1
Fixes defaultvalue test.
2013-08-23 18:27:12 +02:00
Benjamin Otte
64a1f30468 label: Fix gcc warning 2013-08-23 18:24:20 +02:00
Matthias Clasen
eab0ff8e4e Add api to ellipsize labels to multiple lines
When setting the lines property, the label will be ellipsized
to that many lines, with the ellipsis only appearing in the
last line. This is different from how ellipsization of multi-line
labels normally works in GTK+.
2013-08-22 20:38:01 -04:00
David King
4415d087c6 combobox: Add missing Since tags for entry constructors 2013-08-22 20:36:17 +01:00
Jasper St. Pierre
51f229519d gtkwindow: Enable CSD when windows set a titlebar
https://bugzilla.gnome.org/show_bug.cgi?id=706529
2013-08-22 09:33:08 -04:00
Jasper St. Pierre
a2eafe2f57 gtkwindow: Disable CSD if we aren't running under a supported WM
Also, split the checks for CSD out into a separate function.

https://bugzilla.gnome.org/show_bug.cgi?id=706529
2013-08-22 09:33:00 -04:00
Jasper St. Pierre
7462de8fba gtkwindow: Split code that detects if we want CSD out
This will get a bit more complex when we enable CSD for custom headerbars

https://bugzilla.gnome.org/show_bug.cgi?id=706529
2013-08-22 09:25:39 -04:00
Jasper St. Pierre
a95cabd787 gtkwindow: Have a separate "titlebar" pointer for decorations we create ourselves
This cleans up the code a bit.

https://bugzilla.gnome.org/show_bug.cgi?id=706529
2013-08-22 09:25:39 -04:00
Jasper St. Pierre
cae2b697ef gtkwindow: Rename title_icon, etc. to titlebar_icon
"title_box" is used for both a custom header bar and for a titlebar.
Since we want to help differentiate these cases in the code, rename
everything titlebar-internal to use "titlebar_".

https://bugzilla.gnome.org/show_bug.cgi?id=706529
2013-08-22 09:25:39 -04:00
Federico Mena Quintero
354db1d69d filechooser: Don't use an underline mnemonic in the 'Save in folder' label
This used to point to the GtkPathBar, which doesn't accept mnemonic activation, anyway.
This whole thing was a leftover from when we had a combo box to select a folder, but
this is no longer the case.

https://bugzilla.gnome.org/show_bug.cgi?id=706448

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-08-21 09:50:44 -05:00
Saleem Abdulrasool
ec26a909f6 clipboard: fix build without wayland
Signed-off-by: Saleem Abdulrasool <compnerd@compnerd.org>
2013-08-20 20:28:01 -07:00
Piotr Drąg
60ec788489 Fix minor typos 2013-08-21 04:15:52 +02:00
Matthias Clasen
9f8514cc06 Fix distcheck
We need to clean up the ui.h files somewhere if they are generated
during the build from tarball. Reuse the existing distclean-local
hack for it.
2013-08-20 18:53:57 -04:00
Matthias Clasen
22378bbab5 GtkHeaderBar: Add the titlebutton style to the close button
This will let the theme unify the appearance of this button with
the window buttons in 'traditional' title bars.
2013-08-20 15:23:36 -04:00
Volker Sobek
112374b4be doc: Fix typos
Fix two typos in gtk/gtktexttag.c.

https://bugzilla.gnome.org/show_bug.cgi?id=706335
2013-08-20 17:35:44 +02:00
Benjamin Otte
e38e47d7d3 clipboard: Reimplement Wayland clipboard using vfuncs
This way, the Wayland and the regular clipboard implementation can both
be compiled in and selected based on the display in use.

One thing potentially broken now is text mime type handling as Wayland
seemed to use different mime types in some places.
2013-08-20 16:34:29 +02:00
Benjamin Otte
aee5bcf9e2 clipboard: Make a bunch of functions vfuncs 2013-08-20 16:34:29 +02:00
Benjamin Otte
4009c8241b clipboard: Split struct definitions into private header 2013-08-20 16:34:29 +02:00
Matthias Clasen
8383f003f3 Avoid deprecation warnings 2013-08-20 00:15:37 -04:00
Cosimo Cecchi
417d6666e5 iconhelper: refactor some code into a single function
https://bugzilla.gnome.org/show_bug.cgi?id=705443
2013-08-20 02:50:40 +02:00
Cosimo Cecchi
19c5a00f3a iconfactory: cache/invalidate pixbufs according to the effect
The state of the widget is not enough now to cache the pixbuf - we also
have to take into consideration the image effect itself, since the state
on the actual GtkStyleContext we use might not change, e.g. because the
change was on a parent context.

https://bugzilla.gnome.org/show_bug.cgi?id=705443
2013-08-20 02:50:40 +02:00
Cosimo Cecchi
b6cf6d52ef themingengine: apply image effects according to GtkCssImageEffect value
Instead of only looking at the state flags.

https://bugzilla.gnome.org/show_bug.cgi?id=705443
2013-08-20 02:50:40 +02:00
Cosimo Cecchi
736b350d7a css: Add a GtkCssValue for GtkCssImageEffect
This will allow us to use the CSS machinery to apply a highlight or dim
effect when images are prelit or insensitive.

https://bugzilla.gnome.org/show_bug.cgi?id=705443
2013-08-20 02:50:40 +02:00
Cosimo Cecchi
723a589bdd themingengine: refactor a conditional branch
Return early when the state is not wildcarded - makes the code more
readable.

https://bugzilla.gnome.org/show_bug.cgi?id=705443
2013-08-20 02:50:40 +02:00
Cosimo Cecchi
844dade070 pathbar: add back GTK_STYLE_CLASS_LINKED
This was accidentally removed in commit
42f53ab58e

https://bugzilla.gnome.org/show_bug.cgi?id=706028
2013-08-20 02:47:07 +02:00
Matthias Clasen
64d0ecaec8 Redo style class handling
We should set the appropriate style classes when we have
constructed the content and know if it is a label, an image,
or both. Doing this in the convenience constructors is
problematic for language bindings, and misses out when the
content is changed after construction.
2013-08-19 14:42:18 -04:00
Matthias Clasen
27cb50b48c Revert "Add the "text-button" style to button created with gtk_button_new_with_{label,mnemonic}"
This reverts commit 8d7bab7d7b.
2013-08-19 14:42:18 -04:00
Yosef Or Boczko
6e88b76178 Fix a typo 2013-08-19 20:59:50 +03:00
Andrew Walton
19be4edbea GtkEntry: add a "tabs" property for setting a PangoTabArray in the layout.
I'm currently working on porting view::FieldEntry (from libview) to C for use in
upstream GTK+. FieldEntry is a widget which allows users to enter structured
text such as IPv4 addresses or serial numbers. The way that FieldEntry
delineates the fields within the entry is with tabstops, using PangoTabArray
entries to precisely position the fields and delimiters. Because GtkEntry
rebuilds its internal PangoLayout fairly frequently, this requires a property in
the entry that will set the tabs on the layout whenever that happens. This API
looks very similar to one in GtkTextView.

Patch by David Trowbridge <trowbrds@gmail.com>. Updated for Gtk+ 3.10.

https://bugzilla.gnome.org/show_bug.cgi?id=697399
2013-08-19 13:43:32 -04:00
David Trowbridge
a864f9d052 Fix GtkEntry drawing to provide visual feedback when editable=FALSE.
GtkEntry currently draws exactly the same no matter what the state of the
'editable' property. This is pretty confusing for users because there's
no visual feedback at all, it just seems like their keyboard is broken.

This change adds a "read-only" class to the StyleContext, which will
continue to allow the user to select/copy the text, but will draw the
entry as if it were insensitive, providing some indication that the
contents can't be changed.

Signed-off-by: David Trowbridge <trowbrds@gmail.com>

http://bugzilla.gnome.org/show_bug.cgi?id=694831
2013-08-19 13:41:39 -04:00
Alexander Larsson
d5e5616ae6 icon-theme: Add ScaledDirectories support
For backwards compat support we don't want old implementations not
supporting scaling to see the new scaled directories, so move these
to a separate list.
2013-08-19 16:01:57 +02:00
Alexander Larsson
8ae81bb395 icon-theme: Use "Scale" for key as per the spec
The latest spec proposal uses "Scale", not "OutputScale", so use this.
2013-08-19 16:01:57 +02:00
Matthias Clasen
dc4f555d25 Fix keyboard activation of menu buttons
Keyboard activation relies on the menu not being visible,
so ensure that it isn't when the menu is attached.

Problem tracked down by Vincent Le Garrec,
https://bugzilla.gnome.org/show_bug.cgi?id=688738
2013-08-18 22:22:22 -04:00
Matthias Clasen
624ec0fb7d Add a style class for context menus
Attached widgets inherit from the style of the widget they are
attached to. This can sometimes have unintended consequences,
like a context menu in the main view of gedit inheriting the font
that is configured for documents, or the context menu of the preview
in the font chooser coming up with humongous font size.

To fix this problem, we introduce a context menu style class
and use it for all menus that are used like that. The theme
can then set a font for this style class.

https://bugzilla.gnome.org/show_bug.cgi?id=697127
2013-08-18 13:46:48 -04:00
Yosef Or Boczko
8d7bab7d7b Add the "text-button" style to button created with gtk_button_new_with_{label,mnemonic}
https://bugzilla.gnome.org/show_bug.cgi?id=706220
2013-08-18 10:12:49 +03:00
Stef Walter
6a837c668a window: Some protection against nested set_focus() calls
Since set_focus() can triger events, have a check to make
sure state is still valid before firing is-focus signal.

https://bugzilla.gnome.org/show_bug.cgi?id=706152
2013-08-17 09:55:27 +02:00
Cosimo Cecchi
9896b9960d window: set GTK_STYLE_CLASS_TITLEBAR to custom titles
When a custom title is added to a GtkWindow, add the
GTK_STYLE_CLASS_TITLEBAR to it, so the theme can apply the default rules
for its style.

https://bugzilla.gnome.org/show_bug.cgi?id=706045
2013-08-16 23:12:23 -04:00
Cosimo Cecchi
3ea0e4a019 stylecontext: add GTK_STYLE_CLASS_TITLEBAR define
For consistency with the other stock style classes.

https://bugzilla.gnome.org/show_bug.cgi?id=706045
2013-08-16 23:12:22 -04:00
Matthias Clasen
f8412eca34 Revert "Deprecate and ignore the cursor blink settings"
This reverts commit b2e666bf8f.

We need to keep cursor blinking configurable for accessibility
reasons.

https://bugzilla.gnome.org/show_bug.cgi?id=704134

Conflicts:
	gdk/win32/gdkproperty-win32.c
	gdk/x11/gdksettings.c
	gtk/gtksettings.c
	gtk/gtktextview.c
2013-08-16 22:45:13 -04:00
Matthias Clasen
7b4f82ccc6 Make symbolic icons work with the current rsvg
The rsvg loader now restricts what external files it will
allow to load from an svg. Thus our xinclude trick doesn't work
anymore. To work around that, embed the payload in a  data: uri.
This is somewhat ugly, but the best we could come up with.
2013-08-16 22:05:38 -04:00
Matthias Clasen
77059dbaba Add style classes to headerbar titles
The current theme just makes all text bold that appears anywhere
in a headerbar, which is not great. We add 'title' and 'subtitle'
style classes to allow more targeted overriding of the font.
2013-08-16 13:39:25 -04:00
Joanmarie Diggs
e67d0119fe gtksearchentry: Provide an accessible name
https://bugzilla.gnome.org/show_bug.cgi?id=706014
2013-08-15 16:37:29 +02:00
Jasper St. Pierre
030b62d122 gtkdnd: Introduce a new API for more accurate drag origin data
When trying to drag, we currently the position of the first motion
event to determine where the drag came from. This might be alright
in the case of the old animation, but the data will be inaccurate
if the user has moved the pointer quite a bit since pressing the
cursor to start dragging. While we could monkey patch the GdkEvent
at the widget layer, this is unintuitive and strange.

Add a new API that takes a set of pointer coordinates describing
the origin of the drag. Additionally, adapt most widgets to use
it and use it with correct coordinates.

https://bugzilla.gnome.org/show_bug.cgi?id=705605
2013-08-14 07:12:52 -04:00
Jasper St. Pierre
e80d1f0523 gtkdnd: Use a more modern spring back animation for cancelled drags
https://bugzilla.gnome.org/show_bug.cgi?id=705605
2013-08-14 07:12:52 -04:00
Jasper St. Pierre
2b2162dd5f gtktextutil: Remove the border and background from drag icons
https://bugzilla.gnome.org/show_bug.cgi?id=705605
2013-08-14 07:12:52 -04:00
David King
1e3e123c17 docs: Convert GtkMenuShell comment to documentation
https://bugzilla.gnome.org/show_bug.cgi?id=448637
2013-08-14 09:53:16 +01:00
Yosef Or Boczko
89f701ab2e oopx - fix typo
Signed-off-by: Yosef Or Boczko <yoseforb@gmail.com>
2013-08-14 10:45:35 +03:00
Yosef Or Boczko
2f77a61e61 Add gtk_button_new_from_icon_name
This function is a convenience wrapper around
gtk_button_new() and gtk_button_set_image().

https://bugzilla.gnome.org/show_bug.cgi?id=705918

Signed-off-by: Yosef Or Boczko <yoseforb@gmail.com>
2013-08-14 10:41:42 +03:00
Alban Browaeys
6ea4c1a1f4 paned: minus the size by the handle for the for_child1 computation.
Fixes:
(rhythmbox:22802): Gtk-CRITICAL **:
_gtk_widget_get_preferred_size_for_size: assertion 'size >= -1' failed

that is gtk_paned_get_preferred_size_for_opposite_orientation calls
_gtk_widget_get_preferred_size_for_size on child2 with a negative
size.

As gtkpaned size was (32), child1 minimum size was (55) then
for_child1 became (32) for an handle_size of (5). Thus for_child2
ended up as (-5).

https://bugzilla.gnome.org/show_bug.cgi?id=705624
2013-08-14 00:10:08 -04:00
Matthias Clasen
b7e41a7eda GtkSpinButton: disconnect signals in the accessible
Just as for GtkRangeAccessible, we were not even trying to disconnect
the signal handler from the adjustment. The same fix works here:
override the widget_set and widget_unset vfuncs.

https://bugzilla.gnome.org/show_bug.cgi?id=705692
2013-08-14 00:04:46 -04:00
Matthias Clasen
b9a6e012d5 GtkRange: disconnect signals in the accessible
We were only disconnecting the signal in finalize, when
the widget was already unset. Instead, override the widget_set
and widget_unset vfuncs of GtkAccessible, and keep a reference
to the adjustment.

https://bugzilla.gnome.org/show_bug.cgi?id=705692
2013-08-14 00:04:05 -04:00
Matthias Clasen
38e51b27c2 Trivial typo fix 2013-08-13 22:25:16 -04:00
Matthias Clasen
4790857da6 Improve a deprecation hint
Don't point to a replacement that is itself deprecated.

https://bugzilla.gnome.org/show_bug.cgi?id=705372
2013-08-13 20:41:59 -04:00
Stefano Facchini
f462dded36 searchbar: ignore GDK_KEY_Menu in handle_event()
https://bugzilla.gnome.org/show_bug.cgi?id=705524
2013-08-13 20:40:06 -04:00
Chun-wei Fan
3b82b97e73 GTK-Win32: Avoid Using Deprecated API
Replace the deprecated API calls with the updated APIs, and fix the build
of modules/input/gtkimcontextime.c, as we really needed
gdk/gdkkeysyms-compat.h (gdk/gdkkeysyms.h was already included)

https://bugzilla.gnome.org/show_bug.cgi?id=705068
2013-08-14 08:05:53 +08:00
Matthias Clasen
35a4bba902 csd: Implement middle-click action for titlebar
The default middle-click action on the titlebar should be to lower
the window. Implement that.

https://bugzilla.gnome.org/show_bug.cgi?id=705809
2013-08-13 18:24:37 -04:00
Matthias Clasen
1398f8ea4c Add some missing deprecation annotations
These were reported missing in bug
https://bugzilla.gnome.org/show_bug.cgi?id=705672
2013-08-13 18:09:47 -04:00
Matthias Clasen
9463c78bac GtkWindow: fix an init/finalize asymmetry
Make sure we always deal with the same screen when
connecting / disconnecting the theme-variant changed handler.
Pointed out by Morten Welinder in
https://bugzilla.gnome.org/show_bug.cgi?id=705640
2013-08-13 17:44:04 -04:00
Matthias Clasen
3923ba1605 Avoid overlong file chooser buttons
When bookmarks are long, the file chooser button would
grow too much. This can be avoided by ellipsizing.

Patch by Ritesh Khadgaray,
https://bugzilla.gnome.org/show_bug.cgi?id=672220
2013-08-13 17:35:28 -04:00
Cosimo Cecchi
b52844031f icontheme: correctly fallback to symbolic icons
When an icon is requested as symbolic, our generic fallback algorithm
uses fullcolor icons when the specified icon name is not found, treating
the "-symbolic" suffix as another component of the icon name.

Change the algorithm to check beforehand if the icon is symbolic, remove
the suffix if so, and re-add it at the end for all the generated icon
names.

https://bugzilla.gnome.org/show_bug.cgi?id=680926
2013-08-13 17:22:47 +02:00
Jasper St. Pierre
8818d8a19b gtkwindow: Export our custom frame extents
This allows CSD windows to be maximized, tiled, and constrained
properly.

https://bugzilla.gnome.org/show_bug.cgi?id=705765
2013-08-13 10:38:49 -04:00
Benjamin Otte
ed5c35306d alignment: Remove dead assignment
.. and clean up code
2013-08-13 16:25:26 +02:00
Benjamin Otte
7f8497f850 gtkmenuitem: Remove dead assignment 2013-08-13 16:25:26 +02:00