From 61b61c3fb75dee78f362558764149e18df75c96a Mon Sep 17 00:00:00 2001 From: Scott Balneaves Date: Wed, 12 Dec 2012 19:21:20 -0600 Subject: First cut at fixing about-me --- capplets/about-me/mate-about-me-dialog.ui | 1512 +--------------------------- capplets/about-me/mate-about-me-password.c | 9 +- capplets/about-me/mate-about-me.c | 35 +- configure.ac | 10 +- 4 files changed, 88 insertions(+), 1478 deletions(-) diff --git a/capplets/about-me/mate-about-me-dialog.ui b/capplets/about-me/mate-about-me-dialog.ui index fdf79b6e..5324d220 100644 --- a/capplets/about-me/mate-about-me-dialog.ui +++ b/capplets/about-me/mate-about-me-dialog.ui @@ -1,29 +1,59 @@ - + - - + + False 5 About Me dialog - False - + True + False vertical 2 + + + True + False + end + + + gtk-close + True + True + True + False + True + + + False + False + 0 + + + + + False + True + end + 0 + + True + False 5 - vertical 12 True + False True + False 12 @@ -46,6 +76,7 @@ True + False 0 Full Name @@ -57,21 +88,25 @@ + True + True 0 True - vertical + False 6 True + False 12 True + False 0 User name: @@ -84,9 +119,12 @@ True + False 0 + True + True 1 @@ -140,6 +178,7 @@ False + True 1 @@ -151,1466 +190,13 @@ - - True - - - True - True - - - True - 12 - vertical - 18 - - - True - vertical - 6 - - - True - 0 - Email - - - - - - False - False - 0 - - - - - True - - - True - - - - False - False - 0 - - - - - True - 2 - 2 - 12 - 6 - - - True - 0 - _Work: - True - email-work-e - - - GTK_FILL - - - - - - True - 0 - _Home: - True - email-home-e - - - 1 - 2 - GTK_FILL - - - - - - True - True - - - 1 - 2 - - - - - - True - True - - - 1 - 2 - 1 - 2 - - - - - - 1 - - - - - 1 - - - - - False - False - 0 - - - - - True - vertical - 6 - - - True - 0 - Telephone - - - - - - False - False - 0 - - - - - True - - - True - - - - False - False - 0 - - - - - True - 2 - 4 - 12 - 6 - - - True - 0 - Wor_k: - True - phone-work-e - - - GTK_FILL - - - - - - True - 0 - Hom_e: - True - phone-home-e - - - 1 - 2 - GTK_FILL - - - - - - True - True - - - 1 - 2 - - - - - - True - True - - - 1 - 2 - 1 - 2 - - - - - - True - True - - - 3 - 4 - 1 - 2 - - - - - - True - True - - - 3 - 4 - - - - - - True - 0 - _Mobile: - True - phone-mobile-e - - - 2 - 3 - 1 - 2 - GTK_FILL - - - - - - True - 0 - Work _fax: - True - phone-work-fax-e - - - 2 - 3 - GTK_FILL - - - - - - 1 - - - - - 1 - - - - - False - False - 1 - - - - - True - vertical - 6 - - - True - 0 - Instant Messaging - - - - - - False - False - 0 - - - - - True - - - True - - - - False - False - 0 - - - - - True - 3 - 4 - 12 - 6 - - - True - 0 - _XMPP: - True - im-jabber-e - - - GTK_FILL - - - - - - True - True - - - 1 - 2 - - - - - - True - True - - - 1 - 2 - 1 - 2 - - - - - - True - 0 - _Yahoo: - True - im-yahoo-e - - - 2 - 3 - GTK_FILL - - - - - - True - 0 - M_SN: - True - im-msn-e - - - 1 - 2 - GTK_FILL - GTK_FILL - - - - - True - 0 - IC_Q: - True - im-icq-e - - - 2 - 3 - GTK_FILL - - - - - - True - 0 - A_IM/iChat: - True - im-aim-e - - - 2 - 3 - 1 - 2 - GTK_FILL - - - - - - True - 0 - _GroupWise: - True - im-groupwise-e - - - 2 - 3 - 2 - 3 - GTK_FILL - - - - - - True - True - - - 1 - 2 - 2 - 3 - - - - - - True - True - - - 3 - 4 - - - - - - True - True - - - 3 - 4 - 1 - 2 - - - - - - True - True - - - 3 - 4 - 2 - 3 - - - - - - 1 - - - - - 1 - - - - - False - False - 2 - - - - - - - True - Contact - - - False - - - - - True - 12 - vertical - 18 - - - True - vertical - - - True - vertical - - - True - 0 - Home - - - - - - False - False - 0 - - - - - True - - - True - - - - False - False - 0 - - - - - True - 4 - 4 - 12 - 6 - - - True - 0 - _Address: - True - addr-street-1 - - - GTK_FILL - - - - - - True - True - automatic - never - in - - - True - True - False - - - - - 1 - 2 - 3 - GTK_FILL - - - - - True - 0 - C_ity: - True - addr-locality-1 - - - 2 - 3 - GTK_FILL - - - - - - True - 0 - _ZIP/Postal code: - True - addr-code-1 - - - 2 - 3 - 1 - 2 - GTK_FILL - - - - - - True - 0 - _State/Province: - True - addr-region-1 - - - 2 - 3 - 2 - 3 - GTK_FILL - - - - - - True - 0 - Co_untry: - True - addr-country-1 - - - 2 - 3 - 3 - 4 - GTK_FILL - - - - - - True - 0 - P._O. box: - True - addr-po-1 - - - 3 - 4 - GTK_FILL - - - - - - True - True - - - 1 - 2 - 3 - 4 - - - - - - True - True - - - 3 - 4 - - - - - - True - True - - - 3 - 4 - 1 - 2 - - - - - - True - True - - - 3 - 4 - 3 - 4 - - - - - - True - True - - - 3 - 4 - 2 - 3 - - - - - - - - - - - - 1 - - - - - 1 - - - - - False - False - 0 - - - - - False - False - 0 - - - - - True - vertical - 6 - - - True - 0 - Work - - - - - - False - False - 0 - - - - - True - - - True - - - - False - False - 0 - - - - - True - 4 - 4 - 12 - 6 - - - True - 0 - A_ddress: - True - addr-street-2 - - - GTK_FILL - - - - - - True - True - automatic - never - in - - - True - True - False - - - - - 1 - 2 - 3 - GTK_FILL - - - - - True - 0 - ZIP/_Postal code: - True - addr-code-2 - - - 2 - 3 - 1 - 2 - GTK_FILL - - - - - - True - 0 - State/Pro_vince: - True - addr-region-2 - - - 2 - 3 - 2 - 3 - GTK_FILL - - - - - - True - 0 - Cou_ntry: - True - addr-country-2 - - - 2 - 3 - 3 - 4 - GTK_FILL - - - - - - True - 0 - P.O. _box: - True - addr-po-2 - - - 3 - 4 - GTK_FILL - - - - - - True - 0 - Ci_ty: - True - addr-locality-2 - - - 2 - 3 - GTK_FILL - - - - - - True - True - - - 1 - 2 - 3 - 4 - - - - - - True - True - - - 3 - 4 - - - - - - True - True - - - 3 - 4 - 1 - 2 - - - - - - True - True - - - 3 - 4 - 2 - 3 - - - - - - True - True - - - 3 - 4 - 3 - 4 - - - - - - - - - - - - 1 - - - - - 1 - - - - - False - False - 1 - - - - - 1 - - - - - True - Address - - - 1 - False - - - - - True - 12 - vertical - 18 - - - True - vertical - 6 - - - True - 0 - Web - - - - - - False - False - 0 - - - - - True - - - True - - - - False - False - 0 - - - - - True - 3 - 2 - 12 - 6 - - - True - 0 - _Home page: - True - web-homepage-e - - - GTK_FILL - - - - - - True - 0 - Web _log: - True - web-weblog-e - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - Cale_ndar: - True - web-calendar-e - - - 2 - 3 - GTK_FILL - - - - - - True - True - - - 1 - 2 - - - - - - True - True - - - 1 - 2 - 1 - 2 - - - - - - True - True - - - 1 - 2 - 2 - 3 - - - - - - 1 - - - - - 1 - - - - - False - False - 0 - - - - - True - vertical - 6 - - - True - 0 - Job - - - - - - False - False - 0 - - - - - True - - - True - - - - False - False - 0 - - - - - True - 6 - 2 - 12 - 6 - - - True - 0 - _Profession: - True - job-profession-e - - - GTK_FILL - - - - - - True - 0 - C_ompany: - True - job-company-e - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - _Manager: - True - job-manager-e - - - 2 - 3 - GTK_FILL - - - - - - True - 0 - _Title: - True - job-title-e - - - 3 - 4 - GTK_FILL - - - - - - True - 0 - _Department: - True - job-dept-e - - - 4 - 5 - GTK_FILL - - - - - - True - 0 - A_ssistant: - True - job-assistant-e - - - 5 - 6 - GTK_FILL - - - - - - True - True - - - 1 - 2 - - - - - - True - True - - - 1 - 2 - 1 - 2 - - - - - - True - True - - - 1 - 2 - 2 - 3 - - - - - - True - True - - - 1 - 2 - 3 - 4 - - - - - - True - True - - - 1 - 2 - 4 - 5 - - - - - - True - True - - - 1 - 2 - 5 - 6 - - - - - - 1 - - - - - 1 - - - - - False - False - 1 - - - - - 2 - - - - - True - Personal Info - - - 2 - False - - - - - 0 - - - - - 1 - - - - - 1 - - - - - True - end - - - gtk-close - True - True - True - False - True - - - False - False - 0 - + False - end - 0 + True + 1 diff --git a/capplets/about-me/mate-about-me-password.c b/capplets/about-me/mate-about-me-password.c index 80f8e4ca..87bf084c 100644 --- a/capplets/about-me/mate-about-me-password.c +++ b/capplets/about-me/mate-about-me-password.c @@ -210,6 +210,7 @@ spawn_passwd (PasswordDialog *pdialog, GError **error) g_set_error (error, PASSDLG_ERROR, PASSDLG_ERROR_BACKEND, + "%s", strerror (errno)); /* Clean up */ @@ -427,7 +428,7 @@ io_watch_stdout (GIOChannel *source, GIOCondition condition, PasswordDialog *pdi GError *error = NULL; gchar *msg = NULL; /* Status error message */ - GtkBuilder *dialog; + GtkBuilder *dialog = NULL; gboolean reinit = FALSE; @@ -722,13 +723,13 @@ passdlg_error_dialog (GtkWindow *parent, const gchar *title, dialog = gtk_message_dialog_new (parent, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, - msg); + "%s", msg); if (title) gtk_window_set_title (GTK_WINDOW (dialog), title); if (details) gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), - details); + "%s", details); gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); } @@ -872,7 +873,7 @@ passdlg_authenticate (GtkButton *button, PasswordDialog *pdialog) static guint passdlg_validate_passwords (PasswordDialog *pdialog) { - GtkBuilder *dialog; + GtkBuilder *dialog = NULL; const gchar *new_password, *retyped_password; glong nlen, rlen; diff --git a/capplets/about-me/mate-about-me.c b/capplets/about-me/mate-about-me.c index 0ef9156f..235e414b 100644 --- a/capplets/about-me/mate-about-me.c +++ b/capplets/about-me/mate-about-me.c @@ -26,7 +26,9 @@ #include #include #include +#if 0 #include +#endif #include #define MATE_DESKTOP_USE_UNSTABLE_API @@ -45,23 +47,26 @@ #define EMAIL_SLOTS 4 typedef struct { +#if 0 EContact *contact; EBook *book; +#endif GtkBuilder *dialog; GtkWidget *enable_fingerprint_button; GtkWidget *disable_fingerprint_button; - GtkWidget *image_chooser; + GtkWidget *image_chooser; GdkScreen *screen; GtkIconTheme *theme; MateDesktopThumbnailFactory *thumbs; +#if 0 EContactAddress *addr1; EContactAddress *addr2; gchar *email[EMAIL_SLOTS]; const gchar *email_types[EMAIL_SLOTS]; - +#endif gboolean have_image; gboolean image_changed; gboolean create_self; @@ -80,6 +85,7 @@ struct WidToCid { guint cid; }; +#if 0 enum { ADDRESS_STREET = 1, ADDRESS_POBOX, @@ -144,7 +150,7 @@ struct WidToCid ids[] = { #define ATTRIBUTE_OTHER "OTHER" static void about_me_set_address_field (EContactAddress *, guint, gchar *); - +#endif /*** Utility functions ***/ static void @@ -154,7 +160,7 @@ about_me_error (GtkWindow *parent, gchar *str) dialog = gtk_message_dialog_new (parent, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, - GTK_BUTTONS_OK, str); + GTK_BUTTONS_OK, "%s", str); gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); @@ -164,6 +170,7 @@ about_me_error (GtkWindow *parent, gchar *str) static void about_me_destroy (void) { +#if 0 e_contact_address_free (me->addr1); e_contact_address_free (me->addr2); @@ -171,13 +178,16 @@ about_me_destroy (void) g_object_unref (me->contact); if (me->book) g_object_unref (me->book); +#endif if (me->dialog) g_object_unref (me->dialog); +#if 0 g_free (me->email[0]); g_free (me->email[1]); g_free (me->email[2]); g_free (me->email[3]); +#endif g_free (me->person); g_free (me->login); @@ -186,6 +196,7 @@ about_me_destroy (void) me = NULL; } +#if 0 static void about_me_update_email (MateAboutMe *me) { @@ -333,6 +344,7 @@ about_me_focus_out (GtkWidget *widget, GdkEventFocus *event, MateAboutMe *unused return FALSE; } + /* * Helpers */ @@ -497,8 +509,15 @@ about_me_load_string_field (MateAboutMe *me, const gchar *wid, guint cid, guint g_signal_connect (widget, "focus-out-event", G_CALLBACK (about_me_focus_out), me); } +#endif + +#if 0 static void about_me_load_photo (MateAboutMe *me, EContact *contact) +#endif + +static void +about_me_load_photo (MateAboutMe *me) { GtkBuilder *dialog; EContactPhoto *photo; @@ -621,6 +640,7 @@ about_me_update_photo (MateAboutMe *me) static void about_me_load_info (MateAboutMe *me) { +#if 0 gint i; if (me->create_self == FALSE) { @@ -638,7 +658,7 @@ about_me_load_info (MateAboutMe *me) for (i = 0; ids[i].wid != NULL; i++) { about_me_load_string_field (me, ids[i].wid, ids[i].cid, i); } - +#endif set_fingerprint_label (me->enable_fingerprint_button, me->disable_fingerprint_button); } @@ -883,6 +903,7 @@ about_me_setup_dialog (void) main_dialog, G_CONNECT_SWAPPED); +#if 0 /* Get the self contact */ if (!e_book_get_self (&me->contact, &me->book, &error)) { if (error->code == E_BOOK_ERROR_PROTOCOL_NOT_SUPPORTED) { @@ -914,6 +935,7 @@ about_me_setup_dialog (void) } else { about_me_setup_email (me); } +#endif me->login = g_strdup (g_get_user_name ()); me->username = g_strdup (g_get_real_name ()); @@ -953,6 +975,7 @@ about_me_setup_dialog (void) g_signal_connect (me->image_chooser, "changed", G_CALLBACK (about_me_image_changed_cb), me); +#if 0 /* Address tab: set up the focus chains */ chain = g_list_prepend (NULL, WID ("addr-country-1")); chain = g_list_prepend (chain, WID ("addr-po-1")); @@ -973,7 +996,7 @@ about_me_setup_dialog (void) widget = WID ("addr-table-2"); gtk_container_set_focus_chain (GTK_CONTAINER (widget), chain); g_list_free (chain); - +#endif about_me_load_info (me); gtk_widget_show_all (main_dialog); diff --git a/configure.ac b/configure.ac index e5b13a93..e345f2ad 100644 --- a/configure.ac +++ b/configure.ac @@ -250,11 +250,11 @@ AC_ARG_ENABLE([aboutme], [enable_aboutme=no]) AC_MSG_RESULT([$enable_aboutme]) -if test "x$enable_aboutme" = "xyes"; then - PKG_CHECK_MODULES(LIBEBOOK, [libebook-1.2 >= 1.7.90], - [AC_DEFINE([HAVE_LIBEBOOK], 1, - [Define if evolution-data-server libebook-1.2 is available])]) -fi +dnl if test "x$enable_aboutme" = "xyes"; then +dnl PKG_CHECK_MODULES(LIBEBOOK, [libebook-1.2 >= 1.7.90], +dnl [AC_DEFINE([HAVE_LIBEBOOK], 1, +dnl [Define if evolution-data-server libebook-1.2 is available])]) +dnl fi AM_CONDITIONAL(BUILD_ABOUTME, test "x$enable_aboutme" = "xyes") -- cgit v1.2.1