[gnome-contacts] Update to work with latest vala/glib
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-contacts] Update to work with latest vala/glib
- Date: Tue, 20 Dec 2011 15:57:04 +0000 (UTC)
commit 0be7d1116600db320c29aa1c4126dcd3e1c2d078
Author: Alexander Larsson <alexl redhat com>
Date: Tue Dec 20 16:56:43 2011 +0100
Update to work with latest vala/glib
src/contacts-avatar-menu.vala | 14 +++++++-------
src/contacts-contact-frame.vala | 6 +++---
src/contacts-contact-pane.vala | 10 +++++-----
src/contacts-menu-button.vala | 8 ++++----
src/contacts-new-contact-dialog.vala | 2 +-
src/contacts-utils.vala | 4 ++--
6 files changed, 22 insertions(+), 22 deletions(-)
---
diff --git a/src/contacts-avatar-menu.vala b/src/contacts-avatar-menu.vala
index b7db2bf..52c69bf 100644
--- a/src/contacts-avatar-menu.vala
+++ b/src/contacts-avatar-menu.vala
@@ -20,15 +20,15 @@ using Gtk;
using Folks;
using Gee;
-public class Contacts.AvatarMenu : Menu {
+public class Contacts.AvatarMenu : Gtk.Menu {
private Gnome.DesktopThumbnailFactory thumbnail_factory;
- private MenuItem? menu_item_for_pixbuf (Gdk.Pixbuf? pixbuf, Icon icon) {
+ private Gtk.MenuItem? menu_item_for_pixbuf (Gdk.Pixbuf? pixbuf, Icon icon) {
if (pixbuf == null)
return null;
var image = new Image.from_pixbuf (Contact.frame_icon (pixbuf));
- var menuitem = new MenuItem ();
+ var menuitem = new Gtk.MenuItem ();
menuitem.add (image);
menuitem.show_all ();
menuitem.set_data ("source-icon", icon);
@@ -36,7 +36,7 @@ public class Contacts.AvatarMenu : Menu {
return menuitem;
}
- private MenuItem? menu_item_for_persona (Persona persona) {
+ private Gtk.MenuItem? menu_item_for_persona (Persona persona) {
var details = persona as AvatarDetails;
if (details == null || details.avatar == null)
return null;
@@ -51,7 +51,7 @@ public class Contacts.AvatarMenu : Menu {
return null;
}
- private MenuItem? menu_item_for_filename (string filename) {
+ private Gtk.MenuItem? menu_item_for_filename (string filename) {
try {
var pixbuf = new Gdk.Pixbuf.from_file (filename);
pixbuf = pixbuf.scale_simple (48, 48, Gdk.InterpType.HYPER);
@@ -67,7 +67,7 @@ public class Contacts.AvatarMenu : Menu {
icon_set (icon);
}
- private void pick_avatar_cb (MenuItem menu) {
+ private void pick_avatar_cb (Gtk.MenuItem menu) {
Icon icon = menu.get_data<Icon> ("source-icon");
set_avatar_from_icon (icon);
}
@@ -105,7 +105,7 @@ public class Contacts.AvatarMenu : Menu {
chooser.set_preview_widget_active (true);
}
- private void select_avatar_file_cb (MenuItem menu) {
+ private void select_avatar_file_cb (Gtk.MenuItem menu) {
var chooser = new FileChooserDialog (_("Browse for more pictures"),
(Window)this.get_toplevel (),
FileChooserAction.OPEN,
diff --git a/src/contacts-contact-frame.vala b/src/contacts-contact-frame.vala
index f037c2d..ae0c80b 100644
--- a/src/contacts-contact-frame.vala
+++ b/src/contacts-contact-frame.vala
@@ -27,9 +27,9 @@ public class Contacts.ContactFrame : Frame {
private Pango.Layout? layout;
private int text_height;
private bool popup_in_progress;
- private Menu? menu;
+ private Gtk.Menu? menu;
- private void menu_position (Menu menu, out int x, out int y, out bool push_in) {
+ private void menu_position (Gtk.Menu menu, out int x, out int y, out bool push_in) {
Allocation allocation;
get_allocation (out allocation);
@@ -84,7 +84,7 @@ public class Contacts.ContactFrame : Frame {
push_in = false;
}
- public ContactFrame (int size, Menu? menu = null) {
+ public ContactFrame (int size, Gtk.Menu? menu = null) {
this.size = size;
var image = new Image ();
diff --git a/src/contacts-contact-pane.vala b/src/contacts-contact-pane.vala
index dc9c2cb..e8a7665 100644
--- a/src/contacts-contact-pane.vala
+++ b/src/contacts-contact-pane.vala
@@ -1435,9 +1435,9 @@ public class Contacts.ContactPane : ScrolledWindow {
public Button email_button;
public Button chat_button;
public Button call_button;
- public Menu context_menu;
- private MenuItem link_menu_item;
- private MenuItem delete_menu_item;
+ public Gtk.Menu context_menu;
+ private Gtk.MenuItem link_menu_item;
+ private Gtk.MenuItem delete_menu_item;
public Contact? contact;
@@ -1525,7 +1525,7 @@ public class Contacts.ContactPane : ScrolledWindow {
Gdk.Window window = null;
foreach (var win in event_box.get_window ().get_children ()) {
Widget *w = null;
- win.get_user_data (&w);
+ win.get_user_data (out w);
if (w == event_box) {
window = win;
}
@@ -2034,7 +2034,7 @@ public class Contacts.ContactPane : ScrolledWindow {
top_grid.show_all ();
- context_menu = new Menu ();
+ context_menu = new Gtk.Menu ();
link_menu_item = Utils.add_menu_item (context_menu,_("Add/Remove Linked Contacts..."));
link_menu_item.activate.connect (link_contact);
link_menu_item.set_sensitive (false);
diff --git a/src/contacts-menu-button.vala b/src/contacts-menu-button.vala
index 0b086aa..393cd27 100644
--- a/src/contacts-menu-button.vala
+++ b/src/contacts-menu-button.vala
@@ -19,7 +19,7 @@
using Gtk;
public class Contacts.MenuButton : ToggleButton {
- Menu? menu;
+ Gtk.Menu? menu;
bool popup_in_progress;
public MenuButton (string label) {
@@ -43,7 +43,7 @@ public class Contacts.MenuButton : ToggleButton {
public signal void popup ();
- private void menu_position (Menu menu, out int x, out int y, out bool push_in) {
+ private void menu_position (Gtk.Menu menu, out int x, out int y, out bool push_in) {
Allocation allocation;
get_allocation (out allocation);
@@ -158,10 +158,10 @@ public class Contacts.MenuButton : ToggleButton {
set_active (false);
}
- private void menu_detach (Menu menu) {
+ private void menu_detach (Gtk.Menu menu) {
}
- public void set_menu (Menu? menu) {
+ public void set_menu (Gtk.Menu? menu) {
if (this.menu != null) {
this.menu.show.disconnect (menu_show);
this.menu.hide.disconnect (menu_hide);
diff --git a/src/contacts-new-contact-dialog.vala b/src/contacts-new-contact-dialog.vala
index 2825bec..36aff5f 100644
--- a/src/contacts-new-contact-dialog.vala
+++ b/src/contacts-new-contact-dialog.vala
@@ -114,7 +114,7 @@ public class Contacts.NewContactDialog : Dialog {
menu_button.set_hexpand (false);
menu_button.set_halign (Align.START);
- var menu = new Menu ();
+ var menu = new Gtk.Menu ();
menu_button.set_menu (menu);
Utils.add_menu_item (menu, _("Email")).activate.connect ( () => {
diff --git a/src/contacts-utils.vala b/src/contacts-utils.vala
index 6d00181..f8b47b1 100644
--- a/src/contacts-utils.vala
+++ b/src/contacts-utils.vala
@@ -84,8 +84,8 @@ public class Contacts.Utils : Object {
return null;
}
- public static MenuItem add_menu_item (Menu menu, string label) {
- var mi = new MenuItem.with_label (label);
+ public static Gtk.MenuItem add_menu_item (Gtk.Menu menu, string label) {
+ var mi = new Gtk.MenuItem.with_label (label);
menu.append (mi);
mi.show ();
return mi;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]