aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-05-26 11:07:23 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-05-26 11:07:23 +0800
commit04a042ee01dba30ba231c48ec7d172b6be1a6fca (patch)
tree080e3ad2fe16da7e3fb057e1baa0b3734a4e4d2f /widgets
parenta6c9a55391c484038a98f0326798949c52621c50 (diff)
downloadgsoc2013-evolution-04a042ee01dba30ba231c48ec7d172b6be1a6fca.tar
gsoc2013-evolution-04a042ee01dba30ba231c48ec7d172b6be1a6fca.tar.gz
gsoc2013-evolution-04a042ee01dba30ba231c48ec7d172b6be1a6fca.tar.bz2
gsoc2013-evolution-04a042ee01dba30ba231c48ec7d172b6be1a6fca.tar.lz
gsoc2013-evolution-04a042ee01dba30ba231c48ec7d172b6be1a6fca.tar.xz
gsoc2013-evolution-04a042ee01dba30ba231c48ec7d172b6be1a6fca.tar.zst
gsoc2013-evolution-04a042ee01dba30ba231c48ec7d172b6be1a6fca.zip
Fix compiler warnings in widgets.
Diffstat (limited to 'widgets')
-rw-r--r--widgets/e-timezone-dialog/e-timezone-dialog.c4
-rw-r--r--widgets/menus/gal-define-views-dialog.c4
-rw-r--r--widgets/menus/gal-view-instance.c4
-rw-r--r--widgets/menus/gal-view-menus.c2
-rw-r--r--widgets/menus/gal-view-new-dialog.c2
-rw-r--r--widgets/misc/e-attachment-view.c6
-rw-r--r--widgets/misc/e-calendar-item.h9
-rw-r--r--widgets/misc/e-canvas-vbox.c2
-rw-r--r--widgets/misc/e-canvas.c2
-rw-r--r--widgets/misc/e-cell-date-edit.c4
-rw-r--r--widgets/misc/e-charset-picker.c15
-rw-r--r--widgets/misc/e-cursors.c8
-rw-r--r--widgets/misc/e-filter-bar.c2
-rw-r--r--widgets/misc/e-image-chooser.c2
-rw-r--r--widgets/misc/e-multi-config-dialog.c2
-rw-r--r--widgets/misc/e-popup-menu.h68
-rw-r--r--widgets/misc/e-search-bar.h6
-rw-r--r--widgets/misc/e-selection-model-simple.c4
-rw-r--r--widgets/misc/e-spinner.c6
-rw-r--r--widgets/misc/e-unicode.c4
-rw-r--r--widgets/misc/e-unicode.h1
-rw-r--r--widgets/misc/pixmaps/cursor_cross.xpm2
-rw-r--r--widgets/misc/pixmaps/cursor_hand_closed.xpm2
-rw-r--r--widgets/misc/pixmaps/cursor_hand_open.xpm2
-rw-r--r--widgets/misc/pixmaps/cursor_zoom_in.xpm2
-rw-r--r--widgets/misc/pixmaps/cursor_zoom_out.xpm2
-rw-r--r--widgets/misc/test-calendar.c2
-rw-r--r--widgets/misc/test-dateedit.c18
-rw-r--r--widgets/misc/test-dropdown-button.c14
-rw-r--r--widgets/table/add-col.xpm2
-rw-r--r--widgets/table/e-cell-combo.c2
-rw-r--r--widgets/table/e-cell-popup.c2
-rw-r--r--widgets/table/e-cell-popup.h4
-rw-r--r--widgets/table/e-cell-text.c6
-rw-r--r--widgets/table/e-cell.c8
-rw-r--r--widgets/table/e-table-config.c5
-rw-r--r--widgets/table/e-table-extras.c6
-rw-r--r--widgets/table/e-table-extras.h6
-rw-r--r--widgets/table/e-table-field-chooser-dialog.c2
-rw-r--r--widgets/table/e-table-field-chooser-item.c2
-rw-r--r--widgets/table/e-table-field-chooser.c2
-rw-r--r--widgets/table/e-table-header-item.c28
-rw-r--r--widgets/table/e-table-model.c4
-rw-r--r--widgets/table/e-table-model.h2
-rw-r--r--widgets/table/e-table-selection-model.c6
-rw-r--r--widgets/table/e-table-selection-model.h2
-rw-r--r--widgets/table/e-table-specification.c2
-rw-r--r--widgets/table/remove-col.xpm2
-rw-r--r--widgets/table/tree-expanded.xpm2
-rw-r--r--widgets/table/tree-unexpanded.xpm2
-rw-r--r--widgets/text/e-text-model.c2
-rw-r--r--widgets/text/e-text.c12
52 files changed, 131 insertions, 181 deletions
diff --git a/widgets/e-timezone-dialog/e-timezone-dialog.c b/widgets/e-timezone-dialog/e-timezone-dialog.c
index f0879a41ae..cff74204f1 100644
--- a/widgets/e-timezone-dialog/e-timezone-dialog.c
+++ b/widgets/e-timezone-dialog/e-timezone-dialog.c
@@ -81,8 +81,6 @@ extern long timezone;
extern int daylight;
#endif
-static void e_timezone_dialog_class_init (ETimezoneDialogClass *class);
-static void e_timezone_dialog_init (ETimezoneDialog *etd);
static void e_timezone_dialog_dispose (GObject *object);
static void e_timezone_dialog_finalize (GObject *object);
@@ -406,7 +404,7 @@ static void
format_utc_offset (int utc_offset,
char *buffer)
{
- char *sign = "+";
+ const gchar *sign = "+";
int hours, minutes, seconds;
if (utc_offset < 0) {
diff --git a/widgets/menus/gal-define-views-dialog.c b/widgets/menus/gal-define-views-dialog.c
index 4e252e1622..69778e4f3d 100644
--- a/widgets/menus/gal-define-views-dialog.c
+++ b/widgets/menus/gal-define-views-dialog.c
@@ -32,8 +32,6 @@
#include "gal-define-views-model.h"
#include "gal-view-new-dialog.h"
-static void gal_define_views_dialog_init (GalDefineViewsDialog *card);
-static void gal_define_views_dialog_class_init (GalDefineViewsDialogClass *klass);
static void gal_define_views_dialog_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
static void gal_define_views_dialog_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
static void gal_define_views_dialog_dispose (GObject *object);
@@ -221,7 +219,7 @@ gdvd_cursor_changed_callback (GtkWidget *widget, GalDefineViewsDialog *dialog)
}
static void
-gdvd_connect_signal(GalDefineViewsDialog *dialog, char *widget_name, char *signal, GCallback handler)
+gdvd_connect_signal(GalDefineViewsDialog *dialog, const char *widget_name, const char *signal, GCallback handler)
{
GtkWidget *widget;
diff --git a/widgets/menus/gal-view-instance.c b/widgets/menus/gal-view-instance.c
index a1eac04b6c..3b0e02c064 100644
--- a/widgets/menus/gal-view-instance.c
+++ b/widgets/menus/gal-view-instance.c
@@ -486,7 +486,7 @@ view_item_cb (GtkWidget *widget,
static void
add_popup_radio_item (EPopupMenu *menu_item,
- gchar *title,
+ const gchar *title,
GCallback fn,
gpointer closure,
gboolean value)
@@ -504,7 +504,7 @@ add_popup_radio_item (EPopupMenu *menu_item,
static void
add_popup_menu_item (EPopupMenu *menu_item,
- gchar *title,
+ const gchar *title,
GCallback fn,
gpointer closure)
{
diff --git a/widgets/menus/gal-view-menus.c b/widgets/menus/gal-view-menus.c
index 7305ff0534..e663c6e4e4 100644
--- a/widgets/menus/gal-view-menus.c
+++ b/widgets/menus/gal-view-menus.c
@@ -414,7 +414,7 @@ static BonoboUIVerb verbs [] = {
};
static void
-set_state (GalViewMenus *gvm, char *path, CORBA_Environment *ev)
+set_state (GalViewMenus *gvm, const gchar *path, CORBA_Environment *ev)
{
char *full_path = g_strdup_printf ("/commands/%s", path);
diff --git a/widgets/menus/gal-view-new-dialog.c b/widgets/menus/gal-view-new-dialog.c
index 061c04b71a..0822d83e2b 100644
--- a/widgets/menus/gal-view-new-dialog.c
+++ b/widgets/menus/gal-view-new-dialog.c
@@ -32,8 +32,6 @@
#include "gal-define-views-model.h"
#include "gal-view-new-dialog.h"
-static void gal_view_new_dialog_init (GalViewNewDialog *card);
-static void gal_view_new_dialog_class_init (GalViewNewDialogClass *klass);
static void gal_view_new_dialog_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
static void gal_view_new_dialog_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
static void gal_view_new_dialog_dispose (GObject *object);
diff --git a/widgets/misc/e-attachment-view.c b/widgets/misc/e-attachment-view.c
index 48292cfbc3..d2b676993d 100644
--- a/widgets/misc/e-attachment-view.c
+++ b/widgets/misc/e-attachment-view.c
@@ -39,9 +39,9 @@ enum {
/* Note: Do not use the info field. */
static GtkTargetEntry target_table[] = {
- { "_NETSCAPE_URL", 0, 0 },
- { "text/x-vcard", 0, 0 },
- { "text/calendar", 0, 0 }
+ { (gchar *) "_NETSCAPE_URL", 0, 0 },
+ { (gchar *) "text/x-vcard", 0, 0 },
+ { (gchar *) "text/calendar", 0, 0 }
};
static const gchar *ui =
diff --git a/widgets/misc/e-calendar-item.h b/widgets/misc/e-calendar-item.h
index b93ec9518d..0032e12a6c 100644
--- a/widgets/misc/e-calendar-item.h
+++ b/widgets/misc/e-calendar-item.h
@@ -287,7 +287,7 @@ void e_calendar_item_set_max_days_sel (ECalendarItem *calitem,
/* Get the maximum number of days selectable */
gint e_calendar_item_get_days_start_week_sel(ECalendarItem *calitem);
-/* Get the maximum number of days before whole weeks are selected */
+/* Set the maximum number of days selectable */
void e_calendar_item_set_days_start_week_sel(ECalendarItem *calitem,
gint days);
@@ -298,13 +298,6 @@ gboolean e_calendar_item_get_display_popup (ECalendarItem *calitem);
void e_calendar_item_set_display_popup (ECalendarItem *calitem,
gboolean display);
-/* Set the maximum number of days before whole weeks are selected */
-gint e_calendar_item_get_days_start_week_sel(ECalendarItem *calitem);
-
-/* Set the maximum number of days selectable */
-void e_calendar_item_set_days_start_week_sel(ECalendarItem *calitem,
- gint days);
-
/* Gets the range of dates actually shown. Months are 0 to 11.
This also includes the last days of the previous month and the first days
of the following month, which are normally shown in gray.
diff --git a/widgets/misc/e-canvas-vbox.c b/widgets/misc/e-canvas-vbox.c
index dfdfaf64dc..377a7a2605 100644
--- a/widgets/misc/e-canvas-vbox.c
+++ b/widgets/misc/e-canvas-vbox.c
@@ -34,8 +34,6 @@
#include "e-canvas-utils.h"
#include "e-canvas-vbox.h"
-static void e_canvas_vbox_init (ECanvasVbox *CanvasVbox);
-static void e_canvas_vbox_class_init (ECanvasVboxClass *klass);
static void e_canvas_vbox_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
static void e_canvas_vbox_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
static void e_canvas_vbox_dispose (GObject *object);
diff --git a/widgets/misc/e-canvas.c b/widgets/misc/e-canvas.c
index 903331576e..40aaf7d510 100644
--- a/widgets/misc/e-canvas.c
+++ b/widgets/misc/e-canvas.c
@@ -28,9 +28,7 @@
#include "e-canvas.h"
-static void e_canvas_init (ECanvas *card);
static void e_canvas_dispose (GObject *object);
-static void e_canvas_class_init (ECanvasClass *klass);
static void e_canvas_realize (GtkWidget *widget);
static void e_canvas_unrealize (GtkWidget *widget);
static gint e_canvas_key (GtkWidget *widget,
diff --git a/widgets/misc/e-cell-date-edit.c b/widgets/misc/e-cell-date-edit.c
index 97947980d9..76450b8f5f 100644
--- a/widgets/misc/e-cell-date-edit.c
+++ b/widgets/misc/e-cell-date-edit.c
@@ -95,7 +95,7 @@ static void e_cell_date_edit_on_none_clicked (GtkWidget *button,
static void e_cell_date_edit_on_today_clicked (GtkWidget *button,
ECellDateEdit *ecde);
static void e_cell_date_edit_update_cell (ECellDateEdit *ecde,
- char *text);
+ const gchar *text);
static void e_cell_date_edit_on_time_selected (GtkTreeSelection *selection, ECellDateEdit *ecde);
static void e_cell_date_edit_hide_popup (ECellDateEdit *ecde);
@@ -932,7 +932,7 @@ e_cell_date_edit_on_today_clicked (GtkWidget *button,
static void
e_cell_date_edit_update_cell (ECellDateEdit *ecde,
- char *text)
+ const gchar *text)
{
ECellPopup *ecp = E_CELL_POPUP (ecde);
ECellText *ecell_text = E_CELL_TEXT (ecp->child);
diff --git a/widgets/misc/e-charset-picker.c b/widgets/misc/e-charset-picker.c
index 87652974cb..6c7233ab9f 100644
--- a/widgets/misc/e-charset-picker.c
+++ b/widgets/misc/e-charset-picker.c
@@ -71,9 +71,9 @@ static const char *classnames[] = {
};
typedef struct {
- char *name;
+ const gchar *name;
ECharsetClass class;
- char *subclass;
+ const gchar *subclass;
} ECharset;
/* This list is based on what other mailers/browsers support. There's
@@ -146,7 +146,7 @@ add_charset (GtkWidget *menu, ECharset *charset, gboolean free_name)
item = gtk_menu_item_new_with_label (label);
g_object_set_data_full ((GObject *) item, "charset",
- charset->name, free_name ? g_free : NULL);
+ (gpointer) charset->name, free_name ? g_free : NULL);
g_free (label);
gtk_widget_show (item);
@@ -605,13 +605,14 @@ e_charset_picker_bonobo_ui_populate (BonoboUIComponent *uic, const char *path,
g_free (label);
for (i = 0; i < num_charsets; i++) {
- char *command;
- char *charset_name, *u;
+ gchar *charset_name;
+ gchar *command, *u;
/* escape _'s in the charset name so that it doesn't become an underline in a GtkLabel */
if ((u = strchr (charsets[i].name, '_'))) {
int extra = 1;
- char *s, *d;
+ const gchar *s;
+ gchar *d;
while ((u = strchr (u + 1, '_')))
extra++;
@@ -625,7 +626,7 @@ e_charset_picker_bonobo_ui_populate (BonoboUIComponent *uic, const char *path,
}
*d = '\0';
} else {
- charset_name = charsets[i].name;
+ charset_name = (gchar *) charsets[i].name;
}
if (charsets[i].subclass) {
diff --git a/widgets/misc/e-cursors.c b/widgets/misc/e-cursors.c
index ac03e18e70..f0b9ca6843 100644
--- a/widgets/misc/e-cursors.c
+++ b/widgets/misc/e-cursors.c
@@ -39,8 +39,8 @@
typedef struct {
GdkCursor *cursor;
- int hot_x, hot_y;
- char **xpm;
+ gint hot_x, hot_y;
+ const gchar **xpm;
} CursorDef;
static CursorDef cursors [] = {
@@ -63,7 +63,7 @@ static CursorDef cursors [] = {
static void
-create_bitmap_and_mask_from_xpm (GdkBitmap **bitmap, GdkBitmap **mask, gchar **xpm)
+create_bitmap_and_mask_from_xpm (GdkBitmap **bitmap, GdkBitmap **mask, const gchar **xpm)
{
int height, width, colors;
char pixmap_buffer [(32 * 32)/8];
@@ -155,7 +155,7 @@ e_cursors_shutdown (void)
GdkCursor *
e_cursor_get (ECursorType type)
{
- g_return_val_if_fail (type >= 0 && type < E_CURSOR_NUM_CURSORS, NULL);
+ g_return_val_if_fail (type < E_CURSOR_NUM_CURSORS, NULL);
return cursors [type].cursor;
}
diff --git a/widgets/misc/e-filter-bar.c b/widgets/misc/e-filter-bar.c
index ad688d3305..2dffb39cac 100644
--- a/widgets/misc/e-filter-bar.c
+++ b/widgets/misc/e-filter-bar.c
@@ -373,7 +373,7 @@ build_items (ESearchBar *esb, ESearchBarItem *items, int type, int *start, GPtrA
int id = 0, i;
GArray *menu = g_array_new (FALSE, FALSE, sizeof (ESearchBarItem));
ESearchBarItem item = { NULL, -1, 2 };
- char *source;
+ const gchar *source;
GSList *gtksux = NULL;
int num;
diff --git a/widgets/misc/e-image-chooser.c b/widgets/misc/e-image-chooser.c
index 20252f1b92..7d504685a5 100644
--- a/widgets/misc/e-image-chooser.c
+++ b/widgets/misc/e-image-chooser.c
@@ -85,7 +85,7 @@ enum DndTargetType {
#define URI_LIST_TYPE "text/uri-list"
static GtkTargetEntry image_drag_types[] = {
- { URI_LIST_TYPE, 0, DND_TARGET_TYPE_URI_LIST },
+ { (gchar *) URI_LIST_TYPE, 0, DND_TARGET_TYPE_URI_LIST },
};
static const int num_image_drag_types = sizeof (image_drag_types) / sizeof (image_drag_types[0]);
diff --git a/widgets/misc/e-multi-config-dialog.c b/widgets/misc/e-multi-config-dialog.c
index 0d5594cf66..6cee26e75c 100644
--- a/widgets/misc/e-multi-config-dialog.c
+++ b/widgets/misc/e-multi-config-dialog.c
@@ -52,7 +52,7 @@ G_DEFINE_TYPE (EMultiConfigDialog, e_multi_config_dialog, GTK_TYPE_DIALOG)
/* ETable stuff. */
-static char *list_e_table_spec =
+static const gchar *list_e_table_spec =
"<ETableSpecification cursor-mode=\"line\""
" selection-mode=\"browse\""
" no-headers=\"true\""
diff --git a/widgets/misc/e-popup-menu.h b/widgets/misc/e-popup-menu.h
index c297bde53f..37589f4243 100644
--- a/widgets/misc/e-popup-menu.h
+++ b/widgets/misc/e-popup-menu.h
@@ -29,65 +29,43 @@
G_BEGIN_DECLS
-#define E_POPUP_SEPARATOR { "", NULL, (NULL), NULL, 0 }
+#define E_POPUP_SEPARATOR { (gchar *) "", NULL, (NULL), NULL, 0 }
#define E_POPUP_TERMINATOR { NULL, NULL, (NULL), NULL, 0 }
/* In the following, CC = custom closure */
-#define E_POPUP_ITEM(name,fn,disable_mask) { (name), NULL, (fn), NULL, (disable_mask), NULL, NULL, 0, 0, 0, 0 }
-#define E_POPUP_ITEM_CC(name,fn,closure,disable_mask) { (name), NULL, (fn), NULL, (disable_mask), NULL, (closure), 0, 0, 0, 1 }
-#define E_POPUP_SUBMENU(name,submenu,disable_mask) { (name), NULL, NULL, (submenu), (disable_mask), NULL, NULL, 0, 0, 0, 0 }
+#define E_POPUP_ITEM(name,fn,disable_mask) { (gchar *) (name), NULL, (fn), NULL, (disable_mask), NULL, NULL, 0, 0, 0, 0 }
+#define E_POPUP_ITEM_CC(name,fn,closure,disable_mask) { (gchar *) (name), NULL, (fn), NULL, (disable_mask), NULL, (closure), 0, 0, 0, 1 }
+#define E_POPUP_SUBMENU(name,submenu,disable_mask) { (gchar *) (name), NULL, NULL, (submenu), (disable_mask), NULL, NULL, 0, 0, 0, 0 }
-#define E_POPUP_PIXMAP_ITEM(name,pixmap,fn,disable_mask) { (name), (pixmap), (fn), NULL, (disable_mask), NULL, NULL, 0, 0, 0, 0 }
-#define E_POPUP_PIXMAP_ITEM_CC(name,pixmap,fn,closure,disable_mask) { (name), (pixmap), (fn), NULL, (disable_mask), NULL, (closure), 0, 0, 0, 1 }
-#define E_POPUP_PIXMAP_SUBMENU(name,pixmap,submenu,disable_mask) { (name), (pixmap), NULL, (submenu), (disable_mask), NULL, NULL, 0, 0, 0, 0 }
+#define E_POPUP_PIXMAP_ITEM(name,pixmap,fn,disable_mask) { (gchar *) (name), (pixmap), (fn), NULL, (disable_mask), NULL, NULL, 0, 0, 0, 0 }
+#define E_POPUP_PIXMAP_ITEM_CC(name,pixmap,fn,closure,disable_mask) { (gchar *) (name), (pixmap), (fn), NULL, (disable_mask), NULL, (closure), 0, 0, 0, 1 }
+#define E_POPUP_PIXMAP_SUBMENU(name,pixmap,submenu,disable_mask) { (gchar *) (name), (pixmap), NULL, (submenu), (disable_mask), NULL, NULL, 0, 0, 0, 0 }
-#define E_POPUP_PIXMAP_WIDGET_ITEM(name,pixmap_widget,fn,disable_mask) { (name), NULL, (fn), NULL, (disable_mask), (pixmap_widget), NULL, 0, 0, 0, 0 }
-#define E_POPUP_PIXMAP_WIDGET_ITEM_CC(name,pixmap_widget,fn,closure,disable_mask) { (name), NULL, (fn), NULL, (disable_mask), (pixmap_widget), (closure), 0, 0, 0, 1 }
-#define E_POPUP_PIXMAP_WIDGET_SUBMENU(name,pixmap_widget,submenu,disable_mask) { (name), NULL, NULL, (submenu), (disable_mask), (pixmap_widget), NULL, 0, 0, 0, 0 }
+#define E_POPUP_PIXMAP_WIDGET_ITEM(name,pixmap_widget,fn,disable_mask) { (gchar *) (name), NULL, (fn), NULL, (disable_mask), (pixmap_widget), NULL, 0, 0, 0, 0 }
+#define E_POPUP_PIXMAP_WIDGET_ITEM_CC(name,pixmap_widget,fn,closure,disable_mask) { (gchar *) (name), NULL, (fn), NULL, (disable_mask), (pixmap_widget), (closure), 0, 0, 0, 1 }
+#define E_POPUP_PIXMAP_WIDGET_SUBMENU(name,pixmap_widget,submenu,disable_mask) { (gchar *) (name), NULL, NULL, (submenu), (disable_mask), (pixmap_widget), NULL, 0, 0, 0, 0 }
-#define E_POPUP_TOGGLE_ITEM(name,fn,disable_mask,value) { (name), NULL, (fn), NULL, (disable_mask), NULL, NULL, 1, 0, value, 0 }
-#define E_POPUP_TOGGLE_ITEM_CC(name,fn,closure,disable_mask,value) { (name), NULL, (fn), NULL, (disable_mask), NULL, (closure), 1, 0, value, 1 }
+#define E_POPUP_TOGGLE_ITEM(name,fn,disable_mask,value) { (gchar *) (name), NULL, (fn), NULL, (disable_mask), NULL, NULL, 1, 0, value, 0 }
+#define E_POPUP_TOGGLE_ITEM_CC(name,fn,closure,disable_mask,value) { (gchar *) (name), NULL, (fn), NULL, (disable_mask), NULL, (closure), 1, 0, value, 1 }
+#define E_POPUP_TOGGLE_ITEM_CC(name,fn,closure,disable_mask,value) { (gchar *) (name), NULL, (fn), NULL, (disable_mask), NULL, (closure), 1, 0, value, 1 }
-#define E_POPUP_SEPARATOR { "", NULL, (NULL), NULL, 0 }
-#define E_POPUP_TERMINATOR { NULL, NULL, (NULL), NULL, 0 }
-
-
-/* In the following, CC = custom closure */
-
-#define E_POPUP_ITEM(name,fn,disable_mask) { (name), NULL, (fn), NULL, (disable_mask), NULL, NULL, 0, 0, 0, 0 }
-#define E_POPUP_ITEM_CC(name,fn,closure,disable_mask) { (name), NULL, (fn), NULL, (disable_mask), NULL, (closure), 0, 0, 0, 1 }
-#define E_POPUP_SUBMENU(name,submenu,disable_mask) { (name), NULL, NULL, (submenu), (disable_mask), NULL, NULL, 0, 0, 0, 0 }
-
-#define E_POPUP_PIXMAP_ITEM(name,pixmap,fn,disable_mask) { (name), (pixmap), (fn), NULL, (disable_mask), NULL, NULL, 0, 0, 0, 0 }
-#define E_POPUP_PIXMAP_ITEM_CC(name,pixmap,fn,closure,disable_mask) { (name), (pixmap), (fn), NULL, (disable_mask), NULL, (closure), 0, 0, 0, 1 }
-#define E_POPUP_PIXMAP_SUBMENU(name,pixmap,submenu,disable_mask) { (name), (pixmap), NULL, (submenu), (disable_mask), NULL, NULL, 0, 0, 0, 0 }
-
-#define E_POPUP_PIXMAP_WIDGET_ITEM(name,pixmap_widget,fn,disable_mask) { (name), NULL, (fn), NULL, (disable_mask), (pixmap_widget), NULL, 0, 0, 0, 0 }
-#define E_POPUP_PIXMAP_WIDGET_ITEM_CC(name,pixmap_widget,fn,closure,disable_mask) { (name), NULL, (fn), NULL, (disable_mask), (pixmap_widget), (closure), 0, 0, 0, 1 }
-#define E_POPUP_PIXMAP_WIDGET_SUBMENU(name,pixmap_widget,submenu,disable_mask) { (name), NULL, NULL, (submenu), (disable_mask), (pixmap_widget), NULL, 0, 0, 0, 0 }
-
-
-#define E_POPUP_TOGGLE_ITEM(name,fn,disable_mask,value) { (name), NULL, (fn), NULL, (disable_mask), NULL, NULL, 1, 0, value, 0 }
-#define E_POPUP_TOGGLE_ITEM_CC(name,fn,closure,disable_mask,value) { (name), NULL, (fn), NULL, (disable_mask), NULL, (closure), 1, 0, value, 1 }
-
-#define E_POPUP_TOGGLE_PIXMAP_ITEM(name,pixmap,fn,disable_mask) { (name), (pixmap), (fn), NULL, (disable_mask), NULL, NULL, 1, 0, value, 0 }
-#define E_POPUP_TOGGLE_PIXMAP_ITEM_CC(name,pixmap,fn,closure,disable_mask) { (name), (pixmap), (fn), NULL, (disable_mask), NULL, (closure), 1, 0, value, 1 }
-
-#define E_POPUP_TOGGLE_PIXMAP_WIDGET_ITEM(name,pixmap_widget,fn,disable_mask) { (name), NULL, (fn), NULL, (disable_mask), (pixmap_widget), NULL, 1, 0, value, 0 }
-#define E_POPUP_TOGGLE_PIXMAP_WIDGET_ITEM_CC(name,pixmap_widget,fn,closure,disable_mask) { (name), NULL, (fn), NULL, (disable_mask), (pixmap_widget), (closure), 1, 0, value, 1 }
+#define E_POPUP_TOGGLE_PIXMAP_ITEM(name,pixmap,fn,disable_mask) { (gchar *) (name), (pixmap), (fn), NULL, (disable_mask), NULL, NULL, 1, 0, value, 0 }
+#define E_POPUP_TOGGLE_PIXMAP_ITEM_CC(name,pixmap,fn,closure,disable_mask) { (gchar *) (name), (pixmap), (fn), NULL, (disable_mask), NULL, (closure), 1, 0, value, 1 }
+#define E_POPUP_TOGGLE_PIXMAP_WIDGET_ITEM(name,pixmap_widget,fn,disable_mask) { (gchar *) (name), NULL, (fn), NULL, (disable_mask), (pixmap_widget), NULL, 1, 0, value, 0 }
+#define E_POPUP_TOGGLE_PIXMAP_WIDGET_ITEM_CC(name,pixmap_widget,fn,closure,disable_mask) { (gchar *) (name), NULL, (fn), NULL, (disable_mask), (pixmap_widget), (closure), 1, 0, value, 1 }
-#define E_POPUP_RADIO_ITEM(name,fn,disable_mask,value) { (name), NULL, (fn), NULL, (disable_mask), NULL, NULL, 0, 1, value, 0 }
-#define E_POPUP_RADIO_ITEM_CC(name,fn,closure,disable_mask,value) { (name), NULL, (fn), NULL, (disable_mask), NULL, (closure), 0, 1, value, 1 }
+#define E_POPUP_RADIO_ITEM(name,fn,disable_mask,value) { (gchar *) (name), NULL, (fn), NULL, (disable_mask), NULL, NULL, 0, 1, value, 0 }
+#define E_POPUP_RADIO_ITEM_CC(name,fn,closure,disable_mask,value) { (gchar *) (name), NULL, (fn), NULL, (disable_mask), NULL, (closure), 0, 1, value, 1 }
-#define E_POPUP_RADIO_PIXMAP_ITEM(name,pixmap,fn,disable_mask) { (name), (pixmap), (fn), NULL, (disable_mask), NULL, NULL, 0, 1, value, 0 }
-#define E_POPUP_RADIO_PIXMAP_ITEM_CC(name,pixmap,fn,closure,disable_mask) { (name), (pixmap), (fn), NULL, (disable_mask), NULL, (closure), 0, 1, value, 1 }
+#define E_POPUP_RADIO_PIXMAP_ITEM(name,pixmap,fn,disable_mask) { (gchar *) (name), (pixmap), (fn), NULL, (disable_mask), NULL, NULL, 0, 1, value, 0 }
+#define E_POPUP_RADIO_PIXMAP_ITEM_CC(name,pixmap,fn,closure,disable_mask) { (gchar *) (name), (pixmap), (fn), NULL, (disable_mask), NULL, (closure), 0, 1, value, 1 }
-#define E_POPUP_RADIO_PIXMAP_WIDGET_ITEM(name,pixmap_widget,fn,disable_mask) { (name), NULL, (fn), NULL, (disable_mask), (pixmap_widget), NULL, 0, 1, value, 0 }
-#define E_POPUP_RADIO_PIXMAP_WIDGET_ITEM_CC(name,pixmap_widget,fn,closure,disable_mask) { (name), NULL, (fn), NULL, (disable_mask), (pixmap_widget), (closure), 0, 1, value, 1 }
+#define E_POPUP_RADIO_PIXMAP_WIDGET_ITEM(name,pixmap_widget,fn,disable_mask) { (gchar *) (name), NULL, (fn), NULL, (disable_mask), (pixmap_widget), NULL, 0, 1, value, 0 }
+#define E_POPUP_RADIO_PIXMAP_WIDGET_ITEM_CC(name,pixmap_widget,fn,closure,disable_mask) { (gchar *) (name), NULL, (fn), NULL, (disable_mask), (pixmap_widget), (closure), 0, 1, value, 1 }
typedef struct _EPopupMenu EPopupMenu;
diff --git a/widgets/misc/e-search-bar.h b/widgets/misc/e-search-bar.h
index 2d01598541..f2d9b0576b 100644
--- a/widgets/misc/e-search-bar.h
+++ b/widgets/misc/e-search-bar.h
@@ -54,9 +54,9 @@ enum _ESearchBarItemType {
typedef enum _ESearchBarItemType ESearchBarItemType;
typedef struct {
- char *text;
- int id;
- int type;
+ gchar *text;
+ gint id;
+ gint type;
} ESearchBarItem;
typedef struct _ESearchBar ESearchBar;
diff --git a/widgets/misc/e-selection-model-simple.c b/widgets/misc/e-selection-model-simple.c
index 88fa6f857f..f2856622ec 100644
--- a/widgets/misc/e-selection-model-simple.c
+++ b/widgets/misc/e-selection-model-simple.c
@@ -30,6 +30,8 @@
static gint esms_get_row_count (ESelectionModelArray *esma);
+G_DEFINE_TYPE (ESelectionModelSimple, e_selection_model_simple, e_selection_model_array_get_type())
+
static void
e_selection_model_simple_init (ESelectionModelSimple *selection)
{
@@ -46,8 +48,6 @@ e_selection_model_simple_class_init (ESelectionModelSimpleClass *klass)
esma_class->get_row_count = esms_get_row_count;
}
-G_DEFINE_TYPE (ESelectionModelSimple, e_selection_model_simple, e_selection_model_array_get_type())
-
/**
* e_selection_model_simple_new
*
diff --git a/widgets/misc/e-spinner.c b/widgets/misc/e-spinner.c
index d980991b03..6e18410018 100644
--- a/widgets/misc/e-spinner.c
+++ b/widgets/misc/e-spinner.c
@@ -422,7 +422,7 @@ e_spinner_cache_get_images (ESpinnerCache *cache,
LOG ("Getting animation images for screen %p at size %d", screen, icon_size);
- g_return_val_if_fail (icon_size >= 0 && icon_size < LAST_ICON_SIZE, NULL);
+ g_return_val_if_fail (icon_size < LAST_ICON_SIZE, NULL);
/* Backward compat: "invalid" meant "native" size which doesn't exist anymore */
if (icon_size == GTK_ICON_SIZE_INVALID)
@@ -665,8 +665,8 @@ e_spinner_expose (GtkWidget *widget,
/* Otherwise |images| will be NULL anyway */
g_return_val_if_fail (images->n_animation_pixbufs > 0, FALSE);
- g_return_val_if_fail (details->current_image >= 0 &&
- details->current_image < images->n_animation_pixbufs, FALSE);
+ g_return_val_if_fail (
+ details->current_image < images->n_animation_pixbufs, FALSE);
pixbuf = images->animation_pixbufs[details->current_image];
diff --git a/widgets/misc/e-unicode.c b/widgets/misc/e-unicode.c
index 9d660b6600..cc50b39d95 100644
--- a/widgets/misc/e-unicode.c
+++ b/widgets/misc/e-unicode.c
@@ -665,8 +665,8 @@ e_unicode_get_utf8 (const gchar *text, gunichar *out)
typedef struct
{
- unsigned short ch;
- char *expansion;
+ gushort ch;
+ const gchar *expansion;
} e_decomposition;
static e_decomposition e_decomp_table[] =
diff --git a/widgets/misc/e-unicode.h b/widgets/misc/e-unicode.h
index b745876b6d..b0319b0f25 100644
--- a/widgets/misc/e-unicode.h
+++ b/widgets/misc/e-unicode.h
@@ -102,7 +102,6 @@ gint e_unichar_to_utf8 (gint c,
gchar *outbuf);
gchar *e_unicode_get_utf8 (const gchar *text,
gunichar *out);
-guint32 gdk_keyval_to_unicode (guint keysym);
gchar *e_xml_get_translated_utf8_string_prop_by_name (const xmlNode *parent,
const xmlChar *prop_name);
diff --git a/widgets/misc/pixmaps/cursor_cross.xpm b/widgets/misc/pixmaps/cursor_cross.xpm
index cf9d0aca33..6a865148fb 100644
--- a/widgets/misc/pixmaps/cursor_cross.xpm
+++ b/widgets/misc/pixmaps/cursor_cross.xpm
@@ -1,5 +1,5 @@
/* XPM */
-static char * cursor_cross_xpm[] = {
+static const gchar *cursor_cross_xpm[] = {
"32 32 3 1",
" c None",
". c #000000",
diff --git a/widgets/misc/pixmaps/cursor_hand_closed.xpm b/widgets/misc/pixmaps/cursor_hand_closed.xpm
index 61a6de4b88..24450ed2a5 100644
--- a/widgets/misc/pixmaps/cursor_hand_closed.xpm
+++ b/widgets/misc/pixmaps/cursor_hand_closed.xpm
@@ -1,5 +1,5 @@
/* XPM */
-static char * cursor_hand_closed_xpm[] = {
+static const gchar *cursor_hand_closed_xpm[] = {
"32 32 3 1",
" c None",
". c #000000",
diff --git a/widgets/misc/pixmaps/cursor_hand_open.xpm b/widgets/misc/pixmaps/cursor_hand_open.xpm
index 048acc8054..2491b18e3b 100644
--- a/widgets/misc/pixmaps/cursor_hand_open.xpm
+++ b/widgets/misc/pixmaps/cursor_hand_open.xpm
@@ -1,5 +1,5 @@
/* XPM */
-static char * cursor_hand_open_xpm[] = {
+static const gchar *cursor_hand_open_xpm[] = {
"32 32 3 1",
" c None",
". c #000000",
diff --git a/widgets/misc/pixmaps/cursor_zoom_in.xpm b/widgets/misc/pixmaps/cursor_zoom_in.xpm
index 1caf9e3e2a..19e483fd65 100644
--- a/widgets/misc/pixmaps/cursor_zoom_in.xpm
+++ b/widgets/misc/pixmaps/cursor_zoom_in.xpm
@@ -1,5 +1,5 @@
/* XPM */
-static char * cursor_zoom_in_xpm[] = {
+static const gchar *cursor_zoom_in_xpm[] = {
"32 32 2 1",
" c None",
". c #000000",
diff --git a/widgets/misc/pixmaps/cursor_zoom_out.xpm b/widgets/misc/pixmaps/cursor_zoom_out.xpm
index af1b698521..9748fa1143 100644
--- a/widgets/misc/pixmaps/cursor_zoom_out.xpm
+++ b/widgets/misc/pixmaps/cursor_zoom_out.xpm
@@ -1,5 +1,5 @@
/* XPM */
-static char * cursor_zoom_out_xpm[] = {
+static const gchar *cursor_zoom_out_xpm[] = {
"32 32 2 1",
" c None",
". c #000000",
diff --git a/widgets/misc/test-calendar.c b/widgets/misc/test-calendar.c
index 117def6190..10a463de12 100644
--- a/widgets/misc/test-calendar.c
+++ b/widgets/misc/test-calendar.c
@@ -38,7 +38,7 @@ enum {
};
static GtkTargetEntry target_table[] = {
- { "E-SHORTCUT", 0, TARGET_SHORTCUT }
+ { (gchar *) "E-SHORTCUT", 0, TARGET_SHORTCUT }
};
static guint n_targets = sizeof(target_table) / sizeof(target_table[0]);
diff --git a/widgets/misc/test-dateedit.c b/widgets/misc/test-dateedit.c
index 8c340ed45b..d359d120c4 100644
--- a/widgets/misc/test-dateedit.c
+++ b/widgets/misc/test-dateedit.c
@@ -82,12 +82,12 @@ main (int argc, char **argv)
#if 0
g_signal_connect (dedit, "date_changed",
- G_CALLBACK (on_date_changed), "1");
+ G_CALLBACK (on_date_changed), (gpointer) "1");
g_signal_connect (dedit, "time_changed",
- G_CALLBACK (on_time_changed), "1");
+ G_CALLBACK (on_time_changed), (gpointer) "1");
#else
g_signal_connect (dedit, "changed",
- G_CALLBACK (on_changed), "1");
+ G_CALLBACK (on_changed), (gpointer) "1");
#endif
button = gtk_button_new_with_label ("Print Date");
@@ -110,12 +110,12 @@ main (int argc, char **argv)
#if 0
g_signal_connect (dedit, "date_changed",
- G_CALLBACK (on_date_changed), "2");
+ G_CALLBACK (on_date_changed), (gpointer) "2");
g_signal_connect (dedit, "time_changed",
- G_CALLBACK (on_time_changed), "2");
+ G_CALLBACK (on_time_changed), (gpointer) "2");
#else
g_signal_connect (dedit, "changed",
- G_CALLBACK (on_changed), "2");
+ G_CALLBACK (on_changed), (gpointer) "2");
#endif
button = gtk_button_new_with_label ("Print Date");
@@ -138,12 +138,12 @@ main (int argc, char **argv)
#if 0
g_signal_connect (dedit, "date_changed",
- G_CALLBACK (on_date_changed), "3");
+ G_CALLBACK (on_date_changed), (gpointer) "3");
g_signal_connect (dedit, "time_changed",
- G_CALLBACK (on_time_changed), "3");
+ G_CALLBACK (on_time_changed), (gpointer) "3");
#else
g_signal_connect (dedit, "changed",
- G_CALLBACK (on_changed), "3");
+ G_CALLBACK (on_changed), (gpointer) "3");
#endif
button = gtk_button_new_with_label ("Print Date");
diff --git a/widgets/misc/test-dropdown-button.c b/widgets/misc/test-dropdown-button.c
index f0a7ca4d0e..51143ff560 100644
--- a/widgets/misc/test-dropdown-button.c
+++ b/widgets/misc/test-dropdown-button.c
@@ -45,25 +45,25 @@ item_activated (GtkWidget *widget,
}
static GnomeUIInfo ui_info[] = {
- { GNOME_APP_UI_ITEM, "_New", "Create a new file", item_activated, "file/new", NULL,
+ { GNOME_APP_UI_ITEM, "_New", "Create a new file", item_activated, (gpointer) "file/new", NULL,
GNOME_APP_PIXMAP_STOCK, GTK_STOCK_NEW, 'n', GDK_CONTROL_MASK, NULL },
- { GNOME_APP_UI_ITEM, "_Open...", "Open an existing file", item_activated, "file/open", NULL,
+ { GNOME_APP_UI_ITEM, "_Open...", "Open an existing file", item_activated, (gpointer) "file/open", NULL,
GNOME_APP_PIXMAP_STOCK, GTK_STOCK_OPEN, 'o', GDK_CONTROL_MASK, NULL },
- { GNOME_APP_UI_ITEM, "_Save", "Save the current file", item_activated, "file/save", NULL,
+ { GNOME_APP_UI_ITEM, "_Save", "Save the current file", item_activated, (gpointer) "file/save", NULL,
GNOME_APP_PIXMAP_STOCK, GTK_STOCK_SAVE, 's', GDK_CONTROL_MASK, NULL },
- { GNOME_APP_UI_ITEM, "Save _as...", "Save the current file with a new name", item_activated, "file/save as", NULL,
+ { GNOME_APP_UI_ITEM, "Save _as...", "Save the current file with a new name", item_activated, (gpointer) "file/save as", NULL,
GNOME_APP_PIXMAP_STOCK, GTK_STOCK_SAVE_AS, 0, 0, NULL },
GNOMEUIINFO_SEPARATOR,
- { GNOME_APP_UI_ITEM, "_Print...", "Print the current file", item_activated, "file/print", NULL,
+ { GNOME_APP_UI_ITEM, "_Print...", "Print the current file", item_activated, (gpointer) "file/print", NULL,
GNOME_APP_PIXMAP_STOCK, GTK_STOCK_PRINT, 'p', GDK_CONTROL_MASK, NULL },
GNOMEUIINFO_SEPARATOR,
- { GNOME_APP_UI_ITEM, "_Close", "Close the current file", item_activated, "file/close", NULL,
+ { GNOME_APP_UI_ITEM, "_Close", "Close the current file", item_activated, (gpointer) "file/close", NULL,
GNOME_APP_PIXMAP_STOCK, GTK_STOCK_CLOSE, 0, 0, NULL },
- { GNOME_APP_UI_ITEM, "E_xit", "Exit the program", item_activated, "file/exit", NULL,
+ { GNOME_APP_UI_ITEM, "E_xit", "Exit the program", item_activated, (gpointer) "file/exit", NULL,
GNOME_APP_PIXMAP_STOCK, GTK_STOCK_QUIT, 'q', GDK_CONTROL_MASK, NULL },
GNOMEUIINFO_END
};
diff --git a/widgets/table/add-col.xpm b/widgets/table/add-col.xpm
index 9c5f314c8e..6dadad6fcc 100644
--- a/widgets/table/add-col.xpm
+++ b/widgets/table/add-col.xpm
@@ -1,5 +1,5 @@
/* XPM */
-static char * add_col_xpm[] = {
+static const gchar *add_col_xpm[] = {
"16 16 3 1",
" c None",
". c #000000",
diff --git a/widgets/table/e-cell-combo.c b/widgets/table/e-cell-combo.c
index 84d58200d2..83c17d3c2f 100644
--- a/widgets/table/e-cell-combo.c
+++ b/widgets/table/e-cell-combo.c
@@ -74,8 +74,6 @@
/* The height to make the popup list if there aren't any items in it. */
#define E_CELL_COMBO_LIST_EMPTY_HEIGHT 15
-static void e_cell_combo_class_init (ECellComboClass *klass);
-static void e_cell_combo_init (ECellCombo *ecc);
static void e_cell_combo_dispose (GObject *object);
static gint e_cell_combo_do_popup (ECellPopup *ecp,
diff --git a/widgets/table/e-cell-popup.c b/widgets/table/e-cell-popup.c
index 92e03d79a1..c291571c73 100644
--- a/widgets/table/e-cell-popup.c
+++ b/widgets/table/e-cell-popup.c
@@ -46,8 +46,6 @@
#define E_CELL_POPUP_ARROW_YPAD 3
-static void e_cell_popup_class_init (ECellPopupClass *klass);
-static void e_cell_popup_init (ECellPopup *ecp);
static void e_cell_popup_dispose (GObject *object);
diff --git a/widgets/table/e-cell-popup.h b/widgets/table/e-cell-popup.h
index 5c462b9490..12e44cb8dc 100644
--- a/widgets/table/e-cell-popup.h
+++ b/widgets/table/e-cell-popup.h
@@ -94,8 +94,4 @@ void e_cell_popup_set_shown (ECellPopup *ecp,
gboolean shown);
void e_cell_popup_queue_cell_redraw (ECellPopup *ecp);
-void e_cell_popup_set_shown (ECellPopup *ecp,
- gboolean shown);
-void e_cell_popup_queue_cell_redraw (ECellPopup *ecp);
-
#endif /* _E_CELL_POPUP_H_ */
diff --git a/widgets/table/e-cell-text.c b/widgets/table/e-cell-text.c
index e50d3d7ae7..b86d709bca 100644
--- a/widgets/table/e-cell-text.c
+++ b/widgets/table/e-cell-text.c
@@ -213,7 +213,7 @@ static void e_cell_text_preedit_changed_cb (GtkIMContext *context, ECellTextView
static void e_cell_text_commit_cb (GtkIMContext *context, const gchar *str, ECellTextView *text_view);
static gboolean e_cell_text_retrieve_surrounding_cb (GtkIMContext *context, ECellTextView *text_view);
static gboolean e_cell_text_delete_surrounding_cb (GtkIMContext *context, gint offset, gint n_chars, ECellTextView *text_view);
-static void _insert (ECellTextView *text_view, char *string, int value);
+static void _insert (ECellTextView *text_view, const gchar *string, int value);
static void _delete_selection (ECellTextView *text_view);
static PangoAttrList* build_attr_list (ECellTextView *text_view, int row, int text_length);
static void update_im_cursor_location (ECellTextView *tv);
@@ -1029,7 +1029,7 @@ ect_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col,
_get_tep (edit);
return_val = e_text_event_processor_handle_event (edit->tep, &e_tep_event);
if (e_tep_event.key.string)
- g_free (e_tep_event.key.string);
+ g_free ((gpointer) e_tep_event.key.string);
break;
}
}
@@ -2360,7 +2360,7 @@ _delete_selection (ECellTextView *text_view)
/* NB! We expect value to be length IN BYTES */
static void
-_insert (ECellTextView *text_view, char *string, int value)
+_insert (ECellTextView *text_view, const gchar *string, int value)
{
CellEdit *edit = text_view->edit;
char *temp;
diff --git a/widgets/table/e-cell.c b/widgets/table/e-cell.c
index e76e073dd1..1de405feff 100644
--- a/widgets/table/e-cell.c
+++ b/widgets/table/e-cell.c
@@ -58,20 +58,22 @@ ec_draw (ECellView *ecell_view, GdkDrawable *drawable,
int model_col, int view_col, int row, ECellFlags flags,
int x1, int y1, int x2, int y2)
{
- g_error ("e-cell-draw invoked\n");
+ g_critical ("e-cell-draw invoked");
}
static gint
ec_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col, int row, ECellFlags flags, ECellActions *actions)
{
- g_error ("e-cell-event invoked\n");
+ g_critical ("e-cell-event invoked");
+
return 0;
}
static gint
ec_height (ECellView *ecell_view, int model_col, int view_col, int row)
{
- g_error ("e-cell-height invoked\n");
+ g_critical ("e-cell-height invoked");
+
return 0;
}
diff --git a/widgets/table/e-table-config.c b/widgets/table/e-table-config.c
index 510b5074f6..1c40798720 100644
--- a/widgets/table/e-table-config.c
+++ b/widgets/table/e-table-config.c
@@ -282,7 +282,7 @@ update_sort_and_group_config_dialog (ETableConfig *config, gboolean is_sort)
for (i = 0; i < 4; i++){
gboolean sensitive = (i <= count);
- char *text = "";
+ const gchar *text = "";
gtk_widget_set_sensitive (widgets [i].frames, sensitive);
@@ -619,7 +619,8 @@ create_global_store (ETableConfig *config)
}
}
-static char *spec = "<ETableSpecification gettext-domain=\"" GETTEXT_PACKAGE "\" no-headers=\"true\" cursor-mode=\"line\" "
+static const gchar *spec =
+"<ETableSpecification gettext-domain=\"" GETTEXT_PACKAGE "\" no-headers=\"true\" cursor-mode=\"line\" "
" draw-grid=\"false\" draw-focus=\"true\" selection-mode=\"browse\">"
"<ETableColumn model_col= \"0\" _title=\"Name\" minimum_width=\"30\" resizable=\"true\" cell=\"string\" compare=\"string\"/>"
"<ETableState> <column source=\"0\"/>"
diff --git a/widgets/table/e-table-extras.c b/widgets/table/e-table-extras.c
index 2fa6e5cecf..acbd479a43 100644
--- a/widgets/table/e-table-extras.c
+++ b/widgets/table/e-table-extras.c
@@ -194,7 +194,7 @@ e_table_extras_new (void)
void
e_table_extras_add_cell (ETableExtras *extras,
- char *id,
+ const gchar *id,
ECell *cell)
{
if (cell)
@@ -211,7 +211,7 @@ e_table_extras_get_cell (ETableExtras *extras,
void
e_table_extras_add_compare (ETableExtras *extras,
- char *id,
+ const gchar *id,
GCompareFunc compare)
{
g_hash_table_insert(extras->compares, g_strdup(id), (gpointer) compare);
@@ -226,7 +226,7 @@ e_table_extras_get_compare (ETableExtras *extras,
void
e_table_extras_add_search (ETableExtras *extras,
- char *id,
+ const gchar *id,
ETableSearchFunc search)
{
g_hash_table_insert(extras->searches, g_strdup(id), search);
diff --git a/widgets/table/e-table-extras.h b/widgets/table/e-table-extras.h
index 986d9b9208..9ab8bc2395 100644
--- a/widgets/table/e-table-extras.h
+++ b/widgets/table/e-table-extras.h
@@ -54,19 +54,19 @@ GType e_table_extras_get_type (void);
ETableExtras *e_table_extras_new (void);
void e_table_extras_add_cell (ETableExtras *extras,
- char *id,
+ const gchar *id,
ECell *cell);
ECell *e_table_extras_get_cell (ETableExtras *extras,
char *id);
void e_table_extras_add_compare (ETableExtras *extras,
- char *id,
+ const gchar *id,
GCompareFunc compare);
GCompareFunc e_table_extras_get_compare (ETableExtras *extras,
char *id);
void e_table_extras_add_search (ETableExtras *extras,
- char *id,
+ const gchar *id,
ETableSearchFunc search);
ETableSearchFunc e_table_extras_get_search (ETableExtras *extras,
char *id);
diff --git a/widgets/table/e-table-field-chooser-dialog.c b/widgets/table/e-table-field-chooser-dialog.c
index e92428d5f8..5b504496c7 100644
--- a/widgets/table/e-table-field-chooser-dialog.c
+++ b/widgets/table/e-table-field-chooser-dialog.c
@@ -30,8 +30,6 @@
#include "e-table-field-chooser-dialog.h"
-static void e_table_field_chooser_dialog_init (ETableFieldChooserDialog *card);
-static void e_table_field_chooser_dialog_class_init (ETableFieldChooserDialogClass *klass);
static void e_table_field_chooser_dialog_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
static void e_table_field_chooser_dialog_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
static void e_table_field_chooser_dialog_dispose (GObject *object);
diff --git a/widgets/table/e-table-field-chooser-item.c b/widgets/table/e-table-field-chooser-item.c
index d29dcbfa5f..4b4c6b16a7 100644
--- a/widgets/table/e-table-field-chooser-item.c
+++ b/widgets/table/e-table-field-chooser-item.c
@@ -527,7 +527,7 @@ etfci_start_drag (ETableFieldChooserItem *etfci, GdkEvent *event, double x, doub
int button_height;
GtkTargetEntry etfci_drag_types [] = {
- { TARGET_ETABLE_COL_TYPE, 0, TARGET_ETABLE_COL_HEADER },
+ { (gchar *) TARGET_ETABLE_COL_TYPE, 0, TARGET_ETABLE_COL_HEADER },
};
if (etfci->combined_header == NULL)
diff --git a/widgets/table/e-table-field-chooser.c b/widgets/table/e-table-field-chooser.c
index 2a343e9915..60a0b40e9d 100644
--- a/widgets/table/e-table-field-chooser.c
+++ b/widgets/table/e-table-field-chooser.c
@@ -32,8 +32,6 @@
#include "e-table-field-chooser.h"
#include "e-table-field-chooser-item.h"
-static void e_table_field_chooser_init (ETableFieldChooser *card);
-static void e_table_field_chooser_class_init (ETableFieldChooserClass *klass);
static void e_table_field_chooser_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
static void e_table_field_chooser_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
static void e_table_field_chooser_dispose (GObject *object);
diff --git a/widgets/table/e-table-header-item.c b/widgets/table/e-table-header-item.c
index e6c20b1796..028fd9b93e 100644
--- a/widgets/table/e-table-header-item.c
+++ b/widgets/table/e-table-header-item.c
@@ -871,7 +871,7 @@ ethi_realize (GnomeCanvasItem *item)
{
ETableHeaderItem *ethi = E_TABLE_HEADER_ITEM (item);
GtkTargetEntry ethi_drop_types [] = {
- { TARGET_ETABLE_COL_TYPE, 0, TARGET_ETABLE_COL_HEADER },
+ { (gchar *) TARGET_ETABLE_COL_TYPE, 0, TARGET_ETABLE_COL_HEADER },
};
@@ -1131,7 +1131,7 @@ ethi_start_drag (ETableHeaderItem *ethi, GdkEvent *event)
GHashTable *arrows = g_hash_table_new (NULL, NULL);
GtkTargetEntry ethi_drag_types [] = {
- { TARGET_ETABLE_COL_TYPE, 0, TARGET_ETABLE_COL_HEADER },
+ { (gchar *) TARGET_ETABLE_COL_TYPE, 0, TARGET_ETABLE_COL_HEADER },
};
ethi->drag_col = ethi_find_col_by_x (ethi, event->motion.x);
@@ -1468,19 +1468,19 @@ free_popup_info (GtkWidget *w, EthiHeaderInfo *info)
/* Bit 2 is disabled if not "sortable". */
/* Bit 4 is disabled if we don't have a pointer to our table object. */
static EPopupMenu ethi_context_menu [] = {
- E_POPUP_ITEM (N_("Sort _Ascending"), G_CALLBACK(ethi_popup_sort_ascending), 2),
- E_POPUP_ITEM (N_("Sort _Descending"), G_CALLBACK(ethi_popup_sort_descending), 2),
- E_POPUP_ITEM (N_("_Unsort"), G_CALLBACK(ethi_popup_unsort), 0),
+ E_POPUP_ITEM (N_("Sort _Ascending"), G_CALLBACK(ethi_popup_sort_ascending), 2),
+ E_POPUP_ITEM (N_("Sort _Descending"), G_CALLBACK(ethi_popup_sort_descending), 2),
+ E_POPUP_ITEM (N_("_Unsort"), G_CALLBACK(ethi_popup_unsort), 0),
E_POPUP_SEPARATOR,
- E_POPUP_ITEM (N_("Group By This _Field"), G_CALLBACK(ethi_popup_group_field), 16),
- E_POPUP_ITEM (N_("Group By _Box"), G_CALLBACK(ethi_popup_group_box), 128),
+ E_POPUP_ITEM (N_("Group By This _Field"), G_CALLBACK(ethi_popup_group_field), 16),
+ E_POPUP_ITEM (N_("Group By _Box"), G_CALLBACK(ethi_popup_group_box), 128),
E_POPUP_SEPARATOR,
- E_POPUP_ITEM (N_("Remove This _Column"), G_CALLBACK(ethi_popup_remove_column), 8),
- E_POPUP_ITEM (N_("Add a C_olumn..."), G_CALLBACK(ethi_popup_field_chooser), 0),
+ E_POPUP_ITEM (N_("Remove This _Column"), G_CALLBACK(ethi_popup_remove_column), 8),
+ E_POPUP_ITEM (N_("Add a C_olumn..."), G_CALLBACK(ethi_popup_field_chooser), 0),
E_POPUP_SEPARATOR,
- E_POPUP_ITEM (N_("A_lignment"), G_CALLBACK(ethi_popup_alignment), 128),
- E_POPUP_ITEM (N_("B_est Fit"), G_CALLBACK(ethi_popup_best_fit), 2),
- E_POPUP_ITEM (N_("Format Column_s..."), G_CALLBACK(ethi_popup_format_columns), 128),
+ E_POPUP_ITEM (N_("A_lignment"), G_CALLBACK(ethi_popup_alignment), 128),
+ E_POPUP_ITEM (N_("B_est Fit"), G_CALLBACK(ethi_popup_best_fit), 2),
+ E_POPUP_ITEM (N_("Format Column_s..."), G_CALLBACK(ethi_popup_format_columns), 128),
E_POPUP_SEPARATOR,
E_POPUP_ITEM (N_("Custo_mize Current View..."), G_CALLBACK(ethi_popup_customize_view), 4),
E_POPUP_TERMINATOR
@@ -1935,11 +1935,11 @@ ethi_class_init (ETableHeaderItemClass *klass)
dnd_colormap = gtk_widget_get_default_colormap ();
remove_col_pixmap = gdk_pixmap_colormap_create_from_xpm_d (
NULL, dnd_colormap,
- &remove_col_mask, NULL, remove_col_xpm);
+ &remove_col_mask, NULL, (gchar **) remove_col_xpm);
add_col_pixmap = gdk_pixmap_colormap_create_from_xpm_d (
NULL, dnd_colormap,
- &add_col_mask, NULL, add_col_xpm);
+ &add_col_mask, NULL, (gchar **) add_col_xpm);
ethi_signals [BUTTON_PRESSED] =
g_signal_new ("button_pressed",
diff --git a/widgets/table/e-table-model.c b/widgets/table/e-table-model.c
index 41664e4757..f88f3bf215 100644
--- a/widgets/table/e-table-model.c
+++ b/widgets/table/e-table-model.c
@@ -209,8 +209,8 @@ e_table_model_has_save_id (ETableModel *e_table_model)
char *
e_table_model_get_save_id (ETableModel *e_table_model, int row)
{
- g_return_val_if_fail (e_table_model != NULL, "/");
- g_return_val_if_fail (E_IS_TABLE_MODEL (e_table_model), "/");
+ g_return_val_if_fail (e_table_model != NULL, NULL);
+ g_return_val_if_fail (E_IS_TABLE_MODEL (e_table_model), NULL);
if (ETM_CLASS (e_table_model)->get_save_id)
return ETM_CLASS (e_table_model)->get_save_id (e_table_model, row);
diff --git a/widgets/table/e-table-model.h b/widgets/table/e-table-model.h
index 337da0758e..f639d77374 100644
--- a/widgets/table/e-table-model.h
+++ b/widgets/table/e-table-model.h
@@ -54,7 +54,7 @@ typedef struct {
gboolean (*is_cell_editable) (ETableModel *etm, int col, int row);
gboolean (*has_save_id) (ETableModel *etm);
- char *(*get_save_id) (ETableModel *etm, int row);
+ gchar *(*get_save_id) (ETableModel *etm, int row);
gboolean (*has_change_pending) (ETableModel *etm);
diff --git a/widgets/table/e-table-selection-model.c b/widgets/table/e-table-selection-model.c
index 75ae0f92c8..2fdef3f88a 100644
--- a/widgets/table/e-table-selection-model.c
+++ b/widgets/table/e-table-selection-model.c
@@ -45,9 +45,9 @@ static void
save_to_hash(int model_row, gpointer closure)
{
ETableSelectionModel *etsm = closure;
- gchar *key = e_table_model_get_save_id(etsm->model, model_row);
+ const gchar *key = e_table_model_get_save_id(etsm->model, model_row);
- g_hash_table_insert(etsm->hash, key, key);
+ g_hash_table_insert(etsm->hash, (gpointer) key, (gpointer) key);
}
static void
@@ -101,7 +101,7 @@ model_changed_idle(ETableSelectionModel *etsm)
int i;
e_selection_model_array_confirm_row_count(E_SELECTION_MODEL_ARRAY(etsm));
for (i = 0; i < row_count; i++) {
- char *save_id = e_table_model_get_save_id(etm, i);
+ gchar *save_id = e_table_model_get_save_id(etm, i);
if (g_hash_table_lookup(etsm->hash, save_id))
e_selection_model_change_one_row(E_SELECTION_MODEL(etsm), i, TRUE);
diff --git a/widgets/table/e-table-selection-model.h b/widgets/table/e-table-selection-model.h
index c1549513db..5d7d831205 100644
--- a/widgets/table/e-table-selection-model.h
+++ b/widgets/table/e-table-selection-model.h
@@ -58,7 +58,7 @@ typedef struct {
guint group_info_changed : 1;
GHashTable *hash;
- char *cursor_id;
+ gchar *cursor_id;
} ETableSelectionModel;
typedef struct {
diff --git a/widgets/table/e-table-specification.c b/widgets/table/e-table-specification.c
index 6860d2f275..ff170dfce5 100644
--- a/widgets/table/e-table-specification.c
+++ b/widgets/table/e-table-specification.c
@@ -351,7 +351,7 @@ e_table_specification_save_to_node (ETableSpecification *specification,
xmlDoc *doc)
{
xmlNode *node;
- char *s;
+ const gchar *s;
g_return_val_if_fail (doc != NULL, NULL);
g_return_val_if_fail (specification != NULL, NULL);
diff --git a/widgets/table/remove-col.xpm b/widgets/table/remove-col.xpm
index ff1024f0c9..570d1862d1 100644
--- a/widgets/table/remove-col.xpm
+++ b/widgets/table/remove-col.xpm
@@ -1,5 +1,5 @@
/* XPM */
-static char * remove_col_xpm[] = {
+static const gchar *remove_col_xpm[] = {
"16 16 3 1",
" c None",
". c #000000",
diff --git a/widgets/table/tree-expanded.xpm b/widgets/table/tree-expanded.xpm
index d9bda3694d..94d162d40b 100644
--- a/widgets/table/tree-expanded.xpm
+++ b/widgets/table/tree-expanded.xpm
@@ -1,5 +1,5 @@
/* XPM */
-static char * tree_expanded_xpm[] = {
+static const gchar *tree_expanded_xpm[] = {
"16 16 4 1",
" c None",
". c #FFFFFF",
diff --git a/widgets/table/tree-unexpanded.xpm b/widgets/table/tree-unexpanded.xpm
index e1b48448ba..d20ec5aa33 100644
--- a/widgets/table/tree-unexpanded.xpm
+++ b/widgets/table/tree-unexpanded.xpm
@@ -1,5 +1,5 @@
/* XPM */
-static char * tree_unexpanded_xpm[] = {
+static const gchar *tree_unexpanded_xpm[] = {
"16 16 4 1",
" c None",
". c #FFFFFF",
diff --git a/widgets/text/e-text-model.c b/widgets/text/e-text-model.c
index 207ac6ce50..663cdd6e30 100644
--- a/widgets/text/e-text-model.c
+++ b/widgets/text/e-text-model.c
@@ -48,8 +48,6 @@ struct _ETextModelPrivate {
GString *text;
};
-static void e_text_model_class_init (ETextModelClass *class);
-static void e_text_model_init (ETextModel *model);
static void e_text_model_dispose (GObject *object);
static gint e_text_model_real_validate_position (ETextModel *, gint pos);
diff --git a/widgets/text/e-text.c b/widgets/text/e-text.c
index 0890b46243..bd79c0ad7b 100644
--- a/widgets/text/e-text.c
+++ b/widgets/text/e-text.c
@@ -2350,7 +2350,7 @@ e_text_event (GnomeCanvasItem *item, GdkEvent *event)
if (e_tep_event.key.string)
- g_free (e_tep_event.key.string);
+ g_free ((gpointer) e_tep_event.key.string);
return ret;
@@ -2603,11 +2603,11 @@ static void
e_text_update_primary_selection (EText *text)
{
static const GtkTargetEntry targets[] = {
- { "UTF8_STRING", 0, 0 },
- { "UTF-8", 0, 0 },
- { "STRING", 0, 0 },
- { "TEXT", 0, 0 },
- { "COMPOUND_TEXT", 0, 0 }
+ { (gchar *) "UTF8_STRING", 0, 0 },
+ { (gchar *) "UTF-8", 0, 0 },
+ { (gchar *) "STRING", 0, 0 },
+ { (gchar *) "TEXT", 0, 0 },
+ { (gchar *) "COMPOUND_TEXT", 0, 0 }
};
GtkClipboard *clipboard;