Commit Graph

23735 Commits

Author SHA1 Message Date
9d550fe42a open-with-pk: don't show an error if no apps are found
gnome-packagekit already shows a message dialog for us.
2010-11-23 16:53:22 +01:00
04eb875e86 open-with-diaolog: set the default text according to the dialog mode 2010-11-23 16:53:22 +01:00
1be137ae9f open-with-widget: let the default fallback text be customizable
We'll set it from the dialog.
2010-11-23 16:53:22 +01:00
44ef183fa1 tests: update to the new API 2010-11-23 16:53:22 +01:00
2cb1b7e891 open-with: move the "Show more applications" button in the dialog
It doesn't really belong in the widget now that we have the new states.
2010-11-23 16:53:22 +01:00
4cfe121296 open-with-dialog: remove automatic setting of support-for-type
We don't want to hardcode any kind of policy in these widgets/dialogs from
now on.
2010-11-23 16:53:22 +01:00
3b6941f087 open-with: add a public _refresh() method
This can be useful now that we're splitting some items from the widget.
2010-11-23 16:53:22 +01:00
f12ff4b676 open-with-widget: move to a property-based state
We can enable on-demand one of the three sections (recommended,
fallback, other apps) or use the special ALL property to display everything
uncategorized.

These properties are also easily bindable from outside.
2010-11-23 16:53:17 +01:00
09b8d37b8a open-with-dialog: use misc_set_alignment instead of widget_set_halign 2010-11-23 16:51:41 +01:00
e7194c31a7 open-with-pk: don't set error if the user cancelled the installation 2010-11-23 16:51:40 +01:00
9df2c0910d open-with-dialog: integrate the online capability 2010-11-23 16:51:40 +01:00
d4e1dd9734 open-with: add a PackageKit module for online lookup of applications
It's implemented with a GIOExtensionPoint, which has two
implementations:
- a dummy one, which just errors out
- a PackageKit one, which looks up for the specified content type using
  the PK DBus API and GDBus.

The PK module is optional, and can be compiled out at configure time.

TODO: a Win32 implementation of the module.
2010-11-23 16:51:40 +01:00
86a8f99806 open-with-widget: don't forget to set the search column
Otherwise find-as-you-type won't work at all.
2010-11-23 16:51:40 +01:00
4becd25bf5 open-with-widget: don't sort by name recommended apps 2010-11-23 16:51:40 +01:00
9bbbfe3aa8 Using italics here actually introduces more visual clutter than anything 2010-11-23 16:51:40 +01:00
370ecf0ee8 Use Related instead of the somewhat jargonny fallback 2010-11-23 16:51:40 +01:00
3c7e6cd49c Use other instead of more
More doesn't make sense when there are no apps in the list and
they aren't just more apps they are apps in another category.
2010-11-23 16:51:40 +01:00
8ea4faf0d3 The colon is a bit unneccessary and looks a bit ugly 2010-11-23 16:51:40 +01:00
1226070b93 Improve wording of no apps text 2010-11-23 16:51:40 +01:00
076e851c5f Add some window border to test open with 2010-11-23 16:51:40 +01:00
04452df476 Add a default file to open with test 2010-11-23 16:51:40 +01:00
d09550b2d2 Simplify title and heading 2010-11-23 16:51:40 +01:00
8b16f73f88 open-with-widget: don't set border in the widget box 2010-11-23 16:51:40 +01:00
9a1cd83933 open-with-widget: add support for fallback applications
Needs some new API in GIO, which is not yet merged.
2010-11-23 16:51:40 +01:00
a443eb8602 open-with-dialog: remove old declarations 2010-11-23 16:51:40 +01:00
1bb2a1b9ec open-with: remove obsolete code 2010-11-23 16:51:39 +01:00
9150f6b13a open-with-widget: simplify code a bit 2010-11-23 16:51:39 +01:00
a6a56d4194 open-with-widget: add a "Show more applications" button
So that we don't always show them all unconditionally in HEADINGS mode.
2010-11-23 16:51:39 +01:00
7d8e7e5f1d open-with-widget: make the list more pretty
Use bigger icons, with bold names and italic descriptions next to them.
2010-11-23 16:51:39 +01:00
9ffe52c049 open-with-dialog: don't ever show_all()
As there might be some elements in the widget that we don't want to
always show.
2010-11-23 16:51:39 +01:00
254cc6aca6 open-with-widget: add a context menu for recommended entries
We can put "Forget association" there, which removes the application
from the recommended list.
2010-11-23 16:51:39 +01:00
f8a6ac5429 tests: update to new API 2010-11-23 16:51:39 +01:00
2f5073fbb3 open-with-dialog: remove the mode from the dialog, we won't use it anymore
According to the new design, the dialog should automatically do the
right thing wrt. app association and default handling.
2010-11-23 16:51:39 +01:00
cf25ec8fa7 open-with: first attempt to split the dialog into a widget + interface
Like GtkFileChooser does; GtkOpenWith is a generic interface, which is
now implemented by both GtkOpenWithDialog and GtkOpenWithWidget (and in
the future also by GtkOpenWithComboBox).
2010-11-23 16:51:39 +01:00
9d6055d0c8 tests: use new open with mode in the tests 2010-11-23 16:51:39 +01:00
a4283d7bab open-with: turn the show_all_applications boolean into an enum
We have three modes of showing applications now:
- RECOMMENDED mode: shows only the recommended applications
- ALL mode: shows all applications, uncategorized
- HEADINGS: shows headings for recommended and other applications
  (default).
2010-11-23 16:51:39 +01:00
77b5fcfa93 open-with: add docs and integrate with the build GTK+ conventions 2010-11-23 16:51:39 +01:00
8c8f7f83ba open-with: add gtk_open_with_dialog_get_mode() 2010-11-23 16:51:39 +01:00
df8ccfb800 open-with: change the API to make it symmetric for GFile or content-type
It's much more convenient this way.
2010-11-23 16:51:39 +01:00
3a6b936573 tests: rewrite the GtkOpenWithDialog test to make it more interactive
Now you can play with all the options provided by GtkOpenWithDialog API.
2010-11-23 16:51:39 +01:00
accb766db2 open-with: add misc utility API to the dialog
- _set/get_show_other_applications() is a way to only display
  recommended applications in the dialog
- _set/get_show_set_as_default_button() is a way to control the
  "Remember this application" checkbox

We also get rid of he "application-selected" signal, in favour of a
_get_selected_application() API inspired by GtkFileChooser.
2010-11-23 16:51:38 +01:00
a8cf63cc84 open-with: add xpadding to the treeview renderers
We use a GtkCellRenderer hack for this.
2010-11-23 16:51:38 +01:00
ee9a7a3baf open-with: cope with NULL GAppInfo
It's not that the GAppInfo can actually be NULL, but we use the store to
save headings too, which have no GAppInfo in their rows.
2010-11-23 16:51:38 +01:00
1d67b4ac26 open-with: don't override the class signal handler, as it's RUN_LAST
And explain why in a comment; basically we want our handler to always
run before client code.
2010-11-23 16:51:38 +01:00
c8ea415873 open-with: don't use gtk_misc_* functions
They're so passe'!
2010-11-23 16:51:38 +01:00
3d044a7c3e open-with: add a "show-other-applications" property
This is useful for use-cases where showing a list of all the installed
applications can be confusing. We can control that with a property now.
2010-11-23 16:51:38 +01:00
be18ca45f0 open-with: initial implementation of GtkOpenWithDialog 2010-11-23 16:51:38 +01:00
fad1bc0de4 tests: Fixed argument naming inconsistancy 2010-11-23 10:49:44 +01:00
6c6b493926 iconcache: Ensure we don't lose data on power loss
fsync() should ensure our data hits disk; since corrupt icon
caches break all apps, we need to ensure it's valid.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=635307
2010-11-22 20:49:59 +01:00
323df2b280 Make gdk_event_apply_filters safe against changes in filter list
An event filter may add or remove filters itself.  This patch does
two things to address this case.  The first is to take a temporary
reference to the filter while it is being used.  The second is
to wait until after the filter function is run before determining
the next node in the list to process.  This guards against
changes to the next node.  It also does not run functions
that have been marked as removed.  Though I'm not sure if this
case can arise.

https://bugzilla.gnome.org/show_bug.cgi?id=635380
2010-11-22 13:16:24 -05:00