aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorKjartan Maraas <kmaraas@gnome.org>2007-10-31 20:30:29 +0800
committerKjartan Maraas <kmaraas@src.gnome.org>2007-10-31 20:30:29 +0800
commitbe99f3db8925de2016528d50f32339a73fcd10c8 (patch)
tree083a23213c8ab1dcfb72a3f761b2b27af1f539fc /widgets
parent907d1861ab0ffe7e90601f6a9f9e5ef339969301 (diff)
downloadgsoc2013-evolution-be99f3db8925de2016528d50f32339a73fcd10c8.tar
gsoc2013-evolution-be99f3db8925de2016528d50f32339a73fcd10c8.tar.gz
gsoc2013-evolution-be99f3db8925de2016528d50f32339a73fcd10c8.tar.bz2
gsoc2013-evolution-be99f3db8925de2016528d50f32339a73fcd10c8.tar.lz
gsoc2013-evolution-be99f3db8925de2016528d50f32339a73fcd10c8.tar.xz
gsoc2013-evolution-be99f3db8925de2016528d50f32339a73fcd10c8.tar.zst
gsoc2013-evolution-be99f3db8925de2016528d50f32339a73fcd10c8.zip
Warning fixes: - NULL vs 0 vs FALSE - ANSIfication of function
2007-10-29 Kjartan Maraas <kmaraas@gnome.org> * e-activity-handler.c: (e_activity_handler_new): * e-canvas.c: (e_canvas_new), (emit_event), (pick_current_item), (e_canvas_button): * e-combo-button.c: (menu_detacher), (impl_destroy), (impl_button_press_event): * e-combo-cell-editable.c: (e_combo_cell_editable_new): * e-expander.c: (e_expander_init), (e_expander_size_request), (e_expander_size_allocate), (e_expander_button_press), (e_expander_focus): * e-gui-utils.c: (e_popup_menu), (e_container_change_tab_order_callback): * e-image-chooser.c: (image_drag_data_received_cb): * e-info-label.c: (e_info_label_new): * e-map.c: (e_map_key_press), (e_map_new), (update_render_pixbuf), (blowup_window_area), (zoom_do), (set_scroll_area): * e-pilot-settings.c: (e_pilot_settings_get_source): * e-printable.c: (e_printable_will_fit): * e-reflow.c: (items_inserted), (model_changed), (set_empty), (e_reflow_event), (e_reflow_draw): * e-search-bar.c: (set_option): * e-search-bar.h: * e-unicode.c: (e_xml_get_translated_utf8_string_prop_by_name): Warning fixes: - NULL vs 0 vs FALSE - ANSIfication of function declarations. - Use non-deprecated GSignal functions - Don't mix different enum types svn path=/trunk/; revision=34466
Diffstat (limited to 'widgets')
-rw-r--r--widgets/misc/ChangeLog31
-rw-r--r--widgets/misc/e-activity-handler.c2
-rw-r--r--widgets/misc/e-canvas.c2
-rw-r--r--widgets/misc/e-combo-button.c6
-rw-r--r--widgets/misc/e-combo-cell-editable.c2
-rw-r--r--widgets/misc/e-expander.c2
-rw-r--r--widgets/misc/e-gui-utils.c6
-rw-r--r--widgets/misc/e-image-chooser.c8
-rw-r--r--widgets/misc/e-info-label.c2
-rw-r--r--widgets/misc/e-map.c44
-rw-r--r--widgets/misc/e-pilot-settings.c4
-rw-r--r--widgets/misc/e-printable.c4
-rw-r--r--widgets/misc/e-reflow.c10
-rw-r--r--widgets/misc/e-search-bar.c2
-rw-r--r--widgets/misc/e-search-bar.h2
-rw-r--r--widgets/misc/e-unicode.c4
16 files changed, 81 insertions, 50 deletions
diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog
index bcb15f5fad..9b7eb344a5 100644
--- a/widgets/misc/ChangeLog
+++ b/widgets/misc/ChangeLog
@@ -1,3 +1,34 @@
+2007-10-29 Kjartan Maraas <kmaraas@gnome.org>
+
+ * e-activity-handler.c: (e_activity_handler_new):
+ * e-canvas.c: (e_canvas_new), (emit_event), (pick_current_item),
+ (e_canvas_button):
+ * e-combo-button.c: (menu_detacher), (impl_destroy),
+ (impl_button_press_event):
+ * e-combo-cell-editable.c: (e_combo_cell_editable_new):
+ * e-expander.c: (e_expander_init), (e_expander_size_request),
+ (e_expander_size_allocate), (e_expander_button_press),
+ (e_expander_focus):
+ * e-gui-utils.c: (e_popup_menu),
+ (e_container_change_tab_order_callback):
+ * e-image-chooser.c: (image_drag_data_received_cb):
+ * e-info-label.c: (e_info_label_new):
+ * e-map.c: (e_map_key_press), (e_map_new), (update_render_pixbuf),
+ (blowup_window_area), (zoom_do), (set_scroll_area):
+ * e-pilot-settings.c: (e_pilot_settings_get_source):
+ * e-printable.c: (e_printable_will_fit):
+ * e-reflow.c: (items_inserted), (model_changed), (set_empty),
+ (e_reflow_event), (e_reflow_draw):
+ * e-search-bar.c: (set_option):
+ * e-search-bar.h:
+ * e-unicode.c: (e_xml_get_translated_utf8_string_prop_by_name):
+
+ Warning fixes:
+ - NULL vs 0 vs FALSE
+ - ANSIfication of function declarations.
+ - Use non-deprecated GSignal functions
+ - Don't mix different enum types
+
2007-10-31 Michael Monreal <mmonreal@svn.gnome.org>
** Fix for bug #483785
diff --git a/widgets/misc/e-activity-handler.c b/widgets/misc/e-activity-handler.c
index 3a9be17dc4..c324268db4 100644
--- a/widgets/misc/e-activity-handler.c
+++ b/widgets/misc/e-activity-handler.c
@@ -268,7 +268,7 @@ e_activity_handler_init (EActivityHandler *activity_handler)
EActivityHandler *
e_activity_handler_new (void)
{
- return g_object_new (e_activity_handler_get_type (), 0);
+ return g_object_new (e_activity_handler_get_type (), NULL);
}
void
diff --git a/widgets/misc/e-canvas.c b/widgets/misc/e-canvas.c
index 9ae23fbfd6..387f89730b 100644
--- a/widgets/misc/e-canvas.c
+++ b/widgets/misc/e-canvas.c
@@ -141,7 +141,7 @@ e_canvas_dispose (GObject *object)
}
GtkWidget *
-e_canvas_new ()
+e_canvas_new (void)
{
return GTK_WIDGET (g_object_new (E_CANVAS_TYPE, NULL));
}
diff --git a/widgets/misc/e-combo-button.c b/widgets/misc/e-combo-button.c
index 51ac4590fb..a079729c13 100644
--- a/widgets/misc/e-combo-button.c
+++ b/widgets/misc/e-combo-button.c
@@ -194,8 +194,10 @@ menu_detacher (GtkWidget *widget,
combo_button = E_COMBO_BUTTON (widget);
priv = combo_button->priv;
-
- gtk_signal_disconnect_by_data (GTK_OBJECT (menu), combo_button);
+ g_signal_handlers_disconnect_matched (menu,
+ G_SIGNAL_MATCH_DATA,
+ 0, 0, NULL, NULL,
+ combo_button);
priv->menu = NULL;
}
diff --git a/widgets/misc/e-combo-cell-editable.c b/widgets/misc/e-combo-cell-editable.c
index 0cfc31b396..9e7794ca9f 100644
--- a/widgets/misc/e-combo-cell-editable.c
+++ b/widgets/misc/e-combo-cell-editable.c
@@ -393,7 +393,7 @@ e_combo_cell_editable_get_type (void)
}
GtkCellEditable *
-e_combo_cell_editable_new ()
+e_combo_cell_editable_new (void)
{
return GTK_CELL_EDITABLE (g_object_new (E_TYPE_COMBO_CELL_EDITABLE, NULL));
}
diff --git a/widgets/misc/e-expander.c b/widgets/misc/e-expander.c
index d0075f8c62..4c2ecdb317 100644
--- a/widgets/misc/e-expander.c
+++ b/widgets/misc/e-expander.c
@@ -262,7 +262,7 @@ e_expander_init (EExpander *expander)
GTK_WIDGET_SET_FLAGS (expander, GTK_CAN_FOCUS);
GTK_WIDGET_UNSET_FLAGS (expander, GTK_NO_WINDOW);
- priv->label_widget = 0;
+ priv->label_widget = NULL;
priv->spacing = 0;
priv->expander_style = GTK_EXPANDER_COLLAPSED;
diff --git a/widgets/misc/e-gui-utils.c b/widgets/misc/e-gui-utils.c
index dde4bef7f4..bd94ddb4d9 100644
--- a/widgets/misc/e-gui-utils.c
+++ b/widgets/misc/e-gui-utils.c
@@ -46,18 +46,18 @@ e_popup_menu (GtkMenu *menu, GdkEvent *event)
if (event) {
if (event->type == GDK_KEY_PRESS)
- gtk_menu_popup (menu, NULL, NULL, 0, NULL, 0,
+ gtk_menu_popup (menu, NULL, NULL, NULL, NULL, 0,
event->key.time);
else if ((event->type == GDK_BUTTON_PRESS) ||
(event->type == GDK_BUTTON_RELEASE) ||
(event->type == GDK_2BUTTON_PRESS) ||
(event->type == GDK_3BUTTON_PRESS)){
- gtk_menu_popup (menu, NULL, NULL, 0, NULL,
+ gtk_menu_popup (menu, NULL, NULL, NULL, NULL,
event->button.button,
event->button.time);
}
} else
- gtk_menu_popup (menu, NULL, NULL, 0, NULL, 0,
+ gtk_menu_popup (menu, NULL, NULL, NULL, NULL, 0,
GDK_CURRENT_TIME);
}
diff --git a/widgets/misc/e-image-chooser.c b/widgets/misc/e-image-chooser.c
index 5212027bac..319c2b55ac 100644
--- a/widgets/misc/e-image-chooser.c
+++ b/widgets/misc/e-image-chooser.c
@@ -416,7 +416,7 @@ image_drag_data_received_cb (GtkWidget *widget,
char *nl = strstr ((char *)selection_data->data, "\r\n");
char *buf = NULL;
/* Why can't we change the info parameter to a GnomeVFSFileInfo and use that? */
- GnomeVFSFileInfo info;
+ GnomeVFSFileInfo file_info;
if (nl)
uri = g_strndup ((char *)selection_data->data, nl - (char*)selection_data->data);
@@ -425,13 +425,13 @@ image_drag_data_received_cb (GtkWidget *widget,
result = gnome_vfs_open (&handle, uri, GNOME_VFS_OPEN_READ);
if (result == GNOME_VFS_OK) {
- result = gnome_vfs_get_file_info_from_handle (handle, &info, GNOME_VFS_FILE_INFO_DEFAULT);
+ result = gnome_vfs_get_file_info_from_handle (handle, &file_info, GNOME_VFS_FILE_INFO_DEFAULT);
if (result == GNOME_VFS_OK) {
GnomeVFSFileSize num_read;
- buf = g_malloc (info.size);
+ buf = g_malloc (file_info.size);
- if ((result = gnome_vfs_read (handle, buf, info.size, &num_read)) == GNOME_VFS_OK) {
+ if ((result = gnome_vfs_read (handle, buf, file_info.size, &num_read)) == GNOME_VFS_OK) {
if (set_image_from_data (chooser, buf, num_read)) {
handled = TRUE;
} else {
diff --git a/widgets/misc/e-info-label.c b/widgets/misc/e-info-label.c
index c2086398d5..e38d4692cc 100644
--- a/widgets/misc/e-info-label.c
+++ b/widgets/misc/e-info-label.c
@@ -111,7 +111,7 @@ e_info_label_get_type(void)
GtkWidget *
e_info_label_new(const char *icon)
{
- EInfoLabel *el = g_object_new(e_info_label_get_type(), 0);
+ EInfoLabel *el = g_object_new(e_info_label_get_type(), NULL);
GtkWidget *image;
char *name = e_icon_factory_get_icon_filename (icon, E_ICON_SIZE_MENU);
diff --git a/widgets/misc/e-map.c b/widgets/misc/e-map.c
index eb6a3b3aa5..17c1ecbb35 100644
--- a/widgets/misc/e-map.c
+++ b/widgets/misc/e-map.c
@@ -26,7 +26,6 @@
#include <gdk/gdkkeysyms.h>
#include <gtk/gtksignal.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
-#include <libart_lgpl/art_filterlevel.h>
#include <glib/gi18n.h>
#include "e-util/e-util-private.h"
@@ -102,7 +101,7 @@ static gint e_map_expose (GtkWidget *widget, GdkEventExpose *event);
static gint e_map_key_press (GtkWidget *widget, GdkEventKey *event);
static void e_map_set_scroll_adjustments (GtkWidget *widget, GtkAdjustment *hadj, GtkAdjustment *vadj);
-static void update_render_pixbuf (EMap *map, ArtFilterLevel interp, gboolean render_overlays);
+static void update_render_pixbuf (EMap *map, GdkInterpType interp, gboolean render_overlays);
static void set_scroll_area (EMap *view);
static void request_paint_area (EMap *view, GdkRectangle *area);
static void center_at (EMap *map, int x, int y, gboolean scroll);
@@ -585,17 +584,17 @@ e_map_key_press (GtkWidget *widget, GdkEventKey *event)
scroll_to (view, x, y);
- gtk_signal_handler_block_by_data (GTK_OBJECT (priv->hadj), view);
- gtk_signal_handler_block_by_data (GTK_OBJECT (priv->vadj), view);
+ g_signal_handlers_block_matched (priv->hadj, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, view);
+ g_signal_handlers_block_matched (priv->vadj, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, view);
priv->hadj->value = x;
priv->vadj->value = y;
- gtk_signal_emit_by_name (GTK_OBJECT (priv->hadj), "value_changed");
- gtk_signal_emit_by_name (GTK_OBJECT (priv->vadj), "value_changed");
+ g_signal_emit_by_name (priv->hadj, "value_changed");
+ g_signal_emit_by_name (priv->vadj, "value_changed");
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->hadj), view);
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->vadj), view);
+ g_signal_handlers_unblock_matched (priv->hadj, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, view);
+ g_signal_handlers_unblock_matched (priv->vadj, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, view);
}
return TRUE;
@@ -617,7 +616,7 @@ e_map_key_press (GtkWidget *widget, GdkEventKey *event)
**/
EMap *
-e_map_new ()
+e_map_new (void)
{
GtkWidget *widget;
AtkObject *a11y;
@@ -967,7 +966,7 @@ load_map_background (EMap *view, gchar *name)
static void
-update_render_pixbuf (EMap *map, ArtFilterLevel interp, gboolean render_overlays)
+update_render_pixbuf (EMap *map, GdkInterpType interp, gboolean render_overlays)
{
EMapPrivate *priv;
EMapPoint *point;
@@ -1661,9 +1660,8 @@ zoom_do (EMap *map)
EMapPrivate *priv;
priv = map->priv;
-
- gtk_signal_handler_block_by_data (GTK_OBJECT (priv->hadj), map);
- gtk_signal_handler_block_by_data (GTK_OBJECT (priv->vadj), map);
+ g_signal_handlers_block_matched (priv->hadj, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, map);
+ g_signal_handlers_block_matched (priv->vadj, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, map);
if (priv->zoom_state == E_MAP_ZOOMING_IN)
{
@@ -1676,8 +1674,8 @@ zoom_do (EMap *map)
zoom_out (map);
}
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->hadj), map);
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->vadj), map);
+ g_signal_handlers_unblock_matched (priv->hadj, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, map);
+ g_signal_handlers_unblock_matched (priv->vadj, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, map);
set_scroll_area(map);
}
@@ -1728,8 +1726,8 @@ set_scroll_area (EMap *view)
if (priv->map_render_pixbuf)
priv->vadj->upper = gdk_pixbuf_get_height (priv->map_render_pixbuf);
- gtk_signal_emit_by_name (GTK_OBJECT (priv->hadj), "changed");
- gtk_signal_emit_by_name (GTK_OBJECT (priv->vadj), "changed");
+ g_signal_emit_by_name (priv->hadj, "changed");
+ g_signal_emit_by_name (priv->vadj, "changed");
priv->xofs = CLAMP (priv->xofs, 0, priv->hadj->upper - priv->hadj->page_size);
priv->yofs = CLAMP (priv->yofs, 0, priv->vadj->upper - priv->vadj->page_size);
@@ -1738,17 +1736,17 @@ set_scroll_area (EMap *view)
{
priv->hadj->value = priv->xofs;
- gtk_signal_handler_block_by_data (GTK_OBJECT (priv->hadj), view);
- gtk_signal_emit_by_name (GTK_OBJECT (priv->hadj), "value_changed");
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->hadj), view);
+ g_signal_handlers_block_matched (priv->hadj, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, view);
+ g_signal_emit_by_name (priv->hadj, "value_changed");
+ g_signal_handlers_unblock_matched (priv->hadj, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, view);
}
if (priv->vadj->value != priv->yofs)
{
priv->vadj->value = priv->yofs;
- gtk_signal_handler_block_by_data (GTK_OBJECT (priv->vadj), view);
- gtk_signal_emit_by_name (GTK_OBJECT (priv->vadj), "value_changed");
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->vadj), view);
+ g_signal_handlers_block_matched (priv->vadj, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, view);
+ g_signal_emit_by_name (priv->vadj, "value_changed");
+ g_signal_handlers_unblock_matched (priv->vadj, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, view);
}
}
diff --git a/widgets/misc/e-pilot-settings.c b/widgets/misc/e-pilot-settings.c
index dcee88fa73..6dfd4873f6 100644
--- a/widgets/misc/e-pilot-settings.c
+++ b/widgets/misc/e-pilot-settings.c
@@ -148,8 +148,8 @@ e_pilot_settings_get_source (EPilotSettings *ps)
{
EPilotSettingsPrivate *priv;
- g_return_val_if_fail (ps != NULL, FALSE);
- g_return_val_if_fail (E_IS_PILOT_SETTINGS (ps), FALSE);
+ g_return_val_if_fail (ps != NULL, NULL);
+ g_return_val_if_fail (E_IS_PILOT_SETTINGS (ps), NULL);
priv = ps->priv;
diff --git a/widgets/misc/e-printable.c b/widgets/misc/e-printable.c
index 7d7aa7b36b..7fb79432d6 100644
--- a/widgets/misc/e-printable.c
+++ b/widgets/misc/e-printable.c
@@ -194,8 +194,8 @@ e_printable_will_fit (EPrintable *e_printable,
{
gboolean ret_val;
- g_return_val_if_fail (e_printable != NULL, -1);
- g_return_val_if_fail (E_IS_PRINTABLE (e_printable), -1);
+ g_return_val_if_fail (e_printable != NULL, FALSE);
+ g_return_val_if_fail (E_IS_PRINTABLE (e_printable), FALSE);
g_signal_emit (e_printable,
e_printable_signals [WILL_FIT], 0,
diff --git a/widgets/misc/e-reflow.c b/widgets/misc/e-reflow.c
index 96c2fa8961..a8306ffbb3 100644
--- a/widgets/misc/e-reflow.c
+++ b/widgets/misc/e-reflow.c
@@ -430,7 +430,7 @@ items_inserted (EReflowModel *model, int position, int count, EReflow *reflow)
memmove (reflow->heights + position + count, reflow->heights + position, (reflow->count - position - count) * sizeof (int));
memmove (reflow->items + position + count, reflow->items + position, (reflow->count - position - count) * sizeof (GnomeCanvasItem *));
for (i = position; i < position + count; i++) {
- reflow->items[i] = 0;
+ reflow->items[i] = NULL;
reflow->heights[i] = e_reflow_model_height (reflow->model, i, GNOME_CANVAS_GROUP (reflow));
}
@@ -485,7 +485,7 @@ model_changed (EReflowModel *model, EReflow *reflow)
count = reflow->count;
for (i = 0; i < count; i++) {
- reflow->items[i] = 0;
+ reflow->items[i] = NULL;
reflow->heights[i] = e_reflow_model_height (reflow->model, i, GNOME_CANVAS_GROUP (reflow));
}
@@ -927,11 +927,11 @@ e_reflow_event (GnomeCanvasItem *item, GdkEvent *event)
if (has_focus) {
if (event->key.state & GDK_SHIFT_MASK) {
if (i == 0)
- return 0;
+ return FALSE;
i--;
} else {
if (i == count - 1)
- return 0;
+ return FALSE;
i++;
}
@@ -944,7 +944,7 @@ e_reflow_event (GnomeCanvasItem *item, GdkEvent *event)
gnome_canvas_item_set(item,
"has_focus", (event->key.state & GDK_SHIFT_MASK) ? E_FOCUS_END : E_FOCUS_START,
NULL);
- return 1;
+ return TRUE;
}
}
}
diff --git a/widgets/misc/e-search-bar.c b/widgets/misc/e-search-bar.c
index 4cc488f8f1..e93a532ed8 100644
--- a/widgets/misc/e-search-bar.c
+++ b/widgets/misc/e-search-bar.c
@@ -705,7 +705,7 @@ set_option (ESearchBar *esb, ESearchBarItem *items)
/* Create a new group */
if (items[i].id == 0)
- group = 0;
+ group = NULL;
if (items[i].text) {
char *str;
diff --git a/widgets/misc/e-search-bar.h b/widgets/misc/e-search-bar.h
index cb05e70b0a..12f0129b4e 100644
--- a/widgets/misc/e-search-bar.h
+++ b/widgets/misc/e-search-bar.h
@@ -60,7 +60,7 @@ typedef struct {
typedef struct _ESearchBar ESearchBar;
typedef struct _ESearchBarClass ESearchBarClass;
-typedef void (*ESearchBarMenuFunc)(ESearchBar *esb, ESearchBarItem *menu_items );
+typedef void (*ESearchBarMenuFunc)(ESearchBar *esb, ESearchBarItem *menu_items);
struct _ESearchBar
{
diff --git a/widgets/misc/e-unicode.c b/widgets/misc/e-unicode.c
index 00d2eccef1..cdbd715871 100644
--- a/widgets/misc/e-unicode.c
+++ b/widgets/misc/e-unicode.c
@@ -2029,8 +2029,8 @@ e_xml_get_translated_utf8_string_prop_by_name (const xmlNode *parent, const xmlC
gchar *ret_val = NULL;
gchar *combined_name;
- g_return_val_if_fail (parent != NULL, 0);
- g_return_val_if_fail (prop_name != NULL, 0);
+ g_return_val_if_fail (parent != NULL, NULL);
+ g_return_val_if_fail (prop_name != NULL, NULL);
prop = xmlGetProp ((xmlNode *) parent, prop_name);
if (prop != NULL) {