From 7b74bcd63520f224930c8cd67561ef811b37ce54 Mon Sep 17 00:00:00 2001 From: Benedikt Roth Date: Thu, 14 Mar 2002 15:46:23 +0000 Subject: Hide the password in the passwort dialog. Correctly load and save the 2002-03-14 Benedikt Roth * mailcheck.c: (get_remote_password), (mailcheck_load_animation), (animation_selected), (applet_load_prefs): Hide the password in the passwort dialog. Correctly load and save the preferences for animation and remote user. Correctly display the animation if there is mail. * mailcheck.schemas: Fix to correctly load/save preferences. * tasklist.schemas: Fix typo. --- mailcheck/ChangeLog | 11 +++++++++++ mailcheck/mailcheck.c | 20 +++++++------------- mailcheck/mailcheck.schemas.in | 4 ++-- 3 files changed, 20 insertions(+), 15 deletions(-) diff --git a/mailcheck/ChangeLog b/mailcheck/ChangeLog index bca6169c6..80e277d15 100644 --- a/mailcheck/ChangeLog +++ b/mailcheck/ChangeLog @@ -1,3 +1,14 @@ +2002-03-14 Benedikt Roth + + * mailcheck.c: (get_remote_password), (mailcheck_load_animation), + (animation_selected), (applet_load_prefs): + Hide the password in the passwort dialog. + Correctly load and save the preferences for animation and remote user. + Correctly display the animation if there is mail. + + * mailcheck.schemas: Fix to correctly load/save preferences. + * tasklist.schemas: Fix typo. + 2002-03-12 Mark McLoughlin * pager.c: (display_help_dialog): update for new docs diff --git a/mailcheck/mailcheck.c b/mailcheck/mailcheck.c index b24f95975..74886616b 100644 --- a/mailcheck/mailcheck.c +++ b/mailcheck/mailcheck.c @@ -219,6 +219,7 @@ get_remote_password (void) gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); entry = gtk_entry_new (); + gtk_entry_set_visibility (GTK_ENTRY (entry), FALSE); gtk_box_pack_start (GTK_BOX (hbox), entry, FALSE, FALSE, 0); gtk_widget_show_all (hbox); @@ -411,6 +412,8 @@ mailcheck_load_animation (MailCheck *mc, const char *fname) return FALSE; else if (mc->frames == 3) mc->report_mail_mode = REPORT_MAIL_USE_BITMAP; + else + mc->report_mail_mode = REPORT_MAIL_USE_ANIMATION; mc->nframe = 0; gdk_pixbuf_render_pixmap_and_mask(pb, @@ -732,7 +735,7 @@ animation_selected (GtkMenuItem *item, gpointer data) load_new_pixmap (mc); panel_applet_gconf_set_string(mc->applet, "animation-file", - mc->animation_file, NULL); + mc->animation_file ? mc->animation_file : "", NULL); } static void @@ -1460,20 +1463,11 @@ check_callback (BonoboUIComponent *uic, gpointer data, const gchar *verbname) static void applet_load_prefs(MailCheck *mc) { - gchar *query; - - query = gnome_program_locate_file ( - NULL, GNOME_FILE_DOMAIN_PIXMAP, - "mailcheck/email.png", FALSE, NULL); - mc->animation_file = panel_applet_gconf_get_string(mc->applet, "animation-file", NULL); - if(!mc->animation_file || strcmp(mc->animation_file, "none")) { + if(!mc->animation_file) { g_free(mc->animation_file); - mc->animation_file = g_strdup(query); + mc->animation_file = NULL; } - - g_free(query); - mc->update_freq = panel_applet_gconf_get_int(mc->applet, "update-frequency", NULL); mc->pre_check_cmd = panel_applet_gconf_get_string(mc->applet, "exec-command", NULL); mc->pre_check_enabled = panel_applet_gconf_get_bool(mc->applet, "exec-enabled", NULL); @@ -1484,7 +1478,7 @@ applet_load_prefs(MailCheck *mc) mc->remote_server = panel_applet_gconf_get_string(mc->applet, "remote-server", NULL); mc->pre_remote_command = panel_applet_gconf_get_string(mc->applet, "pre-remote-command", NULL); mc->remote_username = panel_applet_gconf_get_string(mc->applet, "remote-username", NULL); - if(!mc->remote_username || strcmp(mc->remote_username, "none")) { + if(!mc->remote_username) { g_free(mc->remote_username); mc->remote_username = g_strdup(g_getenv("USER")); } diff --git a/mailcheck/mailcheck.schemas.in b/mailcheck/mailcheck.schemas.in index 05467c842..c205a1642 100644 --- a/mailcheck/mailcheck.schemas.in +++ b/mailcheck/mailcheck.schemas.in @@ -4,7 +4,7 @@ /schemas/apps/mailcheck-applet/prefs/animation-file mailcheck-applet string - none + Path to the animation file This is the animation that will be displayed during normal use of the mailcheck applet @@ -104,7 +104,7 @@ /schemas/apps/mailcheck-applet/prefs/remote-username mailcheck-applet string - none + Username on the remote server Username on the remote server -- cgit v1.2.3