Re: [evolution-patches] Patch for a lot of compiler warnings and some other cleanups in evolution/calendar/*
- From: Kjartan Maraas <kmaraas broadpark no>
- To: evolution-patches <evolution-patches gnome org>
- Subject: Re: [evolution-patches] Patch for a lot of compiler warnings and some other cleanups in evolution/calendar/*
- Date: Tue, 19 Sep 2006 11:18:21 +0200
tir, 29,.08.2006 kl. 18.03 +0200, skrev Kjartan Maraas:
> This probably needs a couple of rounds of review before going in.
>
> - compiler warnings, mostly incompatible pointers being used as
> arguments or for assignments, also unused variables, signedness issues,
> implicit declarations etc
>
> - changes to GString handling
> micro-optimizations because passing the lenght where we know it when
> appending/prepending to a GString supposedly saves a call to strlen().
> Same thing for g_string_new("") vs g_string_new(NULL)
>
Rediffed after the latest batch of similar fixes by Matthew.
Cheers
Kjartan
? calendar.error
? warnings
? gui/apps_evolution_calendar-2.8.schemas
Index: gui/cal-search-bar.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/cal-search-bar.c,v
retrieving revision 1.30
diff -u -p -r1.30 cal-search-bar.c
--- gui/cal-search-bar.c 18 Sep 2006 17:19:10 -0000 1.30
+++ gui/cal-search-bar.c 19 Sep 2006 09:09:16 -0000
@@ -30,6 +30,7 @@
#include <gtk/gtkoptionmenu.h>
#include <gtk/gtksignal.h>
#include <libgnome/gnome-i18n.h>
+#include <libedataserver/e-categories.h>
#include <e-util/e-icon-factory.h>
#include <libedataserver/e-categories.h>
#include "cal-search-bar.h"
@@ -252,7 +253,7 @@ notify_e_cal_view_contains (CalSearchBar
sexp = g_strdup_printf ("(contains? \"%s\" \"%s\")", field, text);
g_free (text);
} else
- sexp = g_strdup_printf ("(contains? \"summary\" \"\")", field, text); /* Show all */
+ sexp = g_strdup_printf ("(contains? \"summary\" \"%s\")", field); /* Show all */
/* Apply the selected view on search */
@@ -264,6 +265,7 @@ notify_e_cal_view_contains (CalSearchBar
g_free (sexp);
}
+#if 0
/* Sets the query string to the appropriate match for categories */
static void
notify_category_is (CalSearchBar *cal_search)
@@ -280,13 +282,14 @@ notify_category_is (CalSearchBar *cal_se
if (sexp)
g_free (sexp);
}
+#endif
/* Creates a new query from the values in the widgets and notifies upstream */
static void
regen_query (CalSearchBar *cal_search)
{
int id;
- const char *category_sexp, *category;
+ const char *category_sexp;
/* Fetch the data from the ESearchBar's entry widgets */
id = e_search_bar_get_item_id (E_SEARCH_BAR (cal_search));
@@ -321,6 +324,7 @@ regen_query (CalSearchBar *cal_search)
}
}
+#if 0
static void
regen_view_query (CalSearchBar *cal_search)
{
@@ -331,6 +335,8 @@ regen_view_query (CalSearchBar *cal_sear
gtk_signal_emit (GTK_OBJECT (cal_search), cal_search_bar_signals[CATEGORY_CHANGED],
category);
}
+#endif
+
/* search_activated handler for the calendar search bar */
static void
cal_search_bar_search_activated (ESearchBar *search)
@@ -375,7 +381,6 @@ generate_viewoption_menu (CALSearchBarIt
{
GtkWidget *menu, *menu_item;
gint i = 0;
- GSList *l;
menu = gtk_menu_new ();
@@ -444,7 +449,7 @@ make_suboptions (CalSearchBar *cal_searc
subitems[i + CATEGORIES_OFFSET].search.text = str;
subitems[i + CATEGORIES_OFFSET].search.id = i + CATEGORIES_OFFSET;
- subitems[i + CATEGORIES_OFFSET].image = e_categories_get_icon_file_for(str);
+ subitems[i + CATEGORIES_OFFSET].image = g_strdup (e_categories_get_icon_file_for(str));
}
subitems[i + CATEGORIES_OFFSET].search.id = -1; /* terminator */
@@ -461,9 +466,10 @@ make_suboptions (CalSearchBar *cal_searc
e_search_bar_set_viewoption_menu ((ESearchBar *)cal_search, menu);
/* Free the strings */
- for (i = 0; i < priv->categories->len; i++)
+ for (i = 0; i < priv->categories->len; i++) {
g_free (subitems[i + CATEGORIES_OFFSET].search.text);
-
+ g_free (subitems[i + CATEGORIES_OFFSET].image);
+ }
g_free (subitems);
}
Index: gui/e-cal-component-memo-preview.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-cal-component-memo-preview.c,v
retrieving revision 1.6
diff -u -p -r1.6 e-cal-component-memo-preview.c
--- gui/e-cal-component-memo-preview.c 11 Sep 2006 09:47:44 -0000 1.6
+++ gui/e-cal-component-memo-preview.c 19 Sep 2006 09:09:17 -0000
@@ -158,7 +158,7 @@ write_html (GtkHTMLStream *stream, ECal
e_cal_component_get_categories_list (comp, &l);
if (l) {
GSList *node;
- GString *string = g_string_new ("");
+ GString *string = g_string_new (NULL);
gtk_html_stream_printf(stream, "<H3>Categories: ");
@@ -186,7 +186,9 @@ write_html (GtkHTMLStream *stream, ECal
}
gtk_html_stream_printf(stream, string->str);
-
+
+ g_string_free (string, TRUE);
+
gtk_html_stream_printf(stream, "</H3>");
e_cal_component_free_categories_list (l);
@@ -220,17 +222,17 @@ write_html (GtkHTMLStream *stream, ECal
for (node = l; node != NULL; node = node->next) {
gint i, j;
- GString *string = g_string_new ("");
+ GString *string = g_string_new (NULL);
text = * (ECalComponentText *) node->data;
for (i = 0, j=0; i < strlen (text.value ? text.value : 0); i++, j++) {
if (text.value[i] == '\n'){
- string = g_string_append (string, "<BR>");
+ string = g_string_append_len (string, "<BR>", 4);
}
else if (text.value[i] == '<')
- string = g_string_append (string, "<");
+ string = g_string_append_len (string, "<", 4);
else if (text.value[i] == '>')
- string = g_string_append (string, ">");
+ string = g_string_append_len (string, ">", 4);
else
string = g_string_append_c (string, text.value[i]);
}
Index: gui/e-cal-component-preview.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-cal-component-preview.c,v
retrieving revision 1.8
diff -u -p -r1.8 e-cal-component-preview.c
--- gui/e-cal-component-preview.c 8 Feb 2006 13:06:02 -0000 1.8
+++ gui/e-cal-component-preview.c 19 Sep 2006 09:09:17 -0000
@@ -272,16 +272,16 @@ write_html (GtkHTMLStream *stream, ECal
for (node = l; node != NULL; node = node->next) {
gint i;
- GString *string = g_string_new ("");;
+ GString *string = g_string_new (NULL);;
text = * (ECalComponentText *) node->data;
for (i = 0; i < strlen (text.value ? text.value : 0); i++) {
if (text.value[i] == '\n')
- string = g_string_append (string, "<BR>");
+ string = g_string_append_len (string, "<BR>", 4);
else if (text.value[i] == '<')
- string = g_string_append (string, "<");
+ string = g_string_append_len (string, "<", 4);
else if (text.value[i] == '>')
- string = g_string_append (string, ">");
+ string = g_string_append_len (string, ">", 4);
else
string = g_string_append_c (string, text.value[i]);
}
Index: gui/e-cal-model-tasks.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-cal-model-tasks.c,v
retrieving revision 1.38
diff -u -p -r1.38 e-cal-model-tasks.c
--- gui/e-cal-model-tasks.c 8 Aug 2006 08:13:11 -0000 1.38
+++ gui/e-cal-model-tasks.c 19 Sep 2006 09:09:17 -0000
@@ -1111,8 +1111,7 @@ void
e_cal_model_tasks_mark_task_incomplete (ECalModelTasks *model, gint model_row)
{
ECalModelComponent *comp_data;
- icalproperty *prop,*prop1,*prop2;
- gboolean set_completed = TRUE;
+ icalproperty *prop,*prop1;
g_return_if_fail (E_IS_CAL_MODEL_TASKS (model));
g_return_if_fail (model_row >= 0 && model_row < e_table_model_row_count (E_TABLE_MODEL (model)));
Index: gui/e-cal-model.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-cal-model.c,v
retrieving revision 1.77
diff -u -p -r1.77 e-cal-model.c
--- gui/e-cal-model.c 22 Jul 2006 10:15:59 -0000 1.77
+++ gui/e-cal-model.c 19 Sep 2006 09:09:18 -0000
@@ -349,7 +349,7 @@ get_description (ECalModelComponent *com
prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_DESCRIPTION_PROPERTY);
if (prop) {
- str = g_string_new ("");
+ str = g_string_new (NULL);
do {
str = g_string_append (str, icalproperty_get_description (prop));
} while ((prop = icalcomponent_get_next_property (comp_data->icalcomp, ICAL_DESCRIPTION_PROPERTY)));
@@ -2098,7 +2098,7 @@ e_cal_model_get_object_array (ECalModel
}
void
-e_cal_model_set_instance_times (ECalModelComponent *comp_data, icaltimezone *zone)
+e_cal_model_set_instance_times (ECalModelComponent *comp_data, const icaltimezone *zone)
{
struct icaltimetype start_time, end_time;
Index: gui/e-cal-model.h
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-cal-model.h,v
retrieving revision 1.18
diff -u -p -r1.18 e-cal-model.h
--- gui/e-cal-model.h 11 Oct 2005 09:07:24 -0000 1.18
+++ gui/e-cal-model.h 19 Sep 2006 09:09:18 -0000
@@ -153,7 +153,7 @@ void e_cal_model_generate
ECalRecurInstanceFn cb,
gpointer cb_data);
GPtrArray * e_cal_model_get_object_array (ECalModel *model);
-void e_cal_model_set_instance_times (ECalModelComponent *comp_data, icaltimezone *zone);
+void e_cal_model_set_instance_times (ECalModelComponent *comp_data, const icaltimezone *zone);
Index: gui/e-cal-popup.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-cal-popup.c,v
retrieving revision 1.25
diff -u -p -r1.25 e-cal-popup.c
--- gui/e-cal-popup.c 14 Jul 2006 05:23:19 -0000 1.25
+++ gui/e-cal-popup.c 19 Sep 2006 09:09:18 -0000
@@ -381,7 +381,6 @@ ecalp_standard_menu_factory (EPopup *eca
g_free (mime_type);
if (apps) {
- GString *label = g_string_new("");
GSList *open_menus = NULL;
GList *l;
@@ -407,7 +406,6 @@ ecalp_standard_menu_factory (EPopup *eca
if (open_menus)
e_popup_add_items(ecalp, open_menus, NULL, ecalp_apps_popup_free, NULL);
- g_string_free(label, TRUE);
g_list_free(apps);
}
}
Index: gui/e-day-view-config.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-day-view-config.c,v
retrieving revision 1.11
diff -u -p -r1.11 e-day-view-config.c
--- gui/e-day-view-config.c 8 Feb 2006 13:06:02 -0000 1.11
+++ gui/e-day-view-config.c 19 Sep 2006 09:09:19 -0000
@@ -394,7 +394,7 @@ void
e_day_view_config_set_view (EDayViewConfig *view_config, EDayView *day_view)
{
EDayViewConfigPrivate *priv;
- guint not, not_1, not_2;
+ gint not, not_1, not_2;
GList *l;
g_return_if_fail (view_config != NULL);
Index: gui/e-day-view-main-item.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-day-view-main-item.c,v
retrieving revision 1.54
diff -u -p -r1.54 e-day-view-main-item.c
--- gui/e-day-view-main-item.c 18 Sep 2006 13:04:34 -0000 1.54
+++ gui/e-day-view-main-item.c 19 Sep 2006 09:09:20 -0000
@@ -1271,7 +1271,7 @@ e_day_view_main_item_draw_day_event (EDa
gint end_hour, end_display_hour, end_minute, end_suffix_width;
gboolean show_span = FALSE, format_time;
gint offset, interval;
- char *text, *start_suffix, *end_suffix;
+ char *text = NULL, *start_suffix, *end_suffix;
int scroll_flag = 0;
gint row_y;
GConfClient *gconf;
Index: gui/e-day-view-time-item.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-day-view-time-item.c,v
retrieving revision 1.38
diff -u -p -r1.38 e-day-view-time-item.c
--- gui/e-day-view-time-item.c 4 May 2006 15:14:24 -0000 1.38
+++ gui/e-day-view-time-item.c 19 Sep 2006 09:09:20 -0000
@@ -178,7 +178,6 @@ e_day_view_time_item_get_column_width (E
gint digit, large_digit_width, max_large_digit_width = 0;
gint max_suffix_width, max_minute_or_suffix_width;
gint column_width_default, column_width_60_min_rows;
- cairo_t *cr;
day_view = dvtmitem->day_view;
g_return_val_if_fail (day_view != NULL, 0);
Index: gui/e-day-view.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-day-view.c,v
retrieving revision 1.303
diff -u -p -r1.303 e-day-view.c
--- gui/e-day-view.c 28 Jul 2006 09:25:19 -0000 1.303
+++ gui/e-day-view.c 19 Sep 2006 09:09:47 -0000
@@ -2473,11 +2473,11 @@ e_day_view_update_event_label (EDayView
if ((interval/day_view->mins_per_row) >= 2)
short_event = FALSE;
- else if ((interval%day_view->mins_per_row)==0)
+ else if ((interval%day_view->mins_per_row)==0) {
if (((event->end_minute%day_view->mins_per_row)==0) || ((event->start_minute%day_view->mins_per_row)==0)){
short_event = TRUE;
}
- else
+ } else
short_event = FALSE;
if (!editing_event) {
@@ -7132,7 +7132,7 @@ e_day_view_on_text_item_event (GnomeCanv
pevent->y = ((GdkEventCrossing *)event)->y_root;
pevent->tooltip = NULL;
- data->cal_view = day_view;
+ data->cal_view = (ECalendarView *)day_view;
data->day = day;
data->event_num = event_num;
data->get_view_event = tooltip_get_view_event;
Index: gui/e-meeting-list-view.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-meeting-list-view.c,v
retrieving revision 1.33
diff -u -p -r1.33 e-meeting-list-view.c
--- gui/e-meeting-list-view.c 18 Sep 2006 13:04:34 -0000 1.33
+++ gui/e-meeting-list-view.c 19 Sep 2006 09:09:48 -0000
@@ -287,7 +287,7 @@ e_meeting_list_view_remove_attendee_from
if (e_destination_is_evolution_list (des)) {
GList *l, *dl;
- dl = e_destination_list_get_dests (des);
+ dl = g_list_copy ((GList *)e_destination_list_get_dests (des));
for (l = dl; l; l = l->next) {
attendee = e_destination_get_email (l->data);
@@ -335,7 +335,7 @@ attendee_edited_cb (GtkCellRenderer *ren
continue;
attendee = e_meeting_store_add_attendee_with_defaults (model);
- e_meeting_attendee_set_address (attendee, g_strdup_printf ("MAILTO:%s", l->data));
+ e_meeting_attendee_set_address (attendee, g_strdup_printf ("MAILTO:%s", (char *)l->data));
e_meeting_attendee_set_cn (attendee, g_strdup (m->data));
if (existing_attendee) {
/* FIXME Should we copy anything else? */
@@ -367,7 +367,7 @@ attendee_edited_cb (GtkCellRenderer *ren
e_meeting_store_remove_attendee (model, existing_attendee);
}
} else {
- EMeetingAttendee *attendee = e_meeting_attendee_new ();
+ EMeetingAttendee *attendee = E_MEETING_ATTENDEE (e_meeting_attendee_new ());
if (existing_attendee)
e_meeting_list_view_remove_attendee_from_name_selector (E_MEETING_LIST_VIEW (view),
@@ -568,7 +568,6 @@ row_activated_cb (GtkTreeSelection *sele
{
EMeetingAttendee *existing_attendee;
EMeetingListViewPrivate *priv;
- GtkTreeIter iter;
int row;
EMeetingAttendeeEditLevel el;
gint edit_level;
@@ -804,7 +803,7 @@ add_to_list (gpointer data, gpointer u_d
{
GSList **user_data = u_data;
- *user_data = g_slist_append (*user_data, itip_strip_mailto (e_meeting_attendee_get_address (data)));
+ *user_data = g_slist_append (*user_data, (gpointer)itip_strip_mailto (e_meeting_attendee_get_address (data)));
}
static void
Index: gui/e-meeting-store.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-meeting-store.c,v
retrieving revision 1.19
diff -u -p -r1.19 e-meeting-store.c
--- gui/e-meeting-store.c 10 Apr 2006 10:11:16 -0000 1.19
+++ gui/e-meeting-store.c 19 Sep 2006 09:09:50 -0000
@@ -1472,7 +1472,7 @@ e_meeting_store_refresh_busy_periods (EM
guint
e_meeting_store_get_num_queries (EMeetingStore *store)
{
- g_return_if_fail (E_IS_MEETING_STORE (store));
+ g_return_val_if_fail (E_IS_MEETING_STORE (store), 0);
return store->priv->num_queries;
}
Index: gui/e-tasks.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-tasks.c,v
retrieving revision 1.132
diff -u -p -r1.132 e-tasks.c
--- gui/e-tasks.c 30 Jun 2006 09:46:10 -0000 1.132
+++ gui/e-tasks.c 19 Sep 2006 09:09:50 -0000
@@ -559,7 +559,7 @@ setup_widgets (ETasks *tasks)
/* create the task list */
priv->tasks_view = e_calendar_table_new ();
- g_object_set_data (priv->tasks_view, "tasks", tasks);
+ g_object_set_data (G_OBJECT (priv->tasks_view), "tasks", tasks);
priv->tasks_view_config = e_calendar_table_config_new (E_CALENDAR_TABLE (priv->tasks_view));
g_signal_connect (priv->tasks_view, "user_created", G_CALLBACK (user_created_cb), tasks);
Index: gui/e-week-view.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-week-view.c,v
retrieving revision 1.261
diff -u -p -r1.261 e-week-view.c
--- gui/e-week-view.c 11 Jul 2006 11:54:45 -0000 1.261
+++ gui/e-week-view.c 19 Sep 2006 09:09:51 -0000
@@ -2577,7 +2577,7 @@ tooltip_event_cb (GnomeCanvasItem *item,
pevent->y = ((GdkEventCrossing *)event)->y_root;
pevent->tooltip = NULL;
- data->cal_view = view;
+ data->cal_view = (ECalendarView *)view;
data->day = -1;
data->event_num = event_num;
data->get_view_event = tooltip_get_view_event;
@@ -3149,7 +3149,7 @@ e_week_view_on_text_item_event (GnomeCan
pevent->y = ((GdkEventCrossing *)gdkevent)->y_root;
pevent->tooltip = NULL;
- data->cal_view = week_view;
+ data->cal_view = (ECalendarView *)week_view;
data->day = -1;
data->event_num = nevent;
data->get_view_event = tooltip_get_view_event;
Index: gui/gnome-cal.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/gnome-cal.c,v
retrieving revision 1.401
diff -u -p -r1.401 gnome-cal.c
--- gui/gnome-cal.c 28 Aug 2006 05:24:15 -0000 1.401
+++ gui/gnome-cal.c 19 Sep 2006 09:09:52 -0000
@@ -1427,7 +1427,7 @@ view_done_cb (ECalModel *model, ECalenda
GtkWidget *
gnome_calendar_get_tag (GnomeCalendar *gcal)
{
- return gcal->priv->date_navigator;
+ return GTK_WIDGET (gcal->priv->date_navigator);
}
static void
@@ -3444,7 +3444,7 @@ gnome_calendar_cut_clipboard (GnomeCalen
} else if (location == FOCUS_TASKPAD)
e_calendar_table_cut_clipboard (E_CALENDAR_TABLE (priv->todo));
else if (location == FOCUS_MEMOPAD)
- e_calendar_table_copy_clipboard (E_MEMO_TABLE (priv->memo));
+ e_calendar_table_copy_clipboard (E_CALENDAR_TABLE (priv->memo));
}
void
@@ -3462,7 +3462,7 @@ gnome_calendar_copy_clipboard (GnomeCale
} else if (location == FOCUS_TASKPAD)
e_calendar_table_copy_clipboard (E_CALENDAR_TABLE (priv->todo));
else if (location == FOCUS_MEMOPAD)
- e_calendar_table_copy_clipboard (E_MEMO_TABLE (priv->memo));
+ e_calendar_table_copy_clipboard (E_CALENDAR_TABLE (priv->memo));
}
void
Index: gui/gnome-cal.h
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/gnome-cal.h,v
retrieving revision 1.107
diff -u -p -r1.107 gnome-cal.h
--- gui/gnome-cal.h 18 Sep 2006 17:19:10 -0000 1.107
+++ gui/gnome-cal.h 19 Sep 2006 09:16:12 -0000
@@ -138,6 +138,7 @@ ECalendarTable *gnome_calendar_get_task_
GtkWidget *gnome_calendar_get_e_calendar_widget (GnomeCalendar *gcal);
GtkWidget *gnome_calendar_get_search_bar_widget (GnomeCalendar *gcal);
GtkWidget *gnome_calendar_get_view_notebook_widget (GnomeCalendar *gcal);
+GtkWidget *gnome_calendar_get_tag (GnomeCalendar *gcal);
struct _ECalMenu *gnome_calendar_get_taskpad_menu (GnomeCalendar *gcal);
struct _ECalMenu *gnome_calendar_get_calendar_menu (GnomeCalendar *gcal);
Index: gui/itip-utils.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/itip-utils.c,v
retrieving revision 1.114
diff -u -p -r1.114 itip-utils.c
--- gui/itip-utils.c 19 Aug 2006 10:50:26 -0000 1.114
+++ gui/itip-utils.c 19 Sep 2006 09:16:12 -0000
@@ -603,16 +603,18 @@ comp_to_list (ECalComponentItipMethod me
break;
case E_CAL_COMPONENT_METHOD_PUBLISH:
if(users) {
+ GList *list;
+
len = g_list_length (users);
to_list = GNOME_Evolution_Composer_RecipientList__alloc ();
to_list->_maximum = len;
to_list->_length = 0;
to_list->_buffer = CORBA_sequence_GNOME_Evolution_Composer_Recipient_allocbuf (len);
- for (l = users; l != NULL; l = l->next) {
+ for (list = users; list != NULL; list = list->next) {
recipient = &(to_list->_buffer[to_list->_length]);
recipient->name = CORBA_string_dup ("");
- recipient->address = CORBA_string_dup (l->data);
+ recipient->address = CORBA_string_dup (list->data);
to_list->_length++;
}
Index: gui/memos-component.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/memos-component.c,v
retrieving revision 1.10
diff -u -p -r1.10 memos-component.c
--- gui/memos-component.c 22 Aug 2006 17:21:40 -0000 1.10
+++ gui/memos-component.c 19 Sep 2006 09:16:13 -0000
@@ -518,7 +518,7 @@ source_removed_cb (EMemos *memos, ESourc
static void
set_info (MemosComponentView *component_view)
{
- GString *message = g_string_new ("");
+ GString *message = g_string_new (NULL);
int rows, selected_rows;
rows = e_table_model_row_count (component_view->model);
Index: gui/migration.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/migration.c,v
retrieving revision 1.43
diff -u -p -r1.43 migration.c
--- gui/migration.c 28 Aug 2006 11:29:43 -0000 1.43
+++ gui/migration.c 19 Sep 2006 09:16:13 -0000
@@ -248,7 +248,7 @@ get_source_name (ESourceGroup *group, co
int i, j, starting_index;
int num_elements;
gboolean conflict;
- GString *s = g_string_new ("");
+ GString *s = g_string_new (NULL);
for (i = 0; p[i]; i ++) ;
@@ -260,7 +260,6 @@ get_source_name (ESourceGroup *group, co
/* check if it conflicts */
starting_index = i;
do {
- g_string_assign (s, "");
for (j = starting_index; j < num_elements; j += 2) {
if (j != starting_index)
g_string_append_c (s, '_');
Index: gui/tasks-component.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/tasks-component.c,v
retrieving revision 1.99
diff -u -p -r1.99 tasks-component.c
--- gui/tasks-component.c 8 Jul 2006 13:29:35 -0000 1.99
+++ gui/tasks-component.c 19 Sep 2006 09:16:13 -0000
@@ -508,7 +508,7 @@ source_removed_cb (ETasks *tasks, ESourc
static void
set_info (TasksComponentView *component_view)
{
- GString *message = g_string_new ("");
+ GString *message = g_string_new (NULL);
int rows, selected_rows;
rows = e_table_model_row_count (component_view->model);
Index: gui/dialogs/cal-attachment-select-file.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/cal-attachment-select-file.c,v
retrieving revision 1.4
diff -u -p -r1.4 cal-attachment-select-file.c
--- gui/dialogs/cal-attachment-select-file.c 25 May 2006 06:04:41 -0000 1.4
+++ gui/dialogs/cal-attachment-select-file.c 19 Sep 2006 09:16:13 -0000
@@ -82,7 +82,7 @@ run_selector(CompEditor *editor, const c
NULL);
gtk_dialog_set_default_response (GTK_DIALOG (selection), GTK_RESPONSE_OK);
- gtk_file_chooser_set_local_only (selection, FALSE);
+ gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER (selection), FALSE);
if ((flags & SELECTOR_MODE_SAVE) == 0)
gtk_file_chooser_set_select_multiple ((GtkFileChooser *) selection, (flags & SELECTOR_MODE_MULTI));
Index: gui/dialogs/comp-editor.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/comp-editor.c,v
retrieving revision 1.172
diff -u -p -r1.172 comp-editor.c
--- gui/dialogs/comp-editor.c 10 Aug 2006 07:34:30 -0000 1.172
+++ gui/dialogs/comp-editor.c 19 Sep 2006 09:16:14 -0000
@@ -2360,7 +2360,7 @@ fill_widgets (CompEditor *editor)
GSList *attachment_list = NULL;
e_cal_component_get_attachment_list (priv->comp, &attachment_list);
set_attachment_list (editor, attachment_list);
- g_slist_foreach (attachment_list, g_free, NULL);
+ g_slist_foreach (attachment_list, (GFunc)g_free, NULL);
g_slist_free (attachment_list);
}
Index: gui/dialogs/delete-comp.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/delete-comp.c,v
retrieving revision 1.28
diff -u -p -r1.28 delete-comp.c
--- gui/dialogs/delete-comp.c 3 Apr 2006 08:36:49 -0000 1.28
+++ gui/dialogs/delete-comp.c 19 Sep 2006 09:16:14 -0000
@@ -201,7 +201,7 @@ prompt_retract_dialog (ECalComponent *co
gtk_window_set_resizable (GTK_WINDOW (dialog), TRUE);
gtk_box_set_spacing ((GtkBox *) (GTK_DIALOG (dialog)->vbox), 12);
- vbox = GTK_CONTAINER (GTK_DIALOG (dialog)->vbox);
+ vbox = GTK_WIDGET (GTK_DIALOG (dialog)->vbox);
cb = gtk_check_button_new_with_mnemonic (_("_Delete this item from all other recipient's mailboxes?"));
gtk_container_add (GTK_CONTAINER (vbox), cb);
Index: gui/dialogs/event-page.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/event-page.c,v
retrieving revision 1.119
diff -u -p -r1.119 event-page.c
--- gui/dialogs/event-page.c 22 Aug 2006 11:57:47 -0000 1.119
+++ gui/dialogs/event-page.c 19 Sep 2006 09:16:17 -0000
@@ -2746,6 +2746,7 @@ alarm_store_changed_cb (EAlarmList *alar
field_changed_cb (NULL, data);
}
+#if 0
static void
alarm_custom_clicked_cb (GtkWidget *widget, gpointer data)
{
@@ -2789,6 +2790,7 @@ alarm_custom_clicked_cb (GtkWidget *widg
sensitize_widgets (epage);
}
+#endif
/* Hooks the widget signals */
static gboolean
@@ -2799,7 +2801,7 @@ init_widgets (EventPage *epage)
icaltimezone *zone;
char *menu_label = NULL;
GtkTreeSelection *selection;
- GtkWidget *w, *cus_label, *cus_item, *menu;
+ GtkWidget *w, *cus_item, *menu;
priv = epage->priv;
Index: gui/dialogs/memo-editor.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/memo-editor.c,v
retrieving revision 1.7
diff -u -p -r1.7 memo-editor.c
--- gui/dialogs/memo-editor.c 24 Aug 2006 13:53:21 -0000 1.7
+++ gui/dialogs/memo-editor.c 19 Sep 2006 09:16:17 -0000
@@ -244,9 +244,6 @@ memo_editor_set_e_cal (CompEditor *edito
static void
memo_editor_edit_comp (CompEditor *editor, ECalComponent *comp)
{
- CompEditorFlags flags = comp_editor_get_flags (editor);
- ECal *client = comp_editor_get_e_cal (editor);
-
if (COMP_EDITOR_CLASS (memo_editor_parent_class)->edit_comp)
COMP_EDITOR_CLASS (memo_editor_parent_class)->edit_comp (editor, comp);
}
Index: gui/dialogs/memo-page.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/memo-page.c,v
retrieving revision 1.11
diff -u -p -r1.11 memo-page.c
--- gui/dialogs/memo-page.c 1 Sep 2006 08:17:29 -0000 1.11
+++ gui/dialogs/memo-page.c 19 Sep 2006 09:16:18 -0000
@@ -535,11 +535,11 @@ fill_comp_with_recipients (ENameSelector
continue;
if (!str) {
- str = g_string_new ("");
+ str = g_string_new (NULL);
g_string_prepend (str, attendee);
continue;
}
- g_string_prepend (str, ";");
+ g_string_prepend_c (str, ';');
g_string_prepend (str, attendee);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]