~ubuntu-branches/ubuntu/vivid/gnome-desktop3/vivid-proposed

« back to all changes in this revision

Viewing changes to libgnome-desktop/test-wall-clock.c

  • Committer: Package Import Robot
  • Author(s): Tim Lunn
  • Date: 2013-05-28 09:10:46 UTC
  • mfrom: (1.6.1) (21.1.10 experimental)
  • Revision ID: package-import@ubuntu.com-20130528091046-b0oc28za9l97fgq1
Tags: 3.8.2-0ubuntu1
* New upstream release
* Sync with Debian (LP: #1184812) Remaining changes:
  - debian/patches:
    + 04_compute_average_color.patch: Compute the avergage color in
      gnome-desktop itself, not in unity to fix some races (LP #963140)
    + tweak_color_computation.patch, Patch from Gord, no patch header,
      no bug link.
    + git_revert_draw_background.patch
    + ubuntu_language.patch, Ported relevant bits from g-c-c 
      52_region_language.patch, as required for gnome 3.8 region panel
    + ubuntu_language_list_from_SUPPORTED.patch,
      adds api to get list of available languages from SUPPORTED file.
      To be used by gnome 3.8 region panel language installation.
  - debian/control.in:
    + Don't break gnome-shell << 3.7.90
    + Use source:Version for gnome-desktop3-data Depend
    + Add epoch to gnome-desktop3-data's Breaks/Replaces, as our old
      gnome-desktop source package introduced an epoch. This needs to be
      kept until after 14.04 LTS.
 - Install helper tools into a versioned directory (by overriding
   libexecdir). They could alternatively be installed in a separate package
* Dropped changes:
  - 02_refuse_to_break_GL_compositors.patch:
    + Doesn't appear to be needed any more
 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include <locale.h>
 
2
#define GNOME_DESKTOP_USE_UNSTABLE_API
 
3
#include <libgnome-desktop/gnome-wall-clock.h>
 
4
 
 
5
static void
 
6
clock_changed (GObject    *object,
 
7
               GParamSpec *pspec,
 
8
               gpointer    user_data)
 
9
{
 
10
        const char *txt;
 
11
 
 
12
        txt = gnome_wall_clock_get_clock (GNOME_WALL_CLOCK (object));
 
13
        g_print ("%s\n", txt);
 
14
}
 
15
 
 
16
int main (int argc, char **argv)
 
17
{
 
18
        GMainLoop *loop;
 
19
        GnomeWallClock *clock;
 
20
 
 
21
        setlocale (LC_ALL, "");
 
22
 
 
23
        g_setenv ("G_MESSAGES_DEBUG", "all", TRUE);
 
24
 
 
25
        loop = g_main_loop_new (NULL, FALSE);
 
26
 
 
27
        clock = g_object_new (GNOME_TYPE_WALL_CLOCK, NULL);
 
28
        g_signal_connect (G_OBJECT (clock), "notify::clock",
 
29
                          G_CALLBACK (clock_changed), NULL);
 
30
 
 
31
        g_main_loop_run (loop);
 
32
 
 
33
        return 0;
 
34
}