]> Pileus Git - ~andy/gtk/log
~andy/gtk
11 years agoMake accessible implementations public
Matthias Clasen [Thu, 27 Dec 2012 06:04:46 +0000 (01:04 -0500)]
Make accessible implementations public

This commit exposes the get_type() functions and standard
headers for accessible implementations. This makes it possible
to derive from the GTK accessible implementations without
GType magic tricks. This is necessary, because we require the
a11y type hierarchy to be parallel to the widget type hierarchy.
So, if you derive a widget and need to adjust its a11y implementation,
you have to be able to derive its accessible implementation.

This commit probably exposes more than is absolutely necessary,
it also exposes accessibles of widgets that are unlikely candidates
for deriving from.

11 years agoTrivial sorting fix
Matthias Clasen [Tue, 30 Oct 2012 15:58:47 +0000 (11:58 -0400)]
Trivial sorting fix

11 years agoUpdated Galician translations
Fran Diéguez [Mon, 24 Dec 2012 20:55:07 +0000 (21:55 +0100)]
Updated Galician translations

11 years agoPaint GtkFrame background correctly when there is a label
Paolo Borelli [Sun, 23 Dec 2012 15:34:27 +0000 (16:34 +0100)]
Paint GtkFrame background correctly when there is a label

11 years agoUpdated Norwegian bokmål translation
Kjartan Maraas [Sat, 22 Dec 2012 19:52:49 +0000 (20:52 +0100)]
Updated Norwegian bokmål translation

11 years agoroundedbox: Fix copy-paste error
Benjamin Otte [Thu, 20 Dec 2012 18:51:06 +0000 (19:51 +0100)]
roundedbox: Fix copy-paste error

y coordinates don't care about the right value, they want bottom.

11 years agotestgtk: Remove GtkAlignment usage from progressbar test
Benjamin Otte [Thu, 20 Dec 2012 18:53:04 +0000 (19:53 +0100)]
testgtk: Remove GtkAlignment usage from progressbar test

We can use gtk_widget_set_[hv]align here.

11 years agoaboutdialog: ensure the credits page uses the "view" style class
Cosimo Cecchi [Fri, 21 Dec 2012 16:52:03 +0000 (17:52 +0100)]
aboutdialog: ensure the credits page uses the "view" style class

Since not every theme renders a background for a GtkViewport (and
Adwaita master doesn't), ensure the grid+viewport we use to emulate a
text view here uses the "view" style class.

11 years agoUpdated Norwegian bokmål translation
Kjartan Maraas [Fri, 21 Dec 2012 15:12:10 +0000 (16:12 +0100)]
Updated Norwegian bokmål translation

11 years agoPaint GtkFrame background
Paolo Borelli [Fri, 21 Dec 2012 12:53:02 +0000 (13:53 +0100)]
Paint GtkFrame background

It already paints the css border, so let's make it also honor css
background. This is needed to have a box of a different color around
some widgets (e.g. latest gnome-clocks design)

11 years agoUpdated Lithuanian translation
Aurimas Černius [Thu, 20 Dec 2012 21:07:08 +0000 (23:07 +0200)]
Updated Lithuanian translation

11 years agobroadway: Use SOURCE operator when scrolling
Alexander Larsson [Wed, 19 Dec 2012 21:27:08 +0000 (22:27 +0100)]
broadway: Use SOURCE operator when scrolling

11 years agobroadway: Allow reconnecting to a broadway page
Alexander Larsson [Wed, 19 Dec 2012 20:58:25 +0000 (21:58 +0100)]
broadway: Allow reconnecting to a broadway page

11 years agobroadway: Fix possible access-after-free
Alexander Larsson [Wed, 19 Dec 2012 20:57:58 +0000 (21:57 +0100)]
broadway: Fix possible access-after-free

We need to calculate the buf pointer after the realloc.

11 years agobroadway: Remove separate browser windows hack
Alexander Larsson [Wed, 19 Dec 2012 12:09:38 +0000 (13:09 +0100)]
broadway: Remove separate browser windows hack

This never really worked well, we need to be able to fully handle
sizes from the client.

11 years agobroadway: Separate out the server parts
Alexander Larsson [Wed, 19 Dec 2012 11:37:02 +0000 (12:37 +0100)]
broadway: Separate out the server parts

This (shouldn't) change any behaviour, but it moves the
webserver parts to a separate file, making the broadway display file
smaller and preparing for later separating out the server to its own
process.

11 years agoTamil translation updated
Shantha kumar [Wed, 19 Dec 2012 07:51:54 +0000 (13:21 +0530)]
Tamil translation updated

11 years agoTamil translation updated
Shantha kumar [Wed, 19 Dec 2012 07:50:51 +0000 (13:20 +0530)]
Tamil translation updated

11 years agocombobox: Don't special-case RTL child positions anymore
Benjamin Otte [Tue, 18 Dec 2012 17:23:07 +0000 (18:23 +0100)]
combobox: Don't special-case RTL child positions anymore

If you want to get rounded corners on an hbox, instead of
  :first-child {
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
  }
  :last-child {
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
  }
you now need to write:
  :first-child, :last-child:dir(rtl) {
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
  }
  :last-child, :first-child:dir(rtl)
  {
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
  }

11 years agotoolbar: Don't special-case RTL toolbar child positions anymore
Benjamin Otte [Tue, 18 Dec 2012 17:18:24 +0000 (18:18 +0100)]
toolbar: Don't special-case RTL toolbar child positions anymore

If you want to get rounded corners on an hbox, instead of
  :first-child {
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
  }
  :last-child {
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
  }
you now need to write:
  :first-child, :last-child:dir(rtl) {
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
  }
  :last-child, :first-child:dir(rtl)
  {
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
  }

11 years agobox: Don't special-case RTL hbox child positions anymore
Benjamin Otte [Tue, 18 Dec 2012 17:12:26 +0000 (18:12 +0100)]
box: Don't special-case RTL hbox child positions anymore

If you want to get rounded corners on an hbox, instead of
  :first-child {
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
  }
  :last-child {
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
  }
you now need to write:
  :first-child, :last-child:dir(rtl) {
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
  }
  :last-child, :first-child:dir(rtl) {
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
  }

11 years agostylecontext: Deprecate direction property
Benjamin Otte [Tue, 18 Dec 2012 17:05:28 +0000 (18:05 +0100)]
stylecontext: Deprecate direction property

...  and the functions implementing it. Also deprecate the direction
getter on GtkThemingEngine.

11 years agostylecontext: Use state flags for direction
Benjamin Otte [Tue, 18 Dec 2012 16:47:06 +0000 (17:47 +0100)]
stylecontext: Use state flags for direction

... instead of using a custom direction member.

And with that, GtkWidget doesn't need to call
gtk_style_context_set_direction() anymore.

11 years agowidget: Set state flags for direction
Benjamin Otte [Tue, 18 Dec 2012 16:31:10 +0000 (17:31 +0100)]
widget: Set state flags for direction

11 years agocss: Parse and print the new state flags
Benjamin Otte [Tue, 18 Dec 2012 16:30:58 +0000 (17:30 +0100)]
css: Parse and print the new state flags

11 years agoAPI: Add state flags for RTL and LTR
Benjamin Otte [Tue, 18 Dec 2012 15:42:04 +0000 (16:42 +0100)]
API: Add state flags for RTL and LTR

See http://www.whatwg.org/specs/web-apps/current-work/#pseudo-classes
for the rationale.

11 years ago[l10n] Updated Estonian translation
Mattias Põldaru [Tue, 18 Dec 2012 13:56:10 +0000 (15:56 +0200)]
[l10n] Updated Estonian translation

11 years agoUpdated Slovenian translation
Matej Urbančič [Tue, 18 Dec 2012 07:50:17 +0000 (08:50 +0100)]
Updated Slovenian translation

11 years agobump version
Matthias Clasen [Tue, 18 Dec 2012 05:43:14 +0000 (00:43 -0500)]
bump version

11 years ago3.7.4
Matthias Clasen [Tue, 18 Dec 2012 05:37:25 +0000 (00:37 -0500)]
3.7.4

11 years agoUpdate results for Unicode ellises
Matthias Clasen [Tue, 18 Dec 2012 05:14:53 +0000 (00:14 -0500)]
Update results for Unicode ellises

11 years agoUpdate for some changes to selectable/selected state handling
Matthias Clasen [Tue, 18 Dec 2012 05:02:09 +0000 (00:02 -0500)]
Update for some changes to selectable/selected state handling

Since this is no longer implemented automatically in atk, some
accessibles, such as menus, loose their selectable state.

11 years agoNotebookPageAccessible: Implement selectable/selected states
Matthias Clasen [Tue, 18 Dec 2012 04:59:23 +0000 (23:59 -0500)]
NotebookPageAccessible: Implement selectable/selected states

The automatic handling for this was removed from atk, so
we need to do it ourselves here.

11 years agoGtkMenuItemAccessible: implement selectable/selected states
Matthias Clasen [Tue, 18 Dec 2012 04:58:24 +0000 (23:58 -0500)]
GtkMenuItemAccessible: implement selectable/selected states

The automatic handling for this was removed in atk, so
we need to do it ourselves now.

11 years agoupdate_type_references: Deal with type_refs_ht being NULL
Matthias Clasen [Tue, 18 Dec 2012 03:45:08 +0000 (22:45 -0500)]
update_type_references: Deal with type_refs_ht being NULL

This can apparently happen, and it was breaking make check
on my system, by causing it to throw  a critical out of
g_hash_table_iter_init from here.

11 years agodocs: Add an index for 3.8 api additions
Matthias Clasen [Tue, 18 Dec 2012 03:19:59 +0000 (22:19 -0500)]
docs: Add an index for 3.8 api additions

11 years agoFix up gtk_builder_expose_object addition
Matthias Clasen [Tue, 18 Dec 2012 03:18:06 +0000 (22:18 -0500)]
Fix up gtk_builder_expose_object addition

It needs an AVAILABLE_IN annotation in the header, and it
needs to be added to the symbols list.

11 years agoquartz: make setting_same_owner member of GtkClipboardOwner @public
Michael Natterer [Mon, 17 Dec 2012 21:20:40 +0000 (22:20 +0100)]
quartz: make setting_same_owner member of GtkClipboardOwner @public

to fix the build, thanks to parafin for the patch.
(cherry picked from commit e3e055f8551ac8ee033f361261c849c612554184)

11 years agostylecontext: Fix gtk_style_context_set_background()
Benjamin Otte [Mon, 17 Dec 2012 15:42:55 +0000 (16:42 +0100)]
stylecontext: Fix gtk_style_context_set_background()

This function is just a sophisitcated optimization.

If we know the GDK window's background will be opaque, we mark it as
opaque. This is so GDK can do all the optimizations it does for opaque
windows and be fast.

This is mainly used when scrolling.

The previous code didn't get this right, in particular it didn't enforce
a transparent background when it knew the background was not opaque.

11 years agogdk: API: constify argument
Benjamin Otte [Mon, 17 Dec 2012 15:42:07 +0000 (16:42 +0100)]
gdk: API: constify argument

gdk_window_set_background_rgba() should take a const RGBA.

11 years agomenushell: Remove unused variable
Benjamin Otte [Mon, 17 Dec 2012 16:17:54 +0000 (17:17 +0100)]
menushell: Remove unused variable

Introduced in 531d0dc32a38c3bb00a5f9f6fc37e126f62beb07. Welcome to the
club of people not using -Werror Stéphane.

11 years agogtkmenushell: Fix an endless loop on focus cycle
Stéphane Démurget [Sat, 15 Dec 2012 16:21:12 +0000 (17:21 +0100)]
gtkmenushell: Fix an endless loop on focus cycle

This is a simple fallout from sealing gtkmenushell, which only appears
when F10 or Shift-F10 is used in a submenu.

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

11 years agoAssamese translation updated
Nilamdyuti Goswami [Mon, 17 Dec 2012 09:29:55 +0000 (14:59 +0530)]
Assamese translation updated

11 years agoUpdated German translation (bug 690302)
Christian Kirbach [Mon, 17 Dec 2012 00:45:16 +0000 (01:45 +0100)]
Updated German translation (bug 690302)

11 years agoUpdated Polish translation
Piotr Drąg [Sun, 16 Dec 2012 02:37:09 +0000 (03:37 +0100)]
Updated Polish translation

11 years agogtk: fix scrolling in modal dialogs when event_widget is insensitive
Michael Natterer [Fri, 14 Dec 2012 14:53:29 +0000 (15:53 +0100)]
gtk: fix scrolling in modal dialogs when event_widget is insensitive

When checking for modal grabs in gtk_main_do_event(), forward
GDK_SCROLL events to event_widget, even if it is insensitive.

11 years agocssstyleproperty: remove unused variable
Cosimo Cecchi [Fri, 14 Dec 2012 02:54:50 +0000 (21:54 -0500)]
cssstyleproperty: remove unused variable

11 years agoa11y: fix uninitialized variables compiler warning
Cosimo Cecchi [Fri, 14 Dec 2012 02:52:51 +0000 (21:52 -0500)]
a11y: fix uninitialized variables compiler warning

The code path where we update the tooltip text property doesn't set
the state and value variables, and so doesn't need to call
notify_state_change().
Return early, and move the if block at the beginning of the function for
clarity.

11 years agoxi2: Abort early if we don't have a proper GDK window
Jasper St. Pierre [Fri, 19 Oct 2012 17:33:31 +0000 (13:33 -0400)]
xi2: Abort early if we don't have a proper GDK window

This can happen in mutter or other applications that use GDK filters
but don't actually create GDK windows for everything they get events
for.

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

11 years agoIconHelper: Avoid warnings for non-existing stock ids
Alexander Larsson [Thu, 13 Dec 2012 09:08:37 +0000 (10:08 +0100)]
IconHelper: Avoid warnings for non-existing stock ids

There are some registred stock ids like gtk-discards that have no icons,
and you could also pass a non-registred stock id. Both of these means
gtk_style_context_lookup_icon_set returns NULL, which causes
a critical in gtk_icon_set_render_icon_pixbuf.

We avoid this by just making these render as EMPTY.

11 years agoBug 668239 - texts disappear when notebook switch page at zh_CN locate
Chun-wei Fan [Mon, 26 Nov 2012 04:57:05 +0000 (12:57 +0800)]
Bug 668239 - texts disappear when notebook switch page at zh_CN locate

In gtkimcontextime.c, use gdk_win32_window_get_impl_hwnd() to get to
the impl's existing native window instead of GDK_WINDOW_HWND() which
implicitly ensures a native window for the widget itself. This seems
to work around whatever GDK problem with native subwindows and fixes
the bug.

This is based on Michael Natterer's fix for gtk-2-24.

11 years agoUse GTK_RESIZE_PARENT resize_mode for GtkViewport
Alexander Larsson [Wed, 12 Dec 2012 13:59:06 +0000 (14:59 +0100)]
Use GTK_RESIZE_PARENT resize_mode for GtkViewport

We used to use GTK_RESIZE_QUEUE, but that is problematic for e.g
a GtkScrolledWindow with NEVER scroll policies, as size changes
in ancestors will never get propagated to the scrolled window, causing
it to not have the correct size.

This is a slight performance hit, but in practice its not bound to be
problematic. In typical UIs there is only a single "large" GtkScrolledWindow
visible at a time, so a size requeust propagating out of such a window
will only hit the smaller amount of widgetry outside the scrolled window,
and additionally all such widgets will have their size request caches
still valid.

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

11 years agoUpdated Hebrew translation.
Yaron Shahrabani [Wed, 12 Dec 2012 09:24:50 +0000 (11:24 +0200)]
Updated Hebrew translation.

11 years agoTrivial whitespace fix
Matthias Clasen [Wed, 12 Dec 2012 02:30:22 +0000 (21:30 -0500)]
Trivial whitespace fix

11 years agooverlay: Fix child window position/size on realize
Alexander Larsson [Tue, 11 Dec 2012 14:41:50 +0000 (15:41 +0100)]
overlay: Fix child window position/size on realize

We don't get an automatic queue resize on realize anymore, which
was papering over this bug where we did not set the child window
size/position at realize time.

11 years agoFix compilation on MacOSX Tiger
John Ralls [Tue, 11 Dec 2012 00:51:31 +0000 (16:51 -0800)]
Fix compilation on MacOSX Tiger

NSInteger isn't defined until MacOSX Leopard, so in the 3 files that
use it, include ../gdk/quartz/gdkquartz.h which provides a typedef when
needed.

11 years agoAdded new function gtk_builder_expose_object() based on the original work by
Juan Pablo Ugarte [Mon, 10 Dec 2012 17:53:53 +0000 (14:53 -0300)]
Added new function gtk_builder_expose_object() based on the original work by
Marco Diego Aurélio Mesquita on bug #447972

11 years agocss: Avoid looking up the GtkCssStyleProperty class a lot
Alexander Larsson [Mon, 10 Dec 2012 13:49:51 +0000 (14:49 +0100)]
css: Avoid looking up the GtkCssStyleProperty class a lot

Instead of constantly looking up the class we just stash it away in
class_init.

11 years agocss: Speed up name matching
Alexander Larsson [Mon, 10 Dec 2012 11:57:10 +0000 (12:57 +0100)]
css: Speed up name matching

We use the new g_type_get_type_registration_serial() so that we can
cache and properly invalidate the result of g_type_from_name().

This bumps the glib requirement to 2.35.3 to get the new function.

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

11 years agocss: Clean up tree_match implementations
Alexander Larsson [Mon, 10 Dec 2012 11:28:44 +0000 (12:28 +0100)]
css: Clean up tree_match implementations

A bunch of repeated code is broken out into the helper
gtk_css_selector_tree_match_previous().

11 years agocss: Do get_change directly on the tree without matching first
Alexander Larsson [Mon, 10 Dec 2012 10:27:43 +0000 (11:27 +0100)]
css: Do get_change directly on the tree without matching first

Rather than first collecting matches and then getting the change
for them we do the change collection directly on the tree. This
is about twice as fast.

11 years agocss: Factor out some of the position matching code
Alexander Larsson [Fri, 7 Dec 2012 17:55:49 +0000 (18:55 +0100)]
css: Factor out some of the position matching code

11 years agoAdd missing NULL-check in GtkEntryAccessible
Mario Sanchez Prada [Sun, 9 Dec 2012 10:49:35 +0000 (11:49 +0100)]
Add missing NULL-check in GtkEntryAccessible

Only call to atk_object_set_name if gtk_entry_get_icon_name() is not NULL.

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

11 years agoUpdated Spanish translation
Daniel Mustieles [Sat, 8 Dec 2012 18:50:40 +0000 (19:50 +0100)]
Updated Spanish translation

11 years agoFix build by un-translating org.gtk.Settings.FileChooser
Colin Walters [Fri, 7 Dec 2012 19:05:58 +0000 (14:05 -0500)]
Fix build by un-translating org.gtk.Settings.FileChooser

At the moment, gtk+ doesn't depend on intltool, which is the program
that knows how to translate schemas.  Attempting to translate them
causes a build failure, so for now, let's leave them in en_US.

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

11 years agoAdd summary and description to "show-hidden" key
Timothy Arceri [Mon, 3 Dec 2012 20:59:49 +0000 (07:59 +1100)]
Add summary and description to "show-hidden" key

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

11 years agoscale: render scale mark lines with separator style class
Cosimo Cecchi [Fri, 7 Dec 2012 16:41:03 +0000 (11:41 -0500)]
scale: render scale mark lines with separator style class

So that the theme can distinguish them from the mark text.

11 years agobuild: fix some GCC warnings
Cosimo Cecchi [Fri, 7 Dec 2012 16:34:49 +0000 (11:34 -0500)]
build: fix some GCC warnings

11 years agoquartz: fix crash in the recent clipboard "fix", and really fix it
Michael Natterer [Fri, 7 Dec 2012 11:19:52 +0000 (12:19 +0100)]
quartz: fix crash in the recent clipboard "fix", and really fix it

We must not release the GtkClipboardOwner in pasteboardChangedOwner
becaue we don't own a reference to ourselves (NSPasteboard does).
Instead, release the owner right after setting it, transferring
ownership to NSPasteboard

Also, fix repeated setting of the same owner by keeping the
owner around in GtkCLipboard, and re-use it if "user_data"
doesn't change. To avoid clipboard_unset()ting our own contents
in the process, add an ugly "setting_same_owner" boolean to
GtkClipboardOwner, set it during re-setting the same owner,
and avoid calling clipboard_unset() from pasteboardChangedOwner
if it's TRUE.
(cherry picked from commit 4a8df7a33c298d22bf78b947d0e861fc03ec70e1)

11 years agogtkcssselector: Fix build
Jasper St. Pierre [Thu, 6 Dec 2012 22:48:11 +0000 (17:48 -0500)]
gtkcssselector: Fix build

destroy vs. free strikes again

11 years agogtkcssselector: Don't leak the hash table
Jasper St. Pierre [Thu, 6 Dec 2012 22:38:06 +0000 (17:38 -0500)]
gtkcssselector: Don't leak the hash table

We should probably free the memory we allocate. Sounds like a winning
strategy.

11 years agotreeview: Don't invalidate whole tree unless needed
Alexander Larsson [Thu, 6 Dec 2012 21:28:11 +0000 (22:28 +0100)]
treeview: Don't invalidate whole tree unless needed

We currently invalidate the whole tree every time the style state
changes in the tree view. The primary reason for this is to catch
default font changes as that may affect text cell renderers. But
cell renderers could *potentially* also read other style properties
(although that seems weird and unlikely).

We handle this by invalidating only when some state that affects sizes
is changed. This includes all the font properties.

11 years agotextview: Only clear the layout in style_update if the font actually changes
Alexander Larsson [Thu, 6 Dec 2012 20:16:19 +0000 (21:16 +0100)]
textview: Only clear the layout in style_update if the font actually changes

11 years agocss: Add _gtk_css_style_property_affects_font
Alexander Larsson [Thu, 6 Dec 2012 20:14:02 +0000 (21:14 +0100)]
css: Add _gtk_css_style_property_affects_font

This checks if a style_update affects the font.

11 years agoentry: No need to reset layouts on style_updated
Alexander Larsson [Thu, 6 Dec 2012 18:52:35 +0000 (19:52 +0100)]
entry: No need to reset layouts on style_updated

With pango handling changes to the PangoLayout there now is no
style changes that can affect the layout for the entry, so we don't
have to reset the layout whenever the style is updated.

11 years agoGtkLabel: Rely on the new pango support for context change tracking
Alexander Larsson [Wed, 5 Dec 2012 13:51:23 +0000 (14:51 +0100)]
GtkLabel: Rely on the new pango support for context change tracking

Now that Pango tracks changes to the context automatically there is
no need to do it manually in e.g. style-updated or direction-changed,
in fact the only case we have to care about is when we re-create
the PangoContext due to a screen change, so we only have to clear
the layouts in GtkLabel in screen-changed.

This means we're not clearing all the layouts whenever the state changes,
which happens to every widget when the window is unfocused, which helps
performance a lot.

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

11 years agoRequire new pango with automatic tracking of PangoContext changes
Alexander Larsson [Thu, 6 Dec 2012 18:50:47 +0000 (19:50 +0100)]
Require new pango with automatic tracking of PangoContext changes

Pango 1.32.4 has a feature where any PangoLayout automatically handles
the case where a PangoContext is changed. We want to rely on this to
avoid having to clear layouts too often, so we make this a hard dep.

11 years agostylecontext: Deprecate gtk_style_context_get_font()
Benjamin Otte [Thu, 6 Dec 2012 01:55:22 +0000 (02:55 +0100)]
stylecontext: Deprecate gtk_style_context_get_font()

This is for a very simple reason: The getter is returning a const value
and the font isn't const anymore. So we need to store the font
description somewhere but we can't reuse it as it's changing all the
time (yay animations, yay inherited values). Sucks.

So keep the hack in here but deprecate the function.

11 years agoswitch: Remove hack to change text size
Benjamin Otte [Thu, 6 Dec 2012 01:54:18 +0000 (02:54 +0100)]
switch: Remove hack to change text size

The same effect can now be achieved via
  .switch { font-size: smaller; }
so there is no need to hardcode things.

11 years agogtk: Query font size directly
Benjamin Otte [Thu, 6 Dec 2012 01:53:43 +0000 (02:53 +0100)]
gtk: Query font size directly

... instead of calling gtk_style_context_get_font() and then
pango_font_description_get_size().

11 years agogtk: Use gtk_style_context_get()
Benjamin Otte [Thu, 6 Dec 2012 01:51:04 +0000 (02:51 +0100)]
gtk: Use gtk_style_context_get()

... instead of soon-to-be-deprecated gtk_style_context_get_font().

11 years agogtk: Use context's font
Benjamin Otte [Thu, 6 Dec 2012 01:47:24 +0000 (02:47 +0100)]
gtk: Use context's font

Instead of using gtk_style_context_get_font() in
pango_context_get_metrics(), use pango_context_get_font_description().
The context contains the font description we are about to use after all.

11 years agotests: Don't call to-be-deprecated function
Benjamin Otte [Thu, 6 Dec 2012 01:30:57 +0000 (02:30 +0100)]
tests: Don't call to-be-deprecated function

11 years agoaboutdialog: Add text tag to get small text
Benjamin Otte [Thu, 6 Dec 2012 01:18:58 +0000 (02:18 +0100)]
aboutdialog: Add text tag to get small text

This is to get rid of gtk_widget_override_font() and
gtk_style_context_get_font().

FIXME: This should probably be done by the theme somehow?

11 years agostylecontext: Always recompute font
Benjamin Otte [Wed, 5 Dec 2012 17:41:40 +0000 (18:41 +0100)]
stylecontext: Always recompute font

This is necessary  because values in a GtkCssComputedValues can change
now. So if the font-size is inherited or animated, the cached value will
be outdated.

Fixes the fontchooser preview not updating.

11 years agoUpdated Spanish translation
Daniel Mustieles [Wed, 5 Dec 2012 19:10:39 +0000 (20:10 +0100)]
Updated Spanish translation

11 years agoUpdated Spanish translation
Daniel Mustieles [Wed, 5 Dec 2012 19:10:27 +0000 (20:10 +0100)]
Updated Spanish translation

11 years agotreemodelfilter: Make the constructor binding friendly
Jasper St. Pierre [Mon, 16 Jul 2012 01:14:33 +0000 (21:14 -0400)]
treemodelfilter: Make the constructor binding friendly

This means reffing the root in the set property implementation,
rather than in the constructor. We don't need to unref the root
on set, as it's a CONSTRUCT_ONLY property.

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

11 years agoGdkBroadwayDisplay: include proper port number in error trace
Aleksander Morgado [Wed, 5 Dec 2012 10:15:42 +0000 (11:15 +0100)]
GdkBroadwayDisplay: include proper port number in error trace

11 years agoGdkBroadwayDisplay: initialize GError before using it
Aleksander Morgado [Wed, 5 Dec 2012 10:15:11 +0000 (11:15 +0100)]
GdkBroadwayDisplay: initialize GError before using it

11 years agoRevert "Don't queue resize for hidden widgets without a size group"
Alexander Larsson [Tue, 4 Dec 2012 20:26:37 +0000 (21:26 +0100)]
Revert "Don't queue resize for hidden widgets without a size group"

This seems to break redraw of the middle pane in glade.

This reverts commit faaae520c98af1c27ca1e97ca8f33655ec6b575e.

11 years agoDon't unnecessarily queue resize in GtkWindow.style_updated
Alexander Larsson [Tue, 4 Dec 2012 15:38:23 +0000 (16:38 +0100)]
Don't unnecessarily queue resize in GtkWindow.style_updated

GtkWindow always queues a resize on style updates if there is
a grip, because it may have been the grip size style properties
that changed. However, even if it *were*, and it likely wasn't
that would not affect the windows size request, so no need
to queue a resize.

11 years agoDon't queue resize for hidden widgets without a size group
Alexander Larsson [Tue, 4 Dec 2012 15:53:06 +0000 (16:53 +0100)]
Don't queue resize for hidden widgets without a size group

queue_resize basically tells the parent widget that it may need
to pick a different size/layout. However, for a hidden child widget
that should never be needed. It may be that the widget is in a
sizegroup that has ignore_hidden == FALSE though, so it may
affect the size group calculations.

However, if a widget is not visible and not in a size group then
its safe to avoid the resize, as the widget will be resized on
becoming visible anyway.

This avoids a lot of size allocation for hidden things like menus
and tooltips.

11 years agocss: Avoid queue_resize in _gtk_widget_style_context_invalidated
Alexander Larsson [Tue, 4 Dec 2012 15:36:37 +0000 (16:36 +0100)]
css: Avoid queue_resize in _gtk_widget_style_context_invalidated

We've already emitted style_updated, and the handler for that queues
a resize if necessary.

11 years agocss: Avoid allocations in gtk_css_value_array_compute
Alexander Larsson [Mon, 3 Dec 2012 13:30:37 +0000 (14:30 +0100)]
css: Avoid allocations in gtk_css_value_array_compute

Almost all array computations lead to no changes (99% in nautilus)
so we avoid the upfront allocation and delay it until we know its
needed. This drops the allocate/free from the profile.

11 years agocss: Start array allocation with a better size
Alexander Larsson [Mon, 3 Dec 2012 13:29:40 +0000 (14:29 +0100)]
css: Start array allocation with a better size

All computed values will compute all normal properties at least, so
we might as well allocate these upfront, which leads to a lot less
reallocations.

11 years agocss: Use internal return_if_fail in some commonly called code
Alexander Larsson [Mon, 3 Dec 2012 12:26:16 +0000 (13:26 +0100)]
css: Use internal return_if_fail in some commonly called code

These are internal apis, and any external issues should have been
caught by checks at public API points. We use the internal checks
here because these checks show up in a non-neglible way on profiles.

11 years agoAdd internal versions of g_return_[val_]_if_fail
Alexander Larsson [Mon, 3 Dec 2012 12:25:14 +0000 (13:25 +0100)]
Add internal versions of g_return_[val_]_if_fail

These are only enabled on debug=yes, so not by default
in released tarballs.

11 years agopo: Fix xgettext failing on unicode strings
Rico Tzschichholz [Tue, 4 Dec 2012 19:06:19 +0000 (20:06 +0100)]
po: Fix xgettext failing on unicode strings

It is needed to use -from-code=utf-8 to override the ASCII default

Caused by ceb866dfe6be6d88b8f83a3cbdb8a2a688419c82

11 years agoreftests: Fix wrong name in test
Benjamin Otte [Tue, 4 Dec 2012 19:01:45 +0000 (20:01 +0100)]
reftests: Fix wrong name in test

Typo in d8306aaeb3376d6d11a05b46171300a2b5747606