Commit Graph

40647 Commits

Author SHA1 Message Date
Matthias Clasen
5cf0bff0ba Fix up the last commit 2014-10-27 08:18:02 -04:00
Matthias Clasen
aa90e6fd02 GtkPopoverMenu: Add API to open a submenu
This allows alternative menu switching to be implemented, besides
the builtin GtkModelButton support.
2014-10-26 19:50:07 -04:00
Matthias Clasen
9b8043be93 Add a scale to the popover menu example
Demonsttrate that this is flexible enough for the intended uses.
2014-10-26 19:50:07 -04:00
Matthias Clasen
78585c9b38 Add documentation
Document GtkModelButton and GtkPopoverMenu.
2014-10-26 19:15:18 -04:00
Matthias Clasen
e0f6605d50 Adapt the testpopover example
Add the required boxes for each submenu. We now need to specify the
submenu name only once per submenu.
2014-10-26 19:15:11 -04:00
Matthias Clasen
e068b048b5 GtkPopoverMenu: Simplify
Change things so each submenu is a single child, and users are
required to create the box themselves.
2014-10-26 19:06:33 -04:00
Matthias Clasen
e449ab5fa3 Adapt the testpopover example
Drop all all explicit role setting from the testpopover example.
2014-10-26 19:06:33 -04:00
Matthias Clasen
4589aec1aa GtkModelButton: Don't require an explicit role
When we have an action-name, we can deduce the role from the
action that is looked up by the action helper.
2014-10-26 19:06:33 -04:00
Matthias Clasen
6b27f63008 Adapt the testpopover example 2014-10-26 19:06:32 -04:00
Matthias Clasen
faa793610a GtkModelButton: Rename action-role to role
Rename action-role to role, and make all properties readable.
2014-10-26 19:06:32 -04:00
Matthias Clasen
4d02a65111 GtkModelButton: Drop unused :accel property 2014-10-26 19:06:32 -04:00
Matthias Clasen
c413ddefc1 Adapt the testpopover example
Drop all uses of has-submenu.
2014-10-26 19:06:32 -04:00
Matthias Clasen
7dcda2a17a Drop GtkModelButton:has-submenu
Replace the has-submenu property with checking menu-name != NULL.
2014-10-26 19:06:32 -04:00
Matthias Clasen
5ce97bb77e Adapt the testpopover example
We now use GtkPopoverMenu, and just add the model buttons
directly to it.
2014-10-26 19:06:32 -04:00
Matthias Clasen
fe0aa6e18c GtkModelButton: Add a menu-name property
Add a menu-name property and use it in a default implementation
of ::clicked to switch menus if we are inside a stack. This means
GtkModelButton is no longer entirely generic, but rather expects
to be used inside a GtkPopoverMenu. It still works in other contexts
too, of course.
2014-10-26 19:06:32 -04:00
Matthias Clasen
44ad311eeb Add GtkPopoverMenu
GtkPopoverMenu is a GtkPopover subclass that has a menu-like stack
built-in.
2014-10-26 19:06:25 -04:00
Matthias Clasen
2fe9779b52 Add a manual popover menu example
Reproduce the testpopover popover manually, by packing model
buttons into a stack in a popover.
2014-10-26 15:12:54 -04:00
Matthias Clasen
660bc6adf6 Make GtkModelButton a better GtkActionable
Rename the "toggled" property to "active", since that is what
GtkActionHelper expects to update for check and radio actions.
Also make the property readable, since GtkActionHelper wants
to read it.
2014-10-26 15:12:54 -04:00
Matthias Clasen
70005e0918 Make GtkModelButton public 2014-10-26 15:12:54 -04:00
Matthias Clasen
f7813deb26 Test h/vhomogenenous in teststack
Add separate checkboxes for hhomogeneous and vhomogeneous.
2014-10-26 15:07:26 -04:00
Matthias Clasen
e41a8cf6fc Use GtkStack:vhomogeneous for popover menus
This allows us to get rid of a size group.
2014-10-26 15:03:58 -04:00
Matthias Clasen
b86356bc1c GtkStack: split homogeneous
Split homogeneous into separate hhomogeneous and vhomogeneous
properties. vhomogeneous is what we want for popover menus.
2014-10-26 14:59:21 -04:00
Timm Bäder
4d075cf202 popover: Use the right area for drawing the background
The border shouldn't be subtracted.
2014-10-26 15:21:06 +01:00
Matthias Clasen
8b6457732f GtkBox: Fix self-assignment for center widget
This is happening when glade is loading ui files containing
center widgets.
2014-10-25 20:30:08 -04:00
Marek Černocký
1376c6b1b7 Updated Czech translation 2014-10-26 00:35:56 +02:00
Marek Černocký
eec161ab3f Updated Czech translation 2014-10-26 00:35:50 +02:00
Matthias Clasen
041ccd7f87 GtkPlacesSidebar: Don't crash on dnd
gtk_get_current_event() can return NULL. Don't crash if it does.

https://bugzilla.gnome.org/show_bug.cgi?id=739150
2014-10-25 16:00:00 -04:00
Matthias Clasen
e35d91d18f Revert "Inspector backend hack"
This reverts commit f88a5dc8c7.

Didn't mean to push this.
2014-10-25 13:58:36 -04:00
Matthias Clasen
9ca9fccace GtkSpinButton: Set the screen on the panel contexts
Failure to do so results in custom styling leaking through in
the inspector. This is pretty obvious, now that the inspector
is using a separate display connection and is generally isolated
from style changes.
2014-10-25 13:31:57 -04:00
Matthias Clasen
f88a5dc8c7 Inspector backend hack 2014-10-25 10:33:22 -04:00
Matthias Clasen
f733fa88f5 Broadway: Remove display assumptions
In various places, the broadway backend was just using
the default display and assumed that it is the broadway
display. That may not be the case in a multi-backend world,
so instead iterate over all displays and use the first
broadway display - still not perfect, but enough to survive
for now.
2014-10-25 10:32:53 -04:00
Matthias Clasen
23641e3103 inspector: Plug a memory leak 2014-10-25 10:00:57 -04:00
Matthias Clasen
bd031b89c1 inspector: Add style classes to the object list
We have a lot of space here now, so show some
useful information.
2014-10-25 10:00:39 -04:00
Matthias Clasen
182dd3c1ea Fix a mixup in popover realization
When the window is on a non-default screen, popover_realize
ended up passing a visual and a parent_window from different
screens into gdk_window_new, which doesn't work. Fix it by
using the visual of the parent window.
2014-10-24 23:36:35 -04:00
Matthias Clasen
a46d4e51f7 inspector: Improve details buttons
Ensure that the details buttons are only sensitive when
we actually have details to show.
2014-10-24 21:52:23 -04:00
Matthias Clasen
70c3241bd3 inspector: Improve tab switching
Switch the object and resource trees away from activate-on-single-click
and add a 'view details' button.
2014-10-24 21:14:16 -04:00
Matthias Clasen
32326f826f X11: Don't assume all displays are X11 displays
When iterating over the list of displays gotten from the
display manager, we have to check if what we got is actually
an X11 display.
2014-10-24 19:05:09 -04:00
Matthias Clasen
4590501854 Properly update the style cascade on screen change
GtkStyleContext was not properly handling the style cascade when
setting a screen, causing the inspector global CSS to affect the
inspector window, even though the inspector is using a different
screen now.
2014-10-24 16:23:07 -04:00
Matthias Clasen
385e6beafe Fix the build
Some forgotten include path adjustments.
2014-10-24 16:12:33 -04:00
Matthias Clasen
c16fa45bfe inspector: Use a separate display connection
This helps isolate the inspector from some of the changes that
it can trigger. To specify a different display, set
GTK_INSPECTOR_DISPLAY to the name of the display to use for
the inspector window. If no display is specified, GTK+ will
use a separate connection to the default display.
2014-10-24 15:57:33 -04:00
Matthias Clasen
fea13fcfc1 Fix a problem with screen changes and csd
When a new screen is set on a window, we unrealize it, to
recreate all the resources. But we don't reset the client_decorated
flag, so realize() doesn't call create_decoration() - which makes
sense, since the decoration already exists. But the side-effect
of create_decoration() is to select the rgba visual, and visuals
are per-screen.

Fix this by looking for the rgba visual in set_screen(), and
replacing it with the rgba visual for the new screen, if necessary.
2014-10-24 15:57:33 -04:00
Benjamin Otte
2002613012 styleproperties: Move into deprecated directory 2014-10-24 21:31:40 +02:00
Benjamin Otte
a51378dda8 styleproperties: Deprecate 2014-10-24 21:31:40 +02:00
Benjamin Otte
433c20e59d styleproperties: Remove header where it's not used 2014-10-24 21:31:40 +02:00
Benjamin Otte
e2a0780543 styleproperties: Remove unused function 2014-10-24 21:31:40 +02:00
Benjamin Otte
a1f7c459b7 css: Disallow bypassing value computation
This special code was added back in the days when computation wasn't
idemptotent. These days it is.

Also, the bypass code path is only used in fallback code that is pretty
much unused.
2014-10-24 21:31:40 +02:00
Benjamin Otte
ec8a29b0c2 css: Remove unneeded header 2014-10-24 21:31:39 +02:00
Daniel Mustieles
40c129f906 Updated Spanish translation 2014-10-24 19:18:54 +02:00
Matthias Clasen
f32ec2e4be widget-factory: Add mnemonics in the prefs dialog
This helps testing the mmemonic label display in the inspector,
and is just good practice.
2014-10-24 08:34:13 -04:00
Matthias Clasen
1aa3000ae6 Inspector: Show more misc info about widgets
This adds clip area, accessible role, mapped, realize,
is-toplevel, child-visible, mnemonic labels and tick
callbacks to the displayed information.
2014-10-24 08:34:13 -04:00