Commit Graph

441 Commits

Author SHA1 Message Date
Paolo Borelli
508353fd15 Do not manually create empty label
gtk_notebook_update_labels will take care of creating it if needed.
2011-08-15 15:08:28 +02:00
Matthias Clasen
2ba9c4b4a7 Make focus rectangles optional
This commit introduces a new setting, gtk-visible-focus, backed
by the Gtk/VisibleFocus X setting. Its three values control how
focus rectangles are displayed.

'always' is equivalent to the traditional GTK+ behaviour of always
rendering focus rectangles.

'never' does what it says, and is intended for keyboardless
situations, e.g. tablets.

'automatic' hides focus rectangles initially, until the user
interacts with the keyboard, at which point focus rectangles
become visible.

https://bugzilla.gnome.org/show_bug.cgi?id=649567
2011-08-10 16:34:20 +02:00
Benjamin Otte
ebadb36962 notebook: Remove unused private member variable 2011-07-20 02:36:44 +02:00
Benjamin Otte
1cdb47d960 notebook: Remove the homogenous private member variable
It's unused and therefor always FALSE, so we can remove the parts of the
code that branch based on it.
2011-07-19 12:53:06 +02:00
Matthias Clasen
318192b937 Convert GailNotebook to GtkNotebookAccessible 2011-07-05 16:08:56 -04:00
Paolo Borelli
399de11116 Speed up page insertion
Make sure to call widget_set_child_visible(false) on all tabs except the
current before calling widget_set_parent.
2011-06-26 20:41:21 +02:00
Javier Jardón
bf0d8402f5 gtk: Use const instead G_CONST_RETURN 2011-06-10 13:07:54 +01:00
Benjamin Otte
a6daba5e78 API: Change semantics of gtk_container_get_child_path()
Include the child widget path in the returned path now. This allows
customizing the path of the current widgets - like adding flags to child
widgets (and maybe siblings in the future).
2011-06-02 02:03:50 +02:00
Benjamin Otte
352569298a notebook: Implement height_for_width and width_for_height getters 2011-06-02 00:07:25 +02:00
Benjamin Otte
4d78e9c8af notebook: Rewrite size request function for wfh 2011-06-02 00:07:25 +02:00
Benjamin Otte
d7519e6ca2 notebook: Split out tabs size computation into its own function 2011-06-02 00:07:25 +02:00
Benjamin Otte
edd2f24b6e notebook: Compute tab width in a simpler way
This code should be more obvious: The check only needs to check for
scrollable widgets, and only needs to compare to tab_width.

As a side note, for vis_pages == 1, tab_width will be smaller than
tab_max + stuff, so this code will not behave differently.
2011-06-01 21:57:45 +02:00
Benjamin Otte
86aefc2c31 notebook: Remove uneeded function declaration 2011-06-01 21:45:21 +02:00
Benjamin Otte
975f735fb7 notebook: Include arrow size in tab size computation
We don't want tabs to resize when a 2nd page is added, just because the
scroll arrows are now visible. And we do want the arrow size to be
included.

Note: Previosuly this code was never run, as the check
  requisition->width < tab_width
was only run when tab_width wasn't computed, so was still equal to 0
(same for the height). So what this patch essentially does it add the
functionality of the if switch.
2011-06-01 17:46:22 +02:00
Diego Celix
95fd3d708d gtk/gtknotebook: gtk_misc_set_alignment replacing
Replacing the function gtk_misc_set_alignment () with
gtk_widget_set_halign () and gtk_widget_set_valign () in
gtk/gtknotebook.c

https://bugzilla.gnome.org/show_bug.cgi?id=650762
2011-05-31 20:02:42 -04:00
Benjamin Otte
5642703b0e notebook: Match horizontal and vertical code paths
I have no idea what this code does, but it looks better now. :o
2011-04-29 11:05:37 +02:00
Benjamin Otte
8e1714d59b notebook: Respect left border when allocating tab widgets
This mirrors the code for the other tab locations.
2011-04-29 11:05:36 +02:00
Benjamin Otte
409143637f notebook: Respect padding when computing tabs for left/right
This mirrors the top/bottom code
2011-04-29 11:05:36 +02:00
Benjamin Otte
9a4aec1446 Don't adjust for values that we have previously adjusted for
The padding had been taken into account by the computation of
priv->allocation, so don't compute it twice.
2011-04-29 11:05:36 +02:00
Benjamin Otte
02b14ffad9 notebook: Use the right padding for inactive tabs 2011-04-29 08:48:36 +02:00
Benjamin Otte
7a322193e8 notebook: Warn if builder file defines multiple tab widgets per page
Glade causes such files when a notebook page has no content. And it's
especially bad because the last tab widget wins, so the label displayed
in Glade will not be what you see when you run the app.
2011-04-28 00:54:34 +02:00
Paolo Borelli
c4e17bb148 Do not leak list when drawing notebook.
When we construct the list in the other order we must free it.

https://bugzilla.gnome.org/show_bug.cgi?id=646886
2011-04-08 20:21:22 -04:00
Benjamin Otte
ea928e4212 notebook: Only reset style on tab labels when it actually changes 2011-03-27 00:48:25 +01:00
Cosimo Cecchi
6e1aa0e0a9 notebook: don't forget to reset the style after setting show-tabs
This fixes a regression after commit
b04f4c536a
2011-03-17 17:27:37 -04:00
Bastien Nocera
90a4f8dc4b notebook: Don't set notebook style with hidden tabs
When tabs are not shown, and the notebook is used as a container,
we should not set the notebook style, otherwise the theme has no
way to know whether tabs are shown or not, and which colour to draw
the background.

https://bugzilla.gnome.org/show_bug.cgi?id=640692
2011-03-17 18:30:40 +00:00
Cosimo Cecchi
c9f38ba518 notebook: make GtkNotebook respect the focus-padding style property
https://bugzilla.gnome.org/show_bug.cgi?id=644348
2011-03-14 11:59:27 -04:00
Cosimo Cecchi
5215f72bd7 notebook: add an 'initial-gap' style property
It adds a gap before the first tab in the notebook.

https://bugzilla.gnome.org/show_bug.cgi?id=643841
2011-03-09 14:15:43 -05:00
Cosimo Cecchi
a3b3c91001 notebook: flip the render order
The render order for tabs is now

- left to right until the active tab
- right to left until the active tab
- active tab

This allows themes that use non-straight lines for the tab curvature to
draw them not worrying about flipping one side after the active tab.
2011-03-07 00:49:14 -05:00
Cosimo Cecchi
a54ca77fb7 notebook: fixup the last commit
Let the tab overlap eat the padding, otherwise having tab-overlap >
tab-curvature without cutting the label is impossible.
This way we give the label widget all the allocation possible before
giving up and cutting it if the values for tab-overlap are too extreme
for the given padding.
2011-03-06 22:08:26 -05:00
Cosimo Cecchi
da814ae767 notebook: make sure the label widget allocation not exceeds the overlap 2011-03-06 18:45:20 -05:00
Cosimo Cecchi
27a0cef60c notebook: make sure the allocation keeps track of the tab curvature
This was a genuine typo, because "padding" was calculated but unused in
this branch of the code.
2011-03-06 14:48:09 -05:00
Matthias Clasen
2ccc6c0d60 GtkNotebooks: fix regressions from tab-pack removal 2011-03-03 18:30:03 -05:00
Matthias Clasen
a71e801943 GtkNotebook: Don't let tab allocation go negative 2011-03-03 18:30:03 -05:00
Matthias Clasen
d9fcc4c630 Silence new gcc warnings
gcc 4.6.0 has started to warn about set-but-unused variables.
So don't do that, then.
2011-01-23 21:51:38 -05:00
Carlos Garnacho
13a3954ad4 GtkNotebook: only set/unset active flag on the tab label 2011-01-23 19:35:21 +01:00
Pavel Holejsovsky
2f0d40335b [GI] Add missing (transfer) annotations 2011-01-20 13:57:18 +01:00
Tristan Van Berkom
ac61edb9fc Avoid calling gtk_widget_is_visible(NULL) in _gtk_notebook_get_tab_flags().
The tab can be NULL here when GtkNotebook:show-tabs is FALSE.
2011-01-15 21:34:49 +09:00
Matthias Clasen
98440ad031 Remove gtktypeutils altogether
Based on patches by Javier Jardón.

https://bugzilla.gnome.org/show_bug.cgi?id=629955
2011-01-04 14:51:19 -05:00
Matthias Clasen
b5c6904c2f Drop explicit includes of gdkkeysyms.h
These are no longer needed. At the same time, port gtkimcontextsimpleseqs.h
to use the new GDK_KEY_ symbols.
2011-01-04 12:21:41 -05:00
Matthias Clasen
7352a166b6 Formatting fixes and whitespace cleanups 2011-01-04 02:21:38 -05:00
Matthias Clasen
32bfc980c1 Remove pack property altogether 2011-01-04 02:06:03 -05:00
Matthias Clasen
723fedef8b Remove pack consideration from tab drawing 2011-01-04 02:03:03 -05:00
Matthias Clasen
4ea886aea1 Don't consider pack when allocating tabs 2011-01-04 01:57:22 -05:00
Matthias Clasen
f9d6bc6cca Drop pack consideration from gtk_notebook_search_page 2011-01-04 01:39:18 -05:00
Matthias Clasen
a7bb193377 Drop internal function to find page position 2011-01-04 01:36:09 -05:00
Matthias Clasen
f838ecf9f0 Remove pack consideration from tab dnd 2011-01-04 01:35:52 -05:00
Matthias Clasen
88501d527d Remove pack consideration from tab reordering 2011-01-04 01:23:05 -05:00
Matthias Clasen
03b37a2e54 Remove pack arguments from some internal functions
This removes pack from gtk_notebook_{set,query}_tab_label_packing.
2011-01-04 01:11:28 -05:00
Matthias Clasen
08a99e9ab3 Remove the deprecated GtkNotebook:tab-pack child property 2011-01-04 00:57:34 -05:00
Matthias Clasen
c874bba0e1 GtkNotebook: fix reference to no-longer-exiting function in docs 2011-01-03 22:55:38 -05:00