aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJP Rosevear <jpr@helixcode.com>2000-12-13 14:56:16 +0800
committerJP Rosevear <jpr@src.gnome.org>2000-12-13 14:56:16 +0800
commit7b07f1342a80551d76bc0f2f26f0cf4cda394d6c (patch)
tree747d92c8705fab6eaa0130f709795c03d62c5346
parent616052c0a7fa403b42cc2ced7dca7b9d79d6357f (diff)
downloadgsoc2013-evolution-7b07f1342a80551d76bc0f2f26f0cf4cda394d6c.tar
gsoc2013-evolution-7b07f1342a80551d76bc0f2f26f0cf4cda394d6c.tar.gz
gsoc2013-evolution-7b07f1342a80551d76bc0f2f26f0cf4cda394d6c.tar.bz2
gsoc2013-evolution-7b07f1342a80551d76bc0f2f26f0cf4cda394d6c.tar.lz
gsoc2013-evolution-7b07f1342a80551d76bc0f2f26f0cf4cda394d6c.tar.xz
gsoc2013-evolution-7b07f1342a80551d76bc0f2f26f0cf4cda394d6c.tar.zst
gsoc2013-evolution-7b07f1342a80551d76bc0f2f26f0cf4cda394d6c.zip
Use set_title_from_comp (save_todo_object): ditto (set_title_from_comp):
2000-12-12 JP Rosevear <jpr@helixcode.com> * gui/dialogs/task-editor.c (task_editor_set_todo_object): Use set_title_from_comp (save_todo_object): ditto (set_title_from_comp): Make sure the title is encoded properly (as in event-editor) svn path=/trunk/; revision=6962
-rw-r--r--calendar/ChangeLog8
-rw-r--r--calendar/gui/dialogs/task-editor.c35
2 files changed, 33 insertions, 10 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 992ae523b5..a48cbbb973 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,11 @@
+2000-12-12 JP Rosevear <jpr@helixcode.com>
+
+ * gui/dialogs/task-editor.c (task_editor_set_todo_object): Use
+ set_title_from_comp
+ (save_todo_object): ditto
+ (set_title_from_comp): Make sure the title is encoded properly (as in
+ event-editor)
+
2000-12-12 Federico Mena Quintero <federico@helixcode.com>
* cal-util/cal-component.c (get_text_list): Constify for new
diff --git a/calendar/gui/dialogs/task-editor.c b/calendar/gui/dialogs/task-editor.c
index 60a9bdd60a..34b62ba61e 100644
--- a/calendar/gui/dialogs/task-editor.c
+++ b/calendar/gui/dialogs/task-editor.c
@@ -31,6 +31,7 @@
#include <gnome.h>
#include <glade/glade.h>
#include <gal/util/e-util.h>
+#include <gal/widgets/e-unicode.h>
#include <e-util/e-dialog-widgets.h>
#include <widgets/misc/e-dateedit.h>
#include <cal-util/timeutil.h>
@@ -132,6 +133,7 @@ static gboolean get_widgets (TaskEditor *tedit);
static void init_widgets (TaskEditor *tedit);
static void task_editor_destroy (GtkObject *object);
static char * make_title_from_comp (CalComponent *comp);
+static void set_title_from_comp (TaskEditor *tedit, CalComponent *comp);
static void clear_widgets (TaskEditor *tedit);
static void fill_widgets (TaskEditor *tedit);
@@ -648,7 +650,6 @@ task_editor_set_todo_object (TaskEditor *tedit,
CalComponent *comp)
{
TaskEditorPrivate *priv;
- char *title;
g_return_if_fail (tedit != NULL);
g_return_if_fail (IS_TASK_EDITOR (tedit));
@@ -663,10 +664,7 @@ task_editor_set_todo_object (TaskEditor *tedit,
if (comp)
priv->comp = cal_component_clone (comp);
- title = make_title_from_comp (priv->comp);
- gtk_window_set_title (GTK_WINDOW (priv->app), title);
- g_free (title);
-
+ set_title_from_comp (tedit, priv->comp);
fill_widgets (tedit);
}
@@ -706,6 +704,27 @@ make_title_from_comp (CalComponent *comp)
}
}
+/* Sets the event editor's window title from a calendar component */
+static void
+set_title_from_comp (TaskEditor *tedit, CalComponent *comp)
+{
+ TaskEditorPrivate *priv;
+ char *title, *tmp;
+
+ priv = tedit->priv;
+
+ title = make_title_from_comp (comp);
+ tmp = e_utf8_to_gtk_string (priv->app, title);
+ g_free (title);
+
+ if (tmp) {
+ gtk_window_set_title (GTK_WINDOW (priv->app), tmp);
+ g_free (tmp);
+ } else {
+ g_message ("set_title_from_comp(): Could not convert the title from UTF8");
+ gtk_window_set_title (GTK_WINDOW (priv->app), "");
+ }
+}
/* Fills the widgets with default values */
static void
@@ -842,7 +861,6 @@ static void
save_todo_object (TaskEditor *tedit)
{
TaskEditorPrivate *priv;
- char *title;
priv = tedit->priv;
@@ -852,10 +870,7 @@ save_todo_object (TaskEditor *tedit)
return;
dialog_to_comp_object (tedit);
-
- title = make_title_from_comp (priv->comp);
- gtk_window_set_title (GTK_WINDOW (priv->app), title);
- g_free (title);
+ set_title_from_comp (tedit, priv->comp);
if (!cal_client_update_object (priv->client, priv->comp))
g_message ("save_todo_object(): Could not update the object!");