Benjamin Otte
a488d2184a
stylecontext: Pass state to style data lookup function
2012-01-09 18:37:49 +01:00
Benjamin Otte
cdb3f05bf1
css: Add _gtk_style_property_get_count()
2012-01-09 18:37:49 +01:00
Benjamin Otte
54d2b9dbc2
cssprovider: Keep a bitmask for the properties
...
That way we can easily tell wich properties are in use.
2012-01-09 18:37:49 +01:00
Benjamin Otte
eb38591c91
css: Add _gtk_style_property_get_id()
2012-01-09 18:37:49 +01:00
Benjamin Otte
f6cf447cad
styleproperty: Assign a unique id to every styleproperty
2012-01-09 18:37:49 +01:00
Benjamin Otte
eddd36d1d9
tests: Add tests for GtkBitmask
2012-01-09 18:37:49 +01:00
Benjamin Otte
45b9193290
gtk: Add GtkBitmask
...
The CSS code likes to have that very much.
2012-01-09 18:37:49 +01:00
Stefan Sauer
f7d3ca46f7
gtkscale: fix bogus compare func
...
The GtkScaleMark values are gdouble, a simple a-b compare func would fail for
values with the same integer value. This breaks the sorting and causes random
marker label placement.
2012-01-09 18:33:11 +01:00
Rui Matos
052c6e0681
scrolledwindow: Render the background so that it can be styled
2012-01-09 16:45:44 +00:00
Rui Matos
09979513b2
window: Stop setting state flags on the style context for drawing
...
This also removes setting the FOCUSED state flag when
gtk_window_has_toplevel_focus() since this effect can now be done with the new
WINDOW_UNFOCUSED flag instead which actually works better regarding X grabs
and modal windows.
2012-01-09 16:45:44 +00:00
Rui Matos
440663f3fe
treeview: Use the widget state flags as a base for drawing expanders
2012-01-09 16:45:44 +00:00
Rui Matos
2972236fdb
treeview: Stop setting state flags on the style context for drawing
2012-01-09 16:45:44 +00:00
Rui Matos
76485b8670
trayicon-x11: Stop setting state flags on the style context for drawing
2012-01-09 16:45:44 +00:00
Rui Matos
8bb0773535
toolitemgroup: Use the widget state flags as a base for drawing
2012-01-09 16:45:44 +00:00
Rui Matos
4011326388
toolbar: Stop setting state flags on the style context for drawing
2012-01-09 16:45:44 +00:00
Rui Matos
a1f72eb06c
Revert "button: Stop setting state flags on the style context for drawing"
...
Setting state flags is actually needed here since this function is called by
GtkButton subclasses which add their specific state flags as a parameter.
This reverts commit e868b8d6ea
.
2012-01-09 16:45:44 +00:00
Rui Matos
2efa658a41
textdisplay: Use the widget state flags as a base for drawing
2012-01-09 16:45:44 +00:00
Rui Matos
b203ea2f93
spinner: Stop setting state flags on the style context for drawing
2012-01-09 16:45:44 +00:00
Rui Matos
e9549a7514
spinbutton: Use the widget state flags as a base for drawing
2012-01-09 16:45:43 +00:00
Rui Matos
9118ccb02d
separator: Stop setting state flags on the style context for drawing
2012-01-09 16:31:11 +00:00
Rui Matos
95caabac03
scale: Stop setting state flags on the style context for drawing
2012-01-09 16:31:11 +00:00
Rui Matos
b2f5959147
range: Use the widget state flags as a base for drawing
2012-01-09 16:31:11 +00:00
Rui Matos
6dd0bd5536
radiobutton: Use the widget state flags as a base for drawing
2012-01-09 16:31:11 +00:00
Rob Bradford
4007449a58
application: Correct the fallback definition for gtk_application_end_session
...
The function definition used a pointer to the enum value rather than the enum
itself.
This broke the build on platforms that don't have an implmentation of these
functions.
2012-01-09 15:09:27 +00:00
Ryan Lortie
cf2590d673
GtkButton: do not allow both types of actions
...
Only allow one of 'action-name' or 'related-action' to be set.
https://bugzilla.gnome.org/show_bug.cgi?id=667394
2012-01-09 15:02:10 +01:00
Ryan Lortie
88ec007b98
Add new GtkActionable interface
...
This is the interface for GtkWidgets that can be associated with an
action on a GtkAppicationWindow or associated GtkApplication.
It essentially features 'action-name' and 'action-target' properties
with some associated convenience API.
This interface is implemented by GtkButton and GtkToolButton.
https://bugzilla.gnome.org/show_bug.cgi?id=667394
2012-01-09 15:02:06 +01:00
Murray Cumming
395bf54b8e
gtkmain.h: Used GDK_DEPRECATED
...
If we use just G_GNUC_DEPRECATED then it cannot be disabled by
an ifdef.
2012-01-09 14:20:49 +01:00
Matthias Clasen
69a529572d
Revert "GtkWindow: new API to store state in GSettings"
...
This reverts commit 730765de91
.
This needs more thought, committing it on the same day as filing
the bug was premature.
2012-01-09 00:53:53 -05:00
Matthias Clasen
2ef4621e05
Fix up symbol lists
2012-01-09 00:31:20 -05:00
Matthias Clasen
f3533e4fc2
Fix the gtk_application_end_session implementation
...
We were passing the wrong flags, causing the meaning of
the request_confirmation parameter to be inverted.
2012-01-08 02:16:26 -05:00
Matthias Clasen
d2ed87fbdc
Fix doc build
2012-01-07 21:47:42 -05:00
Matthias Clasen
f78696f3d0
GtkApplication: only allow quit_response when it make sense
...
This check was present in the OS X implementation, but it
makes sense in the D-Bus implementation as well.
2012-01-07 20:01:23 -05:00
Matthias Clasen
00d5214695
Remove some debug spew
2012-01-07 19:55:20 -05:00
Matthias Clasen
bb957e5389
GtkApplication: Add OS X implementation from EggSMClient
2012-01-07 19:52:14 -05:00
Paolo Borelli
7c8130dada
Change param name to make gtk-doc happy.
2012-01-07 18:06:59 +01:00
Benjamin Otte
f6d2f4fa8d
application: return a value
2012-01-07 15:56:26 +01:00
Martin Pitt
700a334d87
gtkapplication.c: Fix syntax error
...
Previous commit accidentally removed the closing } from
gtk_application_end_session(). Add it back to unbreak the build.
2012-01-07 10:04:18 +01:00
Matthias Clasen
916009b5d6
Add a trivial implementation of the new apis
...
For non-X11, this is just a placeholder until we get around
to moving the EggSMClient implementations over.
2012-01-07 03:20:56 -05:00
Matthias Clasen
48872705f0
Document the new apis
2012-01-07 03:20:56 -05:00
Matthias Clasen
3142d13972
Add gtk_application_end_session
...
This function allows applications to request that
the user session be ended by logout/shutdown/reboot.
2012-01-07 03:20:56 -05:00
Matthias Clasen
bdd7e15c84
GtkApplication: Add an inhibit api
...
This lets applications block logout and similar actions ahead
of time. Currently only implemented for D-Bus, but Windows has
very similar API since Vista.
2012-01-07 03:20:56 -05:00
Matthias Clasen
3133791302
GtkApplication: Add logout notification
...
This is fairly basic, allowing applications to learn when
the session manager is about to end the session, and possibly
block this. The only implementation at this point is using the
org.gnome.SessionManager D-Bus interface of gnome-session. It should
be straightforward to port the EggSMClient implementations for
Windows and OS X.
2012-01-07 03:20:56 -05:00
Ryan Lortie
730765de91
GtkWindow: new API to store state in GSettings
...
https://bugzilla.gnome.org/show_bug.cgi?id=667438
2012-01-06 16:18:48 -05:00
Ryan Lortie
d47c3ac9e4
GtkBuilder: support parsing GVariant properties
...
https://bugzilla.gnome.org/show_bug.cgi?id=667394
2012-01-06 16:18:48 -05:00
Zeeshan Ali (Khattak)
1996618569
gtkspinbutton: Don't hilight buttons when !editable
...
Don't hilight the buttons on mouse over when 'editable' property is set to
'FALSE.
https://bugzilla.gnome.org/show_bug.cgi?id=667229
2012-01-06 18:35:37 +02:00
Matthias Clasen
7df5cf2a3a
GtkApplication: Rename a member for clarity
...
'session' is a bit ambiguous (and GtkApplication may grow session
management support at some point), so rename the bus connection
to 'session_bus'.
2012-01-05 23:53:40 -05:00
Matthias Clasen
c74ac08143
Another attempt at fixing menu positioning corner cases
...
The code for moving the menu into monitor / workarea was duplicated,
once for the push-in scenario and once for without. The problem with
the second case is that we've stored the menu position before adjusting
it. That made us remember an out-of-monitor position that then later
triggered _another_ copy of this code in the size-request implementation.
Unify this to only have one copy of code, and only store the menu
position after adjusting it to be inside the monitor. This fixes both
statusicon menus that get popped up from the panel, outside the workarea,
to not have scroll arrows, and the gedit language menu which was not
placed in the monitor at all after the initial workarea commit.
As a side-effect of this change, we now make large scrolling menus
occupy the full height of the workarea. Before this change, we were
keeping either the top or bottom edge put while shrinking the menu
to fit in the monitor.
https://bugzilla.gnome.org/show_bug.cgi?id=667249
2012-01-05 23:30:41 -05:00
Benjamin Otte
00e84f1cdb
label: Avoid deprecation warning
2012-01-06 05:23:43 +01:00
Benjamin Otte
42d0a6de23
label: Actually mark visited labels as visited
...
A recalculate will clear the labels and compute them again, which will
clear the information if something was visited...
2012-01-06 05:23:43 +01:00
Benjamin Otte
d6bb8a63aa
label: Make attr_list_merge() use sane merging rules
...
Instead of "attribute with later start index wins, make sure the
attribute list that is merged from takes precedence. This now gives the
multiple attribute lists we use in the label an order:
1) gtk_label_set_attributes()
These attributes override everything. It's what the function's there
for after all.
2) markup of label
Other user-specified attributes come next.
3) attributes for links
When we apply custom attributes on parts of the text, we put them
last. We don't want to mess with what the user does. Also, we change
color and underline, so we usually have something to show.
2012-01-06 05:23:42 +01:00
Benjamin Otte
e78e4d8dd8
label: Rename variable
...
The effective attributes aren't that anymore. They're now just the
attributes from the parsed markup.
2012-01-06 05:23:42 +01:00
Benjamin Otte
f1c9a3e633
label: Don't excessively recalculate
...
We don't merge attributes anymore, so no need to call the function that
used to do this job.
2012-01-06 05:23:42 +01:00
Benjamin Otte
396b177e3b
label: Redo attribute application
...
- Don't compute link color attributes until layout creation
This is useful as a performance enhancement, because we don't have to
lookup the property after setting the text, so multiple markup sets
don't cost style lookups.
- Don't merge attrs into effective_attrs
We do this when applying link colors now. Keeping them separate allows
invalidating them separately.
2012-01-06 05:23:42 +01:00
Benjamin Otte
15ac572822
ilabel: Redo gtk_label_get_link_colors()
...
Don't pass out an allocated color, assign it instead. Gets rid of having
to call gdk_color_free() all the time.
2012-01-06 05:23:42 +01:00
Benjamin Otte
dd4df24382
label: Split out function that merges attr lists
2012-01-06 05:23:42 +01:00
Benjamin Otte
712d577531
label: Redo links parsing
...
Instead of getting confused by applied underline or color tags in the
regular markup, we store the link start/end when we actually parse the
text. As a bonus, we can avoid rescanning links when creating the
markup.
2012-01-06 05:23:42 +01:00
Benjamin Otte
18ce0b21a0
label: Move function into only caller
2012-01-06 05:23:42 +01:00
Benjamin Otte
fc37e2749c
API: Deprecate key snooping
...
You really shouldn't be doing this. If you have to, you can use
gdk_window_add_filter() or listen to raw events on XI2.
2012-01-06 05:23:42 +01:00
Benjamin Otte
0c8ecba7dc
a11y: Remove keysnooping support
...
As previously announced, key snooping is something that we should not
support in GTK. In particular because AT-SPI made every key press a
synchronous DBUS call / spawned a nested main loop with the key
snoopers. This breaks responsiveness, order of key presses and internal
consistency when the AT decides to remove key events.
2012-01-06 05:23:42 +01:00
Zeeshan Ali (Khattak)
43e29f7cbf
gtkspinbutton: Ignore keynav when !editable
...
Don't allow changing of value through keyboard when 'editable' property is
set to 'FALSE.
https://bugzilla.gnome.org/show_bug.cgi?id=667229
2012-01-06 05:45:46 +02:00
Benjamin Berg
b3e352f489
Improve PICKONE_* handling in GtkPrinterOptionWidget (bug #543520 )
...
This patch modifies GtkPrinterOptionWidget to support loading them
again. It also allows the user to enter values from the dropdown list
to select the item.
2012-01-06 00:20:42 +01:00
Matthias Clasen
f7fb2fbebd
Use the right icon-name for missing images
...
Patch by Erik van Pienbroek, bug 629878.
2012-01-05 14:07:04 -05:00
Marek Kasik
f1995f80e7
GtkPrintUnixDialog: Hide unused tabs
...
Don't show tabs which are empty. This is related to
the recent GtkTable -> GtkGrid conversion. (#663479 )
2012-01-05 13:17:46 +01:00
Xan Lopez
5f53045707
Revert "gtksettings.c: Do not use GdkColor API"
...
This reverts commit baef3e5f24
.
This broke the Adwaita theme pretty severely, so I don't think it can
be right. See: http://i.imgur.com/Rq7wc.png
2012-01-05 12:22:05 +01:00
Javier Jardón
baef3e5f24
gtksettings.c: Do not use GdkColor API
2012-01-05 04:38:22 +01:00
Javier Jardón
e77ffa6f87
gtkcolorsel.c: Do not use GdkColor API
2012-01-05 04:38:22 +01:00
Javier Jardón
d005b01319
gtk/*: Use g_list_free_full() convenience function
2012-01-05 04:22:43 +01:00
Ryan Lortie
0ea48c4139
GtkComboBoxText: allow id='' tag in builder markup
...
Presently, GtkComboBoxText lets you list the items for it in the
GtkBuilder markup like so:
<items>
<item translatable='yes'>Red</item>
<item translatable='yes'>Blue</item>
</items>
but has no way to set the "id" column for added items. Add an id='' tag
for that purpose so that you can do:
<item id='red' translatable='yes'>Red</item>
https://bugzilla.gnome.org/show_bug.cgi?id=667319
2012-01-04 17:00:35 -05:00
Xan Lopez
eeb9de80e1
GtkNotebook: fix crash when DnD tabs between windows
...
When doing DnD between windows the tab label is set as the child of
the DnD info window. If this is happening the remove method of
GtkNotebook should not unparent the tab label, since it's been already
unparented, belongs to the DnD window and will be properly destroyed
when the DnD is over.
https://bugzilla.gnome.org/show_bug.cgi?id=639875
2012-01-04 08:48:46 +01:00
Javier Jardón
912375ff38
gtk/gtkcolorbutton.c: Do not use deprecated GdkColor api
2012-01-04 01:55:16 +01:00
Zeeshan Ali (Khattak)
3caa370bb5
gtkspinbutton: Respect value of inherited 'editable' property
...
When this property is set to 'FALSE', user's click on the buttons
should not actually update the value but rather result in error bell.
https://bugzilla.gnome.org/show_bug.cgi?id=667229
2012-01-04 00:49:35 +02:00
Federico Mena Quintero
022c576bd2
treeview: bgo#666685 - Crash when toggling the selected status of a row
...
The refactoring from e01af5c5c
seems to have caused this inadvertently.
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-01-03 15:08:34 -06:00
Javier Jardón
abb7f40fb8
gtkcolorsel: Do not use deprecated GdkColor api
2012-01-03 18:00:57 +01:00
Javier Jardón
49d232d3a0
gtkcellview: Do not use deprecated GdkColor api
2012-01-03 18:00:57 +01:00
Chun-wei Fan
9f6e7d214c
gtk/gtkprivate.c: Include stdlib.h
...
Include stdlib.h for getenv to avoid C4013/implicit declaration of ...
warnings
2012-01-04 00:52:44 +08:00
Ignacio Casal Quinteiro
f0b8fc69e8
textdisplay: use g_list_free_full
2012-01-01 22:38:30 +01:00
Kjell Ahlstedt
6aeab7b7cc
comboboxtext: Set entry-text-column and id-column props in the constructor
...
This is cleaner than setting the value in the _new() functions and
makes binding and GtkBuilder instantiation easier. Bug #612396 , comment 65.
2011-12-30 11:10:26 +01:00
Chun-wei Fan
d273b817e8
Bug 667018-gtk/gtkwindow.c: Include deprecated/gtkstyle.h
...
This is needed for the prototype of gtk_widget_reset_rc_styles, to avoid
C4013/implicit declaration of ... warnings of that function
2011-12-30 17:25:48 +08:00
Chun-wei Fan
1a122a4367
gtk/gtkspinbutton.c: Remove lingering ';'
...
...so that C89 compilers will not complain
2011-12-30 17:25:47 +08:00
Chun-wei Fan
24e476caab
gtk/Makefile.am: Update VS projects completion
...
Take the sources in gtk/deprecated/ into account-VS does not like '/'
in file paths.
2011-12-30 16:44:55 +08:00
Matthias Clasen
2637240abe
Remove an unnecessary warning
...
Don't warn if there's more than one mnemonic label for a widget,
and skip invisible labels.
Bug 665015
2011-12-30 02:01:15 -05:00
Matthias Clasen
d7e8388e9d
Add a Since tag
...
gtk_css_provider_to_string is a post-3.0 addition.
Fixes bug 659516
2011-12-30 00:38:06 -05:00
Matthias Clasen
3c70a12785
GtkImContextSimple: fix tentative match handling
...
When switching to the compact table format, we inadvertedly lost
the 'tentative match' handling which allows to complete longer
compose sequences even if a prefix is a complete sequence.
This was pointed out in bug 666710.
2011-12-29 23:42:03 -05:00
Matthias Clasen
694bbf4ac0
Cosmetic changes to comments
2011-12-29 23:42:03 -05:00
Benjamin Otte
45161fbb55
settings: Cache style properties
...
This way we don't need to compute them every lookup. (That's not the
real reason though - the real reason is that I want to add new APIs that
require the caching because they return consts).
2011-12-29 10:10:32 +01:00
Benjamin Otte
524938aa53
modifierstyle: Move Private typedef to public header
2011-12-29 10:10:22 +01:00
Ignacio Casal Quinteiro
1abf7618c0
gtktextlayout: use g_slice for GtkTextLineDisplay
2011-12-25 18:13:51 +01:00
Ignacio Casal Quinteiro
359d8c9856
gtktextbtree: use g_slice
2011-12-25 17:49:03 +01:00
Benjamin Otte
ab1699510e
themingbackground: Avoid erroring cairo context
2011-12-23 22:30:45 +01:00
Benjamin Otte
58d553c604
cssprovider: Fix leak
...
Thanks to the heroic valgrinding efforts of Olivier Sessnik, another
leak could be plugged.
2011-12-23 22:30:45 +01:00
Matthias Clasen
fbc3db8ba9
Fix scroll_offset handling
...
scroll_offset can be negative here, so replace a > 0 test
by != 0.
2011-12-23 00:36:20 -05:00
Matthias Clasen
f1bfdda3fd
Only push the menu in if the position function said so
2011-12-23 00:36:20 -05:00
Matthias Clasen
a553cb50ab
Use gtk_widget_get_allocated_width/height where it makes sense
2011-12-23 00:36:20 -05:00
Matthias Clasen
53ce519b1f
Remove an unneeded variable
2011-12-23 00:36:20 -05:00
Matthias Clasen
547baf0e5f
Remove an unused struct
2011-12-23 00:36:19 -05:00
Benjamin Otte
9707d964f7
combobox: Don't allow an individual cell to cheat
...
Make sure we only set sensitive when the cell is sensitive and visible.
Also avoid invalid memory accesses if no cells existed.
2011-12-23 00:15:59 +01:00
Benjamin Otte
8a83f0c2d1
widget: Print a g_warning() when a cairo_t is invalid
...
Only print the warning on internal code, so we aren't too verbose.
2011-12-23 00:15:59 +01:00
Benjamin Otte
d1c92c38df
styleproperties: Move private struct declaration into public header
2011-12-23 00:15:59 +01:00
Javier Jardón
a3abc18858
Deprecate all the public API that is using GdkColor struct
2011-12-22 02:59:39 +00:00
Javier Jardón
115d92aa11
gtkappchooserwidget: Use g_object_clear()
2011-12-22 02:57:35 +00:00
Ryan Lortie
182fbba2bf
GtkModelMenu: drop extra & added by mistake
2011-12-21 17:15:16 -05:00
Cosimo Cecchi
157d9271fa
application: don't unconditionally unref the GMenuModel in getters
...
Both the app-menu and menubar models can be NULL, so we shouldn't
blindly unref them, since g_object_unref() doesn't cope with NULL
pointers.
2011-12-21 12:20:15 +01:00
Cosimo Cecchi
72c04c064a
application: mark menu/menubar getters as (transfer none)
...
Since they do not return a reference to the underlying GMenuModel.
2011-12-21 12:19:31 +01:00
Cosimo Cecchi
9ae0ffb9cb
application: use the same variable names in definitions and declarations
...
gobject-introspection will be confused and mark the methods as not
introspectable otherwise.
2011-12-21 11:29:39 +01:00
Colin Walters
06307dd774
GtkAction: Hold a reference to proxy widgets
...
Previously we expect that a proxy widget holds a reference to the
action via gtk_activatable_do_set_related_action(). However, it
is possible for the widget to still be in a floating state when
it adds itself to the the action.
This is a problem when gtk_action_get_proxies() gets called, because
we return floating objects back to the user. And language bindings
aren't going to be expecting that.
Fix this by calling ref_sink() and unref().
https://bugzilla.gnome.org/show_bug.cgi?id=657367
2011-12-20 15:36:48 -05:00
Matthias Clasen
b5577781d1
GtkApplicationWindow: fix a typo
...
And add a link to the screenshots.
2011-12-20 14:10:39 -05:00
Javier Jardón
f84c124e53
gtk/gtkcellview.c: Use new GdkRGBA api instead GdkColor one
2011-12-20 18:32:15 +00:00
Javier Jardón
e24634537e
gtk/gtktrayicon-x11.c: Use new GdkRGBA api instead GDKColor one
2011-12-20 18:32:15 +00:00
Cosimo Cecchi
2827cd4518
button: deprecate the inner-border style property
...
Since we allocate the standard CSS border to the button now, and center
the child accordingly, there's no need for an additional inner-border
style property. Deprecate it and ignore its values.
https://bugzilla.gnome.org/show_bug.cgi?id=666600
2011-12-20 19:01:38 +01:00
Cosimo Cecchi
0021ef19fa
button: add CSS borders to the size request
...
And allocate the button children according to it as well.
https://bugzilla.gnome.org/show_bug.cgi?id=666600
2011-12-20 19:01:38 +01:00
Cosimo Cecchi
fe59c5f954
button: add a border param to gtk_button_get_props()
...
We'll use it later to compute the child offsets.
https://bugzilla.gnome.org/show_bug.cgi?id=666600
2011-12-20 19:01:38 +01:00
Ryan Lortie
bac58abec3
gtkmodelmenuitem: don't crash on missing action
2011-12-20 10:51:58 -05:00
Cosimo Cecchi
13f5706488
treeview: fix an uninitialised variable warning
2011-12-20 11:41:46 +01:00
Matthias Clasen
d7652d2c06
Fix dist
2011-12-19 18:37:28 -05:00
Matthias Clasen
23ca2a953c
Fix symbol lists
2011-12-19 18:07:42 -05:00
Rui Matos
f4c698ef93
Revert "progressbar: Set state flags on draw"
...
This reverts commit 6ed5918718
which is no
longer needed as the style context now has the state flags updated when going
into draw.
2011-12-19 20:59:06 +00:00
Matthias Clasen
5d8641dd92
Add another bloatpad screenshot
2011-12-19 15:16:11 -05:00
Rui Matos
8b444d1c03
notebook: Use the widget state flags as a base for drawing
2011-12-19 19:21:16 +00:00
Rui Matos
9a4edf7a5a
menuitem: Stop setting state flags on the style context for drawing
2011-12-19 19:21:16 +00:00
Rui Matos
6b624a5a18
menubar: Stop setting state flags on the style context for drawing
2011-12-19 19:21:16 +00:00
Rui Matos
5b4cc2f0b6
label: Use the widget state flags as a base for drawing
2011-12-19 19:21:16 +00:00
Rui Matos
02dd7df653
label: Stop setting state flags on the style context for drawing
2011-12-19 19:21:16 +00:00
Rui Matos
e3d38708ab
image: Stop setting state flags on the style context for drawing
2011-12-19 19:21:16 +00:00
Rui Matos
f4b9562f46
iconview: Use the widget state flags as a base for drawing items
2011-12-19 19:21:16 +00:00
Rui Matos
ffd5126a42
iconview: Stop setting state flags on the style context for drawing
2011-12-19 19:21:16 +00:00
Rui Matos
e9a8938b21
hsv: Stop setting state flags on the style context for drawing
2011-12-19 19:21:16 +00:00
Rui Matos
1facea2a8d
expander: Use the widget state flags as a base for drawing
2011-12-19 19:21:16 +00:00
Rui Matos
3e0b2f7262
eventbox: Stop setting state flags on the style context for drawing
2011-12-19 19:21:16 +00:00
Rui Matos
754eabeb19
entry: Use the widget state flags as a base for drawing icons and text
2011-12-19 19:21:16 +00:00
Rui Matos
a0fd344217
entry: Stop setting state flags on the style context for drawing
2011-12-19 19:21:16 +00:00
Rui Matos
721920e9e9
combobox: Stop setting state flags on the style context for drawing
2011-12-19 19:21:15 +00:00
Rui Matos
ee669a1b51
cellview: Stop checking for sensitivity on draw
...
This is needless since GtkCellRenderer does it consistently before rendering.
2011-12-19 19:21:15 +00:00
Rui Matos
70970146ca
cellrenderertoggle: Use the cell renderer's state flags as a base for rendering
...
This allows us to pick the underlying widget's state flags that we don't
explicitly set here.
2011-12-19 19:21:15 +00:00
Rui Matos
42d2a1984c
cellrenderer: Use the widget state flags as a base for cell renderers' state
2011-12-19 19:21:15 +00:00
Rui Matos
8baf65b595
checkmenuitem: Clean up state flags handling on drawing
2011-12-19 19:21:15 +00:00
Rui Matos
c9bbfb5e9b
checkbutton: Use the widget state flags as a base for drawing the indicator
...
Instead of building a set of state flags specifically for drawing the
indicator, base it on the underlying widget state flags.
2011-12-19 19:21:15 +00:00
Rui Matos
dae2675441
checkbutton: Stop setting state flags on the style context for drawing
2011-12-19 19:21:15 +00:00
Rui Matos
5f5d4db034
calendar: Use the widget state flags as a base for drawing arrows
...
This allows drawing calendar arrows in all possible states the main widget may
be in.
The arrow_state array is converted into a bit field since it only really needs
to store boolean information about prelight for each arrow.
2011-12-19 19:21:15 +00:00
Rui Matos
d84021a870
calendar: Use the widget state flags as a base for drawing days
...
Instead of building a set of state flags specifically for drawing days, base
it on the underlying widget state flags.
2011-12-19 19:21:15 +00:00
Rui Matos
e868b8d6ea
button: Stop setting state flags on the style context for drawing
2011-12-19 19:21:15 +00:00
Rui Matos
cf469eeb61
arrow: Stop setting state flags on the style context for drawing
2011-12-19 19:21:15 +00:00
Rui Matos
221442aa2a
accellabel: Stop setting state flags on the style context for drawing
2011-12-19 19:21:15 +00:00
Rui Matos
cc8012eb32
widget: Set style flags on the style context when the flags are set
...
This will allow us to simplify most draw methods by not having to explicitly
set the style flags on the context.
2011-12-19 19:21:15 +00:00
Rui Matos
eecbdb6f57
widget: Always propagate state flags to all children
...
https://bugzilla.gnome.org/show_bug.cgi?id=666126
2011-12-19 19:21:15 +00:00
Ryan Lortie
8578fefaa5
GtkApplication: add menu API
...
We add the app-menu and menubar public APIs to GtkApplication while
leaving the implementation in GApplication.
The actual implementation will be moved soon.
2011-12-19 12:51:12 -05:00
Ryan Lortie
4e5e47931d
missing file
2011-12-19 12:51:12 -05:00
Ryan Lortie
06c8921975
GtkApplication: document relationship to gdkthreads
2011-12-19 12:51:12 -05:00
Ryan Lortie
6a246a85f2
GtkApplicationWindow: deal with remote actions
...
Deal with remote action invocations correctly by implementing
GRemoteActionGroup in the same way that GApplication does and pushing
remote activations through the before/after_emit functions of the
GApplication associated with the window.
This is the last part of getting the threading situation right.
https://bugzilla.gnome.org/show_bug.cgi?id=665737
2011-12-19 12:51:12 -05:00
Ryan Lortie
363c2d684c
GtkApplication: lock gdk on incoming messages
...
When we have incoming activations or action invocations we should
acquire the GDK lock, just in case the program in question is using gdk
threads.
https://bugzilla.gnome.org/show_bug.cgi?id=665737
2011-12-19 12:51:12 -05:00
Ryan Lortie
76d671d6a2
Move X property handling to GtkApplicationWindow
...
Don't try to deal with this using a qdata and signal connections in
GtkApplication.
2011-12-19 12:51:12 -05:00
Matthias Clasen
cff5ba1bc2
Document that gtk_init is called without argv
...
This answers a question in bug 661823.
2011-12-19 12:51:12 -05:00
Matthias Clasen
316e0ea542
Fix a typo
2011-12-19 12:51:12 -05:00
Matthias Clasen
5562d0a57a
Forgotten file
2011-12-19 12:51:12 -05:00
Matthias Clasen
080007d7cb
Show off some menus
2011-12-19 12:51:12 -05:00
Matthias Clasen
06a75b7e1f
Some more menu-related docs
2011-12-19 12:51:12 -05:00
Matthias Clasen
a991bb9927
GtkBuilder: pick up named submenus
...
When parsing GMenu xml, use the facility for pick up named submenus.
Note that <section id='foo'>...</section> is _not_ a named submenu.
It is a named item with an unnamed submenu :-(
2011-12-19 12:51:12 -05:00
William Hua
c1f9ccce5b
Handle menu changes.
2011-12-19 12:51:12 -05:00
William Hua
1a02fc036d
Refactor GMenuModel rendering for Mac OS.
2011-12-19 12:51:12 -05:00
William Hua
ec72f8fd81
gtkquartz-menu: fix some leaks
2011-12-19 12:51:12 -05:00
William Hua
460ac291b2
begin adding menu accelerators
...
Show accelerators in menus.
2011-12-19 12:51:12 -05:00
Matthias Clasen
3103ae2685
Two small fixes
...
Don't leak a session bus reference, and don't assume a display
is X11 just because we've built the X11 backend.
2011-12-19 12:51:12 -05:00
Matthias Clasen
d91c9f9859
Fix up includes
2011-12-19 12:51:12 -05:00
William Hua
8bc7513a7b
begin GtkApplication menu support for Mac OS
2011-12-19 12:51:11 -05:00
Ryan Lortie
21f4562d10
GtkApplicationWindow: share one GActionMuxer
...
Use the same GActionMuxer for menubars and accels instead of recreating
a new one each time.
2011-12-19 12:51:11 -05:00
Matthias Clasen
f485dd3f08
Documentation additions
2011-12-19 12:51:11 -05:00
Matthias Clasen
0baa663182
GtkApplicationWindow: Always install accelerators
...
We want accelerators to work, even if the menus are not shown
locally, so we can't rely on the GtkMenu code to set them up
for us. Currently, this code only installs accelerators when the
window is realized.
2011-12-19 12:51:11 -05:00
Matthias Clasen
f7244431a9
GtkApplication: Extract accelerators from menus
...
This allows to specify accelerators in a convenient way, by
adding accel="..." attributes to the menu items in the
XML for the menu.
Currently, the accelerators are extracted only once, when the
menu property is changed on the application.
2011-12-19 12:51:11 -05:00
Matthias Clasen
2398d7e900
Introduce gtkaccelmapprivate.h
...
Move internal accel map API there and update all users.
Also, add an internal function to create an accel path for
an action and parameter, and use it in gtkapplication.c and
gtkmodelmenuitem.c instead of duplicating that code.
2011-12-19 12:51:11 -05:00
Matthias Clasen
153cc818db
GtkApplication: Add API to install accelerators for actions
2011-12-19 12:51:11 -05:00
Matthias Clasen
1c6d0c3e27
GtkApplicationWindow: Set the accel group on constructed windows
...
This will make the menuitems pick up matching accel map entries
automatically. Currently, nothing creates such accel map entries,
though.
2011-12-19 12:51:11 -05:00
Matthias Clasen
9d62d24d65
GtkApplicationWindow: Add a GtkAccelGroup
...
This will be used in the following patches.
2011-12-19 12:51:11 -05:00
Matthias Clasen
d5d896f812
Fix a gtk-doc warning
2011-12-19 12:51:11 -05:00
Ryan Lortie
90fcf994d5
GtkApplication: export windows on the bus
...
And advertise their location on the bus using X11 properties.
2011-12-19 12:51:11 -05:00
Ryan Lortie
03db3e1ca1
(trivially) implement 'shutdown' in GtkApplication
2011-12-19 12:51:11 -05:00
Matthias Clasen
aa1faa7c70
Add an example
2011-12-19 12:51:10 -05:00
Matthias Clasen
898bc98d3b
Update GtkApplicationWindow docs
2011-12-19 12:51:10 -05:00
Matthias Clasen
3205a40b84
Whitespace fix
2011-12-19 12:51:10 -05:00
Matthias Clasen
f119c834c1
Make accelmap initialization more forgiving
2011-12-19 12:51:10 -05:00
Matthias Clasen
7ef340fb87
Clean up includes
2011-12-19 12:51:10 -05:00
Ryan Lortie
cd7ce867a7
Split off GMenuModel -> GtkMenuBar code
...
Put this in a separate file and substantially refactor it.
Move handling of submenu creation into gtkmodelmenuitem where it
belongs.
Improve our handling of when to show separators or not.
2011-12-19 12:51:10 -05:00
Ryan Lortie
afb0c098cb
Watch "shell shows menu" settings for changes
...
Correctly monitor the GtkSettings for changes to the
"gtk-shell-shows-app-menu" and "gtk-shell-shows-menubar" properties.
2011-12-19 12:51:10 -05:00
Ryan Lortie
88f16b13f3
GtkSettings: quartz: shell always shows menus
2011-12-19 12:51:10 -05:00
Matthias Clasen
b7de477611
Never add separators to menubars
2011-12-19 12:51:10 -05:00
Ryan Lortie
2e64177e3f
GtkModelMenuItem: don't leak a GVariant
2011-12-19 12:51:10 -05:00
Ryan Lortie
f83530ae3a
GtkModelMenuItem: omit indicator if not required
...
GtkModelMenuItem, being based on GtkCheckMenuItem, was always reserving
space for a check/radio indicator. This ends up looking pretty strange
in a GtkMenuBar.
Don't reserve space for the indicator unless it's appropriate.
2011-12-19 12:51:10 -05:00
Ryan Lortie
de53b5226d
GtkApplicationWindow: nuke some g_print spew
2011-12-19 12:51:10 -05:00
Ryan Lortie
f0c2ff39fc
GtkApplcationWindow: plug two obvious leaks
2011-12-19 12:51:10 -05:00
Colin Walters
c7e7237559
GtkApplicationWindow: Consistently unparent menubar
...
We create it floating, and don't hold an extra ref, so we should
just unparent it.
2011-12-19 12:51:10 -05:00
Ryan Lortie
c299963428
GtkApplicationWindow: clean up menubar logic
2011-12-19 12:51:10 -05:00
Ryan Lortie
612e24dfc6
introduce GtkModelMenuItem
...
This GtkMenuItem subclass (and GActionObserver implementation) contains
all the knowledge necessary for converting a GMenuModel item description
into a GtkMenuItem.
Remove much of the code that used to do this from
gtkapplicationwindow.c.
2011-12-19 12:51:09 -05:00
Ryan Lortie
ecfdb834c9
GtkSettings: add shell-shows-menubar property
...
Unity will set this to tell us that it is going to handle displaying the
menubar.
2011-12-19 12:51:09 -05:00
Matthias Clasen
45e9d09eab
Only add separators when a section actually ends
2011-12-19 12:51:09 -05:00
Colin Walters
2c6b7eff17
GtkApplicationWindow: Further sanitize handling of merging app menu and menubar
...
The _set_show_app_menu should really be _set_show_menubar().
Also, correctly display just the window menu in the window when run
under GNOME 3.
2011-12-19 12:51:09 -05:00
Colin Walters
65a2962733
GtkApplication: Merge app menu and menubar
...
Change bloatpad to have both an app menu and a menubar.
2011-12-19 12:51:09 -05:00
Matthias Clasen
aae52d4580
GtkApplicationWindow: Make mnemonics work for stateful actions
2011-12-19 12:51:09 -05:00
Colin Walters
3a088d9ac2
GtkApplicationWindow: Don't unref a NULL object
2011-12-19 12:51:09 -05:00
Ryan Lortie
b42308f8e3
Adapt to changes in GLib API
...
g_application_get_menu() -> get_app_menu().
2011-12-19 12:51:09 -05:00
Matthias Clasen
33aaf26dd5
Drop GtkApplicationMenuButton for now
...
This feels premature; we do have the fallback situation covered
adaequately with the menubar, and people can do their own creative
solutions with gtk_application_window_get_menu(), so we don't have
to offer a widget for this right now.
2011-12-19 12:51:09 -05:00
Matthias Clasen
acbda82199
Remove a redundant test
2011-12-19 12:51:09 -05:00
Matthias Clasen
b893247eeb
GtkApplicationMenuButton: add docs
2011-12-19 12:51:09 -05:00
Matthias Clasen
bd30a1c556
Undoccommentify action muxer files
2011-12-19 12:51:09 -05:00
Matthias Clasen
0683f086bb
Whitespace fixes
2011-12-19 12:51:09 -05:00
Matthias Clasen
6d0475df4f
Remove no-longer existing function
2011-12-19 12:51:09 -05:00
Matthias Clasen
f10f3bc7e4
GtkApplicationWindow: more docs
2011-12-19 12:51:09 -05:00
Matthias Clasen
762616dd75
Include gtkapplicationmenubutton.h in gtk.h
2011-12-19 12:51:08 -05:00
Matthias Clasen
65f5a65336
GtkApplicationWindow: mark a string for translation
2011-12-19 12:51:08 -05:00
Matthias Clasen
792c719478
Some coding style fixes
2011-12-19 12:51:08 -05:00
Matthias Clasen
d9c3714fcb
GtkApplication: doc improvement
2011-12-19 12:51:08 -05:00
Matthias Clasen
a6794133aa
Some initial docs
2011-12-19 12:51:08 -05:00
Colin Walters
1eee7fb103
GtkApplicationWindow: Use dispose for GObjects
...
This ensures we break cyclic references.
2011-12-19 12:51:08 -05:00
Colin Walters
9e9e1a9fbf
gtkapplicationwindow: Pick up gtk-shell-shows-app-menu XSetting
...
Calling gtk_application_window_set_show_app_menu() is now an override
for that setting. If you don't call it, we pick up the default.
2011-12-19 12:51:08 -05:00
Ryan Lortie
ddfbe19b23
add GtkApplicationMenuButton
2011-12-19 12:51:08 -05:00
Ryan Lortie
1a97f4b9ef
GtkApplicationWindow: wire up action activations
...
Wire the 'activate_action' and 'change_action_state' vfuncs through to
the GSimpleActionGroup.
2011-12-19 12:51:08 -05:00
Ryan Lortie
af0c1e66ab
gtk.symbols fixes
2011-12-19 12:51:08 -05:00
Ryan Lortie
7e34342899
GtkApplicationWindow: implement GActionMap
2011-12-19 12:51:08 -05:00
Ryan Lortie
a93b9dd1cb
add GtkApplicationWindow
...
This is a GtkWindow subclass that "application windows" will use. Each
is associated with a GtkApplication, has the ability to show menus and
will have its own associated set of actions.
2011-12-19 12:51:08 -05:00
Ryan Lortie
e7ad2f97c8
add GActionMuxer and observer interfaces
...
These were destined for GLib, but they don't really make sense as a
public API. Instead, we'll copy/paste them around between the various
codebases that need to render menus.
2011-12-19 12:51:08 -05:00
Ryan Lortie
f826dd5481
GtkSettings: add shell-shows-app-menu property
...
This is a boolean property that will be set to TRUE if the current
desktop environment is capable of displaying the application menu as
part of the desktop shell.
If it is FALSE then the application will need to display the menu for
itself.
2011-12-19 12:51:08 -05:00
Matthias Clasen
6b7be4a3a2
Add a very bad fallback check
...
...maybe committing this inspires some better solution.
2011-12-19 12:51:07 -05:00
Colin Walters
9c52a73c21
window: Set a _DBUS_APPLICATION_ID X11 window property
...
This will allow gnome-shell to reference it.
2011-12-19 12:51:07 -05:00
Matthias Clasen
5705a330c2
GtkApplication: Insert separators after sections
...
The previous code was only inserting a separator when a new
section was starting right away, which may not always be the
case.
2011-12-19 12:45:51 -05:00
Matthias Clasen
5aee67793f
GtkApplication: Initial attempt at section headings
...
This should be redone to show the label together with the
separator line, somehow. For now, just put the label below
the separator, as a separate item.
2011-12-19 12:45:51 -05:00
Matthias Clasen
92af3d04b8
GtkApplication: use activate for actions here, too
2011-12-19 12:45:51 -05:00
Matthias Clasen
95d9a5e368
Adapt to api changes in GMenuModel
2011-12-19 12:45:51 -05:00
Matthias Clasen
cc24dbe9c7
GtkApplication: add a way to get the appmenu
...
This function either returns a GtkMenu or NULL.
Still to do: detect if the app menu is externally handled.
2011-12-19 12:45:51 -05:00
Matthias Clasen
601b3fca60
Drop an unused variable
2011-12-19 12:45:51 -05:00
Matthias Clasen
3b2f77e2c6
Remove an unneeded include
2011-12-19 12:45:51 -05:00
Matthias Clasen
f13083bf0d
Pass domain to the menu parser
...
This is necessary to make translations in markup work.
2011-12-19 12:45:51 -05:00
Matthias Clasen
1ddaf01aed
Quick-and-dirty GtkBuilder integration
...
This makes GtkBuilder accept a GMenuMarkup tree at the toplevel
(ie with <menu id='foo'> being a child of <interface>) and the resulting
GMenu object can be obtained via gtk_builder_get_object (builder, "foo").
2011-12-19 12:45:50 -05:00
Benjamin Otte
902c5c6979
a11y: emit entry signals immediately
...
We want to emit signals when stuff happens, not sometime later. That way
we can also catch the correct text that was deleted.
https://bugzilla.gnome.org/show_bug.cgi?id=659445
2011-12-19 16:17:14 +01:00
Benjamin Otte
3d4a8dabb2
a11y: implement widget_(un)set in ContainerCell
2011-12-19 16:17:13 +01:00
Benjamin Otte
d2a58446ea
a11y: Make GtkCellAccessible a GtkAccessible
2011-12-19 16:17:13 +01:00
Benjamin Otte
073b4d8bea
accessible: Deprecate gtk_accessible_connect_widget_destroyed()
...
That was an abomination. Also, if people called it twice, you got even
mor signal handlers!
2011-12-19 16:17:13 +01:00
Benjamin Otte
0c1f2f2fc1
widget: Set widget in accessible's constructor
...
No need to add t manually later.
2011-12-19 16:17:13 +01:00
Benjamin Otte
d801b28365
a11y: Don't connect_destroyed anymore
...
It's not used now that set_widget() does the right thing.
2011-12-19 16:17:13 +01:00
Benjamin Otte
1961be9ee9
iconview: Simplify adjustment monitoring for accessible
2011-12-19 16:17:13 +01:00
Benjamin Otte
4652d4c399
a11y: Remove widget_destroyed call
...
GtkAccessible does all of that for us now.
2011-12-19 16:17:13 +01:00
Benjamin Otte
80a0413d40
a11y: Use widget_unset vfunc in treeview
2011-12-19 16:17:13 +01:00
Benjamin Otte
dbc1581376
accessible: Ensure we unset the widget when finalizing
2011-12-19 16:17:13 +01:00
Benjamin Otte
03a63def24
widget: Unref accessible
2011-12-19 16:17:13 +01:00
Benjamin Otte
7b5b678e2e
a11y: Fix crash in notebook
...
When the accessible was disposed before the notebook it referenced, the
weak ref could still trigger. This works around it.
2011-12-19 16:17:13 +01:00
Benjamin Otte
e042462674
widget: Unset self from accessible
2011-12-19 16:17:13 +01:00
Benjamin Otte
23b5f9c066
widget: Unset widget on accessibles
2011-12-19 16:17:13 +01:00
Benjamin Otte
075cc5dd36
accesible: Manage the DEFUNCT state
...
A GtkAccessible with a NULL widget is defunct, there's no way around it.
2011-12-19 16:17:12 +01:00
Benjamin Otte
1305815bde
iconview: Split out iconview accessible
2011-12-19 16:17:12 +01:00
Benjamin Otte
eb27c61878
accessible: Use set_widget() in destroy notify
...
We don't want to bypass the unset_widget call.
2011-12-19 16:17:12 +01:00
Benjamin Otte
bac73e48db
API: accessible: Add widget_set and widget_unset vfuncs
...
I expect them to be used a lot, so this approach seems better than
requiring signals that connect to "notify::widget". Also, we can't use
regular functions (like dispose or constructed), becaiuse those assume
that (un)setting of the widget only happens once and with the current
design (a puble set_widget() function) we can't really guarantee that.
Also, I split them into two separate functions as one function is part
of construction and the other part of destruction of the object. And it
doesn't sound like a good idea to have that both be part of one
function.
2011-12-19 16:17:12 +01:00
Benjamin Otte
50431be274
accessible: At an important note to the docs
...
I wanted to use weak refs to ensure this instead, but it's a performance
problem when used in the treeview and each and every cell adds a weak
ref to the treeview.
2011-12-19 16:17:12 +01:00
Benjamin Otte
5789fd983b
accessible: Check the widgeyt actually changed when setting
2011-12-19 16:17:12 +01:00
Benjamin Otte
1998a63917
accessible: Make widget a property
2011-12-19 16:17:12 +01:00