]> Pileus Git - ~andy/gtk/log
~andy/gtk
12 years agotests: Convert testadjustsize example from GtkTable to box and grid
Benjamin Otte [Tue, 27 Sep 2011 20:02:00 +0000 (22:02 +0200)]
tests: Convert testadjustsize example from GtkTable to box and grid

12 years agotests: Make prop-editor use a grid instead of a table
Benjamin Otte [Tue, 27 Sep 2011 19:32:35 +0000 (21:32 +0200)]
tests: Make prop-editor use a grid instead of a table

12 years agotests: Convert print-editor from GtkTable to GtkBox
Benjamin Otte [Tue, 27 Sep 2011 19:04:26 +0000 (21:04 +0200)]
tests: Convert print-editor from GtkTable to GtkBox

12 years agotests: Convert testimage example from GtkTable to GtkGrid
Benjamin Otte [Tue, 27 Sep 2011 18:24:13 +0000 (20:24 +0200)]
tests: Convert testimage example from GtkTable to GtkGrid

12 years agotests: Convert testmerge from GtkTable to GtkGrid
Benjamin Otte [Tue, 27 Sep 2011 17:37:43 +0000 (19:37 +0200)]
tests: Convert testmerge from GtkTable to GtkGrid

12 years agotoolbutton: don't force the icon widget to be a GtkMisc
Cosimo Cecchi [Tue, 27 Sep 2011 21:06:59 +0000 (17:06 -0400)]
toolbutton: don't force the icon widget to be a GtkMisc

There's really no reason the icon widget must be a GtkMisc. You might
want to use e.g. a GtkSpinner.

12 years agonotebook: vborder/hborder deprecations are Since: 3.4, not 3.2
Cosimo Cecchi [Tue, 27 Sep 2011 17:45:46 +0000 (13:45 -0400)]
notebook: vborder/hborder deprecations are Since: 3.4, not 3.2

12 years agonotebook: add top/bottom/left/right style classes to the tab region
Cosimo Cecchi [Thu, 22 Sep 2011 00:15:02 +0000 (20:15 -0400)]
notebook: add top/bottom/left/right style classes to the tab region

When we use the style context to get information for the tab region,
also add a style class to indicate its position, so that the relevant
information is pulled off from the theme.

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

12 years agostylecontext: add style classes for top/bottom/right/left areas
Cosimo Cecchi [Thu, 22 Sep 2011 00:13:49 +0000 (20:13 -0400)]
stylecontext: add style classes for top/bottom/right/left areas

This is useful to e.g. theme notebook tabs differently according to
their position directly from the CSS sheet.

GtkNotebook support in a separate commit.

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

12 years agonotebook: unconditionally apply padding to the tab content
Cosimo Cecchi [Wed, 21 Sep 2011 23:17:05 +0000 (19:17 -0400)]
notebook: unconditionally apply padding to the tab content

Not only when on left or top, otherwise the other position look
off-centered.

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

12 years agonotebook: really deprecate tab_vborder and tab_hborder
Cosimo Cecchi [Wed, 21 Sep 2011 22:10:46 +0000 (18:10 -0400)]
notebook: really deprecate tab_vborder and tab_hborder

The setter for this was deprecated in 2.x and removed in 3.0.
I don't see any reason why we should hardcode 2px for this value;
instead, deprecated the getter and make it always return zero, and stop
using the variables internally.

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

12 years agonotebook: allow using different padding values for the active tab state
Cosimo Cecchi [Tue, 27 Sep 2011 16:55:05 +0000 (12:55 -0400)]
notebook: allow using different padding values for the active tab state

The code before was basically adding and removing the same padding value
in two different places during the allocation cycle.
Instead, what we want to do is to offset the inactive tab allocation by
the difference with the active tab padding, to ensure the tab content is
always drawn centered and in the right position.

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

12 years agonotebook: use the current state to get the padding values
Cosimo Cecchi [Tue, 27 Sep 2011 16:54:22 +0000 (12:54 -0400)]
notebook: use the current state to get the padding values

We want to enable the use of different padding values between active and
inactive tabs, so that the two are completely separated (but limited by
the active tab size).
This way themes can decide how bigger the active tab is drawn compared
to the normal one just specifying a different padding value from the
CSS, like this:

.notebook tab {
  padding: 2;
}

.notebook tab:active {
  padding: 4;
}

As a first step, fetch the padding values with the right state flags
from GtkStyleContext.

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

12 years agoupdate zh_CN translation
YunQiang Su [Tue, 27 Sep 2011 17:34:08 +0000 (01:34 +0800)]
update zh_CN translation

12 years agomountoperation: fix the build
Cosimo Cecchi [Tue, 27 Sep 2011 16:51:54 +0000 (12:51 -0400)]
mountoperation: fix the build

2d3db3421fd8067dd9c59a0727da239936187cc5 has a typo which broke the
build on master.

12 years agoUpdated POTFILES.skip
Piotr Drąg [Tue, 27 Sep 2011 14:04:53 +0000 (16:04 +0200)]
Updated POTFILES.skip

12 years agoBug 659406 - Abstract what triggers a context menu
Michael Natterer [Tue, 27 Sep 2011 13:37:28 +0000 (15:37 +0200)]
Bug 659406 - Abstract what triggers a context menu

Add gdk_event_triggers_context_menu(), using the new modifier
abstraction API. Remove _gtk_button_event_triggers_context_menu()
and port all callers.

12 years agoGtkSettings: fix compile warnings on != X11
Michael Natterer [Tue, 27 Sep 2011 12:21:09 +0000 (14:21 +0200)]
GtkSettings: fix compile warnings on != X11

12 years agogtk: remove the private GTK_EXTEND/MODIFY_SELECTION_MOD_MASK
Michael Natterer [Tue, 27 Sep 2011 10:06:10 +0000 (12:06 +0200)]
gtk: remove the private GTK_EXTEND/MODIFY_SELECTION_MOD_MASK

and use the new public modifier abstraction API instead.

12 years agogtk: remove the private GTK_NO_TEXT_INPUT_MOD_MASK
Michael Natterer [Tue, 27 Sep 2011 09:34:19 +0000 (11:34 +0200)]
gtk: remove the private GTK_NO_TEXT_INPUT_MOD_MASK

and use the new public modifier abstraction API.

12 years agoBug 659602 - Provide an abstraction for the platform's use of modifier keys
Michael Natterer [Tue, 27 Sep 2011 07:50:34 +0000 (09:50 +0200)]
Bug 659602 - Provide an abstraction for the platform's use of modifier keys

Add enum GdkModifierIntent which identifies use cases for modifier masks
and GdkKeyMap::get_modifier_mask(). Add a default implementation which returns
what is currently hardcoded all over GTK+, and an implementation in the
quartz backend. Also add gtk_widget_get_modifier_mask() which simplifies
things by doing widget->display->keymap->get_modifier_mask().

12 years agotests: Use a grid in testnotebookdnd instead of a table
Benjamin Otte [Tue, 27 Sep 2011 03:36:03 +0000 (05:36 +0200)]
tests: Use a grid in testnotebookdnd instead of a table

12 years agotests: Use a grid in testorientable instead of a table
Benjamin Otte [Tue, 27 Sep 2011 03:32:49 +0000 (05:32 +0200)]
tests: Use a grid in testorientable instead of a table

12 years agotests: Use a box instead of a table in testselection
Benjamin Otte [Tue, 27 Sep 2011 03:29:04 +0000 (05:29 +0200)]
tests: Use a box instead of a table in testselection

12 years agotoolbar: Fix widget path creation code
Benjamin Otte [Tue, 27 Sep 2011 02:29:55 +0000 (04:29 +0200)]
toolbar: Fix widget path creation code

- Ensure arrow button is always included
- Invalidate list when direction changes

12 years agocontainer: Warn if an invalid widget path is created
Benjamin Otte [Tue, 27 Sep 2011 02:29:11 +0000 (04:29 +0200)]
container: Warn if an invalid widget path is created

This makes it quite a bit easier to debug things.

12 years agotests: Convert testtoolbar to use a box instead of a table
Benjamin Otte [Tue, 27 Sep 2011 02:02:52 +0000 (04:02 +0200)]
tests: Convert testtoolbar to use a box instead of a table

12 years agotests: Convert testtreeview from GtkTable to GtkBox
Benjamin Otte [Tue, 27 Sep 2011 00:53:31 +0000 (02:53 +0200)]
tests: Convert testtreeview from GtkTable to GtkBox

12 years agotests: Make testwindows use GtkGrid
Benjamin Otte [Tue, 27 Sep 2011 00:49:15 +0000 (02:49 +0200)]
tests: Make testwindows use GtkGrid

12 years agotests: Make testwindows dialog even more beautiful
Benjamin Otte [Tue, 27 Sep 2011 00:38:05 +0000 (02:38 +0200)]
tests: Make testwindows dialog even more beautiful

12 years agotests: Make editing window look more beautiful
Benjamin Otte [Tue, 27 Sep 2011 00:37:03 +0000 (02:37 +0200)]
tests: Make editing window look more beautiful

12 years agoUpdated Serbian translation
Мирослав Николић [Tue, 27 Sep 2011 00:24:51 +0000 (02:24 +0200)]
Updated Serbian translation

12 years agoPut master on the 3.3 track
Matthias Clasen [Mon, 26 Sep 2011 22:03:37 +0000 (18:03 -0400)]
Put master on the 3.3 track

12 years agoreftests: Add a reftest checking background-color: transparent
Benjamin Otte [Mon, 26 Sep 2011 20:33:40 +0000 (22:33 +0200)]
reftests: Add a reftest checking background-color: transparent

12 years agoFixed some strings in Brazilian Portuguese translation
Rodolfo Ribeiro Gomes [Mon, 26 Sep 2011 18:46:00 +0000 (15:46 -0300)]
Fixed some strings in Brazilian Portuguese translation

12 years agoBug 659406 - Abstract what triggers a context menu
Michael Natterer [Sun, 18 Sep 2011 22:32:52 +0000 (00:32 +0200)]
Bug 659406 - Abstract what triggers a context menu

Add _gtk_button_event_triggers_context_menu() and use it instead
of checking for event->button == 3, so context menus are invoked
correctly on the Mac.

12 years agoapp: abstract which modifiers are used for extending and modifying selections
Michael Natterer [Sat, 17 Sep 2011 18:05:33 +0000 (20:05 +0200)]
app: abstract which modifiers are used for extending and modifying selections

which are SHIFT and MOD2 on the Mac, and SHIFT and CONTROL otherwise.
Use the new define all over the place and rename variables and
members to not say "shift" or "control".

12 years agogtk: use GTK_NO_TEXT_INPUT_MOD_MASK also in gtkfilechooserdefault.c
Michael Natterer [Sat, 17 Sep 2011 13:25:02 +0000 (15:25 +0200)]
gtk: use GTK_NO_TEXT_INPUT_MOD_MASK also in gtkfilechooserdefault.c
(cherry picked from commit b057a311e76a90a120ca0e9597bedeb9fc89b0b2)

12 years agogtk: allow to specify accelerators in a platform-independent way
Michael Natterer [Fri, 16 Sep 2011 14:12:23 +0000 (16:12 +0200)]
gtk: allow to specify accelerators in a platform-independent way

Introduce <Primary> in accelerator strings, which resolves to
GDK_CONTROL_MASK on X11/Win23, and to GDK_META_MASK on quartz.
Also serialize CONTROL/META as <Primary> depending on the platform.

12 years agogtk: fix entering of Option-foo symbols on the Mac
Michael Natterer [Fri, 16 Sep 2011 14:10:06 +0000 (16:10 +0200)]
gtk: fix entering of Option-foo symbols on the Mac

define GTK_NO_TEXT_INPUT_MOD_MASK in gtkprivate.h
and use it in the IM contexts, so Option-foo is no longer
filtered away.

12 years agogtk: use GTK_DEFAULT_ACCEL_MOD_MASK instead of GDK_CONTROL_MASK in gtkstock.c
Michael Natterer [Fri, 16 Sep 2011 13:56:29 +0000 (15:56 +0200)]
gtk: use GTK_DEFAULT_ACCEL_MOD_MASK instead of GDK_CONTROL_MASK in gtkstock.c

12 years agoquartz: resolve the modifier confusion on the Mac
Michael Natterer [Fri, 16 Sep 2011 13:54:03 +0000 (15:54 +0200)]
quartz: resolve the modifier confusion on the Mac

- map Alt/Option to MOD1
- map Command to MOD2
- map MOD2 to the virtual Meta
- improve/fix (?) group handling in gdkkeys-quartz.c

12 years agogtk: disable mnemonics in gtkrc.key.mac, they don't exist on the Mac
Michael Natterer [Fri, 16 Sep 2011 13:51:33 +0000 (15:51 +0200)]
gtk: disable mnemonics in gtkrc.key.mac, they don't exist on the Mac
(cherry picked from commit d83c86d42eda7063f7367057ad3afaf01e95c997)

12 years agogtk: enable setting virtual modifiers in GtkCellRendererAccel
Michael Natterer [Fri, 16 Sep 2011 13:39:23 +0000 (15:39 +0200)]
gtk: enable setting virtual modifiers in GtkCellRendererAccel

Call gdk_keymap_add_virtual_modifiers() on event->state,
so virtual modifiers get added at all.
(cherry picked from commit be1eea612cb7beacffdc0b31e7158195004f5e2d)

12 years agocssprovider: Remove unused enums
Benjamin Otte [Mon, 26 Sep 2011 13:58:27 +0000 (15:58 +0200)]
cssprovider: Remove unused enums

12 years agostyleproperty: Allow 'transparent' keyword for background-color
Benjamin Otte [Mon, 26 Sep 2011 13:56:46 +0000 (15:56 +0200)]
styleproperty: Allow 'transparent' keyword for background-color

12 years agostyleproperty: Default to transparent background-color
Benjamin Otte [Mon, 26 Sep 2011 13:53:48 +0000 (15:53 +0200)]
styleproperty: Default to transparent background-color

12 years agostyleproperty: Use the long form to register background-color
Benjamin Otte [Mon, 26 Sep 2011 13:48:53 +0000 (15:48 +0200)]
styleproperty: Use the long form to register background-color

We want to set a default value.

12 years ago[l10n]Updated Catalan (Valencian) translation
Carles Ferrando [Mon, 26 Sep 2011 12:22:19 +0000 (14:22 +0200)]
[l10n]Updated Catalan (Valencian) translation

12 years ago[l10n]Updated Catalan (Valencian) translation
Carles Ferrando [Mon, 26 Sep 2011 12:22:01 +0000 (14:22 +0200)]
[l10n]Updated Catalan (Valencian) translation

12 years agoUpdate Czech translation
Petr Kovar [Mon, 26 Sep 2011 10:20:49 +0000 (12:20 +0200)]
Update Czech translation

12 years agoBump version
Matthias Clasen [Mon, 26 Sep 2011 02:01:13 +0000 (22:01 -0400)]
Bump version

12 years ago3.2.0
Matthias Clasen [Mon, 26 Sep 2011 02:00:20 +0000 (22:00 -0400)]
3.2.0

12 years agoUpdates
Matthias Clasen [Mon, 26 Sep 2011 01:13:33 +0000 (21:13 -0400)]
Updates

12 years agoDocumentation fixes
Matthias Clasen [Mon, 26 Sep 2011 00:58:59 +0000 (20:58 -0400)]
Documentation fixes

Mostly making sure that return values and varargs don't loose
their docs.

12 years agoGtkBox: make get_path_for_child() work if there are internal children
Michael Natterer [Sun, 25 Sep 2011 22:46:16 +0000 (00:46 +0200)]
GtkBox: make get_path_for_child() work if there are internal children

Use foreach() instead of forall() to find the child's siblings
because internal children of subclasses have no sibling relation
to the box' children. Also deal with the subclass failing to
implement get_path_for_child(). This caused an infinite widget
path invalidation loop of sorts with GimpMessageBox, which is a
vertical box with a decorative icon to the left.

12 years agoUpdate Czech translation
Petr Kovar [Sun, 25 Sep 2011 21:57:51 +0000 (23:57 +0200)]
Update Czech translation

12 years ago[l10n]Updated Catalan translation
Pau Iranzo [Sun, 25 Sep 2011 21:39:17 +0000 (23:39 +0200)]
[l10n]Updated Catalan translation

12 years ago[l10n]Updated Catalan translation
Gil Forcada [Sun, 25 Sep 2011 21:11:05 +0000 (23:11 +0200)]
[l10n]Updated Catalan translation

12 years agoUpdated Japanese translation
OKANO Takayoshi [Sun, 25 Sep 2011 16:23:22 +0000 (01:23 +0900)]
Updated Japanese translation

12 years agoGtkTreeViewColumn: fix x_offset returned by cell_get_position()
Michael Natterer [Sun, 25 Sep 2011 15:43:45 +0000 (17:43 +0200)]
GtkTreeViewColumn: fix x_offset returned by cell_get_position()

Fixes #640741 - gtk_tree_view_column_get_cell_position() seems to be broken

It is supposed to return the offset within the column, but returned
the offset within the tree, changed by allocation.x of the column's
button (which I don't really unserstand and was clearly not working).

12 years agoGtkTreeViewColumn: fix return value of gtk_tree_view_column_cell_get_position()
Michael Natterer [Sun, 25 Sep 2011 12:50:31 +0000 (14:50 +0200)]
GtkTreeViewColumn: fix return value of gtk_tree_view_column_cell_get_position()

Return FALSE again if the passed in cell is not part of the column.
It was always returning TRUE since GtkCellArea was introduced.

12 years agoUpdated Bulgarian translation
Alexander Shopov [Sun, 25 Sep 2011 11:53:52 +0000 (14:53 +0300)]
Updated Bulgarian translation

12 years agoUpdated Telugu Translation
ipraveen [Sun, 25 Sep 2011 08:37:55 +0000 (14:07 +0530)]
Updated Telugu Translation

12 years agoUpdated Telugu Translation
ipraveen [Sun, 25 Sep 2011 06:59:17 +0000 (12:29 +0530)]
Updated Telugu Translation

12 years agoUpdated Telugu Translation
ipraveen [Sun, 25 Sep 2011 06:34:12 +0000 (12:04 +0530)]
Updated Telugu Translation

12 years agoUpdated Danish translation
Kenneth Nielsen [Sat, 24 Sep 2011 20:19:37 +0000 (22:19 +0200)]
Updated Danish translation

12 years agoUpdated Danish translation
Kenneth Nielsen [Sat, 24 Sep 2011 12:51:00 +0000 (14:51 +0200)]
Updated Danish translation

12 years agoAdd some missing entries to the docs
Matthias Clasen [Sat, 24 Sep 2011 02:18:44 +0000 (22:18 -0400)]
Add some missing entries to the docs

12 years agoUpdates
Matthias Clasen [Sat, 24 Sep 2011 01:06:23 +0000 (21:06 -0400)]
Updates

12 years agoUpdated properties Lithuanian translation
Aurimas Černius [Fri, 23 Sep 2011 21:32:27 +0000 (00:32 +0300)]
Updated properties Lithuanian translation

12 years agoUpdated Lithuanian translation
Aurimas Černius [Fri, 23 Sep 2011 21:29:50 +0000 (00:29 +0300)]
Updated Lithuanian translation

12 years agoFix module blacklisting
Matthias Clasen [Fri, 23 Sep 2011 20:25:33 +0000 (16:25 -0400)]
Fix module blacklisting

The handling of the module lists is a bit confusing here. There is
a global list that is populated with initial modules from GTK_MODULES,
and then there is a second list that is suppposed to hold the modules
loaded from the gtk-modules xsetting, which we attach to the GtkSettings
object. The blacklisting caused us to put the wrong modules into the
second list, and mess up the module refcounts, eventually double-freeing
memory when the setting changes repeatedly.

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

12 years agotextview: Fix comparison being the wrong way
Benjamin Otte [Fri, 23 Sep 2011 20:22:35 +0000 (22:22 +0200)]
textview: Fix comparison being the wrong way

Keynav failed when the position did _not_ change.

12 years agogtktreeviewaccessible: do not trigger an assertion
Alban Crequy [Thu, 22 Sep 2011 20:39:06 +0000 (16:39 -0400)]
gtktreeviewaccessible: do not trigger an assertion

The following assertion was triggered in model_row_inserted() because
iterate_thru_children() modifies the parameter tree_model before passing it to
traverse_cells().

Gtk-CRITICAL **: gtk_tree_path_compare: assertion `b->depth > 0' failed

The stack with the bug was:

  #0  gtk_tree_path_compare at gtktreemodel.c
  #1  traverse_cells at gtktreeviewaccessible.c
  #2  model_row_inserted at gtktreeviewaccessible.c

This patch calls iterate_thru_children() with a copy of the path so that the
original is not modified.

12 years agoGtkAssistant: Fix problems with gtk_widget_show_all()
Bastien Nocera [Thu, 22 Sep 2011 18:46:40 +0000 (19:46 +0100)]
GtkAssistant: Fix problems with gtk_widget_show_all()

gtk_widget_show_all() would have shown every single item inside
the GtkAssistant sidebar, as well as all the navigation buttons.

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

12 years agoDisable font fallback in the fontchooser preview
Christian Persch [Thu, 22 Sep 2011 22:32:44 +0000 (00:32 +0200)]
Disable font fallback in the fontchooser preview

The preview is should show the selected font, not whatever
font contains glyphs for the preview text.

12 years agofontbutton: Properly display absolute sizes
Benjamin Otte [Thu, 22 Sep 2011 19:35:25 +0000 (21:35 +0200)]
fontbutton: Properly display absolute sizes

Display them the same way as Pango does.

12 years agofontbutton: Properly update label after property changes
Benjamin Otte [Thu, 22 Sep 2011 19:27:22 +0000 (21:27 +0200)]
fontbutton: Properly update label after property changes

Previously, the font wasn't properly updated after some changes.

12 years agofontbutton: Display the same text as elsewhere
Benjamin Otte [Thu, 22 Sep 2011 19:21:59 +0000 (21:21 +0200)]
fontbutton: Display the same text as elsewhere

In particular, display names of families that don't have an installed
font.

12 years agofontchooser: Use fixed height mode for the font face list
Benjamin Otte [Thu, 22 Sep 2011 16:17:54 +0000 (18:17 +0200)]
fontchooser: Use fixed height mode for the font face list

Now that we enforce same height anyway, this just further speeds things
up.

12 years agofontchooser: Set a fixed size on the preview cell
Benjamin Otte [Thu, 22 Sep 2011 16:00:37 +0000 (18:00 +0200)]
fontchooser: Set a fixed size on the preview cell

This way, all rows have the same height. It has 3 advantages:
1) No actual computation is necessary to compute the size of the cell.
   This speeds up the list tremendously (filling out the list goes from
   25s to 3s).
2) Buggy fonts don't mess up the list anymore with their weird sizes.
   Instead, they are clipped / empty space is added.
3) Buggy fonts look more buggy. So their use is hopefully discouraged.

12 years agofontchooser: Split out computing of the preview text attributes
Benjamin Otte [Thu, 22 Sep 2011 15:34:56 +0000 (17:34 +0200)]
fontchooser: Split out computing of the preview text attributes

12 years agofontchooser: Use absolute size for the preview text in the list
Benjamin Otte [Wed, 21 Sep 2011 18:31:06 +0000 (20:31 +0200)]
fontchooser: Use absolute size for the preview text in the list

With absolute sizes, Pango is way better at getting the actual sizes of
the fonts to match up. It's a bit harder to compute a proper value for
this, whcih makes the code ugly, but as long as it works better...

12 years agofontchooser: Set cell data as text + attributes instead of markup
Benjamin Otte [Wed, 21 Sep 2011 01:27:43 +0000 (03:27 +0200)]
fontchooser: Set cell data as text + attributes instead of markup

This is quite a bit uglier, but allows more freedom.

12 years agofontchooser: Reselect font when it's unfiltered
Benjamin Otte [Wed, 21 Sep 2011 03:49:43 +0000 (05:49 +0200)]
fontchooser: Reselect font when it's unfiltered

12 years agofontchooser: Only compare font descriptions when families match
Benjamin Otte [Wed, 21 Sep 2011 03:44:22 +0000 (05:44 +0200)]
fontchooser: Only compare font descriptions when families match

This way, we can find fonts way quicker as we only need to create font
descriptions for fonts with matching families. Most importantly, we're
rather quick in the "the font doesn't exist" case.

12 years agofontchooser: Only create font descriptions on demand
Benjamin Otte [Wed, 21 Sep 2011 03:24:26 +0000 (05:24 +0200)]
fontchooser: Only create font descriptions on demand

pango_font_describe() is expensive, so try not to use it.

12 years agofontchooser: Make all setters go through merge_font_desc()
Benjamin Otte [Wed, 21 Sep 2011 00:51:08 +0000 (02:51 +0200)]
fontchooser: Make all setters go through merge_font_desc()

Don't special case cursor_changed anymore.

12 years agofontchooser: Update range marks properly
Benjamin Otte [Wed, 21 Sep 2011 00:40:26 +0000 (02:40 +0200)]
fontchooser: Update range marks properly

Range marks weren't updated previously when the font was set
programmatically. Also, setting the range marks could cause the font
size to change.

12 years agofontchooser: Reorganize code a bit
Benjamin Otte [Tue, 20 Sep 2011 23:04:00 +0000 (01:04 +0200)]
fontchooser: Reorganize code a bit

The main reason is so that we have a new function that we can use from
the cursor_changed_cb.

12 years agofontchooser: Don't store the current face and family anymore
Benjamin Otte [Tue, 20 Sep 2011 22:31:26 +0000 (00:31 +0200)]
fontchooser: Don't store the current face and family anymore

They can be queried on-demand from the font list.

12 years agofontchooser: Take font description from model
Benjamin Otte [Tue, 20 Sep 2011 22:23:07 +0000 (00:23 +0200)]
fontchooser: Take font description from model

... instead of taking face and constructing it from there.

12 years agofontchooser: Sanitize variable declarations
Benjamin Otte [Tue, 20 Sep 2011 22:19:51 +0000 (00:19 +0200)]
fontchooser: Sanitize variable declarations

- no empty lines between variables
- no unnecessary casts
- use glib-style casts
- no spaces

12 years agofontchooser: Fix leak
Benjamin Otte [Tue, 20 Sep 2011 22:14:02 +0000 (00:14 +0200)]
fontchooser: Fix leak

the path variable is set, not filled in.

12 years agofontchooser: Store an iter to the current font
Benjamin Otte [Tue, 20 Sep 2011 22:07:21 +0000 (00:07 +0200)]
fontchooser: Store an iter to the current font

Note that we cannot use GtkTreeSelection for this, because when the font
list is filtered the current font may not be visible.

12 years agocssprovider: Remove outdated docs
Morten Welinder [Tue, 20 Sep 2011 19:14:50 +0000 (21:14 +0200)]
cssprovider: Remove outdated docs

12 years agofontchooser: Store tree model member variables as GtkTreeModel
Benjamin Otte [Tue, 20 Sep 2011 15:07:44 +0000 (17:07 +0200)]
fontchooser: Store tree model member variables as GtkTreeModel

... and remove the now unnecessary treemodel casts everywhere.

Just code cleanup.

12 years agofontchooser: Rename populate_list() function
Benjamin Otte [Tue, 20 Sep 2011 15:06:18 +0000 (17:06 +0200)]
fontchooser: Rename populate_list() function

Name it gtk_font_chooser_widget_load_fonts(). Also, don't take any
arguments, they were the same everywhere and they're member variables of
the font chooser anyway.

12 years agofontchooser: Make changing the preview text fast
Benjamin Otte [Tue, 20 Sep 2011 14:49:49 +0000 (16:49 +0200)]
fontchooser: Make changing the preview text fast

Instead of reloading the font list, we now just queue a redraw. This
works, because the preview text is added using a cell data func instead
of a custom column.