Commit Graph

178 Commits

Author SHA1 Message Date
Matthias Clasen
624ec0fb7d Add a style class for context menus
Attached widgets inherit from the style of the widget they are
attached to. This can sometimes have unintended consequences,
like a context menu in the main view of gedit inheriting the font
that is configured for documents, or the context menu of the preview
in the font chooser coming up with humongous font size.

To fix this problem, we introduce a context menu style class
and use it for all menus that are used like that. The theme
can then set a font for this style class.

https://bugzilla.gnome.org/show_bug.cgi?id=697127
2013-08-18 13:46:48 -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
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
dae6afc847 Deprecate and ignore timeout-expand setting 2013-07-11 17:08:15 -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
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
02c793f24a Start migrating internals away from GtkStock 2013-06-24 22:20:49 -04:00
Alban Browaeys
b08fe39cd8 GtkPlacesSidebar: do not unref mount
Do not unref mount has we grabbed its pointer without taking
a reference.
Otherwise the following call to g_list_free_full on network_mounts
frees it a second time. Segfault in nautilus ensue.

https://bugzilla.gnome.org/show_bug.cgi?id=700979
2013-05-26 00:03:13 -04:00
Federico Mena Quintero
dc2f399dd0 GtkPlacesSidebar: Only create bookmarks for folders, not files
https://bugzilla.gnome.org/show_bug.cgi?id=561221
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-05-22 17:22:28 -05:00
Joe Pea
67c8ebc5d5 GtkPlacesSidebar: Fixed tooltip capitalization
Use sentence capitalization for the tooltip on the file system disk under Devices.
https://bugzilla.gnome.org/show_bug.cgi?id=698933
2013-05-13 05:47:05 -04:00
Kalev Lember
34c0deb006 GtkPlacesSidebar: Fix an uninitialized variable in the error code path
Initialize it to NULL early so that we won't try to free an
uninitialized variable when handling an error.
2013-05-07 14:01:54 +02:00
Matthias Clasen
c6894cd606 Try this again
When the hostnamed call is cancelled, we get a G_IO_ERROR_CANCELLED
error back. Handle it properly.
2013-05-02 09:29:35 -04:00
Matthias Clasen
f7f63ae3ee Revert "Remove a superfluous ref"
This reverts commit f326c0eac8.

Grr, turns out that cancelling is not that reliable :-(
2013-05-02 08:23:58 -04:00
Matthias Clasen
f326c0eac8 Remove a superfluous ref
If we cancel the call in dispose, no need to ref the object
we pass as userdata. Avoids the risk of leaking the ref if
the call is actually canceled.
2013-05-02 05:53:40 -04:00
Matthias Clasen
2f0a5dd541 GtkPlacesSidebar: Correct all since tags 2013-05-01 21:19:37 -04:00
Federico Mena Quintero
5322420145 Use friendlier property names for Glade 2013-04-22 15:46:59 -04:00
Federico Mena Quintero
9b91e06513 Oops, only show 'Connect to server' if the caller enabled it 2013-04-21 18:20:46 -04:00
Federico Mena Quintero
9d8e3be6d7 Add a selected_volume argument to ::populate-popup
Nautilus needs this in order to implement a Format command for a volume's popup menu.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-04-21 12:41:33 -04:00
Federico Mena Quintero
9ded1c0c99 Sync from nautilus commit 500770e8de18b07392ffa4435372525d5d03c688
Add a Connect to Server menu item, a show-connect-to-server property, and a show-connect-to-server signal.
2013-04-20 19:14:59 -04:00
Federico Mena Quintero
2d84ebeeb8 Remove the switch location timer during drag_leave
So that hovering in and out of the sidebar quickly doesn't cause a location change in the caller.
2013-04-20 16:21:33 -04:00
Cosimo Cecchi
e9c4dcd3f8 Sync from nautilus commit d2bfffc574c1e6305d862c041b35c9c45ba67674
Coding style fix.
2013-04-20 15:59:04 -04:00
Cosimo Cecchi
755e37ffdf Sync from nautilus commit 277a6a45bee8186b2493ad1b286234ac52f1aed8
Use gtk_tree_view_set_activate_on_single_click().
2013-04-20 15:58:55 -04:00
William Jon McCann
fa1f7d3f97 Sync nautilus commit 95400548176688f3d2f5e8888f48410756bd96b8
Switch location on hovering the places sidebar during a DnD operation -
kind of for spring-loaded folders.
2013-04-20 15:56:59 -04:00
Federico Mena Quintero
3b34e70f13 Remove the drop feedback row a little time after drag_leave
Since ::drag-leave gets emitted before ::drag-drop, we can't just remove the drop feedback row
in drag-leave, as we *need* it during drag-drop.  So, we use the same trick as in testdnd.c - we
install a timeout handler in our drag-leave callback, and remove the feedback in the timeout callback.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-04-20 14:53:03 -04:00
Federico Mena Quintero
9c38ff7dfb Drop in the right place when the feedback row is active
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-04-20 14:53:03 -04:00
Federico Mena Quintero
3083308d1c Actually use the drop_state, instead of encoding things in new_bookmark_index
This lets us keep the new_bookmark_index untouched even when the drop state goes from armed to unarmed.
That will in turn let us drop in the right place...

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-04-20 11:42:04 -04:00
Federico Mena Quintero
a1b9bf7fbc Adjust the drag destination row when it is above the currently highlighted row
This makes the feedback accurate and without hysteresis.  Haven't I written this code ten times before?

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-04-19 17:24:03 -05:00
Federico Mena Quintero
3815f5d956 Dropping on the feedback row is always possible
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-04-19 17:24:03 -05:00
Federico Mena Quintero
bc0a9a33b0 Add a temporary row for feedback when inserting a bookmark is possible
We'll prettify this gradually.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-04-19 17:23:55 -05:00
Federico Mena Quintero
624b352d77 Move the drop feedback code to stub functions
For now it is the old, simple call to gtk_tree_view_set_drag_dest_row().  We'll do something
fancier in the following commits.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-04-19 11:30:23 -05:00
Federico Mena Quintero
7d52dff5ec Add a DropState enum to the internal state of the sidebar
We want to show a little animation when a DnD operation is happening and the user hovers
between existing bookmarks.  The animation should indicate the user that he's about to
create a new bookmark from the file right there.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-04-19 11:20:13 -05:00
Federico Mena Quintero
456c318f6e Remove unused #define 2013-04-11 20:42:43 -05:00
Federico Mena Quintero
d3985dec1d GtkPlacesSidebar: Hold a reference to the sidebar while a D-Bus proxy is being created
The creation is async, and the sidebar could be destroyed while the D-Bus proxy is being created.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-04-11 20:04:53 -05:00
Federico Mena Quintero
0ae26b94f2 Remove a NULL-GError that is no longer useful
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-02-27 18:12:20 -06:00
Federico Mena Quintero
63b9598b51 Don't use inout ints in the drag-action-requested signal
It's not friendly to bindings, and we didn't need an inout parameter anyway.
We use a simple return value from the signal handler now.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-02-27 14:39:39 -06:00
Federico Mena Quintero
bc38811645 Remove a couple of FIXMEs 2013-02-27 14:17:10 -06:00
Federico Mena Quintero
a7213e3ccf Disallow drops on the recent:/// item
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-02-27 14:04:33 -06:00
Federico Mena Quintero
3363974c09 Remove temporary debugging code
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-02-27 14:04:23 -06:00
Federico Mena Quintero
6d94f8a56c Don't allow drops in unmounted volumes
Unmounted volumes don't have a URI yet, so we can use that to distinguish them
from within the DnD code.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-02-27 12:16:31 -06:00
Federico Mena Quintero
dbf98bcfeb Properly indicate when new bookmarks are being dropped between other bookmarks
We weren't handling the drag-URIs-as-bookmarks case in drag_motion_callback().

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-02-27 12:08:16 -06:00
Federico Mena Quintero
936045e82b Merge branch 'master' into places-sidebar
Conflicts:
	docs/reference/gtk/gtk-docs.sgml
	gtk/gtkfilechooserdefault.c
	gtk/org.gtk.Settings.FileChooser.gschema.xml
2013-02-13 20:37:36 -06:00
Federico Mena Quintero
04dbec4191 Allow dropping URIs as bookmarks between existing bookmarks
The before-drop machinery was already in place; here we implement the actual
dropping.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-02-05 14:44:58 -06:00
Federico Mena Quintero
46acb933cd Remove the accept-uri-drops property
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-01-29 01:16:09 -06:00
Federico Mena Quintero
fafec940b3 Redo the logic for computing drop positions
Instead of having an accept_uri_drops flag, we'll always advertise as accepting URI drops.
However, we'll see if the caller actually handles the drag-action-requested signal.  If it
does, we'll indeed allow performing file operations when URIs are dropped.  Otherwise,
we'll only allow creating bookmarks from dragged URIs.

Dragging URIs directly into a places item will cause the sidebar to check if the caller
allows file operations.  Dragging URIs between places items will cause the sidebar
to create bookmarks for those URIs instead.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-01-29 01:14:10 -06:00
Federico Mena Quintero
2a35574067 Whitespace cleanups 2013-01-29 01:02:57 -06:00
Federico Mena Quintero
4bff4b025b Reset the treeview drag dest row if the drop is not possible
This keeps the drop indicator line from 'sticking' if you drag a bookmark above
the Bookmarks heading.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-01-25 18:01:42 -06:00
Federico Mena Quintero
f3fb51e96b Remove TODO items that are done 2013-01-24 18:46:07 -06:00
Federico Mena Quintero
fc9489f381 Use GFile in the DnD signals instead of URIs
The rest of the public API works in terms of GFile, so remove this last remnant
of passing URIs around.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-01-21 17:59:44 -06:00
Cosimo Cecchi
a8f3465181 Add some missing annotations 2013-01-21 18:23:25 -05:00