~ubuntu-branches/ubuntu/oneiric/indicator-datetime/oneiric

« back to all changes in this revision

Viewing changes to src/datetime-service.c

  • Committer: Bazaar Package Importer
  • Author(s): Ted Gould
  • Date: 2011-03-23 16:22:50 UTC
  • mfrom: (1.1.12 upstream)
  • Revision ID: james.westby@ubuntu.com-20110323162250-vm2rg7gtciwldlz3
Tags: 0.2.0-0ubuntu1
* New upstream release.
  ∘ Remove unused liboobs
  ∘ Add translator comments and make strings translatable (LP: #737326)
  ∘ Remove password dialog for calendars not the keyring
  ∘ Use default matching when geonames aren't available (LP: #740870)
  ∘ UI Cleanups and naming fixes (LP: #740806, LP: #740819)
  ∘ Free JSON parser data
  ∘ Avoid duplicates in GeoNames data (LP: #740884)
  ∘ Make location completion more robust
* debian/control: Dropping liboobs

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
#include <libical/icaltime.h>
48
48
#include <cairo/cairo.h>
49
49
 
50
 
#include <oobs/oobs-timeconfig.h>
51
 
 
52
50
#include "datetime-interface.h"
53
51
#include "dbus-shared.h"
54
52
#include "settings-shared.h"
254
252
                return FALSE;
255
253
        }
256
254
 
257
 
        /* Note: may require some localization tweaks */
258
 
        strftime(longstr, 128, "%A, %e %B %Y", ltime);
 
255
        /* Translators: strftime(3) style date format on top of the menu when you click on the clock */
 
256
        strftime(longstr, 128, _("%A, %e %B %Y"), ltime);
259
257
        
260
258
        gchar * utf8 = g_locale_to_utf8(longstr, -1, NULL, NULL, NULL);
261
259
        dbusmenu_menuitem_property_set(date, DBUSMENU_MENUITEM_PROP_LABEL, utf8);
373
371
                dbusmenu_menuitem_property_set_bool(calendar, DBUSMENU_MENUITEM_PROP_ENABLED, TRUE);
374
372
                dbusmenu_menuitem_property_set_bool(calendar, DBUSMENU_MENUITEM_PROP_VISIBLE, TRUE);
375
373
 
 
374
                dbusmenu_menuitem_property_set_bool(date, DBUSMENU_MENUITEM_PROP_ENABLED, TRUE);
 
375
                g_signal_connect (G_OBJECT(date), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED,
 
376
                                                  G_CALLBACK (activate_cb), "evolution -c calendar");
 
377
                                                  
376
378
                events_separator = dbusmenu_menuitem_new();
377
379
                dbusmenu_menuitem_property_set(events_separator, DBUSMENU_MENUITEM_PROP_TYPE, DBUSMENU_CLIENT_TYPES_SEPARATOR);
378
380
                dbusmenu_menuitem_child_add_position(root, events_separator, 2);
379
381
                add_appointment = dbusmenu_menuitem_new();
380
 
                dbusmenu_menuitem_property_set (add_appointment, DBUSMENU_MENUITEM_PROP_LABEL, _("Add Appointment"));
 
382
                dbusmenu_menuitem_property_set (add_appointment, DBUSMENU_MENUITEM_PROP_LABEL, _("Add Event..."));
381
383
                dbusmenu_menuitem_property_set_bool(add_appointment, DBUSMENU_MENUITEM_PROP_ENABLED, TRUE);
382
384
                g_signal_connect(G_OBJECT(add_appointment), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(activate_cb), "evolution -c calendar");
383
385
                dbusmenu_menuitem_child_add_position (root, add_appointment, 3);
471
473
           const gchar *key, 
472
474
           gpointer user_data)
473
475
{
474
 
        gboolean remember; // TODO: Is this useful?  Should we be storing it somewhere?
475
476
        ESource *source = e_cal_get_source (ecal);
476
477
        gchar *auth_domain = e_source_get_duped_property (source, "auth-domain");
477
478
 
481
482
        
482
483
        gchar *password = e_passwords_get_password (component_name, key);
483
484
        
484
 
        if (password == NULL) {
485
 
                password = e_passwords_ask_password (
486
 
                        _("Enter password"),
487
 
                        component_name, key, prompt,
488
 
                        E_PASSWORDS_REMEMBER_FOREVER |
489
 
                        E_PASSWORDS_SECRET |
490
 
                        E_PASSWORDS_ONLINE,
491
 
                        &remember, NULL);
492
 
        }
493
 
        
494
485
        g_free (auth_domain);
495
486
 
496
487
        return password;