[accounts-dialog] Small tweaks to the photo popdown
- From: Matthias Clasen <matthiasc src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [accounts-dialog] Small tweaks to the photo popdown
- Date: Wed, 27 Jan 2010 02:44:54 +0000 (UTC)
commit 7e7afbc6118b143774ed4ccb65617b6b93545979
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Jan 26 21:41:49 2010 -0500
Small tweaks to the photo popdown
src/um-photo-dialog.c | 95 +++++++++++++++++++++++++------------------------
1 files changed, 48 insertions(+), 47 deletions(-)
---
diff --git a/src/um-photo-dialog.c b/src/um-photo-dialog.c
index 81a4814..1835e0f 100644
--- a/src/um-photo-dialog.c
+++ b/src/um-photo-dialog.c
@@ -371,54 +371,9 @@ setup_photo_popup (UmPhotoDialog *um)
menu = gtk_menu_new ();
- menuitem = gtk_menu_item_new_with_label (_("None"));
- gtk_menu_attach (GTK_MENU (menu), GTK_WIDGET (menuitem),
- 0, ROW_SPAN - 1, 0, 1);
- g_signal_connect (G_OBJECT (menuitem), "activate",
- G_CALLBACK (none_icon_selected), um);
- gtk_widget_show (menuitem);
-
- menuitem = gtk_menu_item_new_with_label (_("Browse for more pictures..."));
- gtk_menu_attach (GTK_MENU (menu), GTK_WIDGET (menuitem),
- 0, ROW_SPAN - 1, 1, 2);
- g_signal_connect (G_OBJECT (menuitem), "activate",
- G_CALLBACK (file_icon_selected), um);
- gtk_widget_show (menuitem);
-
-#ifdef HAVE_CHEESE
- um->take_photo_menuitem = gtk_menu_item_new_with_label (_("Take a photograph..."));
- gtk_menu_attach (GTK_MENU (menu), GTK_WIDGET (um->take_photo_menuitem),
- 0, ROW_SPAN - 1, 2, 3);
- g_signal_connect (G_OBJECT (um->take_photo_menuitem), "activate",
- G_CALLBACK (webcam_icon_selected), um);
- gtk_widget_set_sensitive (um->take_photo_menuitem, FALSE);
- gtk_widget_show (um->take_photo_menuitem);
-
- um->monitor = cheese_camera_device_monitor_new ();
- g_signal_connect (G_OBJECT (um->monitor), "added",
- G_CALLBACK (device_added), um);
- g_signal_connect (G_OBJECT (um->monitor), "removed",
- G_CALLBACK (device_removed), um);
- cheese_camera_device_monitor_coldplug (um->monitor);
-#endif /* HAVE_CHEESE */
-
- /* Separator */
- menuitem = gtk_separator_menu_item_new ();
-#ifdef HAVE_CHEESE
- gtk_menu_attach (GTK_MENU (menu), GTK_WIDGET (menuitem),
- 0, ROW_SPAN - 1, 3, 4);
-#else
- gtk_menu_attach (GTK_MENU (menu), GTK_WIDGET (menuitem),
- 0, ROW_SPAN - 1, 2, 3);
-#endif /* HAVE_CHEESE */
- gtk_widget_show (menuitem);
-
x = 0;
-#ifdef HAVE_CHEESE
- y = 5;
-#else
- y = 4;
-#endif /* HAVE_CHEESE */
+ y = 0;
+
error = NULL;
dir = g_dir_open (DATADIR "/pixmaps/faces", 0, &error);
if (dir == NULL) {
@@ -447,6 +402,52 @@ setup_photo_popup (UmPhotoDialog *um)
}
}
g_dir_close (dir);
+
+ image = gtk_image_new_from_icon_name ("stock_person", GTK_ICON_SIZE_DIALOG);
+ menuitem = gtk_menu_item_new ();
+ gtk_container_add (GTK_CONTAINER (menuitem), image);
+ gtk_widget_show_all (menuitem);
+ gtk_menu_attach (GTK_MENU (menu), GTK_WIDGET (menuitem),
+ x, x + 1, y, y + 1);
+ g_signal_connect (G_OBJECT (menuitem), "activate",
+ G_CALLBACK (none_icon_selected), um);
+ gtk_widget_show (menuitem);
+ y++;
+
+ /* Separator */
+ menuitem = gtk_separator_menu_item_new ();
+ gtk_menu_attach (GTK_MENU (menu), GTK_WIDGET (menuitem),
+ 0, ROW_SPAN - 1, y, y + 1);
+ gtk_widget_show (menuitem);
+
+ y++;
+
+#ifdef HAVE_CHEESE
+ um->take_photo_menuitem = gtk_menu_item_new_with_label (_("Take a photo..."));
+ gtk_menu_attach (GTK_MENU (menu), GTK_WIDGET (um->take_photo_menuitem),
+ 0, ROW_SPAN - 1, y, y + 1);
+ g_signal_connect (G_OBJECT (um->take_photo_menuitem), "activate",
+ G_CALLBACK (webcam_icon_selected), um);
+ gtk_widget_set_sensitive (um->take_photo_menuitem, FALSE);
+ gtk_widget_show (um->take_photo_menuitem);
+
+ um->monitor = cheese_camera_device_monitor_new ();
+ g_signal_connect (G_OBJECT (um->monitor), "added",
+ G_CALLBACK (device_added), um);
+ g_signal_connect (G_OBJECT (um->monitor), "removed",
+ G_CALLBACK (device_removed), um);
+ cheese_camera_device_monitor_coldplug (um->monitor);
+
+ y++;
+#endif /* HAVE_CHEESE */
+
+ menuitem = gtk_menu_item_new_with_label (_("Browse for more pictures..."));
+ gtk_menu_attach (GTK_MENU (menu), GTK_WIDGET (menuitem),
+ 0, ROW_SPAN - 1, y, y + 1);
+ g_signal_connect (G_OBJECT (menuitem), "activate",
+ G_CALLBACK (file_icon_selected), um);
+ gtk_widget_show (menuitem);
+
out:
um->photo_popup = menu;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]