Updating branch refs/heads/master to d9c3b0763fe46f164acd9f445c18a3eae262a91a (commit) from 1e4d05c8ad33e2a03d95d9215df576bcf5b2cb06 (commit)
commit d9c3b0763fe46f164acd9f445c18a3eae262a91a Author: Andrzej <ndrwr...@gmail.com> Date: Sat Feb 23 23:13:29 2013 +0000 Clock plugin: added a simple timezone selection UI. plugins/clock/clock-dialog.glade | 268 ++++++++++++++++++++++++++++++-------- plugins/clock/clock.c | 4 + 2 files changed, 219 insertions(+), 53 deletions(-) diff --git a/plugins/clock/clock-dialog.glade b/plugins/clock/clock-dialog.glade index ea9c5a4..f200e47 100644 --- a/plugins/clock/clock-dialog.glade +++ b/plugins/clock/clock-dialog.glade @@ -1,42 +1,179 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <interface> <requires lib="gtk+" version="2.14"/> <!-- interface-requires libxfce4ui 0.0 --> <!-- interface-naming-policy toplevel-contextual --> - <object class="GtkAdjustment" id="fuzziness"> - <property name="upper">3</property> - <property name="step_increment">1</property> - <property name="page_increment">1</property> - <property name="page_size">1</property> - </object> <object class="XfceTitledDialog" id="dialog"> + <property name="can_focus">False</property> <property name="title" translatable="yes">Clock</property> <property name="icon_name">gtk-properties</property> <property name="type_hint">normal</property> - <property name="has_separator">False</property> <child internal-child="vbox"> <object class="GtkVBox" id="dialog-vbox2"> <property name="visible">True</property> - <property name="orientation">vertical</property> + <property name="can_focus">False</property> <property name="spacing">2</property> + <child internal-child="action_area"> + <object class="GtkHButtonBox" id="dialog-action_area2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="layout_style">end</property> + <child> + <object class="GtkButton" id="close-button"> + <property name="label">gtk-close</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_action_appearance">False</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> + <child> + <object class="GtkButton" id="help-button"> + <property name="label">gtk-help</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_action_appearance">False</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">1</property> + <property name="secondary">True</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="pack_type">end</property> + <property name="position">0</property> + </packing> + </child> <child> <object class="GtkVBox" id="vbox1"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="border_width">6</property> - <property name="orientation">vertical</property> <property name="spacing">6</property> <child> + <object class="GtkFrame" id="frame2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="left_padding">12</property> + <child> + <object class="GtkTable" id="table1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="border_width">6</property> + <property name="n_rows">2</property> + <property name="n_columns">2</property> + <property name="column_spacing">12</property> + <property name="row_spacing">6</property> + <child> + <object class="GtkLabel" id="label9"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Time_zone:</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">timezone-name</property> + </object> + <packing> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + </packing> + </child> + <child> + <object class="GtkEntry" id="timezone-name"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="tooltip_text" translatable="yes">Name of the timezone matching the system's timezone database. Leave empty to revert to the local time.</property> + <property name="primary_icon_activatable">False</property> + <property name="secondary_icon_activatable">False</property> + <property name="primary_icon_sensitive">True</property> + <property name="secondary_icon_sensitive">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> + <child> + <object class="GtkLabel" id="label7"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Time:</property> + </object> + </child> + <child> + <object class="GtkLabel" id="label10"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="tooltip_text" translatable="yes">To change the system time and the default timezone use a Time and Date configuration tool provided with your system.</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">System time</property> + <attributes> + <attribute name="style" value="oblique"/> + </attributes> + </object> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + </packing> + </child> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label6"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Time Settings</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> <object class="GtkFrame" id="frame3"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="label_xalign">0</property> <property name="shadow_type">none</property> <child> <object class="GtkAlignment" id="alignment3"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="left_padding">12</property> <child> <object class="GtkTable" id="table2"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="border_width">6</property> <property name="n_rows">4</property> <property name="n_columns">2</property> @@ -45,6 +182,7 @@ <child> <object class="GtkLabel" id="label2"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="xalign">0</property> <property name="label" translatable="yes">_Layout:</property> <property name="use_underline">True</property> @@ -57,6 +195,7 @@ <child> <object class="GtkComboBox" id="mode"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="model">mode-model</property> <child> <object class="GtkCellRendererText" id="cellrenderertext1"/> @@ -73,6 +212,7 @@ <child> <object class="GtkLabel" id="label4"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="xalign">0</property> <property name="label" translatable="yes">_Tooltip format:</property> <property name="use_underline">True</property> @@ -86,6 +226,7 @@ <child> <object class="GtkComboBox" id="tooltip-chooser"> <property name="visible">True</property> + <property name="can_focus">False</property> <child> <object class="GtkCellRendererText" id="cellrenderertext2"/> <attributes> @@ -105,6 +246,10 @@ <property name="visible">True</property> <property name="can_focus">True</property> <property name="tooltip_text" translatable="yes">The format describes the date and time parts to insert into the panel. For example, %Y will be substituted with the year, %m with the month and %d with the day. See the documentation of the date utility for additional information.</property> + <property name="primary_icon_activatable">False</property> + <property name="secondary_icon_activatable">False</property> + <property name="primary_icon_sensitive">True</property> + <property name="secondary_icon_sensitive">True</property> </object> <packing> <property name="left_attach">1</property> @@ -116,6 +261,12 @@ <child> <placeholder/> </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> </object> </child> </object> @@ -123,6 +274,7 @@ <child type="label"> <object class="GtkLabel" id="label1"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="label" translatable="yes">Appearance</property> <attributes> <attribute name="weight" value="bold"/> @@ -132,23 +284,26 @@ </object> <packing> <property name="expand">False</property> - <property name="position">0</property> + <property name="fill">True</property> + <property name="position">1</property> </packing> </child> <child> <object class="GtkFrame" id="frame1"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="label_xalign">0</property> <property name="shadow_type">none</property> <child> <object class="GtkAlignment" id="alignment1"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="left_padding">12</property> <child> <object class="GtkVBox" id="vbox2"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="border_width">6</property> - <property name="orientation">vertical</property> <property name="spacing">6</property> <child> <object class="GtkCheckButton" id="show-seconds"> @@ -156,10 +311,13 @@ <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> <property name="use_underline">True</property> <property name="draw_indicator">True</property> </object> <packing> + <property name="expand">True</property> + <property name="fill">True</property> <property name="position">0</property> </packing> </child> @@ -169,10 +327,13 @@ <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> <property name="use_underline">True</property> <property name="draw_indicator">True</property> </object> <packing> + <property name="expand">True</property> + <property name="fill">True</property> <property name="position">1</property> </packing> </child> @@ -182,10 +343,13 @@ <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> <property name="use_underline">True</property> <property name="draw_indicator">True</property> </object> <packing> + <property name="expand">True</property> + <property name="fill">True</property> <property name="position">2</property> </packing> </child> @@ -195,10 +359,13 @@ <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> <property name="use_underline">True</property> <property name="draw_indicator">True</property> </object> <packing> + <property name="expand">True</property> + <property name="fill">True</property> <property name="position">3</property> </packing> </child> @@ -208,16 +375,20 @@ <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> <property name="use_underline">True</property> <property name="draw_indicator">True</property> </object> <packing> + <property name="expand">True</property> + <property name="fill">True</property> <property name="position">4</property> </packing> </child> <child> <object class="GtkTable" id="digital-box"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="n_rows">2</property> <property name="n_columns">2</property> <property name="column_spacing">12</property> @@ -225,6 +396,7 @@ <child> <object class="GtkLabel" id="label8"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="label" translatable="yes">F_ormat:</property> <property name="use_underline">True</property> <property name="mnemonic_widget">digital-chooser</property> @@ -236,6 +408,7 @@ <child> <object class="GtkComboBox" id="digital-chooser"> <property name="visible">True</property> + <property name="can_focus">False</property> <child> <object class="GtkCellRendererText" id="cellrenderertext3"/> <attributes> @@ -253,6 +426,10 @@ <property name="visible">True</property> <property name="can_focus">True</property> <property name="tooltip_text" translatable="yes">The format describes the date and time parts to insert into the panel. For example, %Y will be substituted with the year, %m with the month and %d with the day. See the documentation of the date utility for additional information.</property> + <property name="primary_icon_activatable">False</property> + <property name="secondary_icon_activatable">False</property> + <property name="primary_icon_sensitive">True</property> + <property name="secondary_icon_sensitive">True</property> </object> <packing> <property name="left_attach">1</property> @@ -266,22 +443,27 @@ </child> </object> <packing> + <property name="expand">True</property> + <property name="fill">True</property> <property name="position">5</property> </packing> </child> <child> <object class="GtkHBox" id="fuzziness-box"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="spacing">12</property> <child> <object class="GtkLabel" id="label5"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="label" translatable="yes" comments="I18N: the fuzziness the *precision* of the fuzzy clock. Time steps of 5, 15 or parts of the day.">F_uzziness:</property> <property name="use_underline">True</property> <property name="mnemonic_widget">hscale1</property> </object> <packing> <property name="expand">False</property> + <property name="fill">True</property> <property name="position">0</property> </packing> </child> @@ -295,11 +477,15 @@ <property name="value_pos">right</property> </object> <packing> + <property name="expand">True</property> + <property name="fill">True</property> <property name="position">1</property> </packing> </child> </object> <packing> + <property name="expand">True</property> + <property name="fill">True</property> <property name="position">6</property> </packing> </child> @@ -309,10 +495,13 @@ <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> <property name="use_underline">True</property> <property name="draw_indicator">True</property> </object> <packing> + <property name="expand">True</property> + <property name="fill">True</property> <property name="position">7</property> </packing> </child> @@ -322,10 +511,13 @@ <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> <property name="use_underline">True</property> <property name="draw_indicator">True</property> </object> <packing> + <property name="expand">True</property> + <property name="fill">True</property> <property name="position">8</property> </packing> </child> @@ -336,6 +528,7 @@ <child type="label"> <object class="GtkLabel" id="label3"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="label" translatable="yes">Clock Options</property> <attributes> <attribute name="weight" value="bold"/> @@ -345,54 +538,17 @@ </object> <packing> <property name="expand">False</property> - <property name="position">1</property> + <property name="fill">True</property> + <property name="position">2</property> </packing> </child> </object> <packing> + <property name="expand">True</property> + <property name="fill">True</property> <property name="position">1</property> </packing> </child> - <child internal-child="action_area"> - <object class="GtkHButtonBox" id="dialog-action_area2"> - <property name="visible">True</property> - <property name="layout_style">end</property> - <child> - <object class="GtkButton" id="close-button"> - <property name="label">gtk-close</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> - <child> - <object class="GtkButton" id="help-button"> - <property name="label">gtk-help</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">1</property> - <property name="secondary">True</property> - </packing> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="pack_type">end</property> - <property name="position">0</property> - </packing> - </child> </object> </child> <action-widgets> @@ -400,6 +556,12 @@ <action-widget response="0">help-button</action-widget> </action-widgets> </object> + <object class="GtkAdjustment" id="fuzziness"> + <property name="upper">3</property> + <property name="step_increment">1</property> + <property name="page_increment">1</property> + <property name="page_size">1</property> + </object> <object class="GtkListStore" id="mode-model"> <columns> <!-- column-name title --> diff --git a/plugins/clock/clock.c b/plugins/clock/clock.c index 227d79b..da54b8b 100644 --- a/plugins/clock/clock.c +++ b/plugins/clock/clock.c @@ -799,6 +799,10 @@ clock_plugin_configure_plugin (XfcePanelPlugin *panel_plugin) dialog->plugin = plugin; dialog->builder = builder; + object = gtk_builder_get_object (builder, "timezone-name"); + exo_mutual_binding_new (G_OBJECT (plugin->time), "timezone", + G_OBJECT (object), "text"); + object = gtk_builder_get_object (builder, "mode"); g_signal_connect_data (G_OBJECT (object), "changed", G_CALLBACK (clock_plugin_configure_plugin_mode_changed), dialog, _______________________________________________ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits