[gedit] Don't use an icon in the info bars



commit 7a4e8dd6f13a1546b55db7f937c9d3e0c88005be
Author: William Jon McCann <william jon mccann gmail com>
Date:   Mon Jul 15 09:50:25 2013 -0400

    Don't use an icon in the info bars

 gedit/gedit-io-error-info-bar.c |   56 ++++++--------------------------------
 1 files changed, 9 insertions(+), 47 deletions(-)
---
diff --git a/gedit/gedit-io-error-info-bar.c b/gedit/gedit-io-error-info-bar.c
index b15944d..87f3d9d 100644
--- a/gedit/gedit-io-error-info-bar.c
+++ b/gedit/gedit-io-error-info-bar.c
@@ -94,13 +94,11 @@ set_contents (GtkWidget *area,
 }
 
 static void
-set_info_bar_text_and_icon (GtkWidget   *info_bar,
-                           const gchar *icon_name,
-                           const gchar *primary_text,
-                           const gchar *secondary_text)
+set_info_bar_text (GtkWidget   *info_bar,
+                  const gchar *primary_text,
+                  const gchar *secondary_text)
 {
        GtkWidget *hbox_content;
-       GtkWidget *image;
        GtkWidget *vbox;
        gchar *primary_markup;
        gchar *secondary_markup;
@@ -109,10 +107,6 @@ set_info_bar_text_and_icon (GtkWidget   *info_bar,
 
        hbox_content = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
 
-       image = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_DIALOG);
-       gtk_box_pack_start (GTK_BOX (hbox_content), image, FALSE, FALSE, 0);
-       gtk_widget_set_valign (image, GTK_ALIGN_START);
-
        vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
        gtk_box_pack_start (GTK_BOX (hbox_content), vbox, TRUE, TRUE, 0);
 
@@ -157,10 +151,9 @@ create_io_loading_error_info_bar (const gchar *primary_text,
        gtk_info_bar_set_message_type (GTK_INFO_BAR (info_bar),
                                       GTK_MESSAGE_ERROR);
 
-       set_info_bar_text_and_icon (info_bar,
-                                   "dialog-error",
-                                   primary_text,
-                                   secondary_text);
+       set_info_bar_text (info_bar,
+                          primary_text,
+                          secondary_text);
 
        if (recoverable_error)
        {
@@ -469,7 +462,6 @@ create_conversion_error_info_bar (const gchar *primary_text,
 {
        GtkWidget *info_bar;
        GtkWidget *hbox_content;
-       GtkWidget *image;
        GtkWidget *vbox;
        gchar *primary_markup;
        gchar *secondary_markup;
@@ -504,11 +496,6 @@ create_conversion_error_info_bar (const gchar *primary_text,
 
        hbox_content = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
 
-       image = gtk_image_new_from_icon_name ("dialog-error",
-                                             GTK_ICON_SIZE_DIALOG);
-       gtk_box_pack_start (GTK_BOX (hbox_content), image, FALSE, FALSE, 0);
-       gtk_widget_set_valign (image, GTK_ALIGN_START);
-
        vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
        gtk_box_pack_start (GTK_BOX (hbox_content), vbox, TRUE, TRUE, 0);
 
@@ -735,7 +722,6 @@ gedit_file_already_open_warning_info_bar_new (GFile *location)
 {
        GtkWidget *info_bar;
        GtkWidget *hbox_content;
-       GtkWidget *image;
        GtkWidget *vbox;
        gchar *primary_markup;
        gchar *secondary_markup;
@@ -778,11 +764,6 @@ gedit_file_already_open_warning_info_bar_new (GFile *location)
 
        hbox_content = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
 
-       image = gtk_image_new_from_icon_name ("dialog-warning",
-                                             GTK_ICON_SIZE_DIALOG);
-       gtk_box_pack_start (GTK_BOX (hbox_content), image, FALSE, FALSE, 0);
-       gtk_widget_set_halign (image, GTK_ALIGN_START);
-
        vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
        gtk_box_pack_start (GTK_BOX (hbox_content), vbox, TRUE, TRUE, 0);
 
@@ -825,7 +806,6 @@ gedit_externally_modified_saving_error_info_bar_new (GFile        *location,
 {
        GtkWidget *info_bar;
        GtkWidget *hbox_content;
-       GtkWidget *image;
        GtkWidget *vbox;
        gchar *primary_markup;
        gchar *secondary_markup;
@@ -868,11 +848,6 @@ gedit_externally_modified_saving_error_info_bar_new (GFile        *location,
 
        hbox_content = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
 
-       image = gtk_image_new_from_icon_name ("dialog-warning",
-                                             GTK_ICON_SIZE_DIALOG);
-       gtk_box_pack_start (GTK_BOX (hbox_content), image, FALSE, FALSE, 0);
-       gtk_widget_set_valign (image, GTK_ALIGN_START);
-
        vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
        gtk_box_pack_start (GTK_BOX (hbox_content), vbox, TRUE, TRUE, 0);
 
@@ -919,7 +894,6 @@ gedit_no_backup_saving_error_info_bar_new (GFile        *location,
 {
        GtkWidget *info_bar;
        GtkWidget *hbox_content;
-       GtkWidget *image;
        GtkWidget *vbox;
        gchar *primary_markup;
        gchar *secondary_markup;
@@ -966,11 +940,6 @@ gedit_no_backup_saving_error_info_bar_new (GFile        *location,
 
        hbox_content = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
 
-       image = gtk_image_new_from_icon_name ("dialog-warning",
-                                             GTK_ICON_SIZE_DIALOG);
-       gtk_box_pack_start (GTK_BOX (hbox_content), image, FALSE, FALSE, 0);
-       gtk_widget_set_valign (image, GTK_ALIGN_START);
-
        vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
        gtk_box_pack_start (GTK_BOX (hbox_content), vbox, TRUE, TRUE, 0);
 
@@ -1199,10 +1168,9 @@ gedit_externally_modified_info_bar_new (GFile    *location,
        gtk_info_bar_set_message_type (GTK_INFO_BAR (info_bar),
                                       GTK_MESSAGE_WARNING);
 
-       set_info_bar_text_and_icon (info_bar,
-                                       "gtk-dialog-warning",
-                                       primary_text,
-                                       secondary_text);
+       set_info_bar_text (info_bar,
+                          primary_text,
+                          secondary_text);
 
        g_free (primary_text);
 
@@ -1214,7 +1182,6 @@ gedit_invalid_character_info_bar_new (GFile *location)
 {
        GtkWidget *info_bar;
        GtkWidget *hbox_content;
-       GtkWidget *image;
        GtkWidget *vbox;
        GtkWidget *primary_label;
        GtkWidget *secondary_label;
@@ -1254,11 +1221,6 @@ gedit_invalid_character_info_bar_new (GFile *location)
 
        hbox_content = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
 
-       image = gtk_image_new_from_icon_name ("dialog-warning",
-                                             GTK_ICON_SIZE_DIALOG);
-       gtk_box_pack_start (GTK_BOX (hbox_content), image, FALSE, FALSE, 0);
-       gtk_widget_set_valign (image, GTK_ALIGN_START);
-
        vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
        gtk_box_pack_start (GTK_BOX (hbox_content), vbox, TRUE, TRUE, 0);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]