Commit Graph

13926 Commits

Author SHA1 Message Date
Matthias Clasen
a805e70615 Add a new forgotten symbol 2011-05-06 23:51:52 -04:00
Matthias Clasen
1d647df176 Add a lock button widget
This is a special-purpose button that can be used together with
GPermission objects to control the sensitivity of system settings.

Suitable permission objects can e.g. be obtained from PolicyKit.

http://bugzilla.gnome.org/show_bug.cgi?id=626457
2011-05-06 22:44:38 -04:00
Matthias Clasen
5cb3f5ff0f Remove outdated comments
Neither GdkColors nor GdkRGBAs are ever 'allocated' nowadays.
2011-05-06 17:05:35 -04:00
Tristan Van Berkom
e217c455f8 Added Since 3.2 annotations for new GdkRGBA properties. 2011-05-06 17:05:34 -04:00
Tristan Van Berkom
cefb950110 Added internal GdkRGBA support for GtkTextTag::paragraph-background-rgba
Added the remaining implementation bits for rendering paragraph backgrounds
with rgba values and updated the test case.
2011-05-06 17:05:34 -04:00
Tristan Van Berkom
2b2d7aa305 Fixed GtkTextTag to sync the GdkColors with the new GdkRGBA values for backwards compatability. 2011-05-06 17:05:34 -04:00
Tristan Van Berkom
d3c77f0330 Handled error_color with GdkRGBA in gtktextdisplay.c. 2011-05-06 17:05:34 -04:00
Tristan Van Berkom
604292a404 Fixed textview rendering regression.
Background color was not painted on the whole tagged segment after
line breaking, this was due to the default ->prepare_run() function
wiping the internal PangoColors clean... fixed this by unconditionally
setting local rgba colors from prepare_run instead of comparing them
and bailing out.
2011-05-06 17:05:34 -04:00
Tristan Van Berkom
d399a4acab Added GdkRGBA properties to GtkTextTag.
This now allows text view to render text with alpha values in
the text foreground and backgrounds, the work is almost complete,
currently the error-underline-color is still a GdkColor style property
and since we use only GdkRGBA for rendering it needs to be converted
and applied, probably a new rgba version of the style property should
also be introduced.

This commit adds tests/testtextview that must be run from the tests/
directory to show translucent text in action.
2011-05-06 17:05:10 -04:00
Cosimo Cecchi
579afaa9a1 progressbar: fetch the padding without the trough style class
This is consistent with the rest of the widget, which uses only one
padding value.

https://bugzilla.gnome.org/show_bug.cgi?id=649593
2011-05-06 15:10:43 -04:00
Cosimo Cecchi
73d9ca67e6 cellrendererprogress: don't force drawing inside the border
The progressbar is composed by two different rendered areas: the trough
(i.e. the non-filled part of the bar) and the bar itself.

The bar should be able to fill the whole height/width of the trough
without resorting to nasty hacks in the theme, and we can control the
amount of space between the bar and the trough with the padding already.

https://bugzilla.gnome.org/show_bug.cgi?id=649593
2011-05-06 15:10:43 -04:00
Matthias Clasen
c83e76fb12 GtkAssistant: an new style for assistants
GtkAssistant is widely recognized as a butt-ugly widget.

This commit changes its style to look more modern. We
deprecate the sidebar and header image properties and
don't show them anymore. Instead, page titles are arranged
in a sidebar, with the title of the current page shown
in highlighted style.
2011-05-06 14:56:43 -04:00
Matthias Clasen
e244e5050b Silently allow child properties on grandchildren
This commit simply removes some child->parent == container checks,
to add some flexibility for containers with 'inner structure'.
If these checks are considered useful, we can bring them back
with a is_child vfunc that allows container implementations to
decided who they consider legitimate child.
2011-05-06 14:29:47 -04:00
Matthias Clasen
deb271d355 Add gtk_container_child_notify
This is a variant of gtk_widget_child_notify() that takes an
explicit container, instead of relying on widget->parent to
be the correct container to use.
2011-05-06 14:29:14 -04:00
Matthias Clasen
73bf1740e9 Some additional auto-mnemonic fixes
Previously, we would also show mnemonics if the user hits
Ctrl+Alt, even though Ctrl+Alt+<x> does not actually trigger.
2011-05-06 14:10:23 -04:00
Rui Matos
6889d5b008 GtkWindow: set mnemonics visible on focus in if modifier is pressed
With gtk-auto-mnemonics on, we hide mnemonics on focus out. We should also
check if the modifier is pressed on focus in and if so, show mnemonics again.

https://bugzilla.gnome.org/show_bug.cgi?id=618815
2011-05-06 14:10:23 -04:00
Benjamin Otte
f6e11febfa Revert "arrow: Make minimum size 5px"
This reverts commit 1c46e04f30.

The change broke too many widgets that relied on the size being
constant. A proper fix would require letting themes override the size.
That would probably also require letting themes specify the size
relative to font size.
2011-05-06 19:35:40 +02:00
Colin Walters
703af0fb48 gtkicontheme: More explicitly note ownership transfers of duplicated string
I was hunting a memory leak and couldn't find it; at least I'm
pretty sure all of these are OK.  But document things better
for the future.

Also use g_hash_table_replace in one more case for consistency.

https://bugzilla.gnome.org/show_bug.cgi?id=649457
2011-05-05 16:02:10 -04:00
Benjamin Otte
33e6479554 label: Compute label offset properly for wrapped justified labels
label offsets were computed wrong for wrapped or ellipsized labels that
were right- or center-justified and had excess space available.
2011-05-05 17:33:44 +02:00
Javier Jardón
2f3e1fa3e4 gtk/gtktrayicon-x11.c: Use GdkRGBA instead GdkColor 2011-05-05 12:48:09 +01:00
Matthias Clasen
b8fe808e15 GtkButtonBox: add a non-homogeneous child property
This makes it easier to add things like lock buttons in
dialogs. Part of #626457.
2011-05-05 07:46:03 -04:00
Colin Walters
b90e8cfc36 gtkdnd: Add API that takes GIcon
This will be useful for me to port gnome-panel to gnome-menus 4, which
uses GAppInfo, which in turn returns icon references as GIcon.

https://bugzilla.gnome.org/show_bug.cgi?id=649295
2011-05-03 12:53:46 -04:00
Colin Walters
e36c9dffac gtkimageprivate: Drop unused theme_change_id 2011-05-03 11:04:56 -04:00
Benjamin Otte
69300df1fc label: Allow using more underline modes 2011-05-03 15:38:43 +02:00
Benjamin Otte
ecb0fa952a accellabel: Remove leftover debug code
The disabling of the check was added in
63a0ab5e73

Ooops.
2011-05-02 20:09:17 +02:00
Benjamin Otte
b102df5370 cellarea: Fix warning messages to display the right type
The warning displayed the type of the area instead of the cell
renderer's type before.
2011-05-02 20:09:17 +02:00
Benjamin Otte
87ecd9ad59 menuitem: Deprecate gtk_menu_item_set_right_justified()
And the getter, too: gtk_menu_item_get_right_justified() and the
corresponding property. Also make the only caller use the private
structure (as it did before the recent patches).
2011-05-02 16:57:12 +02:00
Javier Jardón
3b2e710aa4 gtkbuilder.c: gtk_builder_value_from_string() also support GdkRGBA values 2011-05-02 15:43:45 +01:00
Arnel Borja
c064808a1a Bypass libtool for linking with libuuid on win32
Fixes a regression introduced in 07d49ee5.

Libtool by default refuses to link static libraries into shared
libraries. In Windows, libuuid is however a static library and needed
for shared libgtk; as a work around, use "-Wl,-luuid" to pass the option
directly to the linker.

https://bugzilla.gnome.org/show_bug.cgi?id=642214
2011-05-02 10:19:59 -04:00
Javier Jardón
a817b4763d gtkcalendar: Remove unused variable 2011-05-02 14:59:53 +01:00
Kristian Rietveld
0b3b2a943a tooltips: treat scroll events like key/button press instead of motion
This avoids tooltips from staying visible when scrolling using scroll
events.  Suggested by Paul Davis.
2011-05-01 16:39:21 +02:00
Matthias Clasen
cf588d7404 GtkWidget: avoid an unused variable warning 2011-05-01 10:02:58 -04:00
Benjamin Otte
4f23dc34be window: Make non-resizable windows use default size for geometry hints
Previously, we were trying to size them by the default size, but then
setting the minimum size as the geometry hints' minimum and maximum
size.
2011-05-01 08:47:58 +02:00
Benjamin Otte
63a0ab5e73 accellabel: Only daw accelerator after natural size has been reached 2011-05-01 08:02:15 +02:00
Benjamin Otte
406b2e9e58 window: Remove overeagerness with new size guessing
Don't use the guessed size when we are interested in the minimum size.
So now we can really shrink menubars.

This reverts parts of 08b2ac1d90
2011-05-01 08:02:15 +02:00
Benjamin Otte
f74df9ba70 menubar: Rewrite size allocation to take natural sizes into account
Yay for properly ellipsizing menubars!
2011-05-01 08:02:15 +02:00
Benjamin Otte
4c9b8e0fcd menubar: Only query ipadding when we actually need it 2011-05-01 05:38:47 +02:00
Benjamin Otte
ae32f2fe90 menubar: Respect ipadding also in y direction 2011-05-01 05:30:42 +02:00
Benjamin Otte
27a661143e settings: Recompute styles when font name changes 2011-05-01 04:44:56 +02:00
Benjamin Otte
22a1bd6d6b menubar: Implement height-for-width / width-for-height
Pretty much just required hooking up the 2 vfuncs, the previous code
reorg did the rest of the work.
2011-05-01 04:44:56 +02:00
Benjamin Otte
c52f733a2d menubar: Actually query minimum and natural size of children
Previously, we only queried the minimum size and reported that as
natural size, too.
2011-05-01 04:44:56 +02:00
Benjamin Otte
3091a90538 menubar: Query only the necessary size from the child
The get_preferred_size() function was compied form elsewhere. We should
really make that a common API.
2011-05-01 04:44:56 +02:00
Benjamin Otte
923fcaa928 menubar: Only compute the necessary size
There's no need to compute height when we're only interested in width
2011-05-01 04:44:56 +02:00
Benjamin Otte
5aac83bf08 menubar: compute in advance wether to add toggle size 2011-05-01 04:44:56 +02:00
Benjamin Otte
f2bf5ce378 menubar: Change function prototype for size request function
This is in preparation for redoing that function to actually care about
natural sizes.
2011-05-01 04:44:56 +02:00
Benjamin Otte
d6fbbe159f menubar: Remove unnecessary return_if_fail() in vfuncs 2011-05-01 04:44:56 +02:00
Benjamin Otte
62e6bc7c34 menubar: Remove useless function declaration 2011-05-01 04:44:56 +02:00
Benjamin Otte
d8dfa74b4e menubar: Remove unused variable 2011-05-01 04:44:56 +02:00
Benjamin Otte
a85883ba2b imagemenuitem: No need to query image size by default
Also makes the code look nicer, so woohoo
2011-05-01 04:44:56 +02:00
Benjamin Otte
a64a2aded4 menubar: Compute proper size even when invisible 2011-05-01 04:44:56 +02:00