[Xfce4-commits] [xfce/thunar] 03/09: Renamer: Use an infobar for the error message

noreply at xfce.org noreply at xfce.org
Fri Sep 7 03:23:06 CEST 2018


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

a   n   d   r   e       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 7df838f14dd58729cf7ecd4ade7ddb02946aaed2
Author: Sean Davis <smd.seandavis at gmail.com>
Date:   Sat Sep 1 22:03:23 2018 -0400

    Renamer: Use an infobar for the error message
---
 thunar/thunar-renamer-dialog.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/thunar/thunar-renamer-dialog.c b/thunar/thunar-renamer-dialog.c
index 200d9d6..88ff90e 100644
--- a/thunar/thunar-renamer-dialog.c
+++ b/thunar/thunar-renamer-dialog.c
@@ -316,11 +316,11 @@ thunar_renamer_dialog_init (ThunarRenamerDialog *renamer_dialog)
   GtkWidget              *frame;
   GtkWidget              *image;
   GtkWidget              *label;
-  GtkWidget              *hbox;
   GtkWidget              *mbox;
   GtkWidget              *rbox;
   GtkWidget              *vbox;
   GtkWidget              *swin;
+  GtkWidget              *infobar;
   XfceRc                 *rc;
   gchar                 **entries;
   GList                  *providers;
@@ -598,13 +598,13 @@ G_GNUC_END_IGNORE_DEPRECATIONS
       gtk_widget_set_sensitive (swin, FALSE);
 
       /* display an error to the user */
-      hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
-      gtk_container_set_border_width (GTK_CONTAINER (hbox), 12);
-      gtk_container_add (GTK_CONTAINER (frame), hbox);
-      gtk_widget_show (hbox);
+      infobar = gtk_info_bar_new ();
+      gtk_info_bar_set_message_type (GTK_INFO_BAR (infobar), GTK_MESSAGE_ERROR);
+      gtk_container_add (GTK_CONTAINER (frame), infobar);
+      gtk_widget_show (infobar);
 
       image = gtk_image_new_from_icon_name ("dialog-error", GTK_ICON_SIZE_DIALOG);
-      gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
+      gtk_container_add (GTK_CONTAINER (gtk_info_bar_get_content_area (GTK_INFO_BAR (infobar))), image);
       gtk_widget_show (image);
 
       /* TRANSLATORS: You can test this string by temporarily removing thunar-sbr.* from $libdir/thunarx-2/,
@@ -615,7 +615,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
                                "from source, be sure to enable the \"Simple Builtin Renamers\" plugin."));
       gtk_label_set_xalign (GTK_LABEL (label), 0.0f);
       gtk_label_set_selectable (GTK_LABEL (label), TRUE);
-      gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0);
+      gtk_container_add (GTK_CONTAINER (gtk_info_bar_get_content_area (GTK_INFO_BAR (infobar))), label);
       gtk_widget_show (label);
     }
 

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


More information about the Xfce4-commits mailing list