event-widget: remove alarm icon

This tiny icon wasn't really adding any value, but was
cluttering an already information-intensive view.
This commit is contained in:
Georges Basile Stavracas Neto
2017-09-14 13:26:28 -03:00
parent 2a923939d9
commit 766de8c025
2 changed files with 1 additions and 22 deletions
-13
View File
@@ -32,19 +32,6 @@
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkImage" id="alarm_icon">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">alarm-symbolic</property>
<property name="pixel_size">12</property>
<property name="valign">center</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="summary_label">
<property name="visible">True</property>
+1 -9
View File
@@ -38,7 +38,6 @@ struct _GcalEventWidget
GDateTime *dt_end;
/* widgets */
GtkWidget *alarm_icon;
GtkWidget *event_box;
GtkWidget *hour_label;
GtkWidget *main_grid;
@@ -451,9 +450,6 @@ gcal_event_widget_set_event_internal (GcalEventWidget *self,
/* Tooltip */
gcal_event_widget_set_event_tooltip (self, event);
/* Alarm icon */
gtk_widget_set_visible (self->alarm_icon, gcal_event_has_alarms (event));
/* Hour label */
hour_str = get_hour_label (self);
@@ -562,14 +558,12 @@ gcal_event_widget_size_allocate (GtkWidget *widget,
gint minimum_grid_height;
gtk_label_set_line_wrap (GTK_LABEL (self->summary_label), TRUE);
/* This is needed to push the alarm icon to the end of the widget */
gtk_widget_set_hexpand (self->hour_label, TRUE);
gtk_container_child_set (GTK_CONTAINER (self->main_grid),
self->summary_label,
"left-attach", 0,
"top-attach", 1,
"width", 3,
"width", 2,
NULL);
gtk_widget_get_preferred_height (self->event_box, &minimum_grid_height, NULL);
@@ -588,7 +582,6 @@ gcal_event_widget_size_allocate (GtkWidget *widget,
NULL);
gtk_label_set_line_wrap (GTK_LABEL (self->summary_label), FALSE);
gtk_widget_set_hexpand (self->hour_label, FALSE);
}
}
@@ -813,7 +806,6 @@ gcal_event_widget_class_init (GcalEventWidgetClass *klass)
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/calendar/event-widget.ui");
gtk_widget_class_bind_template_child (widget_class, GcalEventWidget, alarm_icon);
gtk_widget_class_bind_template_child (widget_class, GcalEventWidget, event_box);
gtk_widget_class_bind_template_child (widget_class, GcalEventWidget, hour_label);
gtk_widget_class_bind_template_child (widget_class, GcalEventWidget, main_grid);