~ubuntu-branches/debian/sid/gworldclock/sid

« back to all changes in this revision

Viewing changes to gworldclock.h

  • Committer: Bazaar Package Importer
  • Author(s): Drew Parsons
  • Date: 2005-03-28 13:50:18 UTC
  • mfrom: (1.2.1 upstream) (2.1.2 hoary)
  • Revision ID: james.westby@ubuntu.com-20050328135018-jk2szisqaovghn3s
Tags: 1.4.4-1
* New upstream version.
  - modernised design of AddZone dialog. Closes: #193952.
  - removed use of deprecated GTK functions and objects.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#define VERSION "0.3.3"
2
 
#define RELEASE_DATE "20 Jan 2001"
3
 
 
4
 
void AddZone( gpointer clocklist );
5
 
void DeleteZone( gpointer clocklist );
6
 
void ChangeZoneDescription(gpointer clocklist);
7
 
gint SaveZones(gpointer clocklist);
8
 
static void send_clock_quit( gpointer clocklist );
9
 
gint SetTime(gpointer clocklist);
10
 
gint SetToGivenTime(gpointer clocklist, time_t timeToSet);
11
 
void AboutDialog(gpointer clocklist);
12
 
void Synchronise(gpointer clocklist);
13
 
time_t extractSyncTime();
14
 
 
15
 
static GtkItemFactoryEntry mainmenu_items[] = {
16
 
  { "/_File",         NULL,         NULL, 0, "<Branch>" },
17
 
  /*  { "/File/_Open Zones",     NULL, NULL, 0, NULL },*/
18
 
  { "/File/_Save Zones",     NULL, (void *)SaveZones, 0, NULL },
19
 
  /*  { "/File/Save Zones _As",     NULL, NULL, 0, NULL },*/
20
 
  { "/File/_Quit",     "<control>Q", send_clock_quit, 0, NULL },
21
 
  { "/_Options",      NULL,         NULL, 0, "<Branch>" },
22
 
  { "/Options/_Add Timezone",  "<control>A", AddZone, 0, NULL },
23
 
  { "/Options/_Delete Timezone",  "<control>D", DeleteZone, 0, NULL },
24
 
  { "/Options/Change Description",  NULL,  ChangeZoneDescription, 0, NULL},
25
 
  { "/Options/Synchronise Time",  NULL,  Synchronise, 0, NULL},
26
 
  { "/_Help",         NULL,         NULL, 0, "<LastBranch>" },
27
 
  { "/_Help/About",   NULL,         AboutDialog, 0, NULL }
28
 
};
29
 
 
30
 
static GtkItemFactoryEntry popupmenu_items[] = {
31
 
  { "/Synchronise Time",  NULL,  Synchronise, 0, NULL},
32
 
  /* setup "add zone" here to add at selected row! */
33
 
  { "/Add Timezone",  NULL, AddZone, 0, NULL },
34
 
  { "/Delete Timezone",  NULL,  DeleteZone, 0, NULL},
35
 
  { "/Change Description",  NULL,  ChangeZoneDescription, 0, NULL}
36
 
};
37
 
 
38
 
gchar *continents[] = 
39
 
{ "Africa",
40
 
  "Americas",
41
 
  "Antarctica",
42
 
  "Arctic Ocean",
43
 
  "Asia",
44
 
  "Atlantic Ocean",
45
 
  "Australia",
46
 
  "Europe",
47
 
  "Indian Ocean",
48
 
  "Pacific Ocean" };
49
 
 
50
 
/* Keep this number up to date with the number of continents in the
51
 
   array above.  Not that the number of continents on Earth is going
52
 
   to change, but you know.  */ 
53
 
 
54
 
gint Ncontinents = 10;  
55
 
 
56
 
 
57
 
typedef struct NameCodeType {
58
 
  gchar *name;
59
 
  gchar *code;  /* actually only 2 characters needed, but 3 would be better */
60
 
} NameCodeType;
61
 
 
62
 
/* this data is used to construct the time when synchronising */
63
 
typedef struct SyncData {
64
 
  gchar *zoneName;
65
 
  gint hour;
66
 
  gint minute;
67
 
  gint date;
68
 
  gint month;
69
 
  gint year;
70
 
} SyncData;
71
 
 
72
 
 
73
 
/* approx width of one character in pixels */
74
 
gint CHAR_WIDTH=15;
75
 
 
76
 
gint SYNCBOX_HEIGHT=145;
77
 
 
 
1
/* global definitions needed by several gworldclock files */
 
2
 
 
3
#ifndef GWORLDCLOCK
 
4
#define GWORLDCLOCK
 
5
 
 
6
/* two display columns: Name of zone, and time/date.
 
7
   This could be adjusted later to separate time from date.
 
8
   Also, store the TZ name here.
 
9
*/
 
10
enum
 
11
{
 
12
   TZ_NAME,
 
13
   TZ_DESCRIPTION,
 
14
   TZ_TIMEDATE,
 
15
   LIST_COLUMNS
 
16
};
 
17
 
 
18
 
 
19
GString timeDisplayFormat;
 
20
 
 
21
 
 
22
#endif