[latexila: 7/8] TabInfoBar: remove icon
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [latexila: 7/8] TabInfoBar: remove icon
- Date: Sat, 22 Oct 2016 08:48:41 +0000 (UTC)
commit a94455e51e0455a3052616348f753f03fc69d713
Author: Sébastien Wilmet <swilmet gnome org>
Date: Sat Oct 22 10:43:16 2016 +0200
TabInfoBar: remove icon
Just the text message is good.
src/tab_info_bar.vala | 31 ++++---------------------------
1 files changed, 4 insertions(+), 27 deletions(-)
---
diff --git a/src/tab_info_bar.vala b/src/tab_info_bar.vala
index 3f4fbe7..a7efea3 100644
--- a/src/tab_info_bar.vala
+++ b/src/tab_info_bar.vala
@@ -23,36 +23,11 @@ public class TabInfoBar : Gtef.InfoBar
{
public TabInfoBar (string primary_msg, string secondary_msg, MessageType msg_type)
{
- Box content_area = get_content_area () as Box;
-
- // icon
- string icon_name;
- switch (msg_type)
- {
- case MessageType.ERROR:
- icon_name = "dialog-error";
- break;
- case MessageType.QUESTION:
- icon_name = "dialog-question";
- break;
- case MessageType.WARNING:
- icon_name = "dialog-warning";
- break;
- case MessageType.INFO:
- default:
- icon_name = "dialog-information";
- break;
- }
-
- Image image = new Image.from_icon_name (icon_name, IconSize.DIALOG);
- image.set_valign (Align.START);
- content_area.pack_start (image, false, false, 0);
+ set_message_type (msg_type);
- // text
Grid grid = new Grid ();
grid.orientation = Orientation.VERTICAL;
grid.set_row_spacing (10);
- content_area.pack_start (grid);
Label primary_label = Gtef.InfoBar.create_label ();
primary_label.set_markup ("<b>" + primary_msg + "</b>");
@@ -62,7 +37,9 @@ public class TabInfoBar : Gtef.InfoBar
secondary_label.set_markup ("<small>" + secondary_msg + "</small>");
grid.add (secondary_label);
- set_message_type (msg_type);
+ Box content_area = get_content_area () as Box;
+ content_area.pack_start (grid);
+
show_all ();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]