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
Carlos Garnacho
7e2dea1dff
GtkNotebook: remove unneeded call
2011-01-04 03:06:25 +01:00
Benjamin Otte
0c285341a9
API: gdk: gdk_display_get_device_state() => gdk_device_get_position()
...
The API was not display-specific, but belonged to the device. Also, we
didn't find a user of the modifier mask, so we dropped it.
2010-12-27 18:46:41 +01:00
Benjamin Otte
a5f493bfad
notebook: Use nondeprecated API to query coordinates
2010-12-27 00:50:30 +01:00
Matthias Clasen
9baf24f87e
Add a default handler for drag_failed
...
And use it in notebook dnd.
2010-12-22 18:46:29 -05:00
Javier Jardón
e9a77a1535
docs: gtknotebook.c: Use accessor functions to access GtkSelectionData
2010-12-16 00:16:00 +00:00
Javier Jardón
ad4ac2182a
gtk/gtknotebook.c: Use accessor functions to access GtkSelectionData
2010-12-15 23:58:15 +00:00
Carlos Garnacho
3306305fe1
GtkNotebook: Use GtkStyleContext.
2010-12-13 22:31:29 +01:00
Carlos Garnacho
517eaa55e5
GtkNotebook: Set widget state as state flags.
2010-12-04 15:38:32 +01:00
Carlos Garnacho
c9a3da5025
GtkStyleContext: s/set/add/ and s/unset/remove/ for classes/regions.
...
Several classes and regions may be set to GtkStyleContext, so rename
the functions to be more intuitive.
2010-12-04 15:38:24 +01:00
Carlos Garnacho
7e7347d1a0
GtkNotebook: invert tab drawing order so region flags are set correctly.
2010-12-04 15:38:10 +01:00
Carlos Garnacho
a3637ec60d
s/child class/region/ everywhere.
...
"Child class" is an invented term anyway, and it conceptually defines
identifiable regions in widgets.
2010-12-04 15:37:35 +01:00
Carlos Garnacho
a323310c19
GtkNotebook: Set GtkChildClassFlags for tabs.
2010-12-04 15:37:10 +01:00
Tristan Van Berkom
9a80908c91
Removed size_request from GtkNotebook
2010-10-27 14:35:04 +09:00
Benjamin Otte
6e90804b30
notebook: Hi, I can't get my function prototypes right
...
Also, I refuse to compile with -Werror
2010-10-18 19:22:43 +02:00
Matthias Clasen
7791013754
Support GtkWidget expand properties in GtkNotebook
...
We expand a tab if either tab-expand is set, or the generic widget
expand property in the correct direction is set. And we do not
propagate expand flags from tab labels to the notebook, only
the expand flags from the pages.
2010-10-13 10:49:06 -04:00
Javier Jardón
5a30dad531
docs: Move documentation to inline comments: GtkComboBox
2010-10-04 02:37:42 +02:00
Ignacio Casal Quinteiro
13c4c554ef
Add missing vfuncs to gtknotebook.
2010-10-03 21:48:56 +02:00
Javier Jardón
bbd80b671a
docs: Move documentation to inline comments: GtkNotebook
2010-10-03 20:21:48 +02:00
Matthias Clasen
0bca60fdd3
GTK docs: various fixups
2010-10-01 13:05:12 -04:00
Benjamin Otte
6c7daaf8b9
notebook: Fix compilation warnings - missing cast
2010-09-28 18:24:34 +02:00
Matthias Clasen
f53ad33994
Remove GtkObject completely
2010-09-26 22:18:19 -04:00
Javier Jardón
eac1959d2c
Move destroy signal to GtkWidget
...
Also make GtkWidget derive from GInitiallyUnowned
2010-09-26 22:18:18 -04:00
Benjamin Otte
92732ffea0
notebook: Use gtk_cairo_transform_to_window()
2010-09-26 15:11:46 +02:00
Benjamin Otte
d9c9259861
Move GtkSizeRequest into GtkWidget
...
It doesn't make sense to keep them separate as GtkSizeRequest requires a
GtkWidget and GtkWidget implements GtkSizeRequest, so you can never have
one without the other.
It also makes the code a lot easier because no casts are required when
calling functions.
Also, the names would translate to gtk_widget_get_width() and people
agreed that this would be a too generic name, so a "preferred" was added
to the names.
So this patch moves the functions:
gtk_size_request_get_request_mode() => gtk_widget_get_request_mode()
gtk_size_request_get_width() => gtk_widget_get_preferred_width()
gtk_size_request_get_height() => gtk_widget_get_preferred_height()
gtk_size_request_get_size() => gtk_widget_get_preferred_size()
gtk_size_request_get_width_for_height() =>
gtk_widget_get_preferred_width_for_height()
gtk_size_request_get_height_for_width() =>
gtk_widget_get_preferred_height_for_width()
... and moves the corresponding vfuncs to the GtkWidgetClass.
The patch also renames the implementations of the vfuncs in widgets to
include the word "preferrred".
2010-09-26 15:11:45 +02:00
Benjamin Otte
6eb6135e2d
notebook: Get rid of gdk_drawable_get_size() usage
2010-09-26 15:11:44 +02:00
Benjamin Otte
1d3f6b30b0
API: Rename gtk_cairo_paint_*() to gtk_paint_*()
...
Large patch, but just renaming.
Indentation should still mostly be correct because I took care of
keeping the indentation for this function name.
2010-09-26 15:11:42 +02:00
Benjamin Otte
5f771c8a9f
notebook: Connect to draw signal
2010-09-26 15:11:40 +02:00
Benjamin Otte
f383e1f183
notebook: Port to draw vfunc
2010-09-26 15:11:38 +02:00
Benjamin Otte
21099d31ed
notebook: The drawable check is not necessary
...
Large patch, but that's only indentation.
2010-09-26 15:11:38 +02:00
Benjamin Otte
fadf269a36
notebook: Draw tabs and arrows with Cairo
...
Includes a fix to only draw the current page once during a drag
operation.
2010-09-26 15:11:38 +02:00
Benjamin Otte
ad030e1696
notebook: Simplify draw_tab function a bit
...
Don't keep lots of local variables that are only used once.
2010-09-26 15:11:38 +02:00
Benjamin Otte
806bcb10ff
notebook: remove check for is_drawable
...
When we reach that code, the widget will always be drawable
2010-09-26 15:11:37 +02:00
Benjamin Otte
c46ce97145
notebook: Reorder expose function in preparation of draw vfunc
2010-09-26 15:11:37 +02:00
Benjamin Otte
f94ff0b3b9
notebook: Use a for loop when iterating over a list
2010-09-26 15:11:37 +02:00
Benjamin Otte
468e453a31
notebook: Draw focus when drawing tab
...
Instead of using a special function, draw the focus of a tab when the
tab actually is painted. Simplifies the code quite a bit.
2010-09-26 15:11:37 +02:00
Benjamin Otte
a5e487846a
notebook: Remove useless optimization
...
It will become especially useless once we draw with Cairo exclusively.
2010-09-26 15:11:37 +02:00
Benjamin Otte
e8a6bad00b
gtk: Don't set colormap anymore when creating GDK windows
...
Colormaps are about to be removed, so not using them sounds like an
awesome idea.
2010-09-26 15:11:31 +02:00
Benjamin Otte
eda14b2d47
notebook: Fix compilation warnings
...
A quark is not a pointer.
2010-09-26 15:02:00 +02:00
Matthias Clasen
94e9a35a16
Another since tag
2010-09-24 11:31:23 -04:00
Matthias Clasen
50971f704c
Correct since tags
2010-09-24 11:29:17 -04:00
Matthias Clasen
3c19eea34b
GtkNotebook: replace group by group_name
...
Dealing with bare pointers is problematic for language bindings,
using interned strings is much more straightforward and more than
good enough for what is needed here.
http://bugzilla.gnome.org/show_bug.cgi?id=630521
2010-09-24 11:13:30 -04:00
Matthias Clasen
b47b1428b8
GtkNotebook: remove gtk_notebook_set_window_creation_hook
...
http://bugzilla.gnome.org/show_bug.cgi?id=630521
2010-09-24 11:10:51 -04:00
Cody Russell
27bc88f7c2
Merge branch 'notebooks-without-mouse-scrolling'
2010-09-21 16:19:10 -05:00
Cody Russell
ad48f4d52b
Remove mouse scrolling from GtkNotebook tabs. Bug #630226 .
2010-09-21 16:18:22 -05:00
Matthias Clasen
e0aa12eb0a
Tons of transfer annotations
2010-09-21 00:18:11 -04:00
Javier Jardón
b140884fec
Use gtk_size_request_get_size() instead deprecated gtk_widget_size_request()
...
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=629598
Signed-off-by: Javier Jardón <jjardon@gnome.org>
Signed-off-by: Tristan Van Berkom <tristanvb@openismus.com>
2010-09-15 03:02:58 +02:00
Javier Jardón
9e81022bf6
Use gtk_size_request_get_size() instead deprecated gtk_widget_get_child_requisition()
...
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=629177
2010-09-13 21:26:01 +02:00
Colin Walters
913cdf3be7
GDK: Prefix key names with KEY_
...
The keysyms create a lot of potential namespace conflicts for
C, and are especially problematic for introspection, where we take
constants into the namespace, so GDK_Display conflicts with GdkDisplay.
For C application compatiblity, add gdkkeysyms-compat.h which uses
the old names.
Just one user in GTK+ continues to use gdkkeysyms-compat.h, which is
the gtkimcontextsimple.c, since porting that requires porting more
custom Perl code.
2010-09-08 18:51:44 -04:00
Javier Jardón
efaed1b8f1
gtk/gtknotebook.c: use accessor functions to access GtkWidget
2010-09-08 21:13:04 +02:00
Javier Jardón
bc366cef52
gtknotebook: Do not mention deprecated API
2010-09-08 17:46:11 +02:00
Tristan Van Berkom
f2279d5e51
Fixed GtkNotebook to not consult GtkWidget->requisition directly
...
GtkNotebook was filling widget->requisition directly at "size-request"
time instead of filling in the *requsition argument, also (more importantly)
at size_allocate time GtkNotebook was consulting the action widget's
widget->requisition directly instead of safely calling
gtk_widget_get_child_requisition(). This commit closes bgo #628068 .
2010-09-02 13:50:27 +09:00
Javier Jardón
1e5d7c0225
Use GtkFooPrivate instead GtkFooPriv
2010-08-27 04:48:23 +02:00
Javier Jardón
f91e5e2ac9
gtk/gtknotebook.c: Use accessor functions to access GtkWindow
2010-08-23 20:19:03 +02:00
Philip Withnall
3eb197b51f
Bug 596125 — Property string fixes
2010-08-10 09:23:49 +01:00
Sam Thursfield
a2b72c5953
Add missing accessors for notebook details
...
The ms-windows theme engine needs to access the tab-{h,v}border,
so add accessors. Bug 625655.
2010-08-09 21:20:07 -04:00
Christian Dywan
1c5ee1df12
Correct marshaller for switch-page and adjust emission from menu
...
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=624687
2010-07-23 13:21:33 +02:00
Christian Persch
1af1362a36
gtknotebook: Fix critical warnings on scroll events
...
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=604391
2010-07-19 15:28:03 +02:00
Javier Jardón
63d3b197c2
Add _gtk_bin_set_widget() internal function
2010-07-13 19:40:47 +02:00