datetime: Start implementing new UI designs
New UI design from Jakub Steiner and Hylke Bons
This commit is contained in:
parent
ac72f76543
commit
45218a7991
5 changed files with 529 additions and 307 deletions
|
@ -19,6 +19,7 @@ dist_ui_DATA = \
|
|||
datetime.ui \
|
||||
data/bg.png \
|
||||
data/cc.png \
|
||||
data/pin.png \
|
||||
data/timezone_0.png \
|
||||
data/timezone_-10.png \
|
||||
data/timezone_10.png \
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
|
||||
#include "cc-timezone-map.h"
|
||||
#include "set-timezone.h"
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
G_DEFINE_DYNAMIC_TYPE (CcDateTimePanel, cc_date_time_panel, CC_TYPE_PANEL)
|
||||
|
||||
|
@ -36,6 +38,8 @@ enum {
|
|||
CITY_NUM_COLS
|
||||
};
|
||||
|
||||
#define W(x) (GtkWidget*) gtk_builder_get_object (priv->builder, x)
|
||||
|
||||
struct _CcDateTimePanelPrivate
|
||||
{
|
||||
GtkBuilder *builder;
|
||||
|
@ -47,6 +51,9 @@ struct _CcDateTimePanelPrivate
|
|||
|
||||
GtkTreeModel *locations;
|
||||
GtkTreeModelFilter *city_filter;
|
||||
|
||||
guint hour;
|
||||
guint minute;
|
||||
};
|
||||
|
||||
|
||||
|
@ -130,16 +137,25 @@ update_time (CcDateTimePanel *self)
|
|||
GtkWidget *widget;
|
||||
gchar label[32];
|
||||
time_t t;
|
||||
struct tm time_info;
|
||||
|
||||
g_get_current_time (&timeval);
|
||||
|
||||
priv->timeout = gdk_threads_add_timeout (1000 - timeval.tv_usec / 1000,
|
||||
(GSourceFunc) update_time, self);
|
||||
|
||||
widget = (GtkWidget*) gtk_builder_get_object (priv->builder,
|
||||
"label_current_time");
|
||||
t = time (NULL);
|
||||
strftime (label, 32, "%X", localtime (&t));
|
||||
|
||||
localtime_r (&t, &time_info);
|
||||
|
||||
priv->hour = time_info.tm_hour;
|
||||
priv->minute = time_info.tm_min;
|
||||
|
||||
/* Update the hours label */
|
||||
strftime (label, 32, "%H", &time_info);
|
||||
widget = (GtkWidget*) gtk_builder_get_object (priv->builder, "hours_label");
|
||||
gtk_label_set_text (GTK_LABEL (widget), label);
|
||||
|
||||
/* Update the minutes label */
|
||||
strftime (label, 32, "%M", &time_info);
|
||||
widget = (GtkWidget*) gtk_builder_get_object (priv->builder, "minutes_label");
|
||||
gtk_label_set_text (GTK_LABEL (widget), label);
|
||||
|
||||
return FALSE;
|
||||
|
@ -171,24 +187,22 @@ static void
|
|||
apply_button_clicked_cb (GtkButton *button,
|
||||
CcDateTimePanel *self)
|
||||
{
|
||||
GtkWidget *widget;
|
||||
CcDateTimePanelPrivate *priv = self->priv;
|
||||
guint h, mon, y, min, d;
|
||||
guint mon, y, d;
|
||||
struct tm fulltime;
|
||||
time_t unixtime;
|
||||
gchar *filename;
|
||||
|
||||
widget = (GtkWidget *) gtk_builder_get_object (priv->builder, "spin_hour");
|
||||
h = gtk_spin_button_get_value (GTK_SPIN_BUTTON (widget));
|
||||
widget = (GtkWidget *) gtk_builder_get_object (priv->builder, "spin_minute");
|
||||
min = gtk_spin_button_get_value (GTK_SPIN_BUTTON (widget));
|
||||
mon = 1 + gtk_combo_box_get_active (GTK_COMBO_BOX (W ("month-combobox")));
|
||||
|
||||
y = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (W ("year-spinbutton")));
|
||||
d = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (W ("day-spinbutton")));
|
||||
|
||||
|
||||
widget = (GtkWidget *) gtk_builder_get_object (priv->builder, "calendar");
|
||||
gtk_calendar_get_date (GTK_CALENDAR (widget), &y, &mon, &d);
|
||||
|
||||
fulltime.tm_sec = 0;
|
||||
fulltime.tm_min = min;
|
||||
fulltime.tm_hour = h;
|
||||
fulltime.tm_min = priv->minute;
|
||||
fulltime.tm_hour = priv->hour;
|
||||
fulltime.tm_mday = d;
|
||||
fulltime.tm_mon = mon;
|
||||
fulltime.tm_year = y - 1900;
|
||||
|
@ -217,7 +231,6 @@ location_changed_cb (CcTimezoneMap *map,
|
|||
GtkWidget *widget;
|
||||
time_t t;
|
||||
struct tm *ltime;
|
||||
gchar slabel[32];
|
||||
gchar **split;
|
||||
GtkTreeIter iter;
|
||||
GtkTreeModel *model;
|
||||
|
@ -230,16 +243,6 @@ location_changed_cb (CcTimezoneMap *map,
|
|||
t = time (NULL);
|
||||
ltime = localtime (&t);
|
||||
|
||||
widget = (GtkWidget *) gtk_builder_get_object (priv->builder, "spin_hour");
|
||||
gtk_spin_button_set_value (GTK_SPIN_BUTTON (widget), ltime->tm_hour);
|
||||
widget = (GtkWidget *) gtk_builder_get_object (priv->builder, "spin_minute");
|
||||
gtk_spin_button_set_value (GTK_SPIN_BUTTON (widget), ltime->tm_min);
|
||||
|
||||
widget = (GtkWidget*) gtk_builder_get_object (priv->builder,
|
||||
"label_current_time");
|
||||
strftime (slabel, 32, "%X", localtime (&t));
|
||||
gtk_label_set_text (GTK_LABEL (widget), slabel);
|
||||
|
||||
split = g_strsplit (location->zone, "/", 2);
|
||||
|
||||
/* remove underscores */
|
||||
|
@ -433,18 +436,59 @@ city_changed_cb (GtkComboBox *box,
|
|||
inside = FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
change_time (GtkButton *button,
|
||||
CcDateTimePanel *panel)
|
||||
{
|
||||
CcDateTimePanelPrivate *priv = panel->priv;
|
||||
const gchar *widget_name;
|
||||
gchar *new_str;
|
||||
guint *value, max, min;
|
||||
GtkWidget *label;
|
||||
|
||||
widget_name = gtk_buildable_get_name (GTK_BUILDABLE (button));
|
||||
|
||||
min = 0;
|
||||
if (widget_name[0] == 'h')
|
||||
{
|
||||
/* change hour */
|
||||
label = W ("hours_label");
|
||||
max = 23;
|
||||
value = &priv->hour;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* change minute */
|
||||
label = W ("minutes_label");
|
||||
max = 59;
|
||||
value = &priv->minute;
|
||||
}
|
||||
|
||||
if (strstr (widget_name, "up"))
|
||||
*value = *value + 1;
|
||||
else
|
||||
*value = *value - 1;
|
||||
|
||||
if (*value > max)
|
||||
*value = min;
|
||||
else if (*value < min)
|
||||
*value = max;
|
||||
|
||||
new_str = g_strdup_printf ("%02d", *value);
|
||||
gtk_label_set_text (GTK_LABEL (label), new_str);
|
||||
g_free (new_str);
|
||||
}
|
||||
|
||||
static void
|
||||
cc_date_time_panel_init (CcDateTimePanel *self)
|
||||
{
|
||||
CcDateTimePanelPrivate *priv;
|
||||
gchar *objects[] = { "datetime-panel", "adjustment_min", "adjustment_hour",
|
||||
"adjustment_sec", "region-liststore", "city-liststore",
|
||||
"city-modelfilter", "city-modelsort", NULL };
|
||||
gchar *objects[] = { "datetime-panel", "region-liststore", "city-liststore",
|
||||
"month-liststore", "city-modelfilter", "city-modelsort", NULL };
|
||||
GtkWidget *widget;
|
||||
GtkAdjustment *adjustment;
|
||||
GError *err = NULL;
|
||||
GDate *date;
|
||||
struct tm *ltime;
|
||||
time_t t;
|
||||
GtkTreeModelFilter *city_modelfilter;
|
||||
GtkTreeModelSort *city_modelsort;
|
||||
int ret;
|
||||
|
@ -464,6 +508,37 @@ cc_date_time_panel_init (CcDateTimePanel *self)
|
|||
return;
|
||||
}
|
||||
|
||||
/* set up time editing widgets */
|
||||
g_signal_connect (W("hour_up_button"), "clicked", G_CALLBACK (change_time),
|
||||
self);
|
||||
g_signal_connect (W("hour_down_button"), "clicked", G_CALLBACK (change_time),
|
||||
self);
|
||||
g_signal_connect (W("min_up_button"), "clicked", G_CALLBACK (change_time),
|
||||
self);
|
||||
g_signal_connect (W("min_down_button"), "clicked", G_CALLBACK (change_time),
|
||||
self);
|
||||
|
||||
/* set up date editing widgets */
|
||||
date = g_date_new ();
|
||||
g_date_set_time_t (date, time (NULL));
|
||||
|
||||
gtk_combo_box_set_active (GTK_COMBO_BOX (W ("month-combobox")),
|
||||
g_date_get_month (date) - 1);
|
||||
|
||||
adjustment = (GtkAdjustment*) gtk_adjustment_new (g_date_get_day (date), 0,
|
||||
31, 1, 10, 1);
|
||||
gtk_spin_button_set_adjustment (GTK_SPIN_BUTTON (W ("day-spinbutton")),
|
||||
adjustment);
|
||||
|
||||
adjustment = (GtkAdjustment*) gtk_adjustment_new (g_date_get_year (date),
|
||||
G_MINDOUBLE, G_MAXDOUBLE, 1,
|
||||
10, 1);
|
||||
gtk_spin_button_set_adjustment (GTK_SPIN_BUTTON (W ("year-spinbutton")),
|
||||
adjustment);
|
||||
g_date_free (date);
|
||||
date = NULL;
|
||||
|
||||
/* set up timezone map */
|
||||
priv->map = widget = (GtkWidget *) cc_timezone_map_new ();
|
||||
g_signal_connect (widget, "location-changed",
|
||||
G_CALLBACK (location_changed_cb), self);
|
||||
|
@ -477,26 +552,11 @@ cc_date_time_panel_init (CcDateTimePanel *self)
|
|||
GTK_WIDGET (gtk_builder_get_object (priv->builder,
|
||||
"datetime-panel")));
|
||||
|
||||
widget = (GtkWidget *) gtk_builder_get_object (priv->builder, "calendar");
|
||||
date = g_date_new ();
|
||||
g_date_set_time_t (date, time (NULL));
|
||||
gtk_calendar_select_day (GTK_CALENDAR (widget), g_date_get_day (date));
|
||||
gtk_calendar_select_month (GTK_CALENDAR (widget), g_date_get_month (date) -1,
|
||||
g_date_get_year (date));
|
||||
g_date_free (date);
|
||||
date = NULL;
|
||||
|
||||
update_time (self);
|
||||
|
||||
t = time (NULL);
|
||||
ltime = localtime (&t);
|
||||
|
||||
widget = (GtkWidget *) gtk_builder_get_object (priv->builder, "spin_hour");
|
||||
gtk_spin_button_set_value (GTK_SPIN_BUTTON (widget), ltime->tm_hour);
|
||||
widget = (GtkWidget *) gtk_builder_get_object (priv->builder, "spin_minute");
|
||||
gtk_spin_button_set_value (GTK_SPIN_BUTTON (widget), ltime->tm_min);
|
||||
|
||||
g_signal_connect ((GtkWidget*) gtk_builder_get_object (priv->builder, "button_apply"),
|
||||
g_signal_connect ((GtkWidget*) gtk_builder_get_object (priv->builder,
|
||||
"button_apply"),
|
||||
"clicked",
|
||||
G_CALLBACK (apply_button_clicked_cb),
|
||||
self);
|
||||
|
|
|
@ -194,6 +194,8 @@ cc_timezone_map_size_request (GtkWidget *widget,
|
|||
{
|
||||
CcTimezoneMapPrivate *priv = CC_TIMEZONE_MAP (widget)->priv;
|
||||
|
||||
GTK_WIDGET_CLASS (cc_timezone_map_parent_class)->size_request (widget, req);
|
||||
|
||||
req->width = gdk_pixbuf_get_width (priv->orig_background) * 0.6;
|
||||
req->height = gdk_pixbuf_get_height (priv->orig_background) * 0.6;
|
||||
}
|
||||
|
@ -306,7 +308,7 @@ cc_timezone_map_draw (GtkWidget *widget,
|
|||
cairo_t *cr)
|
||||
{
|
||||
CcTimezoneMapPrivate *priv = CC_TIMEZONE_MAP (widget)->priv;
|
||||
GdkPixbuf *hilight, *orig_hilight;
|
||||
GdkPixbuf *hilight, *orig_hilight, *pin;
|
||||
GtkAllocation alloc;
|
||||
gchar *file;
|
||||
GError *err = NULL;
|
||||
|
@ -344,92 +346,33 @@ cc_timezone_map_draw (GtkWidget *widget,
|
|||
g_object_unref (orig_hilight);
|
||||
}
|
||||
|
||||
/* load pin icon */
|
||||
pin = gdk_pixbuf_new_from_file (DATADIR "/pin.png", &err);
|
||||
|
||||
if (err)
|
||||
{
|
||||
g_warning ("Could not load pin icon: %s", err->message);
|
||||
g_clear_error (&err);
|
||||
}
|
||||
|
||||
if (priv->location)
|
||||
{
|
||||
PangoLayout *layout;
|
||||
PangoRectangle rect;
|
||||
gint width, height;
|
||||
gdouble x1, y1, radius = 5;
|
||||
gchar *zone;
|
||||
|
||||
pointx = convert_longtitude_to_x (priv->location->longitude, alloc.width);
|
||||
pointy = convert_latitude_to_y (priv->location->latitude, alloc.height);
|
||||
|
||||
if (pointy > alloc.height)
|
||||
pointy = alloc.height;
|
||||
|
||||
/* allow for the line width */
|
||||
pointy -= 2;
|
||||
|
||||
zone = g_strdup (priv->location->zone);
|
||||
|
||||
/* convert underscores to spaces */
|
||||
g_strdelimit (zone, "_", ' ');
|
||||
|
||||
layout = gtk_widget_create_pango_layout (widget, zone);
|
||||
|
||||
pango_layout_get_pixel_extents (layout, NULL, &rect);
|
||||
width = rect.width - rect.x;
|
||||
height = rect.height - rect.y;
|
||||
|
||||
x1 = (int) (pointx - width / 2);
|
||||
y1 = (int) (pointy - 10 - height - radius);
|
||||
|
||||
/* rotate the bubble upside-down if there is not enough vertical room */
|
||||
if (y1 < radius)
|
||||
if (pin)
|
||||
{
|
||||
cairo_translate (cr, pointx, pointy);
|
||||
cairo_rotate (cr, G_PI);
|
||||
cairo_translate (cr, -pointx, -pointy);
|
||||
gdk_cairo_set_source_pixbuf (cr, pin, pointx - 8, pointy - 14);
|
||||
cairo_paint (cr);
|
||||
}
|
||||
}
|
||||
|
||||
/* offset the arrow if there is not enough horizontal room */
|
||||
if (x1 - radius - 2 < 0)
|
||||
x1 -= (x1 - radius - 2);
|
||||
|
||||
if (x1 + width + radius + 2 > alloc.width)
|
||||
x1 -= (x1 + width + radius + 2) - alloc.width;
|
||||
|
||||
/* draw the bubble */
|
||||
cairo_arc (cr, x1, y1, radius, G_PI, G_PI * 1.5);
|
||||
cairo_line_to (cr, x1 + width, y1 - radius);
|
||||
|
||||
cairo_arc (cr, x1 + width, y1, radius, G_PI * 1.5, 0);
|
||||
cairo_line_to (cr, x1 + width + radius, y1 + height);
|
||||
|
||||
cairo_arc (cr, x1 + width, y1 + height, radius, 0, G_PI * 0.5);
|
||||
cairo_line_to (cr, pointx + 10, pointy - 10);
|
||||
|
||||
cairo_line_to (cr, pointx, pointy);
|
||||
cairo_line_to (cr, pointx - 10, pointy - 10);
|
||||
cairo_line_to (cr, x1, y1 + height + radius);
|
||||
|
||||
cairo_arc (cr, x1, y1 + height, radius, G_PI * 0.5, G_PI);
|
||||
cairo_line_to (cr, x1 - radius, y1);
|
||||
|
||||
cairo_set_source_rgba (cr, 1, 1, 1, 0.7);
|
||||
cairo_fill_preserve (cr);
|
||||
|
||||
cairo_set_source_rgba (cr, 0, 0, 0, 0.7);
|
||||
cairo_stroke (cr);
|
||||
|
||||
|
||||
if (y1 < radius)
|
||||
{
|
||||
cairo_translate (cr, pointx, pointy);
|
||||
cairo_rotate (cr, G_PI);
|
||||
cairo_translate (cr, -pointx, -pointy);
|
||||
|
||||
y1 += height + 20 + 2 * radius;
|
||||
}
|
||||
|
||||
/* draw the location name */
|
||||
cairo_set_source_rgb (cr, 0, 0, 0);
|
||||
cairo_move_to (cr, x1, y1);
|
||||
pango_cairo_show_layout (cr, layout);
|
||||
|
||||
g_object_unref (layout);
|
||||
g_free (zone);
|
||||
if (pin)
|
||||
{
|
||||
g_object_unref (pin);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
|
BIN
panels/datetime/data/pin.png
Normal file
BIN
panels/datetime/data/pin.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 561 B |
|
@ -4,44 +4,115 @@
|
|||
<!-- interface-naming-policy project-wide -->
|
||||
<object class="GtkWindow" id="window1">
|
||||
<child>
|
||||
<object class="GtkVBox" id="datetime-panel">
|
||||
<object class="GtkAlignment" id="datetime-panel">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">6</property>
|
||||
<property name="bottom_padding">12</property>
|
||||
<property name="right_padding">12</property>
|
||||
<child>
|
||||
<object class="GtkHBox" id="vbox">
|
||||
<object class="GtkVBox" id="hbox">
|
||||
<property name="visible">True</property>
|
||||
<property name="spacing">12</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkVBox" id="vbox1">
|
||||
<object class="GtkHBox" id="vbox">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">6</property>
|
||||
<property name="spacing">24</property>
|
||||
<child>
|
||||
<object class="GtkAspectFrame" id="aspectmap">
|
||||
<object class="GtkVBox" id="map-vbox">
|
||||
<property name="visible">True</property>
|
||||
<property name="label_xalign">0</property>
|
||||
<property name="shadow_type">none</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="yalign">0</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<placeholder/>
|
||||
<object class="GtkAspectFrame" id="aspectmap">
|
||||
<property name="visible">True</property>
|
||||
<property name="label_xalign">0</property>
|
||||
<property name="shadow_type">none</property>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkHBox" id="hbox1">
|
||||
<property name="visible">True</property>
|
||||
<property name="spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label1">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">Region:</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="padding">12</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBox" id="region_combobox">
|
||||
<property name="visible">True</property>
|
||||
<property name="model">region-liststore</property>
|
||||
<child>
|
||||
<object class="GtkCellRendererText" id="cellrenderertext1"/>
|
||||
<attributes>
|
||||
<attribute name="text">0</attribute>
|
||||
</attributes>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label4">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">City:</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBox" id="city_combobox">
|
||||
<property name="visible">True</property>
|
||||
<property name="model">city-modelfilter</property>
|
||||
<child>
|
||||
<object class="GtkCellRendererText" id="cellrenderertext2"/>
|
||||
<attributes>
|
||||
<attribute name="text">0</attribute>
|
||||
</attributes>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="pack_type">end</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkHBox" id="hbox1">
|
||||
<object class="GtkVBox" id="vbox4">
|
||||
<property name="visible">True</property>
|
||||
<property name="spacing">12</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label1">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">Region:</property>
|
||||
<object class="GtkCheckButton" id="check_auto_update">
|
||||
<property name="label" translatable="yes">Set time automatically</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
|
@ -49,25 +120,154 @@
|
|||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBox" id="region_combobox">
|
||||
<object class="GtkAlignment" id="alignment2">
|
||||
<property name="visible">True</property>
|
||||
<property name="model">region-liststore</property>
|
||||
<property name="xscale">0</property>
|
||||
<child>
|
||||
<object class="GtkCellRendererText" id="cellrenderertext1"/>
|
||||
<attributes>
|
||||
<attribute name="text">0</attribute>
|
||||
</attributes>
|
||||
<object class="GtkTable" id="table2">
|
||||
<property name="visible">True</property>
|
||||
<property name="n_rows">3</property>
|
||||
<property name="n_columns">3</property>
|
||||
<property name="column_spacing">12</property>
|
||||
<property name="row_spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label2">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">:</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
<attribute name="scale" value="2.500000"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="hours_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">16</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
<attribute name="scale" value="2.500000"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="minutes_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">45</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
<attribute name="scale" value="2.500000"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="right_attach">3</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="hour_up_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="relief">none</property>
|
||||
<child>
|
||||
<object class="GtkArrow" id="arrow1">
|
||||
<property name="visible">True</property>
|
||||
<property name="arrow_type">up</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="hour_down_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="relief">none</property>
|
||||
<child>
|
||||
<object class="GtkArrow" id="arrow2">
|
||||
<property name="visible">True</property>
|
||||
<property name="arrow_type">down</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="bottom_attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="min_up_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="relief">none</property>
|
||||
<child>
|
||||
<object class="GtkArrow" id="arrow4">
|
||||
<property name="visible">True</property>
|
||||
<property name="arrow_type">up</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="right_attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="min_down_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="relief">none</property>
|
||||
<child>
|
||||
<object class="GtkArrow" id="arrow3">
|
||||
<property name="visible">True</property>
|
||||
<property name="arrow_type">down</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="right_attach">3</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="bottom_attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="padding">12</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label4">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">City:</property>
|
||||
<object class="GtkRadioButton" id="12_radiobutton">
|
||||
<property name="label" translatable="yes">12 hour format</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="active">True</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
|
@ -75,18 +275,107 @@
|
|||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBox" id="city_combobox">
|
||||
<object class="GtkRadioButton" id="24_radiobutton">
|
||||
<property name="label" translatable="yes">24 hour format</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<property name="group">12_radiobutton</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkTable" id="table1">
|
||||
<property name="visible">True</property>
|
||||
<property name="model">city-modelsort</property>
|
||||
<property name="n_rows">3</property>
|
||||
<property name="n_columns">2</property>
|
||||
<property name="column_spacing">6</property>
|
||||
<property name="row_spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkCellRendererText" id="cellrenderertext2"/>
|
||||
<attributes>
|
||||
<attribute name="text">0</attribute>
|
||||
</attributes>
|
||||
<object class="GtkLabel" id="label6">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">Month:</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label7">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">Day:</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label8">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">1</property>
|
||||
<property name="label" translatable="yes">Year:</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="bottom_attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBox" id="month-combobox">
|
||||
<property name="visible">True</property>
|
||||
<property name="model">month-liststore</property>
|
||||
<child>
|
||||
<object class="GtkCellRendererText" id="cellrenderertext3"/>
|
||||
<attributes>
|
||||
<attribute name="text">0</attribute>
|
||||
</attributes>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="year-spinbutton">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="invisible_char">•</property>
|
||||
<property name="width_chars">5</property>
|
||||
<property name="numeric">True</property>
|
||||
<property name="wrap">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="bottom_attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="day-spinbutton">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="invisible_char">•</property>
|
||||
<property name="width_chars">3</property>
|
||||
<property name="numeric">True</property>
|
||||
<property name="wrap">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">3</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="padding">12</property>
|
||||
<property name="position">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
|
@ -101,123 +390,21 @@
|
|||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkVBox" id="vbox4">
|
||||
<object class="GtkHButtonBox" id="hbuttonbox1">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">12</property>
|
||||
<property name="layout_style">end</property>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="check_auto_update">
|
||||
<property name="label" translatable="yes">Keep date and time updated automatically</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="no_show_all">True</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCalendar" id="calendar">
|
||||
<object class="GtkButton" id="button_apply">
|
||||
<property name="label">gtk-apply</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="year">2010</property>
|
||||
<property name="month">4</property>
|
||||
<property name="day">25</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkTable" id="table1">
|
||||
<property name="visible">True</property>
|
||||
<property name="n_rows">2</property>
|
||||
<property name="n_columns">2</property>
|
||||
<property name="column_spacing">6</property>
|
||||
<property name="row_spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkHBox" id="hbox2">
|
||||
<property name="visible">True</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="spin_hour">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="invisible_char">•</property>
|
||||
<property name="width_chars">2</property>
|
||||
<property name="adjustment">adjustment_hour</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label2">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">:</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="spin_minute">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="invisible_char">•</property>
|
||||
<property name="width_chars">2</property>
|
||||
<property name="adjustment">adjustment_min</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label3">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">Current Time:</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label_current_time">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">12:00:00</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label5">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">Time:</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="position">2</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
|
@ -227,45 +414,10 @@
|
|||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkHButtonBox" id="hbuttonbox1">
|
||||
<property name="visible">True</property>
|
||||
<property name="layout_style">end</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="button_apply">
|
||||
<property name="label">gtk-apply</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="adjustment_hour">
|
||||
<property name="upper">23</property>
|
||||
<property name="step_increment">1</property>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="adjustment_min">
|
||||
<property name="upper">60</property>
|
||||
<property name="step_increment">1</property>
|
||||
</object>
|
||||
<object class="GtkListStore" id="region-liststore">
|
||||
<columns>
|
||||
<!-- column-name region -->
|
||||
|
@ -282,6 +434,72 @@
|
|||
<column type="gchararray"/>
|
||||
</columns>
|
||||
</object>
|
||||
<object class="GtkListStore" id="month-liststore">
|
||||
<columns>
|
||||
<!-- column-name gchararray1 -->
|
||||
<column type="gchararray"/>
|
||||
</columns>
|
||||
<data>
|
||||
<row>
|
||||
<col id="0" translatable="yes">January</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">February</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">March</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">April</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">May</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">June</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">July</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">August</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">September</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">October</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">November</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">December</col>
|
||||
</row>
|
||||
</data>
|
||||
</object>
|
||||
<object class="GtkListStore" id="day-liststore">
|
||||
<columns>
|
||||
<!-- column-name gchararray1 -->
|
||||
<column type="gchararray"/>
|
||||
</columns>
|
||||
<data>
|
||||
<row>
|
||||
<col id="0" translatable="yes">22</col>
|
||||
</row>
|
||||
</data>
|
||||
</object>
|
||||
<object class="GtkListStore" id="year-liststore">
|
||||
<columns>
|
||||
<!-- column-name gchararray1 -->
|
||||
<column type="gchararray"/>
|
||||
</columns>
|
||||
<data>
|
||||
<row>
|
||||
<col id="0" translatable="yes">2010</col>
|
||||
</row>
|
||||
</data>
|
||||
</object>
|
||||
<object class="GtkTreeModelFilter" id="city-modelfilter">
|
||||
<property name="child_model">city-liststore</property>
|
||||
</object>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue