[baobab] Consistently use property assignment instead of getters/setters
- From: Stefano Facchini <sfacchini src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [baobab] Consistently use property assignment instead of getters/setters
- Date: Sat, 22 Jun 2013 20:49:39 +0000 (UTC)
commit 77402231f73c7fc968669f9d7ac13b37a3bd9cfb
Author: Stefano Facchini <stefano facchini gmail com>
Date: Sat Jun 22 22:55:53 2013 +0200
Consistently use property assignment instead of getters/setters
src/baobab-location-list.vala | 7 +++----
src/baobab-window.vala | 10 +++++-----
2 files changed, 8 insertions(+), 9 deletions(-)
---
diff --git a/src/baobab-location-list.vala b/src/baobab-location-list.vala
index baa4d8c..c15edf7 100644
--- a/src/baobab-location-list.vala
+++ b/src/baobab-location-list.vala
@@ -51,7 +51,6 @@ namespace Baobab {
ensure_size_groups ();
image.gicon = location.icon;
- image.set_pixel_size (64);
var escaped = GLib.Markup.escape_text (location.name, -1);
name_label.label = "<b>%s</b>".printf (escaped);
@@ -67,11 +66,11 @@ namespace Baobab {
usage_label.show ();
usage_size_group.add_widget (usage_bar);
- usage_bar.set_max_value (location.size);
+ usage_bar.max_value = location.size;
// Set critical color at 90% of the size
usage_bar.add_offset_value (Gtk.LEVEL_BAR_OFFSET_LOW, 0.9 * location.size);
- usage_bar.set_value (location.used);
+ usage_bar.value = location.used;
usage_bar.show ();
}
}
@@ -96,7 +95,7 @@ namespace Baobab {
monitor.volume_removed.connect (volume_removed);
monitor.volume_added.connect (volume_added);
- set_selection_mode (Gtk.SelectionMode.NONE);
+ selection_mode = Gtk.SelectionMode.NONE;
set_header_func (update_header);
populate ();
diff --git a/src/baobab-window.vala b/src/baobab-window.vala
index 8cb08b7..9900654 100644
--- a/src/baobab-window.vala
+++ b/src/baobab-window.vala
@@ -468,8 +468,8 @@ namespace Baobab {
void message (string primary_msg, string secondary_msg, Gtk.MessageType type) {
infobar.message_type = type;
- infobar_primary_label.set_label ("<b>%s</b>".printf (_(primary_msg)));
- infobar_secondary_label.set_label ("<small>%s</small>".printf (_(secondary_msg)));
+ infobar_primary_label.label = "<b>%s</b>".printf (_(primary_msg));
+ infobar_secondary_label.label = "<small>%s</small>".printf (_(secondary_msg));
infobar.show ();
}
@@ -495,7 +495,7 @@ namespace Baobab {
var window = get_window ();
if (window != null) {
- window.set_cursor (cursor);
+ window.cursor = cursor;
}
foreach (ActionState action_state in actions_while_scanning) {
@@ -514,11 +514,11 @@ namespace Baobab {
if (child == home_page) {
var action = lookup_action ("reload") as SimpleAction;
action.set_enabled (false);
- header_bar.set_title (_("Devices and locations"));
+ header_bar.title = _("Devices and locations");
} else {
var action = lookup_action ("reload") as SimpleAction;
action.set_enabled (true);
- header_bar.set_title (active_location.name);
+ header_bar.title = active_location.name;
}
main_stack.visible_child = child;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]