Commit Graph

15874 Commits

Author SHA1 Message Date
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