Carlos Garnacho
3e60650fa8
notebook: Fix assert in ::drag-motion
...
The drag destination might be empty, we shouldn't be checking whether
it contains pages at all. Instead, check the source notebook, which
ought to have a selected page if you're dragging something from there.
https://bugzilla.gnome.org/show_bug.cgi?id=749893
2015-05-26 18:05:36 +02:00
Benjamin Otte
0529e15d61
notebook: Protect against invalid allocations
...
A widget can be mapped but not have a size allocated yet. In that case
avoid computing a broken rectangle.
https://bugzilla.gnome.org/show_bug.cgi?id=746301
2015-03-18 15:14:47 +01:00
Matthias Clasen
c7672699e9
Don't pass invalid rectangles to cairo
...
This causes pixman warnings, or worse.
Clearly, something is not quite right here, if we end up
redrawing tabs at a time when the allocation is set to (1, 1).
For now, avoid straining the error handling in the lower layers.
https://bugzilla.gnome.org/show_bug.cgi?id=746301
2015-03-16 12:51:56 -04:00
Philip Withnall
d65ccf96ee
gtknotebook: Add more non-NULL checks for cur_page
...
These were not spotted by scan-build, but from some brief mental
reasoning could potentially be problem areas.
https://bugzilla.gnome.org/show_bug.cgi?id=712760
2015-03-11 11:24:29 +00:00
Benjamin Otte
9e2cdce58e
notebook: Fix boolean check
...
Commit c352093bde
swapped the condition
when turning it into a return_if_fail().
2015-03-10 13:23:06 +01:00
Philip Withnall
c352093bde
gtknotebook: Fix potential use of uninitialised variables
...
Found by scan-build.
https://bugzilla.gnome.org/show_bug.cgi?id=712760
2015-03-10 07:32:19 +00:00
Philip Withnall
51971d56bc
gtknotebook: Remove dead variable assignments
...
Found by scan-build.
https://bugzilla.gnome.org/show_bug.cgi?id=712760
2015-03-09 13:41:37 +00:00
Philip Withnall
c7f5f10853
gtknotebook: Fix a potential NULL pointer dereference
...
Found by scan-build.
https://bugzilla.gnome.org/show_bug.cgi?id=712760
2015-03-09 13:41:37 +00:00
Matthias Clasen
8d7a235a04
notebook: Add api to complete tab dnd from the outside
...
This is necessary to avoid unwanted drag cancel animations,
now that GtkNotebook is careful about cancelling a drag
when the dragged tab disappears unexpectedly.
2015-02-12 17:33:10 -05:00
Matthias Clasen
3fc21b4f3f
notebook: Protect removal-from-within
...
When a tab is dropped, we have to remove it from the notebook to
insert it elsewhere. This is expected part of the tab dnd operation,
and we need to differentiate it from 'spontaneous' removals which
cause us to cancel the drag operation.
2015-01-30 10:13:28 -05:00
Matthias Clasen
63104944a3
notebook: Make dnd safe against tab disappearance
...
when the dragged tab is being removed during the drag operation,
we need to cancel the drag. To do so, we have to keep around
a reference to the drag context.
This should fix
https://bugzilla.gnome.org/show_bug.cgi?id=732051
2015-01-30 10:13:15 -05:00
Matthias Clasen
3a05d9b5a0
notebook: Make reordering safe for tab disappearance
...
If the dragged tab is removed during reordering, we need to
call gtk_notebook_stop_reorder(), to clean up and bring the
remaining tabs back in order.
2015-01-30 09:39:26 -05:00
Matthias Clasen
5127136723
GtkNotebook: Be a bit more safe against cur_page being NULL
...
https://bugzilla.gnome.org/show_bug.cgi?id=477454
2014-12-22 10:52:54 -05:00
Jasper St. Pierre
a78b18c565
Revert part of "gtknotebook: Optimize GtkStyleContext usage"
...
This reverts part of commit c71e213134
.
This part was unfinished and was pushed simply to avoid the warnings.
2014-11-25 11:21:21 -08:00
Jasper St. Pierre
c71e213134
gtknotebook: Optimize GtkStyleContext usage
2014-11-25 11:05:49 -08:00
Benjamin Otte
cde81e169b
notebook: Don't unset state flags on child removal
...
We don't set any state flags, so we shouldn't unset any either.
2014-07-19 23:48:06 +02:00
Benjamin Otte
93b3179042
widgetpath: Deprecate regions
...
This is a foolowup to d80bf0790d
2014-06-21 15:46:44 +02:00
Benjamin Otte
d80bf0790d
stylecontext: Deprecate regions
...
Regions are done in a very non-css way. They don't fit the DOM in that
they don't integrate into the CSS tree and they have very weird matching
behavior in selectors.
So I'm deprecating them now. GtkNotebook and GtkTreeview will continue
to use them and as long as they do, we can't remove the code for it.
But once those are ported it might be safe to remove the code as it will
clean up lots of places in the code by quite a bit.
2014-06-19 22:26:51 +02:00
Matthias Clasen
f0f9c2aa37
Revert "gtkbin: replace internal api"
...
This reverts commit 0f4751c08e
.
This causes warnings from the notebook and combobox code.
2014-06-16 17:31:56 -04:00
Paolo Borelli
c184458ab3
notebook: set tab position style class on the main frame
...
We want to have .top etc also on the notebook frame, not only on
the header frame.
The patch includes a reftest by Benjamin.
2014-06-14 21:37:07 +02:00
Stefan Sauer
0f4751c08e
gtkbin: replace internal api
2014-06-14 08:10:46 +02:00
Matthias Clasen
c93355616f
GtkNotebook: Use G_PARAM_EXPLICIT_NOTIFY
2014-06-09 13:31:06 -04:00
Matthias Clasen
4d1930cf74
Make notebook content redraw during drag
...
The extra condition here that caused the current child to
not redraw during reordering was introduced in f383e1f1
during the port to ::draw, but was not explained in the
commit message, and removing it has no obvious negative
effect.
https://bugzilla.gnome.org/show_bug.cgi?id=730767
2014-05-30 13:39:27 -04:00
Cosimo Cecchi
853dcc615d
notebook: don't use focus-line-width
2014-05-09 11:02:45 -07:00
Cosimo Cecchi
9a811e2c94
notebook: don't use focus padding
2014-05-09 11:02:43 -07:00
William Jon McCann
469d333aa2
docs: use Returns: consistently
...
Instead of Return value:
2014-02-19 18:56:05 -05:00
William Jon McCann
37a8ee6e95
docs: fully break lines in examples
...
Try to do a better job of keeping example content
from being too wide. It is often rendered as <pre>
text so the only time we can wrap it is in the source.
It is best to full break lines at all punctuation and
to try to keep the width under 70 chars or so.
2014-02-12 18:42:50 -05:00
Matthias Clasen
7f6a964c47
Docs: Remove all entities and turn off sgml mode
...
With all element markup gone, it is time to turn off
sgml mode, and get rid of entities as well.
2014-02-09 17:58:07 -05:00
William Jon McCann
13998c55e7
docs: use proper quotations instead of '*'
2014-02-07 14:22:39 -05:00
William Jon McCann
2a45418b67
docs: use proper quotes
2014-02-05 15:08:42 -05:00
William Jon McCann
3b3d8ca456
docs: Use "#" for refsect2 instead of ##
2014-02-04 21:00:58 -05:00
Matthias Clasen
09d1b28249
docs: Convert to markdown
...
Specifically, switch to using markdown syntax for sections.
2014-02-02 00:30:27 -05:00
William Jon McCann
4c8bd8e7cf
docs: Identify examples that are C code
...
https://bugzilla.gnome.org/show_bug.cgi?id=723119
2014-01-29 12:45:49 -05:00
William Jon McCann
768bc44081
docs: use |[ ]| instead of <programlisting></programlisting>
...
https://bugzilla.gnome.org/show_bug.cgi?id=723119
2014-01-29 12:45:49 -05:00
William Jon McCann
6fd7e547c5
notebook: don't use a null page
2014-01-24 18:41:22 -05:00
William Jon McCann
66f8026622
notebook: add a style class when the child tab is reorderable
2014-01-24 17:27:27 -05:00
William Jon McCann
3437f83ff3
notebook: add a style for prelighted labels
2014-01-24 13:15:44 -05:00
Paolo Borelli
609ddec1f8
Always return FALSE from the notebook leave_notify handler
...
As discussed on IRC with Benjamin, this should not make much
difference in practice, but it is more correct
2014-01-14 20:29:46 +01:00
Paolo Borelli
84b44dd2ac
Readd line removed by mistake in the previous commit
2014-01-14 20:23:52 +01:00
Paolo Borelli
4a3f21b693
Prelight notebook tab
...
Set the prelight state when hovering a notebook tab with the mouse.
https://bugzilla.gnome.org/show_bug.cgi?id=711233
2014-01-14 20:18:54 +01:00
Matthias Clasen
64855f1295
GtkNotebook: Fix a problem with tab states
...
When replacing the tab label, we were not adding the
active-page style class. Fix that.
2014-01-04 13:01:49 -05:00
Bastien Nocera
438cd857c4
all: Add names to timeouts
...
Add names to every timeout we setup, so it's easier to track their
usage, and debug possible misbehaviour.
https://bugzilla.gnome.org/show_bug.cgi?id=710651
2013-10-23 13:31:18 +02:00
William Jon McCann
05b1ea84b4
notebook: inform the theme whether show-borders was set
...
So that it can draw a border or not. If show-borders=true then
the notebook will have GTK_STYLE_CLASS_FRAME.
2013-10-16 12:03:33 -04:00
William Jon McCann
6f17c408e6
notebook: inform the theme to draw borders when requested
...
When the show-border property is TRUE ask the theme to draw
borders on the notebook header.
2013-10-04 18:14:25 -04:00
William Jon McCann
053433010b
notebook: add style classes for orientation to the header
2013-10-04 18:14:25 -04:00
William Jon McCann
db60046af4
notebook: correctly define the header region
...
Correctly define the header region to only be the area under the
tabs.
2013-10-04 18:14:25 -04: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
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