[gnome-contacts] build: removed more gtk+ deprecated calls
- From: Erick Pérez Castellanos <erickpc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-contacts] build: removed more gtk+ deprecated calls
- Date: Sat, 15 Feb 2014 17:28:08 +0000 (UTC)
commit 809423d024968a037fb7ad6538494b7f6a39cbea
Author: Erick Pérez Castellanos <erick red gmail com>
Date: Sat Feb 15 10:16:37 2014 -0500
build: removed more gtk+ deprecated calls
src/contacts-avatar-dialog.vala | 6 +++---
src/contacts-contact-pane.vala | 13 +++++++------
src/contacts-new-contact-dialog.vala | 2 +-
3 files changed, 11 insertions(+), 10 deletions(-)
---
diff --git a/src/contacts-avatar-dialog.vala b/src/contacts-avatar-dialog.vala
index c80b7bb..53025f4 100644
--- a/src/contacts-avatar-dialog.vala
+++ b/src/contacts-avatar-dialog.vala
@@ -171,8 +171,8 @@ public class Contacts.AvatarDialog : Dialog {
if (pixbuf != null)
preview.set_from_pixbuf (pixbuf);
else
- preview.set_from_stock ("dialog-question",
- IconSize.DIALOG);
+ preview.set_from_icon_name ("dialog-question",
+ IconSize.DIALOG);
}
chooser.set_preview_widget_active (true);
@@ -292,7 +292,7 @@ public class Contacts.AvatarDialog : Dialog {
frame_grid.add (scrolled);
view_grid = new Grid ();
- scrolled.add_with_viewport (view_grid);
+ scrolled.add (view_grid);
var toolbar = new Toolbar ();
toolbar.get_style_context ().add_class (STYLE_CLASS_INLINE_TOOLBAR);
diff --git a/src/contacts-contact-pane.vala b/src/contacts-contact-pane.vala
index d099a76..d7e6649 100644
--- a/src/contacts-contact-pane.vala
+++ b/src/contacts-contact-pane.vala
@@ -296,7 +296,7 @@ public class Contacts.ContactPane : Notebook {
sheet.margin = 36;
sheet.set_margin_bottom (24);
- main_sw.add_with_viewport (hcenter);
+ main_sw.add (hcenter);
sheet.set_focus_vadjustment (main_sw.get_vadjustment ());
main_sw.get_child ().get_style_context ().add_class ("contacts-main-view");
@@ -334,7 +334,7 @@ public class Contacts.ContactPane : Notebook {
editor.margin = 36;
editor.set_margin_bottom (24);
- main_sw.add_with_viewport (hcenter);
+ main_sw.add (hcenter);
editor.set_focus_vadjustment (main_sw.get_vadjustment ());
main_sw.get_child ().get_style_context ().add_class ("contacts-main-view");
@@ -486,9 +486,7 @@ public class Contacts.ContactPane : Notebook {
}
void show_no_selection_frame () {
- if ( icon_size_from_name ("ULTRABIG") == 0) {
- icon_size_register ("ULTRABIG", 144, 144);
-
+ if (no_selection_frame == null) {
no_selection_frame = new Frame (null);
no_selection_frame.set_shadow_type (ShadowType.NONE);
no_selection_frame.set_size_request (500, -1);
@@ -505,7 +503,10 @@ public class Contacts.ContactPane : Notebook {
box.set_hexpand (true);
box.margin_bottom = 60;
- var image = new Image.from_icon_name ("avatar-default-symbolic", icon_size_from_name ("ULTRABIG"));
+ var icon_theme = IconTheme.get_default ();
+ var pix = icon_theme.load_icon ("avatar-default-symbolic", 144, 0);
+
+ var image = new Image.from_pixbuf (pix);
image.get_style_context ().add_class ("contacts-watermark");
box.add (image);
diff --git a/src/contacts-new-contact-dialog.vala b/src/contacts-new-contact-dialog.vala
index d94f3a0..33a5799 100644
--- a/src/contacts-new-contact-dialog.vala
+++ b/src/contacts-new-contact-dialog.vala
@@ -68,7 +68,7 @@ public class Contacts.NewContactDialog : Dialog {
grid.set_border_width (12);
grid.set_column_spacing (10);
grid.set_row_spacing (4);
- scrolled.add_with_viewport (grid);
+ scrolled.add (grid);
var frame = new Frame (null);
frame.set_size_request (96, 96);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]