[Goodies-commits] r2680 - in xfce4-datetime-plugin/trunk: . panel-plugin
Remco den Breeje
stacium at xfce.org
Sat Apr 7 17:07:40 CEST 2007
Author: stacium
Date: 2007-04-07 15:07:40 +0000 (Sat, 07 Apr 2007)
New Revision: 2680
Modified:
xfce4-datetime-plugin/trunk/ChangeLog
xfce4-datetime-plugin/trunk/THANKS
xfce4-datetime-plugin/trunk/panel-plugin/datetime-dialog.c
xfce4-datetime-plugin/trunk/panel-plugin/datetime.c
xfce4-datetime-plugin/trunk/panel-plugin/datetime.h
Log:
2007-04-07 Remco den Breeje <remco at sx.mine.nu>
* panel-plugin/datetime.{c,h},
* panel-plugin/datetime-dialog.c: Enable tooltips. Based
on a patch by Laurent Meunier <meunier.laurent at laposte.net> (#3073)
Modified: xfce4-datetime-plugin/trunk/ChangeLog
===================================================================
--- xfce4-datetime-plugin/trunk/ChangeLog 2007-04-07 11:56:44 UTC (rev 2679)
+++ xfce4-datetime-plugin/trunk/ChangeLog 2007-04-07 15:07:40 UTC (rev 2680)
@@ -1,3 +1,8 @@
+2007-04-07 Remco den Breeje <remco at sx.mine.nu>
+ * panel-plugin/datetime.{c,h},
+ * panel-plugin/datetime-dialog.c: Enable tooltips. Based
+ on a patch by Laurent Meunier <meunier.laurent at laposte.net> (#3073)
+
2007-04-02 Remco den Breeje <remco at sx.mine.nu>
* THANKS: added contributors
* panel-plugin/datetime.c: Fix incorrect display when panel starts (#3062)
Modified: xfce4-datetime-plugin/trunk/THANKS
===================================================================
--- xfce4-datetime-plugin/trunk/THANKS 2007-04-07 11:56:44 UTC (rev 2679)
+++ xfce4-datetime-plugin/trunk/THANKS 2007-04-07 15:07:40 UTC (rev 2680)
@@ -16,7 +16,7 @@
* Bug# 2867
Laurent Meunier <meunier.laurent at laposte.net>
- * Bug# 3062
+ * Bug# 3062, 3073
Translators (sorted by language):
----------------------------------
Modified: xfce4-datetime-plugin/trunk/panel-plugin/datetime-dialog.c
===================================================================
--- xfce4-datetime-plugin/trunk/panel-plugin/datetime-dialog.c 2007-04-07 11:56:44 UTC (rev 2679)
+++ xfce4-datetime-plugin/trunk/panel-plugin/datetime-dialog.c 2007-04-07 15:07:40 UTC (rev 2680)
@@ -37,7 +37,9 @@
/* Layouts */
const char *layout_strs[] = {
N_("Date only"),
+ N_("Date only, time in tooltip"),
N_("Time only"),
+ N_("Time only, date in tooltip"),
N_("Date, then time"),
N_("Time, then date")
};
Modified: xfce4-datetime-plugin/trunk/panel-plugin/datetime.c
===================================================================
--- xfce4-datetime-plugin/trunk/panel-plugin/datetime.c 2007-04-07 11:56:44 UTC (rev 2679)
+++ xfce4-datetime-plugin/trunk/panel-plugin/datetime.c 2007-04-07 15:07:40 UTC (rev 2680)
@@ -95,9 +95,11 @@
switch(datetime->layout)
{
case LAYOUT_DATE:
+ case LAYOUT_DATE_TIMETT:
gtk_widget_hide(GTK_WIDGET(datetime->time_label));
break;
case LAYOUT_TIME:
+ case LAYOUT_TIME_DATETT:
gtk_widget_hide(GTK_WIDGET(datetime->date_label));
break;
default:
@@ -116,6 +118,24 @@
gtk_box_reorder_child(GTK_BOX(datetime->vbox), datetime->time_label, 0);
gtk_box_reorder_child(GTK_BOX(datetime->vbox), datetime->date_label, 1);
}
+
+ /* update tooltip */
+ switch(datetime->layout)
+ {
+ case LAYOUT_DATE_TIMETT:
+ gtk_tooltips_set_tip(GTK_TOOLTIPS(datetime->tips), datetime->eventbox,
+ gtk_label_get_text(GTK_LABEL(datetime->time_label)), NULL);
+ break;
+ case LAYOUT_TIME_DATETT:
+ gtk_tooltips_set_tip(GTK_TOOLTIPS(datetime->tips), datetime->eventbox,
+ gtk_label_get_text(GTK_LABEL(datetime->date_label)), NULL);
+ break;
+ default:
+ gtk_tooltips_set_tip(GTK_TOOLTIPS(datetime->tips), datetime->eventbox,
+ NULL, NULL);
+ break;
+ }
+
return TRUE;
}
@@ -555,6 +575,9 @@
gtk_box_reorder_child(GTK_BOX(datetime->vbox), datetime->time_label, 0);
gtk_box_reorder_child(GTK_BOX(datetime->vbox), datetime->date_label, 1);
+ /* create tooltips */
+ datetime->tips = gtk_tooltips_new ();
+
/* connect widget signals to functions */
g_signal_connect(datetime->eventbox, "button-press-event",
G_CALLBACK(datetime_clicked), datetime);
Modified: xfce4-datetime-plugin/trunk/panel-plugin/datetime.h
===================================================================
--- xfce4-datetime-plugin/trunk/panel-plugin/datetime.h 2007-04-07 11:56:44 UTC (rev 2679)
+++ xfce4-datetime-plugin/trunk/panel-plugin/datetime.h 2007-04-07 15:07:40 UTC (rev 2680)
@@ -31,7 +31,9 @@
typedef enum
{
LAYOUT_DATE = 0,
+ LAYOUT_DATE_TIMETT,
LAYOUT_TIME,
+ LAYOUT_TIME_DATETT,
LAYOUT_DATE_TIME,
LAYOUT_TIME_DATE,
LAYOUT_COUNT
@@ -44,6 +46,7 @@
GtkWidget *vbox;
GtkWidget *date_label;
GtkWidget *time_label;
+ GtkWidget *tips;
guint timeout_id;
/* settings */
More information about the Goodies-commits
mailing list