[Xfce4-commits] [xfce/thunar] 02/02: Added infobox to preferences in order to inform about missing gvfs implications.

noreply at xfce.org noreply at xfce.org
Wed Sep 12 22:35:03 CEST 2018


This is an automated email from the git hooks/post-receive script.

a   l   e   x       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       x   f   c   e   -   4   .   1   4   
   in repository xfce/thunar.

commit 3b089bd82858378d3bb804027115b6b1ba2aca58
Author: Alexander Schwinn <alexxcons at xfce.org>
Date:   Mon Sep 3 23:28:54 2018 +0200

    Added infobox to preferences in order to inform about missing gvfs
    implications.
---
 thunar/thunar-preferences-dialog.c | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/thunar/thunar-preferences-dialog.c b/thunar/thunar-preferences-dialog.c
index 5d5c81e..101c5fa 100644
--- a/thunar/thunar-preferences-dialog.c
+++ b/thunar/thunar-preferences-dialog.c
@@ -236,6 +236,7 @@ thunar_preferences_dialog_init (ThunarPreferencesDialog *dialog)
   GtkWidget      *hbox;
   GtkWidget      *ibox;
   GtkWidget      *vbox;
+  GtkWidget      *infobar;
   gchar          *path;
   gchar          *date;
 
@@ -755,6 +756,35 @@ thunar_preferences_dialog_init (ThunarPreferencesDialog *dialog)
   gtk_grid_attach (GTK_GRID (grid), label, 0, 1, 1, 1);
   gtk_widget_show (label);
 
+  /* check the most important gvfs-backends, and inform if they are missing */
+  if (!thunar_g_vfs_is_uri_scheme_supported ("trash")    ||
+      !thunar_g_vfs_is_uri_scheme_supported ("computer") || /* support for removable media */
+      !thunar_g_vfs_is_uri_scheme_supported ("sftp") )
+    {
+      frame = g_object_new (GTK_TYPE_FRAME, "border-width", 0, "shadow-type", GTK_SHADOW_NONE, NULL);
+      gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, TRUE, 0);
+      gtk_widget_show (frame);
+
+      label = gtk_label_new (_("Missing dependencies"));
+      gtk_label_set_attributes (GTK_LABEL (label), thunar_pango_attr_list_bold ());
+      gtk_frame_set_label_widget (GTK_FRAME (frame), label);
+      gtk_widget_show (label);
+
+      infobar = gtk_info_bar_new ();
+      gtk_container_set_border_width (GTK_CONTAINER (infobar), 12);
+      label = gtk_label_new (NULL);
+      gtk_label_set_markup (GTK_LABEL (label), _("It looks like <a href=\"https://wiki.gnome.org/Projects/gvfs\">gvfs</a> is not available.\n"
+                                                 "Important features including trash support,\n"
+                                                 "removable media and remote location browsing\n"
+                                                 "will not work. <a href=\"https://docs.xfce.org/xfce/thunar/unix-filesystem#gnome_virtual_file_system\">[Read more]</a>"));
+      vbox = gtk_info_bar_get_content_area (GTK_INFO_BAR (infobar));
+      gtk_container_add (GTK_CONTAINER (vbox), label);
+      gtk_info_bar_set_message_type (GTK_INFO_BAR (infobar), GTK_MESSAGE_WARNING);
+      gtk_widget_show (label);
+      gtk_widget_show (infobar);
+      gtk_container_add (GTK_CONTAINER (frame), infobar);
+    }
+
   /* cleanup */
   g_free (path);
 }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list