Commit Graph

19010 Commits

Author SHA1 Message Date
Chun-wei Fan
3b82b97e73 GTK-Win32: Avoid Using Deprecated API
Replace the deprecated API calls with the updated APIs, and fix the build
of modules/input/gtkimcontextime.c, as we really needed
gdk/gdkkeysyms-compat.h (gdk/gdkkeysyms.h was already included)

https://bugzilla.gnome.org/show_bug.cgi?id=705068
2013-08-14 08:05:53 +08:00
Matthias Clasen
35a4bba902 csd: Implement middle-click action for titlebar
The default middle-click action on the titlebar should be to lower
the window. Implement that.

https://bugzilla.gnome.org/show_bug.cgi?id=705809
2013-08-13 18:24:37 -04:00
Matthias Clasen
1398f8ea4c Add some missing deprecation annotations
These were reported missing in bug
https://bugzilla.gnome.org/show_bug.cgi?id=705672
2013-08-13 18:09:47 -04:00
Matthias Clasen
9463c78bac GtkWindow: fix an init/finalize asymmetry
Make sure we always deal with the same screen when
connecting / disconnecting the theme-variant changed handler.
Pointed out by Morten Welinder in
https://bugzilla.gnome.org/show_bug.cgi?id=705640
2013-08-13 17:44:04 -04:00
Matthias Clasen
3923ba1605 Avoid overlong file chooser buttons
When bookmarks are long, the file chooser button would
grow too much. This can be avoided by ellipsizing.

Patch by Ritesh Khadgaray,
https://bugzilla.gnome.org/show_bug.cgi?id=672220
2013-08-13 17:35:28 -04:00
Cosimo Cecchi
b52844031f icontheme: correctly fallback to symbolic icons
When an icon is requested as symbolic, our generic fallback algorithm
uses fullcolor icons when the specified icon name is not found, treating
the "-symbolic" suffix as another component of the icon name.

Change the algorithm to check beforehand if the icon is symbolic, remove
the suffix if so, and re-add it at the end for all the generated icon
names.

https://bugzilla.gnome.org/show_bug.cgi?id=680926
2013-08-13 17:22:47 +02:00
Jasper St. Pierre
8818d8a19b gtkwindow: Export our custom frame extents
This allows CSD windows to be maximized, tiled, and constrained
properly.

https://bugzilla.gnome.org/show_bug.cgi?id=705765
2013-08-13 10:38:49 -04:00
Benjamin Otte
ed5c35306d alignment: Remove dead assignment
.. and clean up code
2013-08-13 16:25:26 +02:00
Benjamin Otte
7f8497f850 gtkmenuitem: Remove dead assignment 2013-08-13 16:25:26 +02:00
Matthias Clasen
ea715a49e4 Deal with platform-specific im modules
With multiple GDK backends in the process, we run into problems where
we try to use the Wayland im module on X, which crashes. This commit
adds a quick backend filter that removes the wayland, xim and ime
input methods from consideration  unless the corresponding GDK backend
is in use.
2013-08-11 15:42:19 -04:00
Matthias Clasen
f4a138c7bd GtkIMModule: Use default screen when determining context id
This code is called early on, without a window, and then later on
with a window. Currently, it returns different results for these
cases when the setting contains a value. That leads to pointless
construction and destruction of im contexts. Instead, just look
at the settings of the default screen. In practice, there is only
one screen, ever.
2013-08-11 15:38:25 -04:00
Christian Hergert
a0bc600140 dnd: Motif DnD is no longer supported, update docs. 2013-08-08 16:06:00 +02:00
Kalev Lember
653fc4fd4b listbox: Reorder code
This just moves the gtk_list_box_insert function to where the rest of the
public API is defined.

https://bugzilla.gnome.org/show_bug.cgi?id=705558
2013-08-08 11:00:32 +02:00
Kalev Lember
43c68e118f listbox: Implement gtk_list_box_insert()
... to make it possible to insert rows in the middle of the list without having
to fiddle with the sort functions. One of the first users is going to be Glade.

https://bugzilla.gnome.org/show_bug.cgi?id=705558
2013-08-08 11:00:26 +02:00
Jasper St. Pierre
5674f2ce50 gtkiconview: Take padding into account when getting the cursor hotspot
This makes the icon view look completely seamless when dragging.

https://bugzilla.gnome.org/show_bug.cgi?id=705605
2013-08-07 11:53:05 -04:00
Jasper St. Pierre
d72252c7d6 gtkiconview: Remove the border and background from drag icons
This doesn't look good when combined with rounded corners on
selected items.

https://bugzilla.gnome.org/show_bug.cgi?id=705605
2013-08-07 11:53:04 -04:00
Jasper St. Pierre
b9d85b9412 gtkdnd: Clean up the doc comment of gtk_drag_begin 2013-08-07 11:53:04 -04:00
Jasper St. Pierre
0c49f734a2 gtkstylecontext: Remove some dead code when rendering layouts 2013-08-07 11:53:04 -04:00
Ignacio Casal Quinteiro
fb2bc06f50 headerbar: use a more standard headerbar look for the close button
https://bugzilla.gnome.org/show_bug.cgi?id=705601
2013-08-07 16:49:34 +02:00
Alexander Larsson
8e423ba292 gtkdnd: Use surface based cursor APIs
This allows things to correctly scale things on HiDPI screens.
2013-08-07 13:34:10 +02:00
Alexander Larsson
9bde6b10ef gtkiconhelper: Add _gtk_icon_helper_ensure_surface to private header 2013-08-07 13:34:10 +02:00
Paolo Borelli
0b200aaa32 Add gtk_list_box_prepend
Add a convenience method for prepending rows to a list box without
having to fiddle with a sort function.

https://bugzilla.gnome.org/show_bug.cgi?id=705558
2013-08-07 10:52:11 +02:00
Sébastien Wilmet
425deda2be Improve doc of gtk_text_tag_table_remove()
It's obvious, but it's better to say it.

https://bugzilla.gnome.org/show_bug.cgi?id=705529
2013-08-05 23:01:37 +02:00
Alexander Larsson
0296f1a43a gtkdnd: Use RGBA windows when dragging if possible
If we have rgba visuals and a composited screen we should
just use a RGBA window rather than shaped windows.
2013-08-05 16:49:18 +02:00
Alexander Larsson
499cef1bb0 css: Inherit device scale in _gtk_css_image_get_surface
To handle hidpi support we need to make sure we don't
downscale scaled css images.

Note: If cairo_surface_create_similar starts doing this
by itself we need to back this out.
2013-08-05 16:14:25 +02:00
William Jon McCann
8c7a8e9314 Add autoscroll when dragging past boundary of range
A problem with the zoom scroll mode is that you have to restart
if you hit the bottom of the screen before you hit the bottom
of your document.

This commit adds an autoscroll feature to the zoom scroll: if
you move outside the window while in zoom scroll mode, we keep
scrolling in the direction you were going until you let go
of the mouse button.

https://bugzilla.gnome.org/show_bug.cgi?id=704703
2013-08-05 08:47:27 +02:00
William Jon McCann
c3e172e546 Add press and hold support to set zoom scroll mode
Triggering zoom scroll mode by Shift click was too much
of an easter egg. It also requires using keyboard and
mouse together, which is hard to do for many users.

Instead, we now trigger zoom scroll mode by click-and-hold
(or touch-and-hold).

https://bugzilla.gnome.org/show_bug.cgi?id=704703
2013-08-05 08:47:27 +02:00
William Jon McCann
46302c522b Add mouse pointer support to press and hold
The internal class GtkPressAndHold was so far only
reacting to touch events. But in most cases where
a touch-and-hold or 'long press' pattern is useful,
click-and-hold can also be used.

This patch makes GtkPressAndHold react to mouse
clicks as well.

https://bugzilla.gnome.org/show_bug.cgi?id=704703
2013-08-05 08:45:46 +02:00
Matthias Clasen
b38a096aee GtkHeaderBar: optionally add a close button
Add a boolean property that controls whether a window close button
will be shown in the header bar or not. Doing this in the toolkit
will ensure consistency of the visual apperance.

https://bugzilla.gnome.org/show_bug.cgi?id=702971
2013-08-05 01:37:58 +02:00
Benjamin Otte
40506cf648 range: Remove dead assignment 2013-08-04 17:27:30 +02:00
Cosimo Cecchi
3ebde5303a themingengine: use gtk_icon_source_get_state_wildcarded()
A recent refactor of this code missed a check for the wildcarded state
on the icon source.
2013-08-04 09:19:03 +02:00
Matthias Clasen
eece18d21d GtkTreeView: Remove a dead assignment
This was found by the clang static analyzer.
2013-08-04 01:27:39 +02:00
Cosimo Cecchi
ab88110b51 iconhelper: clear the surface on invalidation
This was missed during the pixbuf->surface conversion, so when the state
changed we were not recreating a new surface for it.
2013-08-03 18:08:33 +02:00
Matthias Clasen
bd9ad3c9c2 Add .ui.h files to git
These files are generated, so adding them to git is somewhat
icky, but it helps translators who currently can't use intltool-update
on a fresh git checkout.
2013-08-03 17:26:27 +02:00
William Jon McCann
362d4fb686 Fix layout of infobar
Make sure the close button is right aligned and centered vertically.
2013-08-03 15:15:12 +02:00
Christian Hergert
6424739819 searchbar: use gtk_search_bar_connect_entry() in documentation. 2013-08-03 15:13:27 +02:00
Matthias Clasen
aace5a8946 Add a revealer to GtkInfoBar
Make GtkInfoBar slide in and out as it is shown or hidden.

https://bugzilla.gnome.org/show_bug.cgi?id=704334
2013-08-03 09:04:47 +02:00
Matthias Clasen
0645369817 GtkFileChooserDefault: Remove redundancy
Don't specify packing properties for internal children.
This doesn't work unless the internal children are actually
direct children of the container (which we are about to
change for GtkInfoBar). Also, it is redundant, since we
just set the properties to the values they already have
anyway.
2013-08-03 09:04:47 +02:00
Matthias Clasen
e6a8848d0c Be more forgiving about child properties
Packing properties in ui files are parsed and handled by
the container, which assumes that the child is a direct
descendant. For internal children, this is inconvenient,
because we don't want to reconstruct the entire internal
structure between the container and the child in the ui
file.

It would be best to not specify packing properties
in that case, but since existing ui files do this for
GtkInfoBar and we are about to change the internal
structure of GtkInfoBar, be more forgiving here.
2013-08-03 09:04:47 +02:00
Matthias Clasen
e63bfabb07 Revert "Add a revealer to GtkInfoBar"
This reverts commit 1198ffb0bc.

This change needs more work, to avoid breaking existing
ui files.
2013-08-02 17:57:11 +02:00
Bastien Nocera
1c63d295ec Revert "Disable primary paste by default"
This reverts commit fbbcb5c01b.

We will be doing this in gnome-settings-daemon itself instead,
as some X11 based platforms using GTK+ will want to override this.
2013-08-02 16:42:41 +02:00
Alberto Ruiz
ef77e4727c fontchooser: set the minimum size of the spinner to 1 2013-08-02 15:56:54 +02:00
Alberto Ruiz
20adc37a01 fontchoser: Fix slider position update when switching from fonts with different recommended sizes 2013-08-02 15:51:33 +02:00
Ryan Lortie
03147b0e72 gtkicontheme: check for GdkPixbuf first
We checked for G_IS_LOADABLE_ICON() before GDK_IS_PIXBUF().

Since we made GdkPixbuf implement GLoadableIcon, the special case for
pixbufs is never used, and the much much slower GLoadableIcon path is
taken instead.  Move the GdkPixbuf one to be first to fix that.

https://bugzilla.gnome.org/show_bug.cgi?id=705320
2013-08-02 15:00:08 +02:00
Chun-wei Fan
ca2dea0a5a Add Visual Studio 2010 Build Support for Broadway
Add the Visual Studio 2010 projects to build the GDK Broadway backend, just
like the Visual Studio 2008 project files in the last commit.  Similarly,
split up the property sheets so that they are easier to maintain and can
be made more flexible for different build types.  Also remove some unneeded
stuff from some of these items.

Also, fix the filter file completion for GTK, as a source file was excluded
for that and this was overlooked as it seemingly did not cause any trouble.
2013-08-02 17:05:57 +08:00
Matthias Clasen
1198ffb0bc Add a revealer to GtkInfoBar
Make GtkInfoBar slide in and out as it is shown or hidden.

https://bugzilla.gnome.org/show_bug.cgi?id=704334
2013-08-01 10:55:49 +02:00
Chun-wei Fan
9232899c69 gtkprintoperation-win32.c: Drop unneeded include
Don't include gtkstock.h as it's not really needed here, and it has been
recently deprecated.

https://bugzilla.gnome.org/show_bug.cgi?id=705060
2013-07-29 20:10:03 -04:00
Kalev Lember
ceda38ee4e listbox: handle row sensitivity
When a row is insensitive, don't emit button press events and avoid
prelighting it.
2013-07-29 12:50:16 +02:00
Simon Feltman
b1a0773112 Add explicit transfer annotations to gtk_icon_view_get_cursor
The cell out argument to gtk_icon_view_get_cursor is a pass-through
for gtk_cell_area_get_focus_cell which is transfer none. Without
this explicit annotation, transfer full is defaulted and introspection
bindings will assume ownership of the GtkIconViews reference to the
cell, causing crashes. Additionally add explicit transfer full to
the path parameter because it is expected the caller will free the
returned memory.

https://bugzilla.gnome.org/show_bug.cgi?id=704700
2013-07-28 21:25:57 -07:00
Matthias Clasen
398f9e8b5b Change the way GtkSearchEntry does delayed change notification
We add a GtkSearchEntry::search-changed signal which gets emitted
with a 150 millisecond delay. The ::change signal goes back to its
expected semantics.

https://bugzilla.gnome.org/show_bug.cgi?id=700229
2013-07-28 21:49:37 -04:00
Matthias Clasen
1b135b28c0 GtkSearchEntry: improve clear icon implementation
Instead of connecting to our own signal, which is generally
considered somewhat unclean, override the class handler
for the icon-release signal.
2013-07-28 20:21:28 -04:00
Matt Barnes
0e350eeea6 GtkApplication: Do not assert sm_proxy != NULL in inhibit functions
Applications have no way of finding out if a session manager proxy was
successfully created in gtk_application_startup_session_dbus(), so it's not
appropriate for certain public GtkApplication functions to be asserting the
presence of a session manager proxy as if it were a programmer error.

This affects:

   gtk_application_inhibit()
   gtk_application_is_inhibited()

If sm_proxy is NULL, the function should just return silently.

In the case of gtk_application_uninhibit(), the application should only be
calling this if it obtained a valid cookie, which implies the presence of a
session manager proxy.  I noted that with a comment.

https://bugzilla.gnome.org/show_bug.cgi?id=701365
2013-07-28 16:09:58 -04:00
Ryan Lortie
3bb059b6e8 Mention of -rdynamic in GtkBuilder lookup error
We toss a g_warning() if we can't find the user's signal handler.  A good chunk
of the time this will be because they didn't use -rdynamic.  Add a note about
that.
2013-07-27 18:15:17 -04:00
John Ralls
b80625a425 Fix broken quartz build due to deprecation of gtkstock.h 2013-07-27 14:24:53 -07:00
Murray Cumming
ac792f4a06 docs: gtk_icon_theme_lookup_by_gicon_for_scale() is new
It was added in commit 58adb70d43 .
2013-07-27 21:38:48 +02:00
Alexandre Quessy
9fb1eb2a09 fix a typo in a comment in gtkwindow.c 2013-07-27 10:18:35 -04:00
Matthias Clasen
cda60c3c40 Another round of template binding api changes
We rename the gtk_widget_class_bind_template_child{_internal}
macros by appending a _private to their name. Otherwise, it
would be too magic to pass the 'public' names as arguments,
but affect a member of the Private struct. At the same time,

Add two new macros with the old names,
gtk_widget_class_bind_template_child{_internal} that operate
on members of the instance struct.
2013-07-26 16:29:12 -04:00
Matthias Clasen
3358c544da Some documentation fixes
Some incomplete renamings in the doc comments for the
template child macros.
2013-07-26 14:10:37 -04:00
Matthias Clasen
fea23b95d9 One forgotten rename 2013-07-26 13:54:27 -04:00
Emmanuele Bassi
89ae3524a3 Rename the widget template API
The macros and functions are inconsistently named, and are not tied to
the "template" concept - to the point that it seems plausible to use
them without setting the template.

The new naming scheme is as follows:

  gtk_widget_class_bind_template_child_full
  gtk_widget_class_bind_template_callback_full

With the convenience macros:

  gtk_widget_class_bind_template_child
  gtk_widget_class_bind_template_child_internal
  gtk_widget_class_bind_template_callback

https://bugzilla.gnome.org/show_bug.cgi?id=700898
https://bugzilla.gnome.org/show_bug.cgi?id=700896
2013-07-26 13:52:15 -04:00
Matthias Clasen
6f78424b5d Trivial typo fix 2013-07-26 08:48:38 -04:00
Alexander Larsson
a8e84545d1 widget: Use a real offset in gtk_widget_class_automate_child
Using an offset from the struct means you can have children in
both the public and private (via G_PRIVATE_OFFSET) parts of the
instance. It also matches the new private macros nicer.

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

Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
2013-07-26 08:41:09 -04:00
Martin Stransky
9aab40b801 stylecontext: Clear paths in gtk_render_foo()
This ensures that existing paths are properly cleared and don't cause
spurious renderings.

https://bugzilla.gnome.org/show_bug.cgi?id=694086
2013-07-26 13:33:40 +02:00
Stefano Facchini
8781c6560c infobar: really make the close button hidden by default
https://bugzilla.gnome.org/show_bug.cgi?id=704894
2013-07-26 00:21:19 +02:00
David King
9a0fb23625 action: Improve some deprecation notices
Improve on some of the deprecation notices for GtkAction by linking to
other relevant API, and mentioning when there is no direct replacement.

https://bugzilla.gnome.org/show_bug.cgi?id=704392
2013-07-24 17:30:30 -04:00
William Jon McCann
88771f7b1b Add an optional close button to the info bar
This adds gtk_info_bar_{get,set}_show_close_button.
Similar to the one for the search bar. This can replace Cancel
buttons.

https://bugzilla.gnome.org/show_bug.cgi?id=704274
2013-07-24 17:01:42 -04:00
Owen W. Taylor
c7574bb6c8 Disable frame sync for GtkPlug
Plug windows weren't redrawing properly because the embedded
window was expecting to get messages for each frame from the
compositor, but the compositor doesn't know about embedded
windows. Simply disable frame sync for GtkPlug's GdkWindow -
extending XEMBED to handle frame sync isn't interesting
at this point.

A new API gdk_x11_window_set_frame_sync_enabled() is added
to allow this to be done.

https://bugzilla.gnome.org/show_bug.cgi?id=701613
2013-07-22 18:36:58 -04:00
Simon Feltman
ab13787985 Add gtk_tree_model_rows_reordered_with_length introspectable method
Add introspection friendly version of gtk_tree_model_rows_reordered
with a "_with_length" suffix. This allows language bindings to
safely pass an array with length argument. Use the "Rename to:"
annotation to expose as "gtk_tree_model_rows_reordered".

https://bugzilla.gnome.org/show_bug.cgi?id=684558
2013-07-22 13:39:24 -07:00
Alberto Ruiz
3cda2a787b fontchooser: prevent the scale from showing the value as it is shown in the spinbutton already 2013-07-22 16:06:24 +02:00
Murray Cumming
9ea08fae04 docs: gtk_menu_attach_to_widget()
Add a few more clues about why this is useful,
based on
https://mail.gnome.org/archives/gtk-devel-list/2007-November/msg00176.html
and the reference to it from gtk_menu_new_from_model().
2013-07-22 14:10:53 +02:00
Alberto Ruiz
1859fe8dcf fontchooser: Fix smooth scrolling in the scale and the preview entry 2013-07-21 20:46:30 +02:00
Jehan
0e4d9b7793 gtkdialog - more informative warning when ordering unexisting response_id 2013-07-21 21:42:50 +09:00
Emmanuele Bassi
18cf2a0806 Restore gtkimagemenuitem.c
It got lost in commit 0aa57d26b5 and it
broke the build.
2013-07-20 10:47:44 +01:00
Matthias Clasen
b49f966e1f Clean up includes in gtk/deprecated/
Purely cosmetic.
2013-07-19 22:48:12 -04:00
Matthias Clasen
2f1fa7cdc3 Drop some unnecessary includes
Drop includes of deprecated headers where they are
no longer needed.
2013-07-19 22:32:23 -04:00
Matthias Clasen
0aa57d26b5 Move wholly deprecated classes to gtk/deprecated/
We've recently a number of classes wholly. For these cases,
move the headers and sources to gtk/deprecated/ and adjust
Makefiles and includes accordingly.

Affected classes:
GtkAction
GtkActionGroup
GtkActivatable
GtkIconFactory
GtkImageMenuItem
GtkRadioAction
GtkRecentAction
GtkStock
GtkToggleAction
GtkUIManager
2013-07-19 21:39:47 -04:00
Chun-wei Fan
d7b6827856 gtk/gtkrecentchooser.c: Avoid C99isms
Declare variables at the top to the block.

G_GNUC_BEGIN_IGNORE_DEPRECATIONS and G_GNUC_END_IGNORE_DEPRECATIONS with
a ';' at the end is still considered a statement, even if these macros
expand to nothing, which C89 compilers don't really like (oddly speaking)-
but this is life.
2013-07-19 18:38:27 +08:00
William Jon McCann
6f7b0cac94 Deprecate tear off menus 2013-07-18 12:16:02 -04:00
William Jon McCann
2378bff415 Use proper quotation marks
As per https://wiki.gnome.org/GnomeOS/Design/Whiteboards/Typography
2013-07-17 22:37:50 -04:00
William Jon McCann
a4332e7f69 Set reasonable minimum size for the file chooser
At small sizes it just looks broken.
2013-07-17 20:48:59 -04:00
William Jon McCann
94ebe21068 Add a bit of margin on the statusbar
So that the text doesn't touch the side of the window. And it
looks much cleaner.
2013-07-17 20:48:59 -04:00
William Jon McCann
31a2cea4b1 Fix infobar docs to not mention type colors
The theme may not use colors to distinguish the info bar
message types.
2013-07-15 13:19:55 -04:00
William Jon McCann
168f425df0 Make the info bar action area border the same as the internal spacing
Using a consistent spacing feels much more polished.
2013-07-15 13:19:55 -04:00
William Jon McCann
75c8be6b66 Make info bar action area horizontal
A vertical action area causes the info bar to be imposingly large.
This defeats the whole point of the info bar which is to be
unobtrusive. Not to mention it is impossible to make it look
and feel good.
2013-07-15 13:19:55 -04:00
Sébastien Wilmet
68f44c4e90 GtkSearchEntry: fix search_entry_clear_cb()
When the icon-release signal is emitted on a GtkSearchEntry, the
contents is now cleared only if it's for the secondary icon. The primary
icon can be used for another purpose.

https://bugzilla.gnome.org/show_bug.cgi?id=704164
2013-07-15 12:27:21 +02:00
William Jon McCann
4b5a389e88 Deprecate and ignore gtk-entry-password-hint-timeout
This feature offers a number of benefits related to providing
feedback to the user when the password is masked. Some experts have
argued that password masking is harmful. I tend to agree with this
setting providing a better and more moderate solution. Some agree:
https://www.schneier.com/blog/archives/2009/07/the_pros_and_co.html

In order to further lessen the impact I've only enabled the feature
on the primary display since the likelyhood of a non-primary display
being visible by others is higher.
2013-07-11 17:08:15 -04:00
William Jon McCann
dae6afc847 Deprecate and ignore timeout-expand setting 2013-07-11 17:08:15 -04:00
William Jon McCann
57fc8763e9 Deprecate and ignore the timeout-initial and timeout-repeat settings 2013-07-11 17:08:15 -04:00
Jasper St. Pierre
dbe5ea6d32 Ignore extract-strings 2013-07-11 13:13:00 -04:00
Colin Walters
fe8de4ca1b Delete gtk/extract-strings binary from source
It was accidentally committed to git.
2013-07-09 23:24:19 -04:00
Matthias Clasen
3247058a30 Revert the private macro change for GtkToolButton
There was a reason that GtkToolButton was not using the
G_DEFINE_TYPE macros - we need the klass argument to get
the proper button type at init time.
2013-07-09 19:33:31 -04:00
William Jon McCann
6218fb45be Deprecate and hardcode gtk-recent-files-limit
The GtkRecentChooser already has a property that can be used
to set this on a per widget basis and the recent manager already
has a max-age limit.
2013-07-09 09:38:52 -04:00
Matthias Clasen
d0a2e06c7d places sidedbar: deal with lack of symbolics
Use g_themed_icon_new_with_default_fallbacks, so we don't end up
without icons when the theme doesn't have symbolic icons.

https://bugzilla.gnome.org/show_bug.cgi?id=703606
2013-07-09 07:12:18 -04:00
Kjell Ahlstedt
4d86472b92 Continue the deprecation of GtkIconSet
Deprecate gtk_icon_set_render_icon_surface() and gtk_image_get_icon_set(),
which take parameters of the deprecated GtkIconSet.

https://bugzilla.gnome.org/show_bug.cgi?id=703616
2013-07-09 06:54:27 -04:00
Kjell Ahlstedt
16c08ae135 Fix some inconsistent deprecations
Some functions had only a deprecation comment in the .c file, or only a
deprecation annotation in the .h file. Add the missing parts.

https://bugzilla.gnome.org/show_bug.cgi?id=703616
2013-07-09 06:54:26 -04:00
aakash
fc6e725d2f gtkrecentmanager: Avoid confusion between the meta-data and the actual resource.
Fixed the documentation to clarify that gtk_recent_info_get_visited
and gtk_recent_info_get_modified are actually about the recent info
meta-data rather than the resource itself.

https://bugzilla.gnome.org/show_bug.cgi?id=703827
2013-07-09 06:51:45 -04:00
Emmanuele Bassi
84186ef11b deprecated: Use the new macros for adding instance private data
https://bugzilla.gnome.org/show_bug.cgi?id=702996
2013-07-09 09:30:02 +01:00
Emmanuele Bassi
0899ef7cc9 gtk: Use new macros for defining private data
https://bugzilla.gnome.org/show_bug.cgi?id=702996
2013-07-09 09:30:02 +01:00
Emmanuele Bassi
365919d5f6 a11y: Use new macros for defining private data
https://bugzilla.gnome.org/show_bug.cgi?id=702996
2013-07-09 09:28:49 +01:00
Bastien Nocera
dbee6e1b56 GtkSearchBar: Don't show a close button by default
And mention in which cases we should show one in the documentation.

https://bugzilla.gnome.org/show_bug.cgi?id=703656
2013-07-09 09:17:01 +02:00
Daiki Ueno
837a0d3e40 textlayout: avoid double-free when adding preedit color
In add_preedit_attrs, don't free foreground/background colors already
set in the underlying text attributes (style).  They will be free'd by
release_style.

https://bugzilla.gnome.org/show_bug.cgi?id=703533
2013-07-09 13:21:17 +09:00
Matthias Clasen
50c3eb9acc Fix the small text for text in GtkAboutDialog
The conversion from gtk_widget_override_font to a GtkTextTag
in fbbb66ae7d was defective.

https://bugzilla.gnome.org/show_bug.cgi?id=701119
2013-07-08 21:46:43 -04:00
William Jon McCann
72c3879893 Add missing G_PARAM_DEPRECATED to stock deprecations 2013-07-08 15:39:55 -04:00
William Jon McCann
aeb878a859 Add missing G_PARAM_DEPRECATED to gtksettings 2013-07-08 15:28:25 -04:00
William Jon McCann
7b66956e63 Deprecate and hardcode default toolbar icon size setting
Toolbar icon size can still be changed on a per-widget basis as
needed by the application developer.
2013-07-08 15:02:28 -04:00
William Jon McCann
425e977bb6 Deprecate and hardcode default toolbar style setting
Toolbar style can still be changed on a per-widget basis as
needed by the application developer.
2013-07-08 15:02:28 -04:00
William Jon McCann
e61c124509 Deprecate and hardcode values for gtk-tooltip* timeouts 2013-07-08 15:02:28 -04:00
William Jon McCann
c9bfd12d2f Deprecate and hardcode the value of visible-focus setting
Just use the default value of AUTOMATIC and make it just work.
2013-07-08 15:01:33 -04:00
Matthias Clasen
e5b51050c6 csd: Fix up close buttons
Must pass the window as first argument to the signal handler.
2013-07-06 23:11:19 -04:00
Matthias Clasen
c0c752fab1 Cosmetics 2013-07-06 23:11:19 -04:00
Matthias Clasen
ffadfbf322 Don't prematurely mark window as realized
Other code assumes that the widget has a window if it is realized.
Since we might trigger such code indirectly from gtk_window_realize,
don't mark the window as realized before we've registered its window.
2013-07-05 17:15:31 -04:00
Matthias Clasen
6bcf8a2584 Cosmetic cleanups
Avoid some unnecessary casts.
2013-07-05 15:53:30 -04:00
Matthias Clasen
3982532145 csd: hide invisible borders when tiled or fullscreen
This is the expected behavior, and matches what mutter does.
2013-07-05 15:53:30 -04:00
Matthias Clasen
776111fadf csd: fix a resizing artifacts when unmaximizing
When using Super-up/down to maximize and unmaximize a csd window,
the titlebar and content was not picking up the window borders.
2013-07-05 15:53:30 -04:00
Matthias Clasen
c2196e596f csd: no border when fullscreen
The was a missing fullscreen check in get_decoration_size was causing
the window background to have a transparent border when fullscreen.
2013-07-05 15:53:30 -04:00
Kalev Lember
5d121a8aaa GtkListBox: Add g_return_if_fail checks to public row functions 2013-07-04 16:00:30 +02:00
Kalev Lember
b46d583f87 GtkListBox: Add a function for getting the index of a row
https://bugzilla.gnome.org/show_bug.cgi?id=703618
2013-07-04 15:19:47 +02:00
Kalev Lember
a5d2565b7e GtkListBox: Remove a double semicolon 2013-07-04 14:03:06 +02:00
Alexander Larsson
e12d3cea47 stack: Use normal opacity groups rather than weird ones in GtkWidget
Since we now do all drawing propagation on the cairo_t (rather than
exposing multiple independent times on the GdkWindows) we no longer
need the opacity 0.999 hack.
2013-07-04 13:30:51 +02:00
Alexander Larsson
5f245374ed widget: Remove some leftover code
The norender stuff is not used anymore
2013-07-04 13:16:05 +02:00
Alexander Larsson
9e4af0b746 widget: Don't crash if setting alpha on non-realized widget.
https://bugzilla.gnome.org/show_bug.cgi?id=703154
2013-07-04 13:10:58 +02:00
Bastien Nocera
fa6a137478 GtkSearchBar: Fix automatic entry connection
Adding an entry to the search bar didn't automatically connect
the signals as expected as the code was in the wrong branch.

https://bugzilla.gnome.org/show_bug.cgi?id=703406
2013-07-04 12:52:30 +02:00
Matthias Clasen
4eac681eba Avoid deprecation warning
There was one overlooked use of GTK_STOCK_MISSING_IMAGE.
2013-07-03 19:52:11 -04:00
Alexander Larsson
eac7dce160 File chooser: Convert icons to using cairo_surface_t 2013-07-03 14:39:26 +02:00
Alexander Larsson
b6b24148fb GtkCellRendererPixbuf: Add surface property 2013-07-03 14:39:26 +02:00
Alexander Larsson
31fc70721e GtkImage: Add new_from_surface() and set_from_surface() 2013-07-03 14:39:26 +02:00
Alexander Larsson
031e1a98a0 GtkIconHelper: Convert to using cairo surfaces as base and support scales
We render the source into a cairo_surface_t so that we can render it
with cairo directly, rather than having to convert it from a pixbuf
every time. We also specify the target window when creating the cairo
surface so that rendering can be faster.

Using cairo surfaces also allows us to seamlessly support window scales.

We also add a GTK_IMAGE_SURFACE source type.
2013-07-03 14:39:26 +02:00
Alexander Larsson
635ae9bd91 icon factory: Add gtk_icon_set_render_icon_surface
Support scales when falling back to loading icons from the
icon theme.

In order to actually render scaled icons we add
gtk_icon_set_render_icon_surface which renders to a cairo_surface_t
which includes whatever scaling you need for scaled icons.
2013-07-03 14:39:26 +02:00
Alexander Larsson
91a268f00e stylecontext: add gtk_render_icon_surface
This draws an icon from a cairo_surface. We want to use this more rather
than render_icon as this means we can skip the pixbuf to surface
conversion (including allocation and alpha premultiplication) at
render time, plus we can use create_similar_image which may allow
faster rendering.
2013-07-03 14:39:26 +02:00
Alexander Larsson
1d0bb3e010 GtkIconTheme: Add helpers to load to cairo_surface_t
Right now this just uses the pixbuf load code and converts
it to a surface. In the future we could cache the pattern
to allow reusing the surface.
2013-07-03 14:39:26 +02:00
Carlos Garnacho
58adb70d43 icontheme: Add support for high resolution icons
An optional OutputScale integer key has been added to index.theme
subdirs description, so icon themes may provide icons that are
more suitable to render at a (typically 2x) integer upscaled
resolution. This way it is possible to make eg. a 16x16@2x icon has a
real size of 32x32, but contains a similar level of detail to the
16x16 icon so things don't look any more cluttered on high-dpi
screens.

The pixbuf lookup has changed so it prefers a minimal scale change
that yields the minimal real size difference, so if looking up for
a 16x16 icon at 2x, it would first prefer 16x16@2x, then 32x32, and
then any other icon that's closest to match

There is now *_for_scale() variants for all GtkIconTheme ways
to directly or indirectly fetch a GdkPixbuf.

This is based on code by Carlos Garnacho with changes by Alexander
Larsson
2013-07-03 14:39:26 +02:00
Alexander Larsson
07519abcde CellRendererPixbuf: Set the window on the icon helper
This lets us get scaled icons if needed.
2013-07-03 14:39:26 +02:00
Alexander Larsson
41a6780f22 spinbutton: set the window on the icon helper 2013-07-03 14:39:26 +02:00
Alexander Larsson
f258e757bd entry: Set the window on the icon helper 2013-07-03 14:39:26 +02:00
Alexander Larsson
e042ffa71e GtkImage: Set the window on the gtkiconhelper 2013-07-03 14:39:26 +02:00
Alexander Larsson
5d8fd4ee24 GtkIconHelper: Add set_window()
This is a hint on where the icon will be drawn. It
will allow us to pre-allocate cairo surfaces for the right
target.
2013-07-03 14:39:25 +02:00
Alexander Larsson
48ff7d026e CSS: Add -gtk-scaled(image1,image2,...) support for hidpi assets 2013-07-03 14:39:25 +02:00
Alexander Larsson
af2c40bd54 css: Add a scale argument to css-value compute vfunc
We need to be able to compute different GtkCssImage values
depending on the scale, and we need this at compute time so that
we don't need to read any images other than the scale in used (to
e.g. calculate the image size). GtkStyleProviderPrivate is shared
for all style contexts, so its not right.
2013-07-03 14:39:25 +02:00
Alexander Larsson
38e1748df8 GtkWidget: Propagate scale to GtkStyleContext 2013-07-03 14:39:25 +02:00
Alexander Larsson
4cc1fe5bf5 GtkStyleContext: Add gtk_style_context_get/set_scale 2013-07-03 14:39:25 +02:00
Alexander Larsson
6cc5d29792 Use gdk_cairo_surface_create_from_pixbuf when possible 2013-07-03 14:39:25 +02:00
Alexander Larsson
ae43f9facb Add GDK_DPI_SCALE env var
This is very useful for hidpi where the dpi is scaled to make
non-dpi aware apps larger. In that case a dpi aware gtk+ using
GDK_SCALE will be getting huge fonts. You can the set GDK_DPI_SCALE
to compensate for this.
2013-07-03 14:39:25 +02:00
Alexander Larsson
c9b52d8820 pixel-cache: Refresh pixel cache on window scale factor changes. 2013-07-03 14:34:13 +02:00
Alexander Larsson
6bf32999b1 widget: Track when the window scale factor changes and notify
The scale-factor property on the widgets will be notified, and the
scale will change on the style property, causing us to pick up
new css assets.
2013-07-03 14:34:13 +02:00
Michael Natterer
c0ea0b5aad gtk: add gtk_widget_get_scale_factor() 2013-07-03 14:34:13 +02:00
Alexander Larsson
2a81d6f396 listbox: Use new private model, remove priv pointer 2013-07-02 13:44:17 +02:00
Alexander Larsson
06a808cf2a stack: Use new private model, remove priv pointer 2013-07-02 13:43:20 +02:00
Alexander Larsson
09d22284f7 revealer: Use new private model, remove priv pointer 2013-07-02 13:42:43 +02:00
William Jon McCann
a9e82cd46a Deprecate and ignore gtk-enable-tooltips setting
It is enabled by default except on touch input devices.
2013-06-30 14:28:02 -04:00
William Jon McCann
7ca327c9bb Deprecate the unused gtk-file-chooser-backend setting 2013-06-30 13:44:24 -04:00
William Jon McCann
c6ca2374cc Deprecate and ignore gtk-im-status-style and gtk-im-preedit-style 2013-06-30 12:57:44 -04:00
William Jon McCann
d1817e7a5d Add deprecation warnings to GTK_STOCK macros 2013-06-30 12:33:22 -04:00
William Jon McCann
4d6f9d280f Add xpadding around the image in message dialogs 2013-06-30 11:19:50 -04:00
William Jon McCann
c96a1c4980 Deprecate GtkAction and GtkUIManager
It is recommended to use GAction et al and GtkBuilder.
2013-06-30 11:19:50 -04:00
Sébastien Wilmet
158451b1ab textiter: better document "tag" functions
https://bugzilla.gnome.org/show_bug.cgi?id=703313
2013-06-30 10:38:25 +02:00
Matthias Clasen
587fb5efa1 GtkSearchBar: formatting trivia 2013-06-30 00:50:29 -04:00
Matthias Clasen
c6daaa16c9 GtkHeaderBar: documentation improvements
Add some more information about title allocation.
2013-06-30 00:27:45 -04:00
Matthias Clasen
328f221b5c csd: Improve window button handling
Group the buttons on each side in a box, and give them different
style classes, so themes can differentiate (this is partially a
workaround for limitations in our css selectors). The boxes also
let us add a margin below the buttons, without affecting the
allocation of the buttons themselves.
2013-06-29 19:00:40 -04:00
Matthias Clasen
534a7a9397 csd: use the correct icon name for close button
The icon is called window-close-symbolic.
2013-06-29 19:00:40 -04:00
Matthias Clasen
da55c86d3f csd: Use a dedicated style class for window buttons
This allows themes to differentiate between regular buttons
in a title bar, and window buttons.
2013-06-29 19:00:39 -04:00
Matthias Clasen
cacac4f85b csd: Improve the window title
Manually create the label, so that we can set its margins.
2013-06-29 19:00:39 -04:00
Sébastien Wilmet
f0a481d97b textiter: doc precision for forward_search() and backward_search()
https://bugzilla.gnome.org/show_bug.cgi?id=703313
2013-06-29 17:01:58 +02:00
Matthias Clasen
c73b48f28a Add a gtk_window_close function
This is useful when adding close buttons in custom titlebars.
2013-06-28 22:19:15 -04:00
Matthias Clasen
f3f6d1a249 Fix the build
We have to uglify the deprecation messages to make gtk-doc
handle them. The get turned into XML attributes, and there
is no automatic quoting to protect quotes in the text.
2013-06-28 06:50:57 -04:00
William Jon McCann
b86588e9f5 Deprecate GtkImageMenuItem
Use GtkMenuItem for menus with only text or GMenu for those
with icons for "nouns" and just text for "verbs".
2013-06-27 18:48:46 -04:00
William Jon McCann
d741b7b873 Deprecate the gtk stock functions 2013-06-27 17:51:38 -04:00
William Jon McCann
a02f2c4291 Make ignored settings be set to false by default 2013-06-27 17:02:58 -04:00
Emilio Pozuelo Monfort
f19c3896d0 menushell: don't activate a menu entry when opening a big menu
If a menu is opened and it doesn't fit entirely below or above
the menu bar, gtk+ will place it on top. The button release will
then activate the popup item that happens to appear under the
cursor. Avoid this by ignoring release events if they originated
in the parent menu bar and the duration of the press was too short.

https://bugzilla.gnome.org/show_bug.cgi?id=703069
2013-06-27 20:20:53 +02:00
Emanuele Aina
4eddc00911 docs: Add GtkListBox functions to their section and fix links
https://bugzilla.gnome.org/show_bug.cgi?id=702981
2013-06-27 16:28:40 +02:00
William Jon McCann
6e028767d0 Fix default value of scrolled window placement-set property
To make the testsuite happy.
2013-06-26 22:07:00 -04:00
William Jon McCann
fbbcb5c01b Disable primary paste by default 2013-06-26 21:41:45 -04:00
William Jon McCann
aef9dca9d5 Deprecate GtkIconFactory, GtkIconSet, GtkIconSource
We want to use GtkIconTheme instead. It is worth noting that
the parts that remain undeprecated are GtkIconSize and gtk_icon_size_lookup.
2013-06-26 20:02:27 -04:00
William Jon McCann
88177d8bd1 Don't use a GtkIconSet to pick the logo image
Just use the first pixbuf in the default list.
2013-06-26 18:48:03 -04:00
William Jon McCann
e779e04bc2 Deprecate and ignore gtk-icon-sizes setting
We don't have icons rendered at arbitrary sizes and we have better
APIs that aren't restricted to GtkIconSizes.
2013-06-26 18:04:27 -04:00
William Jon McCann
b101d465be Deprecate and ignore gtk-keynav-cursor-only and gtk-keynav-wrap-around 2013-06-26 15:33:10 -04:00
William Jon McCann
b26c74e5da Deprecate and ignore gtk-menu-bar-accel setting
Use 'F10' by default.
2013-06-26 14:21:44 -04:00
William Jon McCann
76936193d5 Deprecate and ignore gtk-menu popup and popdown delay settings
Just pick good defaults. The a11y team confirmed that they don't
rely on them.
2013-06-26 14:08:37 -04:00
William Jon McCann
e7b5be93b1 Deprecate and ignore gtk-scrolled-window-placement
Just use GTK_CORNER_TOP_LEFT and allow it to be changed with
gtk_scrolled_window_set_placement().
2013-06-26 13:06:12 -04:00
William Jon McCann
aa78c888eb Deprecate and ignore gtk-fallback-icon-theme
The standard icon themes have built in fallbacks.
2013-06-26 12:47:43 -04:00
William Jon McCann
b2e666bf8f Deprecate and ignore the cursor blink settings
And hardcode them to reasonable values.
2013-06-26 12:32:31 -04:00
William Jon McCann
2d79334bb0 Deprecate and ignore gtk-can-change-accels
It is disabled by default
2013-06-26 12:00:42 -04:00
William Jon McCann
7cfa7e6b72 Mark gtk-color-palette as deprecated
It is only used by the deprecated color selector widget.
2013-06-26 11:47:32 -04:00
William Jon McCann
7e3a494fac Deprecate and ignore gtk-enable-mnemonics and gtk-auto-mnemonics" properties
They are both enabled by default.
2013-06-26 11:16:12 -04:00
William Jon McCann
e8147d15f7 Deprecate and ignore gtk-menu-images setting
GtkImageMenuItem images can still be enabled selectively by the app author
using the always-show-image property on the item.
2013-06-26 10:53:09 -04:00
Benjamin Otte
7bd7bcec0d settings Deprecate properties
Deprecate the properties that were brought back from the dead in the
last patch.
2013-06-26 15:51:31 +02:00
Benjamin Otte
5b7b86c231 Revert "Remove the show-unicode-menu and show-input-method-menu settings"
Removing object properties is too much of an API break, even for
properties we don't expect to be used outside of GTK itself.

This reverts commit 8b811b623c.
2013-06-26 15:51:31 +02:00
William Jon McCann
65c31629c3 Deprecate and ignore gtk-button-images setting
Button images can still be enabled selectively by the app author
using the always-use-image property on the button.
2013-06-26 09:15:22 -04:00
William Jon McCann
d7260d4ee9 Fix a couple documentation warnings 2013-06-25 19:05:32 -04:00
William Jon McCann
424e1d0059 Start deprecating some GtkStock API 2013-06-25 19:05:32 -04:00
William Jon McCann
0091fc3543 Make the testsuite happy that get gets the default value 2013-06-25 12:39:20 -04:00
William Jon McCann
6e22c4cfde Fix some regressions from stock migration 2013-06-25 12:39:19 -04:00
Sébastien Wilmet
67d1183ac9 Document GtkTextSearchFlags
Move the doc about the flags from gtk_text_iter_forward_search() to the
enum.

https://bugzilla.gnome.org/show_bug.cgi?id=390048
2013-06-25 13:21:08 +02:00
William Jon McCann
02c793f24a Start migrating internals away from GtkStock 2013-06-24 22:20:49 -04:00
William Jon McCann
2b571f41e2 Remove more discontinued ChangeLogs
They are all in git.
2013-06-24 19:53:08 -04:00
Ryan Lortie
c79a21e1dd menu model: set separator label conditionally
When creating separators we were binding the "label" property on the
tracker to the "label" property on the GtkSeparatorMenuItem.

This was problematic for two reasons.

First, it was pointless.  The section header label will never change.

Second, it was causing problems: doing the binding caused the value to
be initially synced up, even if it was NULL.  Doing this caused
GtkMenuItem to create a GtkAccelLabel and add it as a child, which
prevented the separator from being shown normally.

Change the code a bit so that we just call gtk_menu_item_set_label()
when creating the item, if we find the label to be non-NULL.

Also, show() the separator item at first.  GtkMenu manages visibility of
separators internally, but it seems "more correct" to show it ourselves
at first.
2013-06-24 18:05:27 -04:00
Ryan Lortie
d498e9b588 GtkMenuTracker: fix leak when creating submenus 2013-06-24 18:05:27 -04:00
Benjamin Otte
830691bdce treeview: Ensure we first validate the visible area when validating
This invariant stopped being guaranteed when we moved the visible area
validation from a high priority idle to a tick callback.

Fixes redrawing bugs like row expanding sometimes not having any visual
effect.
2013-06-24 20:19:11 +02:00
Benjamin Otte
2008148303 treeview: Reorder code
This just moves a function and is in preparation for the next commit.
2013-06-24 20:19:05 +02:00
Benjamin Otte
f54e37a23b treeview: Actually remove presize handler when we presize
Avoids multiple calls to it.
2013-06-24 20:19:05 +02:00
Sébastien Wilmet
ea4e88df86 textiter: bug fix in forward_search() and backward_search()
When the search is case sensitive, g_utf8_normalize() is not called, so
the skip_decomp argument of the function forward_chars_with_skipping()
must be FALSE.

To verify that, when searching "éb", the count parameter of
forward_chars_with_skipping() have a different value:
- case sensitive: count = 2
- case insensitive: count = 3 (g_utf8_normalize() has been called)

The commit adds unit tests that didn't pass before, and that now pass
(without known regression, obviously).

https://bugzilla.gnome.org/show_bug.cgi?id=702977
2013-06-24 20:14:39 +02:00
William Jon McCann
99fa59c961 Add missing allow-none annotations 2013-06-24 13:46:56 -04:00
Ryan Lortie
1107935d2b GMenuModel -> GtkMenu binding: show submenu items
In the non-submenu case we bind the 'visibility' attribute to the
tracker, which takes care of showing the item.  In the submenu case, we
don't bind all of the properties, so we miss this one.

Deal with it by just show()ing the submenu item.

https://bugzilla.gnome.org/show_bug.cgi?id=702332
2013-06-22 09:35:59 -04:00
Federico Mena Quintero
32e75adf6a GtkFileChooserButton: Also emit 'file-set' when changing the selection through the combo box
https://bugzilla.gnome.org/show_bug.cgi?id=696498
2013-06-21 19:14:36 -05:00
Federico Mena Quintero
9162589b5a GtkFileChooserEntry: don't inline-complete if the entry doesn't have the focus
When the file chooser changes directories, it tells the GtkFileChooserEntry to
change its base folder (i.e. the folder from which relative pathnames are resolved).
GtkFileChooserEntry then starts loading a GtkFileSystemModel asynchronously.
In the finished_loading_cb(), however, it would always ask the GtkEntryCompletion
to insert the completion prefix, since that finished_loading_cb() is what is also used
while the user is typing *in the entry*.

But when the entry doesn't have the focus (e.g. the user changed directories by double-clicking
on the file list in the file chooser), there's no reason to insert completions at all.

https://bugzilla.gnome.org/show_bug.cgi?id=672271
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-06-21 18:35:28 -05:00
William Jon McCann
1b3f9df361 Remove rest of gtk-show-input-method-menu and gtk-show-unicode-menu
They are no longer used.
2013-06-21 08:59:32 -04:00
Jonh Wendell
c27ddc66c5 GtkEntry: ellipsize placeholder text
The placeholder string is truncated when there's no
room for it in entry's width.

So, by ellipsizing it, the user can notice the text
was truncated so that they can workaround that by,
for example, maximizing the window.

https://bugzilla.gnome.org/show_bug.cgi?id=702763
2013-06-21 09:29:15 -03:00
Benjamin Otte
8623d73c11 filechooser: Actually return a value 2013-06-21 02:59:23 +02:00
Benjamin Otte
5c61e457c8 treeview: Remove duplicate function 2013-06-21 02:59:23 +02:00
Sébastien Wilmet
08d49fdd58 Fix gtk_text_iter_forward_to_tag_toggle() for end iter
The function must return TRUE only if there is a tag toggle _after_ the
iter, not _at_ the iter. So for the end iter, the function must always
return FALSE.

Add also unit tests for gtk_text_iter_forward_to_tag_toggle().

https://bugzilla.gnome.org/show_bug.cgi?id=691266
2013-06-20 20:22:56 +02:00
Timothy Arceri
555e0a785d filechooser: Fix misleading documentation for gtk_file_chooser_set_preview_widget()
https://bugzilla.gnome.org/show_bug.cgi?id=701174
2013-06-20 12:29:02 -05:00
Sébastien Wilmet
38d78f48b5 Improve doc of gtk_text_iter_forward_search()
It was not possible to know if the @limit was for @match_start or
@match_end. It was documented for backward_search(), but not for
forward_search().

https://bugzilla.gnome.org/show_bug.cgi?id=390048
2013-06-20 12:39:24 +02:00
Claudio Saavedra
0540edcf9c gtkfilechooserbutton: fix documentation typo
https://bugzilla.gnome.org/show_bug.cgi?id=702695
2013-06-20 11:48:51 +03:00
Jonh Wendell
84b4910b39 filechooser: Add gtk_file_chooser_get_current_name()
Currently you can only set the current filename, but not
get it. It's useful to be able to get it in save
dialogs, where the user has typed the desired filename
and you are not in a real directory (recent used, for
example).

https://bugzilla.gnome.org/show_bug.cgi?id=702497
2013-06-19 13:37:35 -05:00
Alexander Larsson
159cccfe7b IconTheme: Move changed emission to an idle
By delaying the emission to an idle we avoid a lot of tricky
reentrancy issues. For instance, a normal gtk_icon_theme_choose_icon()
call could in very rare cases (when a user updated an icon theme) emit
a signal which could affect the icon currently being looked up.  This
kind of reentrancy is very hard to test against, especially when it is
so rare, so we're better of avoiding it.

There is no real value to get the change signal directly anyway. All
it can do is affect which icon is rendered the next frame, and we will
handle the queued emission before rendering. Not to mention that icon
theme change detection is polled anyway, so it is already delayed.

https://bugzilla.gnome.org/show_bug.cgi?id=694755
2013-06-19 11:15:37 +02:00
Alexander Larsson
1ee36713fe IconTheme: Clear caches when reloading theme
When we're reloading the theme in ensure_valid_themes (due to noticing
that a theme dir has changed) we need to also clear the icon cache
as it will not be valid for the new theme.

We already do this in do_theme_change(), but ensure_valid_themes()
was missing this.

https://bugzilla.gnome.org/show_bug.cgi?id=702598
2013-06-19 09:40:19 +02:00
Alexander Larsson
280d606cd4 IconCache: Keep a ref on the GtkIconData
The icon data in GttkIconInfo->data is currently owned by the
IconThemeDir->icon_data hashtable. However, on e.g. a theme change
blow_themes() destroys the dirs and thus the data, meaning any
outstanding GtkIconInfo points to stale data.

We solve this by adding a refcount to GtkIconData and reffing it
from GtkIconInfo.

https://bugzilla.gnome.org/show_bug.cgi?id=702598
2013-06-19 09:40:19 +02:00
Ryan Lortie
7554c15e7b GtkBuilder: add new constructor APIs
Add new APIs gtk_builder_new_from_{file,resource,string}() and encourage
their use over the older _add_from_...() APIs.

https://bugzilla.gnome.org/show_bug.cgi?id=679930
2013-06-18 10:21:27 -04:00
Ryan Lortie
1bc7359123 docs: GtkBuilder: warn about unusual GError use
GtkBuilder returns GError for _add_from_{file,resource,string}(),
implying that the user should be able to recover from these errors.
Mention in the docs that it's unreasonable to try to do this.

https://bugzilla.gnome.org/show_bug.cgi?id=679930
2013-06-18 10:17:34 -04:00
Alexander Larsson
242d0c5d22 Revert "GtkWindow: Move cairo_save/restore from marshaller"
This reverts commit 6c7689506f.

This is not right as we need to save/restore around *each*
callback, not just each emission.
2013-06-18 11:32:18 +02:00
Alexander Larsson
207703155b listbox: handle moving mouse out of widget with button down
Unset active row, etc when mousing out of the widget totally.
2013-06-17 15:15:07 +02:00
Alexander Larsson
3513981e1e listbox: Properly handle double click
We never want to handle GDK_2BUTTON_PRESS like a normal first click.
2013-06-17 15:15:07 +02:00
Alexander Larsson
e4a981eef2 listbox: Rewrite coords from child windows
If button events are from child windows we need to rewrite
the coordinates to our window.
2013-06-17 15:15:07 +02:00
Matthias Clasen
65f0e194e0 Fix a small memory leak 2013-06-15 23:35:25 -04:00
Matthias Clasen
5707e81c81 GtkBuilder: don't leak callbacks
This was noticed while running the testsuite under valgrind.
2013-06-15 23:33:51 -04:00
Matthias Clasen
c9ec4ba5a1 GtkImage: Fix the initial value of icon-size
Since we are pulling the icon-size out of the icon helper now,
we should set its icon-size when constructing it.
2013-06-15 20:23:01 -04:00
Matthias Clasen
87190233ef GtkListBox: cosmetics
Clean up formatting trivia, adjust includes to gtk conventions,
use P_() for properties, etc.
2013-06-15 12:32:59 -04:00
Bastien Nocera
3d11b9b758 GtkSearchBar: Mention we don't handle Ctrl+F for the app
There's probably an expectation from the app developers that
Ctrl+F or similar common shortcuts for starting a search will
be handled by the widget, when this is not the case. Explicitely
mention it in the docs to avoid confusion.

https://bugzilla.gnome.org/show_bug.cgi?id=701523
2013-06-14 19:10:39 +02:00
Bastien Nocera
19c5b37d9d GtkHeaderBar: Fix buildable function names
It's a GtkHeaderBar, not GtkHeader.

https://bugzilla.gnome.org/show_bug.cgi?id=701346
2013-06-14 19:10:39 +02:00
Bastien Nocera
8a45cb5762 GtkHeaderBar: Make labels creation available privately
So it can be reused in subclasses

https://bugzilla.gnome.org/show_bug.cgi?id=701345
2013-06-14 19:10:39 +02:00
Alexander Larsson
264cbc9e35 GtkStack: Switch order on left/right up/down transitions.
When the new child is on the left, scroll right. This makes the
thing look physically "real".
2013-06-13 20:55:05 +02:00
Alexander Larsson
418ac673a3 GtkStack: Fix drawing of sliding
We were not drawing the view window, so the old widget
was clipped for the sliding transitions.
2013-06-13 20:50:41 +02:00
Erick Pérez Castellanos
33a1c4d6e0 GtkStack: Add position-dependent slide transitions
These go left/right or up/down depending on the relative
order of the children being switched between.
2013-06-13 20:33:42 +02:00
Benjamin Otte
0d55d9b96b treeview: Use gtk_adjustment_configure()
... instead of manually setting all the values. Makes for nicer code and
less signal emissions.
2013-06-13 15:31:35 +02:00
Alexander Larsson
61f44628d6 GtkListBox: Consider width of filtered rows
Without this lists keep shrinking in width as they are filtered, whic
looks really bad.
2013-06-13 12:17:08 +02:00
Alexander Larsson
220eb45ef0 GtkListBox: Protect against reentrancy.
Activating a row may destroy the widget, so keep a ref since
we're doing thing to the listbox after emission.
2013-06-13 12:17:08 +02:00
Alexander Larsson
0f93b7f6c4 GtkListBox: minor fix
Move the check inside the existing chech which also checks
for active_row != NULL for extra safety.
2013-06-13 12:17:08 +02:00
Alexander Larsson
1dd0b468a7 GtkListBox: Add style classes for lists and rows 2013-06-13 12:17:07 +02:00
Alexander Larsson
3bb2d15195 GtkListBox: Add getter for activate_on_single_click 2013-06-13 12:17:07 +02:00
Alexander Larsson
90ff262df6 GtkListBox: Rename reXXX to invalidate_XXX
This is lets us later move to a setup where the rows are not
immediately resorted but queued until next layout.
2013-06-13 12:17:07 +02:00
Alexander Larsson
caacce6d44 GtkListBox: Add placeholder widget support 2013-06-13 12:17:07 +02:00
Alexander Larsson
b0b746b2ea GtkListBox: Track the number of visible children 2013-06-13 12:17:07 +02:00
Alexander Larsson
9510b79d78 GtkListBox: Track visible in the row
This is a minor performance improvement, but its mainly to
allow us to track when n_visible_children changes.
2013-06-13 12:17:07 +02:00
Alexander Larsson
217c2bb087 GtkListBox: Open code the update_header calls in add()
Rather than reusing row_visibility_changed. This means
row_visibility_changed really means that the row visibility changed.
2013-06-13 12:17:07 +02:00
Alexander Larsson
1eb729dcd9 GtkListBox: Make reseparate a no-op for hidden lists
We already take care to not track headers when the listbox is hidden,
because that can be very expensive during creation, so we might as
well skip reseparate() too. The only time we don't want to skip it
is when we're about to show the list.
2013-06-13 12:17:07 +02:00
Alexander Larsson
cbf294b27e GtkListBox: Remove some unnecessary code
the unhighlight call already NULLs out drag_highlighted_row
2013-06-13 12:17:07 +02:00
Alexander Larsson
2ba67a0b8b GtkListBox: Fix docs
Removed some cut/paste leftovers
2013-06-13 12:17:07 +02:00
Alexander Larsson
b119b022a7 GtkListBox: Allow unselecting of rows in SINGLE mode 2013-06-13 12:17:07 +02:00
Alexander Larsson
cc4ac1ee70 GtkListBox: Rename separators to headers 2013-06-13 12:17:07 +02:00
Alexander Larsson
4a0b6e5479 GtkListBox: Remove refilter signal
This was added from https://bugzilla.gnome.org/show_bug.cgi?id=691979
where it was wanted in order to get a "all children filtered" kind
of row. However, the solution is not really generic enough, because
filtering can happen for other reasons than a full refilter (i.e. due
to a row change), and the partial fix you can get by counting children
after refilter can be achieved by manually doing it whenever you manually
called refilter anyway.

Its possible we should have some better solution for the "empty state"
though.
2013-06-13 12:17:07 +02:00
Alexander Larsson
c6ac711508 GtkListBox: Add docs 2013-06-13 12:17:07 +02:00