diff options
-rw-r--r-- | DClock.vala | 30 | ||||
-rw-r--r-- | GNOME_DClock_Factory.server | 29 |
2 files changed, 41 insertions, 18 deletions
diff --git a/DClock.vala b/DClock.vala index 5f85d62..14abcc1 100644 --- a/DClock.vala +++ b/DClock.vala @@ -195,27 +195,21 @@ public class DClock : Panel.Applet { } void update_orient() { - /*string text; - int min_width; double new_angle; - double angle;*/ + double angle; - //text = gtk_label_get_text (GTK_LABEL (cd->clockw)); - //min_width = calculate_minimum_width (cd->panel_button, text); - - /*if(orient == Panel.AppletOrient.LEFT && min_width > button.allocation.width) - new_angle = 270; - else if(orient == Panel.AppletOrient.RIGHT && min_width > button.allocation.width) - new_angle = 90; - else - new_angle = 0;*/ + if(orient == Panel.AppletOrient.LEFT) + new_angle = 270; + else if(orient == Panel.AppletOrient.RIGHT) + new_angle = 90; + else + new_angle = 0; - /*angle = gtk_label_get_angle(GTK_LABEL (cd->clockw)); - if (angle != new_angle) { - unfix_size (cd); - gtk_label_set_angle (GTK_LABEL (cd->clockw), new_angle); - gtk_label_set_angle (GTK_LABEL (cd->panel_temperature_label), new_angle); - }*/ + angle = label.get_angle(); + if (angle != new_angle) { + unfix_size(); + label.set_angle(new_angle); + } } private static void applet_change_orient(Panel.Applet applet, Panel.AppletOrient orient, DClock clock) { diff --git a/GNOME_DClock_Factory.server b/GNOME_DClock_Factory.server new file mode 100644 index 0000000..3815b54 --- /dev/null +++ b/GNOME_DClock_Factory.server @@ -0,0 +1,29 @@ +<oaf_info> + +<oaf_server iid="OAFIID:GNOME_DClock_Factory" + type="exe" + location="/usr/lib/gnome-panel/DClock"> + + <oaf_attribute name="repo_ids" type="stringv"> + <item value="IDL:Bonobo/GenericFactory:1.0"/> + <item value="IDL:Bonobo/Unknown:1.0"/> + </oaf_attribute> + <oaf_attribute name="name" type="string" value="DClock Factory"/> + <oaf_attribute name="description" type="string" value="Factory for creating DClock applets."/> +</oaf_server> + +<oaf_server iid="OAFIID:GNOME_DClock" + type="factory" + location="OAFIID:GNOME_DClock_Factory"> + + <oaf_attribute name="repo_ids" type="stringv"> + <item value="IDL:GNOME/Vertigo/PanelAppletShell:1.0"/> + <item value="IDL:Bonobo/Control:1.0"/> + <item value="IDL:Bonobo/Unknown:1.0"/> + </oaf_attribute> + <oaf_attribute name="name" type="string" value="DClock"/> + <oaf_attribute name="description" type="string" value="Get the current discordian time and date"/> + <oaf_attribute name="panel:icon" type="string" value="gnome-panel-clock"/> +</oaf_server> + +</oaf_info> |