aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--widgets/ChangeLog90
-rw-r--r--widgets/e-timezone-dialog/e-timezone-dialog.c3
-rw-r--r--widgets/menus/gal-view-menus.c2
-rw-r--r--widgets/misc/e-attachment-bar.c9
-rw-r--r--widgets/misc/e-attachment.c3
-rw-r--r--widgets/misc/e-calendar-item.c8
-rw-r--r--widgets/misc/e-calendar.c13
-rw-r--r--widgets/misc/e-canvas-background.c2
-rw-r--r--widgets/misc/e-canvas.c5
-rw-r--r--widgets/misc/e-cell-date-edit.c13
-rw-r--r--widgets/misc/e-cell-percent.c2
-rw-r--r--widgets/misc/e-charset-picker.c4
-rw-r--r--widgets/misc/e-config-page.c3
-rw-r--r--widgets/misc/e-dateedit.c17
-rw-r--r--widgets/misc/e-dropdown-button.c2
-rw-r--r--widgets/misc/e-expander.c10
-rw-r--r--widgets/misc/e-filter-bar.c9
-rw-r--r--widgets/misc/e-image-chooser.c9
-rw-r--r--widgets/misc/e-map.c44
-rw-r--r--widgets/misc/e-multi-config-dialog.c2
-rw-r--r--widgets/misc/e-reflow.c3
-rw-r--r--widgets/misc/e-search-bar.c11
-rw-r--r--widgets/misc/e-selection-model.c2
-rw-r--r--widgets/misc/e-send-options.c2
-rw-r--r--widgets/misc/e-unicode.c1
-rw-r--r--widgets/table/e-cell-progress.c18
-rw-r--r--widgets/table/e-cell-spin-button.c11
-rw-r--r--widgets/table/e-cell-text.c8
-rw-r--r--widgets/table/e-cell-toggle.c4
-rw-r--r--widgets/table/e-cell-tree.c3
-rw-r--r--widgets/table/e-cell-vbox.c2
-rw-r--r--widgets/table/e-table-click-to-add.c1
-rw-r--r--widgets/table/e-table-config.c49
-rw-r--r--widgets/table/e-table-field-chooser-dialog.c2
-rw-r--r--widgets/table/e-table-field-chooser-item.c13
-rw-r--r--widgets/table/e-table-field-chooser.c4
-rw-r--r--widgets/table/e-table-group-container.c4
-rw-r--r--widgets/table/e-table-group.c1
-rw-r--r--widgets/table/e-table-header-item.c36
-rw-r--r--widgets/table/e-table-header-utils.c5
-rw-r--r--widgets/table/e-table-item.c12
-rw-r--r--widgets/table/e-table-scrolled.c2
-rw-r--r--widgets/table/e-table-search.c2
-rw-r--r--widgets/table/e-table-sort-info.c3
-rw-r--r--widgets/table/e-table.c19
-rw-r--r--widgets/table/e-tree-scrolled.c2
-rw-r--r--widgets/table/e-tree-table-adapter.c2
-rw-r--r--widgets/table/e-tree-table-adapter.h2
-rw-r--r--widgets/table/e-tree.c16
-rw-r--r--widgets/table/e-tree.h1
50 files changed, 155 insertions, 336 deletions
diff --git a/widgets/ChangeLog b/widgets/ChangeLog
index 467dae1f6b..d350d41d9e 100644
--- a/widgets/ChangeLog
+++ b/widgets/ChangeLog
@@ -1,3 +1,93 @@
+2006-01-30 Kjartan Maraas <kmaraas@gnome.org>
+
+ * e-timezone-dialog/e-timezone-dialog.c: (get_zone_from_point):
+ * menus/gal-view-menus.c:
+ * misc/e-attachment-bar.c: (calculate_height_width),
+ (update_remote_file), (e_attachment_bar_get_attachment),
+ (class_init):
+ * misc/e-attachment.c: (async_progress_update_cb),
+ (download_to_local_path):
+ * misc/e-calendar-item.c: (e_calendar_item_get_arg),
+ (e_calendar_item_realize), (e_calendar_item_ensure_days_visible):
+ * misc/e-calendar.c: (e_calendar_drag_motion),
+ (e_calendar_drag_leave), (e_calendar_focus):
+ * misc/e-canvas-background.c: (ecb_get_property):
+ * misc/e-canvas.c: (e_canvas_class_init), (pick_current_item):
+ * misc/e-cell-date-edit.c: (e_cell_date_edit_do_popup),
+ (e_cell_date_edit_show_popup):
+ * misc/e-cell-percent.c:
+ * misc/e-charset-picker.c: (e_charset_picker_bonobo_ui_populate):
+ * misc/e-config-page.c: (e_config_page_class_init):
+ * misc/e-dateedit.c: (e_date_edit_set_date),
+ (e_date_edit_set_date_and_time_of_day),
+ (on_date_popup_date_selected):
+ * misc/e-dropdown-button.c: (e_dropdown_button_class_init):
+ * misc/e-expander.c: (get_expander_bounds), (e_expander_expose),
+ (is_in_expander_panel):
+ * misc/e-filter-bar.c: (option_changed), (build_items):
+ * misc/e-image-chooser.c: (e_image_chooser_init),
+ (image_drag_data_received_cb):
+ * misc/e-map.c: (e_map_size_allocate), (e_map_button_press),
+ (e_map_button_release), (e_map_motion), (e_map_zoom_to_location),
+ (e_map_zoom_out), (update_render_point), (repaint_point),
+ (zoom_in_smooth):
+ * misc/e-multi-config-dialog.c: (impl_response):
+ * misc/e-reflow.c: (e_reflow_realize), (e_reflow_event):
+ * misc/e-search-bar.c: (clear_search), (search_now_verb_cb),
+ (entry_activated_cb), (activate_button_clicked_cb),
+ (clear_button_clicked_cb):
+ * misc/e-selection-model.c: (e_selection_model_key_press):
+ * misc/e-send-options.c: (delay_until_date_changed_cb),
+ (e_sendoptions_get_need_general_options):
+ * misc/e-unicode.c: (e_stripped_char):
+ * table/e-cell-progress.c: (eprog_draw_border), (eprog_draw),
+ (eprog_event):
+ * table/e-cell-spin-button.c: (ecsb_event), (ecsb_focus),
+ (ecsb_unfocus), (ecsb_dispose):
+ * table/e-cell-text.c: (ect_draw), (ect_show_tooltip):
+ * table/e-cell-toggle.c: (etog_draw), (etog_event):
+ * table/e-cell-tree.c: (ect_max_width):
+ * table/e-cell-vbox.c:
+ * table/e-table-click-to-add.c: (etcta_event):
+ * table/e-table-config.c: (create_global_store):
+ * table/e-table-field-chooser-dialog.c:
+ * table/e-table-field-chooser-item.c: (etfci_find_button),
+ (etfci_reflow), (etfci_get_property), (etfci_realize):
+ * table/e-table-field-chooser.c:
+ (e_table_field_chooser_class_init):
+ * table/e-table-group-container.c: (etgc_unrealize):
+ * table/e-table-group.c: (e_table_group_new):
+ * table/e-table-header-item.c: (e_table_header_item_get_height),
+ (ethi_realize), (ethi_event):
+ * table/e-table-header-utils.c: (e_table_draw_elided_string),
+ (e_table_header_draw_button):
+ * table/e-table-item.c: (eti_set_property), (eti_get_property),
+ (eti_draw), (eti_event), (eti_cursor_change):
+ * table/e-table-scrolled.c: (e_table_scrolled_class_init):
+ * table/e-table-search.c:
+ * table/e-table-sort-info.c: (e_table_sort_info_save_to_node):
+ * table/e-table.c: (table_canvas_reflow_idle),
+ (table_canvas_size_allocate), (canvas_vbox_event),
+ (click_to_add_event), (do_drag_motion), (e_table_class_init):
+ * table/e-tree-scrolled.c: (e_tree_scrolled_class_init):
+ * table/e-tree.c: (tree_canvas_reflow_idle),
+ (tree_canvas_size_allocate), (e_tree_drag_get_data),
+ (do_drag_motion), (e_tree_class_init):
+ * text/e-text.c: (e_text_set_property), (e_text_draw),
+ (_do_tooltip), (primary_clear_cb), (_get_position),
+ (e_text_command): Tons of cleanups of the following sort:
+ - remove unused vars
+ - remove extraneous semi-colons
+ - add some comments where assignments were done without using
+ the results later
+ - remove break; statements after return foo;
+ - add casts in some places to be more type correct
+ - rename variables with name clashes
+ - s/if/ifdef in some cases
+ - mark some code static
+ - remove some unused functions
+ - use guint for 1-bit bitfields
+
2006-01-30 Chenthill Palanisamy <pchenthill@novell.com>
Reviewed by Harish Krishnaswamy <kharish@novell.com>
diff --git a/widgets/e-timezone-dialog/e-timezone-dialog.c b/widgets/e-timezone-dialog/e-timezone-dialog.c
index ef899811cb..381e048898 100644
--- a/widgets/e-timezone-dialog/e-timezone-dialog.c
+++ b/widgets/e-timezone-dialog/e-timezone-dialog.c
@@ -498,13 +498,10 @@ static icaltimezone *
get_zone_from_point (ETimezoneDialog *etd,
EMapPoint *point)
{
- ETimezoneDialogPrivate *priv;
icalarray *zones;
double longitude, latitude;
int i;
- priv = etd->priv;
-
if (point == NULL)
return NULL;
diff --git a/widgets/menus/gal-view-menus.c b/widgets/menus/gal-view-menus.c
index 90904baaff..c440cb6c27 100644
--- a/widgets/menus/gal-view-menus.c
+++ b/widgets/menus/gal-view-menus.c
@@ -53,7 +53,7 @@ static void instance_changed (GalViewInstance *instance,
#define d(x)
#define CURRENT_VIEW_PATH "/menu/View/ViewBegin/CurrentView"
-G_DEFINE_TYPE(GalViewMenus, gal_view_menus, G_TYPE_OBJECT);
+G_DEFINE_TYPE(GalViewMenus, gal_view_menus, G_TYPE_OBJECT)
static void
closure_free (void *data, void *user_data)
diff --git a/widgets/misc/e-attachment-bar.c b/widgets/misc/e-attachment-bar.c
index cf6802ed92..824e110746 100644
--- a/widgets/misc/e-attachment-bar.c
+++ b/widgets/misc/e-attachment-bar.c
@@ -215,9 +215,6 @@ calculate_height_width(EAttachmentBar *bar, int *new_width, int *new_height)
int width, height, icon_width;
PangoFontMetrics *metrics;
PangoContext *context;
- GnomeIconList *icon_list;
-
- icon_list = GNOME_ICON_LIST (bar);
context = gtk_widget_get_pango_context ((GtkWidget *) bar);
metrics = pango_context_get_metrics (context, ((GtkWidget *) bar)->style->font_desc, pango_context_get_language (context));
@@ -426,11 +423,9 @@ update (EAttachmentBar *bar)
static void
update_remote_file (EAttachment *attachment, EAttachmentBar *bar)
{
- EAttachmentBarPrivate *priv;
GnomeIconList *icon_list;
GnomeIconTextItem *item;
char *msg, *base;
- priv = bar->priv;
if (attachment->percentage == -1) {
update (bar);
@@ -903,12 +898,8 @@ static void
class_init (EAttachmentBarClass *klass)
{
GtkObjectClass *object_class;
- GtkWidgetClass *widget_class;
- GnomeIconListClass *icon_list_class;
object_class = GTK_OBJECT_CLASS (klass);
- widget_class = GTK_WIDGET_CLASS (klass);
- icon_list_class = GNOME_ICON_LIST_CLASS (klass);
parent_class = g_type_class_ref (gnome_icon_list_get_type ());
diff --git a/widgets/misc/e-attachment.c b/widgets/misc/e-attachment.c
index e0eb1b9e02..9bec31ca2e 100644
--- a/widgets/misc/e-attachment.c
+++ b/widgets/misc/e-attachment.c
@@ -346,14 +346,12 @@ async_progress_update_cb (GnomeVFSAsyncHandle *handle,
g_free (download_info);
}
return TRUE;
- break;
}
case GNOME_VFS_XFER_PROGRESS_STATUS_VFSERROR:
gnome_vfs_async_cancel (handle);
g_free (download_info->file_name);
g_free (download_info);
return FALSE;
- break;
default:
break;
@@ -374,6 +372,7 @@ download_to_local_path (GnomeVFSURI *source_uri, GnomeVFSURI *target_uri, Down
target_uri_list = g_list_prepend (target_uri_list, target_uri);
/* Callback info */
+ /* Maybe check the result here somewhere? */
result = gnome_vfs_async_xfer (&download_info->attachment->handle, /* handle_return */
source_uri_list, /* source_uri_list */
target_uri_list, /* target_uri_list */
diff --git a/widgets/misc/e-calendar-item.c b/widgets/misc/e-calendar-item.c
index 89b0213401..f0abbf60cf 100644
--- a/widgets/misc/e-calendar-item.c
+++ b/widgets/misc/e-calendar-item.c
@@ -459,10 +459,8 @@ e_calendar_item_destroy (GtkObject *o)
static void
e_calendar_item_get_arg (GtkObject *o, GtkArg *arg, guint arg_id)
{
- GnomeCanvasItem *item;
ECalendarItem *calitem;
- item = GNOME_CANVAS_ITEM (o);
calitem = E_CALENDAR_ITEM (o);
switch (arg_id) {
@@ -681,15 +679,12 @@ static void
e_calendar_item_realize (GnomeCanvasItem *item)
{
ECalendarItem *calitem;
- GdkColormap *colormap;
if (GNOME_CANVAS_ITEM_CLASS (e_calendar_item_parent_class)->realize)
(* GNOME_CANVAS_ITEM_CLASS (e_calendar_item_parent_class)->realize) (item);
calitem = E_CALENDAR_ITEM (item);
- colormap = gtk_widget_get_colormap (GTK_WIDGET (item->canvas));
-
e_calendar_item_style_set (GTK_WIDGET(item->canvas), calitem);
}
@@ -2991,12 +2986,11 @@ e_calendar_item_ensure_days_visible (ECalendarItem *calitem,
gboolean emission)
{
gint current_end_year, current_end_month;
- gint months_shown, months;
+ gint months_shown;
gint first_day_offset, days_in_month, days_in_prev_month;
gboolean need_update = FALSE;
months_shown = calitem->rows * calitem->cols;
- months = (end_year - start_year) * 12 + end_month - start_month;
/* Calculate the range of months currently displayed. */
current_end_year = calitem->year;
diff --git a/widgets/misc/e-calendar.c b/widgets/misc/e-calendar.c
index e410054ef1..83b012f4fe 100644
--- a/widgets/misc/e-calendar.c
+++ b/widgets/misc/e-calendar.c
@@ -538,12 +538,6 @@ e_calendar_drag_motion (GtkWidget *widget,
gint y,
guint time)
{
- ECalendar *cal;
-
- g_return_val_if_fail (E_IS_CALENDAR (widget), FALSE);
-
- cal = E_CALENDAR (widget);
-
#if 0
g_print ("In e_calendar_drag_motion\n");
#endif
@@ -557,12 +551,6 @@ e_calendar_drag_leave (GtkWidget *widget,
GdkDragContext *context,
guint time)
{
- ECalendar *cal;
-
- g_return_if_fail (E_IS_CALENDAR (widget));
-
- cal = E_CALENDAR (widget);
-
#if 0
g_print ("In e_calendar_drag_leave\n");
#endif
@@ -631,7 +619,6 @@ e_calendar_focus (GtkWidget *widget, GtkDirectionType direction)
return FALSE;
gnome_canvas_item_grab_focus (children[focused_index]);
if (GNOME_IS_CANVAS_WIDGET (children[focused_index])) {
- GtkWidget *widget;
widget = GNOME_CANVAS_WIDGET (children[focused_index])->widget;
gtk_widget_grab_focus (widget);
}
diff --git a/widgets/misc/e-canvas-background.c b/widgets/misc/e-canvas-background.c
index b3582cecbb..bd75b6a128 100644
--- a/widgets/misc/e-canvas-background.c
+++ b/widgets/misc/e-canvas-background.c
@@ -283,10 +283,8 @@ ecb_get_property (GObject *object,
GValue *value,
GParamSpec *pspec)
{
- GnomeCanvasItem *item;
ECanvasBackground *ecb;
- item = GNOME_CANVAS_ITEM (object);
ecb = E_CANVAS_BACKGROUND (object);
switch (prop_id){
diff --git a/widgets/misc/e-canvas.c b/widgets/misc/e-canvas.c
index 18903a325e..5cf13a56ff 100644
--- a/widgets/misc/e-canvas.c
+++ b/widgets/misc/e-canvas.c
@@ -76,11 +76,9 @@ static void
e_canvas_class_init (ECanvasClass *klass)
{
GObjectClass *object_class;
- GnomeCanvasClass *canvas_class;
GtkWidgetClass *widget_class;
object_class = (GObjectClass*) klass;
- canvas_class = (GnomeCanvasClass *) klass;
widget_class = (GtkWidgetClass *) klass;
parent_class = g_type_class_ref (PARENT_TYPE);
@@ -434,9 +432,6 @@ pick_current_item (GnomeCanvas *canvas, GdkEvent *event)
&& (canvas->current_item != NULL)
&& !canvas->left_grabbed_item) {
GdkEvent new_event;
- GnomeCanvasItem *item;
-
- item = canvas->current_item;
new_event = canvas->pick_event;
new_event.type = GDK_LEAVE_NOTIFY;
diff --git a/widgets/misc/e-cell-date-edit.c b/widgets/misc/e-cell-date-edit.c
index 1346bfccf7..df28d671ed 100644
--- a/widgets/misc/e-cell-date-edit.c
+++ b/widgets/misc/e-cell-date-edit.c
@@ -113,7 +113,7 @@ enum {
ARG_UPPER_HOUR
};
-G_DEFINE_TYPE (ECellDateEdit, e_cell_date_edit, E_CELL_POPUP_TYPE);
+G_DEFINE_TYPE (ECellDateEdit, e_cell_date_edit, E_CELL_POPUP_TYPE)
static void
@@ -431,17 +431,10 @@ e_cell_date_edit_do_popup (ECellPopup *ecp,
int view_col)
{
ECellDateEdit *ecde = E_CELL_DATE_EDIT (ecp);
- guint32 time;
e_cell_date_edit_show_popup (ecde, row, view_col);
e_cell_date_edit_set_popup_values (ecde);
- if (event->type == GDK_BUTTON_PRESS) {
- time = event->button.time;
- } else {
- time = event->key.time;
- }
-
gtk_grab_add (ecde->popup_window);
/* Set the focus to the first widget. */
@@ -548,14 +541,12 @@ e_cell_date_edit_show_popup (ECellDateEdit *ecde,
int row,
int view_col)
{
- gint x, y, width, height, old_width, old_height;
+ gint x, y, width, height;
if (ecde->need_time_list_rebuild)
e_cell_date_edit_rebuild_time_list (ecde);
/* This code is practically copied from GtkCombo. */
- old_width = ecde->popup_window->allocation.width;
- old_height = ecde->popup_window->allocation.height;
e_cell_date_edit_get_popup_pos (ecde, row, view_col, &x, &y, &height, &width);
diff --git a/widgets/misc/e-cell-percent.c b/widgets/misc/e-cell-percent.c
index b2ccf1def9..161e476345 100644
--- a/widgets/misc/e-cell-percent.c
+++ b/widgets/misc/e-cell-percent.c
@@ -40,7 +40,7 @@
#include "e-cell-percent.h"
-G_DEFINE_TYPE (ECellPercent, e_cell_percent, E_CELL_TEXT_TYPE);
+G_DEFINE_TYPE (ECellPercent, e_cell_percent, E_CELL_TEXT_TYPE)
static char *
diff --git a/widgets/misc/e-charset-picker.c b/widgets/misc/e-charset-picker.c
index 5abc7ddbbb..6700d870d8 100644
--- a/widgets/misc/e-charset-picker.c
+++ b/widgets/misc/e-charset-picker.c
@@ -485,7 +485,7 @@ e_charset_picker_bonobo_ui_populate (BonoboUIComponent *uic, const char *path,
g_free (label);
for (i = 0; i < num_charsets; i++) {
- char *command, *label, *encoded_label;
+ char *command;
char *charset_name, *u;
/* escape _'s in the charset name so that it doesn't become an underline in a GtkLabel */
@@ -542,7 +542,7 @@ e_charset_picker_bonobo_ui_populate (BonoboUIComponent *uic, const char *path,
}
if (def == num_charsets) {
- char *command, *label, *encoded_label;
+ char *command;
char *charset_name, *u;
/* escape _'s in the charset name so that it doesn't become an underline in a GtkLabel */
diff --git a/widgets/misc/e-config-page.c b/widgets/misc/e-config-page.c
index 16218f736b..7b3f288431 100644
--- a/widgets/misc/e-config-page.c
+++ b/widgets/misc/e-config-page.c
@@ -34,9 +34,6 @@ G_DEFINE_TYPE (EConfigPage, e_config_page, GTK_TYPE_EVENT_BOX)
static void
e_config_page_class_init (EConfigPageClass *class)
{
- GObjectClass *object_class;
-
- object_class = G_OBJECT_CLASS (class);
}
static void
diff --git a/widgets/misc/e-dateedit.c b/widgets/misc/e-dateedit.c
index 5bf53a7610..15d442111e 100644
--- a/widgets/misc/e-dateedit.c
+++ b/widgets/misc/e-dateedit.c
@@ -715,13 +715,10 @@ e_date_edit_set_date (EDateEdit *dedit,
gint month,
gint day)
{
- EDateEditPrivate *priv;
gboolean date_changed = FALSE;
g_return_if_fail (E_IS_DATE_EDIT (dedit));
- priv = dedit->priv;
-
date_changed = e_date_edit_set_date_internal (dedit, TRUE, FALSE,
year - 1900, month - 1,
day);
@@ -822,13 +819,10 @@ e_date_edit_set_date_and_time_of_day (EDateEdit *dedit,
gint hour,
gint minute)
{
- EDateEditPrivate *priv;
gboolean date_changed, time_changed;
g_return_if_fail (E_IS_DATE_EDIT (dedit));
- priv = dedit->priv;
-
date_changed = e_date_edit_set_date_internal (dedit, TRUE, FALSE,
year - 1900, month - 1, day);
time_changed = e_date_edit_set_time_internal (dedit, TRUE, FALSE,
@@ -1267,11 +1261,8 @@ static void
on_date_popup_date_selected (ECalendarItem *calitem,
EDateEdit *dedit)
{
- EDateEditPrivate *priv;
GDate start_date, end_date;
- priv = dedit->priv;
-
hide_date_popup (dedit);
if (!e_calendar_item_get_selection (calitem, &start_date, &end_date))
@@ -1625,7 +1616,7 @@ on_date_entry_focus_out (GtkEntry *entry,
EDateEdit *dedit)
{
struct tm tmp_tm;
- GtkMessageDialog *msg_dialog;
+ GtkWidget *msg_dialog;
tmp_tm.tm_year = 0;
tmp_tm.tm_mon = 0;
@@ -1643,7 +1634,7 @@ on_date_entry_focus_out (GtkEntry *entry,
gtk_widget_destroy (msg_dialog);
e_date_edit_get_date (dedit,&tmp_tm.tm_year,&tmp_tm.tm_mon,&tmp_tm.tm_mday);
e_date_edit_set_date (dedit,tmp_tm.tm_year,tmp_tm.tm_mon,tmp_tm.tm_mday);
- gtk_widget_grab_focus (entry);
+ gtk_widget_grab_focus (GTK_WIDGET (entry));
return FALSE;
}
return FALSE;
@@ -1655,7 +1646,7 @@ on_time_entry_focus_out (GtkEntry *entry,
GdkEventFocus *event,
EDateEdit *dedit)
{
- GtkMessageDialog *msg_dialog;
+ GtkWidget *msg_dialog;
e_date_edit_check_time_changed (dedit);
@@ -1668,7 +1659,7 @@ on_time_entry_focus_out (GtkEntry *entry,
gtk_dialog_run (GTK_DIALOG(msg_dialog));
gtk_widget_destroy (msg_dialog);
e_date_edit_set_time (dedit,e_date_edit_get_time(dedit));
- gtk_widget_grab_focus (entry);
+ gtk_widget_grab_focus (GTK_WIDGET (entry));
return FALSE;
}
return FALSE;
diff --git a/widgets/misc/e-dropdown-button.c b/widgets/misc/e-dropdown-button.c
index 480e7d04c1..f939175661 100644
--- a/widgets/misc/e-dropdown-button.c
+++ b/widgets/misc/e-dropdown-button.c
@@ -137,11 +137,9 @@ static void
e_dropdown_button_class_init (EDropdownButtonClass *klass)
{
GtkObjectClass *object_class;
- GtkWidgetClass *widget_class;
GtkToggleButtonClass *toggle_class;
object_class = GTK_OBJECT_CLASS (klass);
- widget_class = GTK_WIDGET_CLASS (klass);
toggle_class = GTK_TOGGLE_BUTTON_CLASS (klass);
object_class->destroy = impl_destroy;
diff --git a/widgets/misc/e-expander.c b/widgets/misc/e-expander.c
index 52a5a833fd..98488dc246 100644
--- a/widgets/misc/e-expander.c
+++ b/widgets/misc/e-expander.c
@@ -592,7 +592,6 @@ static GdkRectangle
get_expander_bounds (EExpander *expander)
{
GtkWidget *widget;
- GtkBin *bin;
EExpanderPrivate *priv;
GdkRectangle bounds;
gint border_width;
@@ -604,7 +603,6 @@ get_expander_bounds (EExpander *expander)
gboolean ltr;
widget = GTK_WIDGET (expander);
- bin = GTK_BIN (expander);
priv = E_EXPANDER_GET_PRIVATE (expander);
@@ -755,9 +753,6 @@ e_expander_expose (GtkWidget *widget,
if (GTK_WIDGET_DRAWABLE (widget))
{
EExpander *expander = E_EXPANDER (widget);
- EExpanderPrivate *priv;
-
- priv = E_EXPANDER_GET_PRIVATE (expander);
e_expander_paint (expander);
@@ -777,14 +772,9 @@ is_in_expander_panel (EExpander *expander,
gint y)
{
GtkWidget *widget;
- GtkBin *bin;
GdkRectangle area;
- gint border_width;
widget = GTK_WIDGET (expander);
- bin = GTK_BIN (expander);
-
- border_width = GTK_CONTAINER (expander)->border_width;
area = get_expander_bounds (expander);
diff --git a/widgets/misc/e-filter-bar.c b/widgets/misc/e-filter-bar.c
index f46378a5f2..75d1b0d9e3 100644
--- a/widgets/misc/e-filter-bar.c
+++ b/widgets/misc/e-filter-bar.c
@@ -107,6 +107,7 @@ static void
rule_advanced_response (GtkWidget *dialog, int response, void *data)
{
EFilterBar *efb = data;
+ /* the below generates a compiler warning about incompatible pointer types */
ESearchBar *esb = efb;
FilterRule *rule;
@@ -304,8 +305,6 @@ option_changed (ESearchBar *esb, void *data)
}
gtk_widget_set_sensitive (esb->entry, TRUE);
} else {
- GtkStyle *style = gtk_widget_get_default_style ();
-
gtk_widget_modify_base (esb->entry, GTK_STATE_NORMAL, NULL);
gtk_widget_modify_text (esb->entry, GTK_STATE_NORMAL, NULL);
@@ -411,11 +410,11 @@ build_items (ESearchBar *esb, ESearchBarItem *items, int type, int *start, GPtrA
/* always add on the advanced menu */
if (type == 1) {
- ESearchBarItem items[2] = { E_FILTERBAR_SEPARATOR, E_FILTERBAR_ADVANCED };
+ ESearchBarItem sb_items[2] = { E_FILTERBAR_SEPARATOR, E_FILTERBAR_ADVANCED };
ESearchBarItem dup_items[2];
- dup_item_no_subitems (&dup_items[0], &items[0]);
- dup_item_no_subitems (&dup_items[1], &items[1]);
+ dup_item_no_subitems (&dup_items[0], &sb_items[0]);
+ dup_item_no_subitems (&dup_items[1], &sb_items[1]);
g_array_append_vals (menu, &dup_items, 2);
}
diff --git a/widgets/misc/e-image-chooser.c b/widgets/misc/e-image-chooser.c
index ed147c6d13..f20b0a646d 100644
--- a/widgets/misc/e-image-chooser.c
+++ b/widgets/misc/e-image-chooser.c
@@ -147,7 +147,7 @@ e_image_chooser_class_init (EImageChooserClass *klass)
object_class->dispose = e_image_chooser_dispose;
}
-#if UI_CHANGE_OK
+#ifdef UI_CHANGE_OK
static void
browse_for_image_cb (GtkWidget *button, gpointer data)
{
@@ -168,7 +168,7 @@ e_image_chooser_init (EImageChooser *chooser)
gtk_container_add (GTK_CONTAINER (alignment), priv->image);
-#if UI_CHANGE_OK
+#ifdef UI_CHANGE_OK
priv->browse_button = gtk_button_new_with_label (_("Choose Image"));
#endif
@@ -177,7 +177,7 @@ e_image_chooser_init (EImageChooser *chooser)
gtk_container_add (GTK_CONTAINER (priv->frame), alignment);
gtk_box_set_homogeneous (GTK_BOX (chooser), FALSE);
gtk_box_pack_start (GTK_BOX (chooser), priv->frame, TRUE, TRUE, 0);
-#if UI_CHANGE_OK
+#ifdef UI_CHANGE_OK
gtk_box_pack_start (GTK_BOX (chooser), priv->browse_button, FALSE, FALSE, 0);
g_signal_connect (priv->browse_button, "clicked", G_CALLBACK (browse_for_image_cb), NULL);
@@ -194,7 +194,7 @@ e_image_chooser_init (EImageChooser *chooser)
"drag_data_received", G_CALLBACK (image_drag_data_received_cb), chooser);
gtk_widget_show_all (priv->frame);
-#if UI_CHANGE_OK
+#ifdef UI_CHANGE_OK
gtk_widget_show (priv->browse_button);
#endif
@@ -414,6 +414,7 @@ image_drag_data_received_cb (GtkWidget *widget,
char *uri;
char *nl = strstr (selection_data->data, "\r\n");
char *buf = NULL;
+ /* Why can't we change the info parameter to a GnomeVFSFileInfo and use that? */
GnomeVFSFileInfo info;
if (nl)
diff --git a/widgets/misc/e-map.c b/widgets/misc/e-map.c
index 0d73ed3493..6a2980430b 100644
--- a/widgets/misc/e-map.c
+++ b/widgets/misc/e-map.c
@@ -375,8 +375,6 @@ static void
e_map_size_allocate (GtkWidget *widget, GtkAllocation *allocation)
{
EMap *view;
- EMapPrivate *priv;
- int xofs, yofs;
GdkRectangle area;
g_return_if_fail (widget != NULL);
@@ -384,10 +382,6 @@ e_map_size_allocate (GtkWidget *widget, GtkAllocation *allocation)
g_return_if_fail (allocation != NULL);
view = E_MAP (widget);
- priv = view->priv;
-
- xofs = priv->xofs;
- yofs = priv->yofs;
/* Resize the window */
@@ -413,12 +407,6 @@ e_map_size_allocate (GtkWidget *widget, GtkAllocation *allocation)
static gint
e_map_button_press (GtkWidget *widget, GdkEventButton *event)
{
- EMap *view;
- EMapPrivate *priv;
-
- view = E_MAP (widget);
- priv = view->priv;
-
if (!GTK_WIDGET_HAS_FOCUS (widget)) gtk_widget_grab_focus (widget);
return TRUE;
}
@@ -429,12 +417,6 @@ e_map_button_press (GtkWidget *widget, GdkEventButton *event)
static gint
e_map_button_release (GtkWidget *widget, GdkEventButton *event)
{
- EMap *view;
- EMapPrivate *priv;
-
- view = E_MAP (widget);
- priv = view->priv;
-
if (event->button != 1) return FALSE;
gdk_pointer_ungrab (event->time);
@@ -447,12 +429,6 @@ e_map_button_release (GtkWidget *widget, GdkEventButton *event)
static gint
e_map_motion (GtkWidget *widget, GdkEventMotion *event)
{
- EMap *view;
- EMapPrivate *priv;
-
- view = E_MAP (widget);
- priv = view->priv;
-
return FALSE;
/*
@@ -728,7 +704,6 @@ void
e_map_zoom_to_location (EMap *map, double longitude, double latitude)
{
EMapPrivate *priv;
- int width, height;
g_return_if_fail (map);
g_return_if_fail (GTK_WIDGET_REALIZED (GTK_WIDGET (map)));
@@ -738,9 +713,6 @@ e_map_zoom_to_location (EMap *map, double longitude, double latitude)
if (priv->zoom_state == E_MAP_ZOOMED_IN) e_map_zoom_out (map);
else if (priv->zoom_state != E_MAP_ZOOMED_OUT) return;
- width = gdk_pixbuf_get_width (priv->map_render_pixbuf);
- height = gdk_pixbuf_get_height (priv->map_render_pixbuf);
-
priv->zoom_state = E_MAP_ZOOMING_IN;
priv->zoom_target_long = longitude;
priv->zoom_target_lat = latitude;
@@ -753,7 +725,6 @@ void
e_map_zoom_out (EMap *map)
{
EMapPrivate *priv;
- int width, height;
g_return_if_fail (map);
g_return_if_fail (GTK_WIDGET_REALIZED (GTK_WIDGET (map)));
@@ -762,9 +733,6 @@ e_map_zoom_out (EMap *map)
if (priv->zoom_state != E_MAP_ZOOMED_IN) return;
- width = gdk_pixbuf_get_width (priv->map_render_pixbuf);
- height = gdk_pixbuf_get_height (priv->map_render_pixbuf);
-
priv->zoom_state = E_MAP_ZOOMING_OUT;
zoom_do (map);
priv->zoom_state = E_MAP_ZOOMED_OUT;
@@ -1146,16 +1114,12 @@ update_render_point (EMap *map, EMapPoint *point)
{
EMapPrivate *priv;
GdkPixbuf *pb;
- int width, height;
double px, py;
priv = map->priv;
pb = priv->map_render_pixbuf;
if (!pb) return;
- width = gdk_pixbuf_get_width (pb);
- height = gdk_pixbuf_get_height (pb);
-
e_map_world_to_window (map, point->longitude, point->latitude, &px, &py);
px += priv->xofs;
py += priv->yofs;
@@ -1182,12 +1146,10 @@ update_render_point (EMap *map, EMapPoint *point)
static void
repaint_point (EMap *map, EMapPoint *point)
{
- EMapPrivate *priv;
GdkRectangle area;
double px, py;
if (!e_map_point_is_in_view (map, point)) return;
- priv = map->priv;
e_map_world_to_window (map, point->longitude, point->latitude, &px, &py);
@@ -1587,8 +1549,6 @@ zoom_in_smooth (EMap *map)
EMapPrivate *priv;
GdkWindow *window;
int width, height;
- int win_width, win_height;
- int target_width, target_height;
double x, y;
g_return_if_fail (map);
@@ -1603,10 +1563,6 @@ zoom_in_smooth (EMap *map)
window = GTK_WIDGET (map)->window;
width = gdk_pixbuf_get_width (priv->map_render_pixbuf);
height = gdk_pixbuf_get_height (priv->map_render_pixbuf);
- win_width = GTK_WIDGET (map)->allocation.width;
- win_height = GTK_WIDGET (map)->allocation.height;
- target_width = win_width / 4;
- target_height = win_height / 4;
/* Center the target point as much as possible */
diff --git a/widgets/misc/e-multi-config-dialog.c b/widgets/misc/e-multi-config-dialog.c
index cd74177e50..607a29a7d4 100644
--- a/widgets/misc/e-multi-config-dialog.c
+++ b/widgets/misc/e-multi-config-dialog.c
@@ -186,11 +186,9 @@ static void
impl_response (GtkDialog *dialog, int response_id)
{
EMultiConfigDialog *multi_config_dialog;
- EMultiConfigDialogPrivate *priv;
GError *error;
multi_config_dialog = E_MULTI_CONFIG_DIALOG (dialog);
- priv = multi_config_dialog->priv;
error = NULL;
diff --git a/widgets/misc/e-reflow.c b/widgets/misc/e-reflow.c
index 169e3675b0..023270cfd4 100644
--- a/widgets/misc/e-reflow.c
+++ b/widgets/misc/e-reflow.c
@@ -830,13 +830,11 @@ static void
e_reflow_realize (GnomeCanvasItem *item)
{
EReflow *reflow;
- GnomeCanvasGroup *group;
GtkAdjustment *adjustment;
int count;
int i;
reflow = E_REFLOW (item);
- group = GNOME_CANVAS_GROUP (item);
if (GNOME_CANVAS_ITEM_CLASS(parent_class)->realize)
(* GNOME_CANVAS_ITEM_CLASS(parent_class)->realize) (item);
@@ -951,7 +949,6 @@ e_reflow_event (GnomeCanvasItem *item, GdkEvent *event)
}
}
#endif
- break;
case GDK_BUTTON_PRESS:
switch(event->button.button)
{
diff --git a/widgets/misc/e-search-bar.c b/widgets/misc/e-search-bar.c
index c390de1524..d1328cffa1 100644
--- a/widgets/misc/e-search-bar.c
+++ b/widgets/misc/e-search-bar.c
@@ -106,14 +106,13 @@ verb_name_from_id (int id)
static void
clear_search (ESearchBar *esb)
{
- int item_row;
GtkWidget *widget;
ESearchBarSubitem *subitems;
e_search_bar_set_text (esb, "");
e_search_bar_set_item_id (esb, 0);
- item_row = find_id (esb->option_menu, 0, "EsbChoiceId", &widget);
+ find_id (esb->option_menu, 0, "EsbChoiceId", &widget);
subitems = g_object_get_data (G_OBJECT (widget), "EsbChoiceSubitems");
activate_by_subitems (esb, 0, subitems);
@@ -204,7 +203,7 @@ search_now_verb_cb (BonoboUIComponent *ui_component,
const char *text;
esb = E_SEARCH_BAR (data);
- text = gtk_entry_get_text (esb->entry);
+ text = gtk_entry_get_text (GTK_ENTRY (esb->entry));
if (text && *text) {
gtk_widget_modify_base (esb->entry, GTK_STATE_NORMAL, &(style->base[GTK_STATE_SELECTED]));
@@ -274,7 +273,7 @@ static void
entry_activated_cb (GtkWidget *widget,
ESearchBar *esb)
{
- const char *text = gtk_entry_get_text (esb->entry);
+ const char *text = gtk_entry_get_text (GTK_ENTRY (esb->entry));
GtkStyle *style = gtk_widget_get_default_style ();
if (text && *text) {
@@ -476,7 +475,7 @@ static void
activate_button_clicked_cb (GtkWidget *widget,
ESearchBar *esb)
{
- const char *text = gtk_entry_get_text (esb->entry);
+ const char *text = gtk_entry_get_text (GTK_ENTRY (esb->entry));
GtkStyle *style = gtk_widget_get_default_style ();
if (text && *text) {
@@ -495,8 +494,6 @@ static void
clear_button_clicked_cb (GtkWidget *widget,
ESearchBar *esb)
{
- GtkStyle *style = gtk_widget_get_default_style ();
-
gtk_widget_modify_base (esb->entry, GTK_STATE_NORMAL, NULL);
gtk_widget_modify_text (esb->entry, GTK_STATE_NORMAL, NULL);
diff --git a/widgets/misc/e-selection-model.c b/widgets/misc/e-selection-model.c
index c34e3514ac..09430de9f5 100644
--- a/widgets/misc/e-selection-model.c
+++ b/widgets/misc/e-selection-model.c
@@ -601,11 +601,9 @@ e_selection_model_key_press (ESelectionModel *selection,
case GDK_Up:
case GDK_KP_Up:
return move_selection(selection, TRUE, key->state);
- break;
case GDK_Down:
case GDK_KP_Down:
return move_selection(selection, FALSE, key->state);
- break;
case GDK_space:
case GDK_KP_Space:
if (selection->mode != GTK_SELECTION_SINGLE) {
diff --git a/widgets/misc/e-send-options.c b/widgets/misc/e-send-options.c
index eb1586adf2..7778d9e17b 100644
--- a/widgets/misc/e-send-options.c
+++ b/widgets/misc/e-send-options.c
@@ -331,12 +331,10 @@ delay_until_date_changed_cb (GtkWidget *dedit, gpointer data)
{
ESendOptionsDialog *sod;
ESendOptionsDialogPrivate *priv;
- ESendOptionsGeneral *gopts;
time_t tmp, current;
sod = data;
priv = sod->priv;
- gopts = sod->data->gopts;
current = time (NULL);
tmp = e_date_edit_get_time (E_DATE_EDIT (priv->delay_until));
diff --git a/widgets/misc/e-unicode.c b/widgets/misc/e-unicode.c
index 65383cb496..7ffe7e44f9 100644
--- a/widgets/misc/e-unicode.c
+++ b/widgets/misc/e-unicode.c
@@ -2012,7 +2012,6 @@ e_stripped_char (gunichar ch)
case G_UNICODE_COMBINING_MARK:
/* Ignore those */
return 0;
- break;
default:
/* Convert to lowercase, fall through */
ch = g_unichar_tolower (ch);
diff --git a/widgets/table/e-cell-progress.c b/widgets/table/e-cell-progress.c
index 10ce1c8291..8e10d7cc31 100644
--- a/widgets/table/e-cell-progress.c
+++ b/widgets/table/e-cell-progress.c
@@ -110,7 +110,7 @@ eprog_clear (ECellProgress *progress)
static void
eprog_draw_border (ECellProgress *progress, guchar red, guchar green, guchar blue)
{
- gint i, j, w4, p4, pw4, wpb4, hp1;
+ gint i, j, w4, p4, pw4, wpb4;
/*
* some speedup
@@ -119,7 +119,6 @@ eprog_draw_border (ECellProgress *progress, guchar red, guchar green, guchar blu
p4=progress->padding*4;
pw4=w4*progress->padding;
wpb4=(progress->width-progress->padding-progress->border)*4;
- hp1=(progress->height-progress->padding-1);
for (i=progress->padding*4;i<(progress->width-progress->padding)*4;i+=4){
for (j=0;j<progress->border;j++){
@@ -172,37 +171,27 @@ eprog_draw (ECellView *ecell_view, GdkDrawable *drawable,
int x1, int y1, int x2, int y2)
{
ECellProgress *progress = E_CELL_PROGRESS (ecell_view->ecell);
- gboolean selected;
- GdkPixbuf *image;
- int x, y, width, height;
+ int x, y;
const int value = GPOINTER_TO_INT (
e_table_model_value_at (ecell_view->e_table_model, model_col, row));
- selected = flags & E_CELL_SELECTED;
-
if ((value > progress->max)||(value < progress->min)){
g_warning ("Value from the table model is %d, the states we support are [%d..%d]\n",
value, progress->min, progress->max);
return;
}
- image = progress->image;
-
if ((x2 - x1) < progress->width){
x = x1;
- width = x2 - x1;
} else {
x = x1 + ((x2 - x1) - progress->width) / 2;
- width = progress->width;
}
if ((y2 - y1) < progress->height){
y = y1;
- height = y2 - y1;
} else {
y = y1 + ((y2 - y1) - progress->height) / 2;
- height = progress->height;
}
eprog_clear(progress);
@@ -267,7 +256,6 @@ eprog_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col
default:
return FALSE;
}
- return TRUE;
}
/*
@@ -323,7 +311,7 @@ e_cell_progress_class_init (GObjectClass *object_class)
parent_class = g_type_class_ref (PARENT_TYPE);
}
-E_MAKE_TYPE(e_cell_progress, "ECellProgress", ECellProgress, e_cell_progress_class_init, NULL, PARENT_TYPE);
+E_MAKE_TYPE(e_cell_progress, "ECellProgress", ECellProgress, e_cell_progress_class_init, NULL, PARENT_TYPE)
/**
* e_cell_progress_construct:
diff --git a/widgets/table/e-cell-spin-button.c b/widgets/table/e-cell-spin-button.c
index c6112bf3b8..9a4d935d60 100644
--- a/widgets/table/e-cell-spin-button.c
+++ b/widgets/table/e-cell-spin-button.c
@@ -338,7 +338,6 @@ ecsb_event (ECellView *ecv,
ECellActions *actions)
{
ECellSpinButton *ecsb;
- ECellSpinButtonClass *ecsb_class;
ECellSpinButtonView *ecsb_view;
ETableItem *eti;
gint height, width;
@@ -347,7 +346,6 @@ ecsb_event (ECellView *ecv,
ecsb_view = (ECellSpinButtonView *) ecv;
ecsb = E_CELL_SPIN_BUTTON (ecsb_view->cell_view.ecell);
- ecsb_class = E_CELL_SPIN_BUTTON_CLASS (GTK_OBJECT_GET_CLASS (ecsb));
eti = E_TABLE_ITEM (ecsb_view->cell_view.e_table_item_view);
switch (event->type) {
@@ -469,10 +467,7 @@ ecsb_focus (ECellView *ecell_view,
int y2)
{
ECellClass *klass;
- ECellSpinButtonView *ecsb_view;
- ecsb_view = (ECellSpinButtonView *) ecell_view;
-
klass = E_CELL_GET_CLASS (ecell_view->ecell);
if (klass->focus)
@@ -484,9 +479,7 @@ static void
ecsb_unfocus (ECellView *ecell_view)
{
ECellClass *klass;
- ECellSpinButtonView *ecsb_view;
- ecsb_view = (ECellSpinButtonView *) ecell_view;
klass = E_CELL_GET_CLASS (ecell_view->ecell);
if (klass->unfocus)
@@ -514,13 +507,9 @@ ecsb_show_tooltip (ECellView *ecv,
static void
ecsb_dispose (GObject *object)
{
- ECellSpinButton *mcsp;
-
g_return_if_fail (object != NULL);
g_return_if_fail (M_IS_CELL_SPIN_BUTTON (object));
- mcsp = E_CELL_SPIN_BUTTON (object);
-
G_OBJECT_CLASS (parent_class)->dispose (object);
}
diff --git a/widgets/table/e-cell-text.c b/widgets/table/e-cell-text.c
index 33ec7a6fa1..db66f13550 100644
--- a/widgets/table/e-cell-text.c
+++ b/widgets/table/e-cell-text.c
@@ -704,7 +704,7 @@ ect_draw (ECellView *ecell_view, GdkDrawable *drawable,
ECellText *ect = E_CELL_TEXT (ecell_view->ecell);
CellEdit *edit = text_view->edit;
gboolean selected;
- GdkColor *foreground, *cursor_color;
+ GdkColor *foreground;
GtkWidget *canvas = GTK_WIDGET (text_view->canvas);
GdkRectangle clip_rect;
int x_origin, y_origin;
@@ -716,10 +716,8 @@ ect_draw (ECellView *ecell_view, GdkDrawable *drawable,
foreground = &canvas->style->fg [GTK_STATE_SELECTED];
else
foreground = &canvas->style->fg [GTK_STATE_ACTIVE];
- cursor_color = foreground;
} else {
foreground = &canvas->style->text [GTK_STATE_NORMAL];
- cursor_color = foreground;
if (ect->color_column != -1) {
char *color_spec;
@@ -1544,6 +1542,10 @@ ect_show_tooltip (ECellView *ecell_view,
tooltip_height = height;
tooltip_y = tooltip->y;
+ /* This looks very broken since tooltip_x is never used?!
+ * Maybe tooltip->x is what was meant here and just get rid of
+ * both tooltip_x and tooltip_y?
+ */
switch (E_CELL_TEXT (text_view->cell_view.ecell)->justify) {
case GTK_JUSTIFY_CENTER:
tooltip_x = - tooltip_width / 2;
diff --git a/widgets/table/e-cell-toggle.c b/widgets/table/e-cell-toggle.c
index e90026399a..2892b18598 100644
--- a/widgets/table/e-cell-toggle.c
+++ b/widgets/table/e-cell-toggle.c
@@ -189,7 +189,6 @@ etog_draw (ECellView *ecell_view, GdkDrawable *drawable,
int x1, int y1, int x2, int y2)
{
ECellToggle *toggle = E_CELL_TOGGLE (ecell_view->ecell);
- gboolean selected;
ECellToggleView *toggle_view = (ECellToggleView *) ecell_view;
GdkPixmap *pixmap;
GdkPixbuf *image;
@@ -199,8 +198,6 @@ etog_draw (ECellView *ecell_view, GdkDrawable *drawable,
const int value = GPOINTER_TO_INT (
e_table_model_value_at (ecell_view->e_table_model, model_col, row));
- selected = flags & E_CELL_SELECTED;
-
if (value < 0 || value >= toggle->n_states){
g_warning ("Value from the table model is %d, the states we support are [0..%d)\n",
value, toggle->n_states);
@@ -289,7 +286,6 @@ etog_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col,
default:
return FALSE;
}
- return TRUE;
}
/*
diff --git a/widgets/table/e-cell-tree.c b/widgets/table/e-cell-tree.c
index c632a16966..d42a067931 100644
--- a/widgets/table/e-cell-tree.c
+++ b/widgets/table/e-cell-tree.c
@@ -574,7 +574,7 @@ ect_max_width (ECellView *ecell_view, int model_col, int view_col)
ETreeModel *tree_model = e_cell_tree_get_tree_model(ecell_view->e_table_model, row);
ETreePath node;
GdkPixbuf *node_image;
- int node_image_width = 0, node_image_height = 0;
+ int node_image_width = 0;
int offset, subcell_offset;
#if 0
@@ -591,7 +591,6 @@ ect_max_width (ECellView *ecell_view, int model_col, int view_col)
if (node_image) {
node_image_width = gdk_pixbuf_get_width (node_image);
- node_image_height = gdk_pixbuf_get_height (node_image);
}
width = subcell_offset + node_image_width;
diff --git a/widgets/table/e-cell-vbox.c b/widgets/table/e-cell-vbox.c
index 91a25ec8c4..bfc140e9fd 100644
--- a/widgets/table/e-cell-vbox.c
+++ b/widgets/table/e-cell-vbox.c
@@ -446,7 +446,7 @@ e_cell_vbox_init (GtkObject *object)
ecv->subcell_count = 0;
}
-E_MAKE_TYPE(e_cell_vbox, "ECellVbox", ECellVbox, e_cell_vbox_class_init, e_cell_vbox_init, PARENT_TYPE);
+E_MAKE_TYPE(e_cell_vbox, "ECellVbox", ECellVbox, e_cell_vbox_class_init, e_cell_vbox_init, PARENT_TYPE)
/**
* e_cell_vbox_new:
diff --git a/widgets/table/e-table-click-to-add.c b/widgets/table/e-table-click-to-add.c
index 76e0155169..a338df9cc5 100644
--- a/widgets/table/e-table-click-to-add.c
+++ b/widgets/table/e-table-click-to-add.c
@@ -433,7 +433,6 @@ etcta_event (GnomeCanvasItem *item, GdkEvent *e)
break;
default:
return FALSE;
- break;
}
break;
diff --git a/widgets/table/e-table-config.c b/widgets/table/e-table-config.c
index 7923a21d9a..38d52b15ab 100644
--- a/widgets/table/e-table-config.c
+++ b/widgets/table/e-table-config.c
@@ -513,7 +513,7 @@ do_fields_config_dialog (ETableConfig *config)
}
-ETableMemoryStoreColumnInfo store_columns[] = {
+static ETableMemoryStoreColumnInfo store_columns[] = {
E_TABLE_MEMORY_STORE_STRING,
E_TABLE_MEMORY_STORE_INTEGER,
E_TABLE_MEMORY_STORE_TERMINATOR
@@ -539,53 +539,6 @@ create_global_store (ETableConfig *config)
}
}
-char *spec = "<ETableSpecification gettext-domain=\"" E_I18N_DOMAIN "\" 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\"/>"
- "<grouping/>"
- "</ETableState>"
- "</ETableSpecification>";
-
-GtkWidget *e_table_proxy_etable_shown_new (void);
-
-GtkWidget *
-e_table_proxy_etable_shown_new (void)
-{
- ETableModel *model = NULL;
- GtkWidget *widget;
- ETableScrolled *ets;
-
- model = e_table_subset_variable_new (global_store);
-
- widget = e_table_scrolled_new (model, NULL, spec, NULL);
- ets = E_TABLE_SCROLLED (widget);
- atk_object_set_name (gtk_widget_get_accessible ((GtkWidget *)ets->table), _("Show Fields"));
-
- return widget;
-}
-
-GtkWidget *e_table_proxy_etable_available_new (void);
-
-GtkWidget *
-e_table_proxy_etable_available_new (void)
-{
- ETableModel *model;
- GtkWidget *widget;
- ETableScrolled *ets;
-
- model = e_table_without_new (global_store,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-
- e_table_without_show_all (E_TABLE_WITHOUT (model));
-
- widget = e_table_scrolled_new (model, NULL, spec, NULL);
- ets = E_TABLE_SCROLLED (widget);
- atk_object_set_name (gtk_widget_get_accessible ((GtkWidget *)ets->table), _("Available Fields"));
-
- return widget;
-}
-
static void
config_button_fields (GtkWidget *widget, ETableConfig *config)
{
diff --git a/widgets/table/e-table-field-chooser-dialog.c b/widgets/table/e-table-field-chooser-dialog.c
index 8c3c9eb883..9845dd7fbc 100644
--- a/widgets/table/e-table-field-chooser-dialog.c
+++ b/widgets/table/e-table-field-chooser-dialog.c
@@ -53,7 +53,7 @@ E_MAKE_TYPE (e_table_field_chooser_dialog,
ETableFieldChooserDialog,
e_table_field_chooser_dialog_class_init,
e_table_field_chooser_dialog_init,
- PARENT_TYPE);
+ PARENT_TYPE)
static void
e_table_field_chooser_dialog_class_init (ETableFieldChooserDialogClass *klass)
diff --git a/widgets/table/e-table-field-chooser-item.c b/widgets/table/e-table-field-chooser-item.c
index c1c2e60400..435b7c63c2 100644
--- a/widgets/table/e-table-field-chooser-item.c
+++ b/widgets/table/e-table-field-chooser-item.c
@@ -98,9 +98,6 @@ etfci_find_button (ETableFieldChooserItem *etfci, double loc)
int i;
int count;
double height = 0;
- GtkStyle *style;
-
- style = GTK_WIDGET (GNOME_CANVAS_ITEM (etfci)->canvas)->style;
count = e_table_header_count(etfci->combined_header);
for (i = 0; i < count; i++) {
@@ -158,12 +155,9 @@ etfci_reflow (GnomeCanvasItem *item, gint flags)
int i;
int count;
double height = 0;
- GtkStyle *style;
etfci_rebuild_combined (etfci);
- style = GTK_WIDGET (GNOME_CANVAS_ITEM (etfci)->canvas)->style;
-
old_height = etfci->height;
count = e_table_header_count(etfci->combined_header);
@@ -369,10 +363,8 @@ etfci_set_property (GObject *object, guint prop_id, const GValue *value, GParamS
static void
etfci_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
{
- GnomeCanvasItem *item;
ETableFieldChooserItem *etfci;
- item = GNOME_CANVAS_ITEM (object);
etfci = E_TABLE_FIELD_CHOOSER_ITEM (object);
switch (prop_id){
@@ -423,13 +415,10 @@ static void
etfci_realize (GnomeCanvasItem *item)
{
ETableFieldChooserItem *etfci = E_TABLE_FIELD_CHOOSER_ITEM (item);
- GdkWindow *window;
if (GNOME_CANVAS_ITEM_CLASS (etfci_parent_class)-> realize)
(*GNOME_CANVAS_ITEM_CLASS (etfci_parent_class)->realize)(item);
- window = GTK_WIDGET (item->canvas)->window;
-
if (!etfci->font)
etfci_font_load (etfci);
@@ -708,4 +697,4 @@ E_MAKE_TYPE (e_table_field_chooser_item,
ETableFieldChooserItem,
etfci_class_init,
etfci_init,
- PARENT_OBJECT_TYPE);
+ PARENT_OBJECT_TYPE)
diff --git a/widgets/table/e-table-field-chooser.c b/widgets/table/e-table-field-chooser.c
index fe6eb3c46c..b3554f86cf 100644
--- a/widgets/table/e-table-field-chooser.c
+++ b/widgets/table/e-table-field-chooser.c
@@ -55,16 +55,14 @@ E_MAKE_TYPE (e_table_field_chooser,
ETableFieldChooser,
e_table_field_chooser_class_init,
e_table_field_chooser_init,
- PARENT_TYPE);
+ PARENT_TYPE)
static void
e_table_field_chooser_class_init (ETableFieldChooserClass *klass)
{
GObjectClass *object_class;
- GtkVBoxClass *vbox_class;
object_class = (GObjectClass*) klass;
- vbox_class = (GtkVBoxClass *) klass;
glade_init();
diff --git a/widgets/table/e-table-group-container.c b/widgets/table/e-table-group-container.c
index 1caeb77a22..632f998c84 100644
--- a/widgets/table/e-table-group-container.c
+++ b/widgets/table/e-table-group-container.c
@@ -332,10 +332,6 @@ etgc_realize (GnomeCanvasItem *item)
static void
etgc_unrealize (GnomeCanvasItem *item)
{
- ETableGroupContainer *etgc;
-
- etgc = E_TABLE_GROUP_CONTAINER (item);
-
if (GNOME_CANVAS_ITEM_CLASS (etgc_parent_class)->unrealize)
(* GNOME_CANVAS_ITEM_CLASS (etgc_parent_class)->unrealize) (item);
}
diff --git a/widgets/table/e-table-group.c b/widgets/table/e-table-group.c
index 008ec07d0a..a7bb72db3e 100644
--- a/widgets/table/e-table-group.c
+++ b/widgets/table/e-table-group.c
@@ -111,7 +111,6 @@ e_table_group_new (GnomeCanvasGroup *parent,
} else {
return e_table_group_leaf_new (parent, full_header, header, model, sort_info);
}
- return NULL;
}
/**
diff --git a/widgets/table/e-table-header-item.c b/widgets/table/e-table-header-item.c
index 2cb6d7db6a..e43fd9fdf5 100644
--- a/widgets/table/e-table-header-item.c
+++ b/widgets/table/e-table-header-item.c
@@ -161,7 +161,6 @@ e_table_header_item_get_height (ETableHeaderItem *ethi)
ETableHeader *eth;
int numcols, col;
int maxheight;
- GtkStyle *style;
g_return_val_if_fail (ethi != NULL, 0);
g_return_val_if_fail (E_IS_TABLE_HEADER_ITEM (ethi), 0);
@@ -171,8 +170,6 @@ e_table_header_item_get_height (ETableHeaderItem *ethi)
maxheight = 0;
- style = GTK_WIDGET (GNOME_CANVAS_ITEM (ethi)->canvas)->style;
-
for (col = 0; col < numcols; col++) {
ETableCol *ecol = e_table_header_get_column (eth, col);
int height;
@@ -896,7 +893,6 @@ static void
ethi_realize (GnomeCanvasItem *item)
{
ETableHeaderItem *ethi = E_TABLE_HEADER_ITEM (item);
- GdkWindow *window;
GtkTargetEntry ethi_drop_types [] = {
{ TARGET_ETABLE_COL_TYPE, 0, TARGET_ETABLE_COL_HEADER },
};
@@ -905,8 +901,6 @@ ethi_realize (GnomeCanvasItem *item)
if (GNOME_CANVAS_ITEM_CLASS (ethi_parent_class)-> realize)
(*GNOME_CANVAS_ITEM_CLASS (ethi_parent_class)->realize)(item);
- window = GTK_WIDGET (item->canvas)->window;
-
if (!ethi->font)
ethi_font_set (ethi, gtk_style_get_font (GTK_WIDGET (item->canvas)->style));
@@ -1722,10 +1716,10 @@ ethi_event (GnomeCanvasItem *item, GdkEvent *e)
needs_ungrab = (ethi->resize_guide != NULL);
ethi_end_resize (ethi);
} else if (was_maybe_drag && ethi->sort_info) {
- ETableCol *col;
+ ETableCol *ecol;
- col = e_table_header_get_column (ethi->eth, ethi_find_col_by_x (ethi, e->button.x));
- ethi_change_sort_state (ethi, col);
+ ecol = e_table_header_get_column (ethi->eth, ethi_find_col_by_x (ethi, e->button.x));
+ ethi_change_sort_state (ethi, ecol);
}
if (needs_ungrab)
@@ -1736,16 +1730,16 @@ ethi_event (GnomeCanvasItem *item, GdkEvent *e)
case GDK_KEY_PRESS:
if ((e->key.keyval == GDK_F10) && (e->key.state & GDK_SHIFT_MASK)) {
EthiHeaderInfo *info = g_new(EthiHeaderInfo, 1);
- ETableCol *col;
+ ETableCol *ecol;
GtkMenu *popup;
info->ethi = ethi;
info->col = ethi->selected_col;
- col = e_table_header_get_column (ethi->eth, info->col);
+ ecol = e_table_header_get_column (ethi->eth, info->col);
popup = e_popup_menu_create_with_domain (ethi_context_menu,
1 +
- (col->sortable ? 0 : 2) +
+ (ecol->sortable ? 0 : 2) +
((ethi->table || ethi->tree) ? 0 : 4) +
((e_table_header_count (ethi->eth) > 1) ? 0 : 8),
((e_table_sort_info_get_can_group (ethi->sort_info)) ? 0 : 16) +
@@ -1756,28 +1750,28 @@ ethi_event (GnomeCanvasItem *item, GdkEvent *e)
G_CALLBACK (free_popup_info), info);
e_popup_menu (popup, NULL);
} else if (e->key.keyval == GDK_space) {
- ETableCol *col;
+ ETableCol *ecol;
- col = e_table_header_get_column (ethi->eth, ethi->selected_col);
- ethi_change_sort_state (ethi, col);
+ ecol = e_table_header_get_column (ethi->eth, ethi->selected_col);
+ ethi_change_sort_state (ethi, ecol);
} else if ((e->key.keyval == GDK_Right) || (e->key.keyval == GDK_KP_Right)) {
- ETableCol *col;
+ ETableCol *ecol;
if ((ethi->selected_col < 0) || (ethi->selected_col >= ethi->eth->col_count - 1))
ethi->selected_col = 0;
else
ethi->selected_col++;
- col = e_table_header_get_column (ethi->eth, ethi->selected_col);
- ethi_change_sort_state (ethi, col);
+ ecol = e_table_header_get_column (ethi->eth, ethi->selected_col);
+ ethi_change_sort_state (ethi, ecol);
} else if ((e->key.keyval == GDK_Left) || (e->key.keyval == GDK_KP_Left)) {
- ETableCol *col;
+ ETableCol *ecol;
if ((ethi->selected_col <= 0) || (ethi->selected_col >= ethi->eth->col_count))
ethi->selected_col = ethi->eth->col_count - 1;
else
ethi->selected_col--;
- col = e_table_header_get_column (ethi->eth, ethi->selected_col);
- ethi_change_sort_state (ethi, col);
+ ecol = e_table_header_get_column (ethi->eth, ethi->selected_col);
+ ethi_change_sort_state (ethi, ecol);
}
break;
diff --git a/widgets/table/e-table-header-utils.c b/widgets/table/e-table-header-utils.c
index 3a5fb64ff1..8a1831bd49 100644
--- a/widgets/table/e-table-header-utils.c
+++ b/widgets/table/e-table-header-utils.c
@@ -294,10 +294,6 @@ e_table_draw_elided_string (GdkDrawable *drawable, GdkGC *gc, GtkWidget *widget,
gdk_draw_layout (drawable, gc, x, y, layout);
for (i = 0; i < arrow_width; i++) {
- int h;
-
- h = 2 * i + 1;
-
gdk_draw_line (drawable, gc,
x + max_width - i,
y + height / 2 - i,
@@ -435,7 +431,6 @@ e_table_header_draw_button (GdkDrawable *drawable, ETableCol *ecol,
xpos = inner_x;
if (inner_width - pwidth > 11) {
- int width;
int ypos;
pango_layout_get_pixel_size (layout, &width, NULL);
diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c
index a3201aa533..ea020c5710 100644
--- a/widgets/table/e-table-item.c
+++ b/widgets/table/e-table-item.c
@@ -1460,11 +1460,9 @@ eti_dispose (GObject *object)
static void
eti_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
{
- GnomeCanvasItem *item;
ETableItem *eti;
int cursor_col;
- item = GNOME_CANVAS_ITEM (object);
eti = E_TABLE_ITEM (object);
switch (prop_id){
@@ -1546,11 +1544,9 @@ eti_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpe
static void
eti_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
{
- GnomeCanvasItem *item;
ETableItem *eti;
int row;
- item = GNOME_CANVAS_ITEM (object);
eti = E_TABLE_ITEM (object);
switch (prop_id){
@@ -1674,7 +1670,7 @@ adjustment_changed (GtkAdjustment *adjustment, ETableItem *eti)
static void
eti_tree_unfreeze (GtkWidget *widget, GdkEvent *event, ETableItem *eti)
{
- g_object_set_data (((GnomeCanvasItem *) eti)->canvas, "freeze-cursor", 0);
+ g_object_set_data (G_OBJECT (((GnomeCanvasItem *) eti)->canvas), "freeze-cursor", 0);
}
static void
@@ -1932,7 +1928,7 @@ eti_draw (GnomeCanvasItem *item, GdkDrawable *drawable, int x, int y, int width,
yd += height_extra;
for (row = first_row; row < last_row; row++){
- int xd, height;
+ int xd;
gboolean selected;
gint cursor_col, cursor_row;
@@ -2401,7 +2397,6 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
case 4:
case 5:
return FALSE;
- break;
}
break;
@@ -2485,7 +2480,6 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
case 4:
case 5:
return FALSE;
- break;
}
break;
@@ -3216,13 +3210,11 @@ static void
eti_cursor_change (ESelectionModel *selection, int row, int col, ETableItem *eti)
{
int view_row;
- int view_col;
if (!(GTK_OBJECT_FLAGS(eti) & GNOME_CANVAS_ITEM_REALIZED))
return;
view_row = model_to_view_row(eti, row);
- view_col = model_to_view_col(eti, col);
if (eti->old_cursor_row != -1 && view_row != eti->old_cursor_row)
e_table_item_redraw_row (eti, eti->old_cursor_row);
diff --git a/widgets/table/e-table-scrolled.c b/widgets/table/e-table-scrolled.c
index 77db176540..fc31f0eef6 100644
--- a/widgets/table/e-table-scrolled.c
+++ b/widgets/table/e-table-scrolled.c
@@ -205,11 +205,9 @@ e_table_scrolled_class_init (ETableScrolledClass *class)
{
GObjectClass *object_class;
GtkWidgetClass *widget_class;
- GtkContainerClass *container_class;
object_class = (GObjectClass *) class;
widget_class = (GtkWidgetClass *) class;
- container_class = (GtkContainerClass *) class;
parent_class = g_type_class_ref (PARENT_TYPE);
diff --git a/widgets/table/e-table-search.c b/widgets/table/e-table-search.c
index 162f148ac0..898b179d16 100644
--- a/widgets/table/e-table-search.c
+++ b/widgets/table/e-table-search.c
@@ -31,7 +31,7 @@
#define d(x)
-d(static gint depth = 0);
+d(static gint depth = 0)
struct _ETableSearchPrivate {
guint timeout_id;
diff --git a/widgets/table/e-table-sort-info.c b/widgets/table/e-table-sort-info.c
index cfb7d2dda6..5bbf443b76 100644
--- a/widgets/table/e-table-sort-info.c
+++ b/widgets/table/e-table-sort-info.c
@@ -418,7 +418,6 @@ e_table_sort_info_save_to_node (ETableSortInfo *info,
xmlNode *parent)
{
xmlNode *grouping;
- xmlNode *node;
int i;
const int sort_count = e_table_sort_info_sorting_get_count (info);
const int group_count = e_table_sort_info_grouping_get_count (info);
@@ -431,7 +430,6 @@ e_table_sort_info_save_to_node (ETableSortInfo *info,
e_xml_set_integer_prop_by_name (new_node, "column", column.column);
e_xml_set_bool_prop_by_name (new_node, "ascending", column.ascending);
- node = new_node;
}
for (i = 0; i < sort_count; i++) {
@@ -440,7 +438,6 @@ e_table_sort_info_save_to_node (ETableSortInfo *info,
e_xml_set_integer_prop_by_name (new_node, "column", column.column);
e_xml_set_bool_prop_by_name (new_node, "ascending", column.ascending);
- node = new_node;
}
return grouping;
diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c
index a1947cf74d..2122a015ca 100644
--- a/widgets/table/e-table.c
+++ b/widgets/table/e-table.c
@@ -682,7 +682,6 @@ static gboolean
table_canvas_reflow_idle (ETable *e_table)
{
gdouble height, width;
- gdouble item_height;
gdouble oldheight, oldwidth;
GtkAllocation *alloc = &(GTK_WIDGET (e_table->table_canvas)->allocation);
@@ -690,7 +689,6 @@ table_canvas_reflow_idle (ETable *e_table)
"height", &height,
"width", &width,
NULL);
- item_height = height;
height = MAX ((int)height, alloc->height);
width = MAX((int)width, alloc->width);
/* I have no idea why this needs to be -1, but it works. */
@@ -713,7 +711,6 @@ table_canvas_size_allocate (GtkWidget *widget, GtkAllocation *alloc,
{
gdouble width;
gdouble height;
- gdouble item_height;
GValue *val = g_new0 (GValue, 1);
g_value_init (val, G_TYPE_DOUBLE);
@@ -722,7 +719,6 @@ table_canvas_size_allocate (GtkWidget *widget, GtkAllocation *alloc,
g_object_get (e_table->canvas_vbox,
"height", &height,
NULL);
- item_height = height;
height = MAX ((int)height, alloc->height);
g_object_set (e_table->canvas_vbox,
@@ -1139,9 +1135,6 @@ table_canvas_focus_event_cb (GtkWidget *widget, GdkEventFocus *event, gpointer d
static gboolean
canvas_vbox_event (ECanvasVbox *vbox, GdkEventKey *key, ETable *etable)
{
- GnomeCanvas *canvas;
-
- canvas = GNOME_CANVAS (etable->table_canvas);
switch (key->keyval) {
case GDK_Tab:
case GDK_KP_Tab:
@@ -1160,9 +1153,6 @@ canvas_vbox_event (ECanvasVbox *vbox, GdkEventKey *key, ETable *etable)
static gboolean
click_to_add_event (ETableClickToAdd *etcta, GdkEventKey *key, ETable *etable)
{
- GnomeCanvas *canvas;
-
- canvas = GNOME_CANVAS (etable->table_canvas);
switch (key->keyval) {
case GDK_Tab:
case GDK_KP_Tab:
@@ -2463,9 +2453,9 @@ struct _GtkDragDestInfo
GdkDragContext *context; /* Drag context */
GtkDragSourceInfo *proxy_source; /* Set if this is a proxy drag */
GtkSelectionData *proxy_data; /* Set while retrieving proxied data */
- gboolean dropped : 1; /* Set after we receive a drop */
+ guint dropped : 1; /* Set after we receive a drop */
guint32 proxy_drop_time; /* Timestamp for proxied drop */
- gboolean proxy_drop_wait : 1; /* Set if we are waiting for a
+ guint proxy_drop_wait : 1; /* Set if we are waiting for a
* status reply before sending
* a proxied drop on.
*/
@@ -2847,9 +2837,6 @@ do_drag_motion(ETable *et,
{
gboolean ret_val;
int row = -1, col = -1;
- GtkWidget *widget;
-
- widget = GTK_WIDGET (et);
e_table_get_cell_at (et, x, y, &row, &col);
@@ -3060,11 +3047,9 @@ e_table_class_init (ETableClass *class)
{
GObjectClass *object_class;
GtkWidgetClass *widget_class;
- GtkContainerClass *container_class;
object_class = (GObjectClass *) class;
widget_class = (GtkWidgetClass *) class;
- container_class = (GtkContainerClass *) class;
parent_class = g_type_class_peek_parent (class);
diff --git a/widgets/table/e-tree-scrolled.c b/widgets/table/e-tree-scrolled.c
index 288769e4bc..953009ea1e 100644
--- a/widgets/table/e-tree-scrolled.c
+++ b/widgets/table/e-tree-scrolled.c
@@ -204,11 +204,9 @@ e_tree_scrolled_class_init (ETreeScrolledClass *class)
{
GObjectClass *object_class;
GtkWidgetClass *widget_class;
- GtkContainerClass *container_class;
object_class = (GObjectClass *) class;
widget_class = (GtkWidgetClass *) class;
- container_class = (GtkContainerClass *) class;
parent_class = g_type_class_ref (PARENT_TYPE);
diff --git a/widgets/table/e-tree-table-adapter.c b/widgets/table/e-tree-table-adapter.c
index 6bf82ede38..4514a7b15e 100644
--- a/widgets/table/e-tree-table-adapter.c
+++ b/widgets/table/e-tree-table-adapter.c
@@ -982,13 +982,13 @@ set_collapsed_state_func (gpointer keyp, gpointer value, gpointer data)
ETreePath path = keyp;
node_t *node = ((GNode *)value)->data;
ETreeTableAdapter *etta = (ETreeTableAdapter *) data;
- xmlNode *xmlnode;
if (node->expanded != FALSE) {
e_tree_table_adapter_node_set_expanded(etta, path, FALSE);
node->expanded = FALSE;
}
}
+
void
e_tree_table_adapter_load_all_expanded_state (ETreeTableAdapter *etta, gboolean state)
{
diff --git a/widgets/table/e-tree-table-adapter.h b/widgets/table/e-tree-table-adapter.h
index fdcbf2335c..2cc4f88e25 100644
--- a/widgets/table/e-tree-table-adapter.h
+++ b/widgets/table/e-tree-table-adapter.h
@@ -71,6 +71,8 @@ void e_tree_table_adapter_node_set_expanded (ETreeTableAdapter
void e_tree_table_adapter_node_set_expanded_recurse (ETreeTableAdapter *etta,
ETreePath path,
gboolean expanded);
+void e_tree_table_adapter_load_all_expanded_state (ETreeTableAdapter *etta,
+ gboolean state);
void e_tree_table_adapter_root_node_set_visible (ETreeTableAdapter *etta,
gboolean visible);
ETreePath e_tree_table_adapter_node_at_row (ETreeTableAdapter *etta,
diff --git a/widgets/table/e-tree.c b/widgets/table/e-tree.c
index 9ba6f7f5f2..afbb484964 100644
--- a/widgets/table/e-tree.c
+++ b/widgets/table/e-tree.c
@@ -713,7 +713,6 @@ static gboolean
tree_canvas_reflow_idle (ETree *e_tree)
{
gdouble height, width;
- gdouble item_height;
gdouble oldheight, oldwidth;
GtkAllocation *alloc = &(GTK_WIDGET (e_tree->priv->table_canvas)->allocation);
@@ -721,7 +720,6 @@ tree_canvas_reflow_idle (ETree *e_tree)
"height", &height,
"width", &width,
NULL);
- item_height = height;
height = MAX ((int)height, alloc->height);
width = MAX((int)width, alloc->width);
/* I have no idea why this needs to be -1, but it works. */
@@ -744,7 +742,6 @@ tree_canvas_size_allocate (GtkWidget *widget, GtkAllocation *alloc,
{
gdouble width;
gdouble height;
- gdouble item_height;
GtkAdjustment *adj = GTK_LAYOUT(e_tree->priv->table_canvas)->vadjustment;
ETreePath path = e_tree_get_cursor (e_tree);
gint x, y, w, h;
@@ -756,7 +753,6 @@ tree_canvas_size_allocate (GtkWidget *widget, GtkAllocation *alloc,
g_object_get (e_tree->priv->item,
"height", &height,
NULL);
- item_height = height;
height = MAX ((int)height, alloc->height);
g_object_set (e_tree->priv->item,
@@ -2205,9 +2201,9 @@ struct _GtkDragDestInfo
GdkDragContext *context; /* Drag context */
GtkDragSourceInfo *proxy_source; /* Set if this is a proxy drag */
GtkSelectionData *proxy_data; /* Set while retrieving proxied data */
- gboolean dropped : 1; /* Set after we receive a drop */
+ guint dropped : 1; /* Set after we receive a drop */
guint32 proxy_drop_time; /* Timestamp for proxied drop */
- gboolean proxy_drop_wait : 1; /* Set if we are waiting for a
+ guint proxy_drop_wait : 1; /* Set if we are waiting for a
* status reply before sending
* a proxied drop on.
*/
@@ -2252,12 +2248,9 @@ e_tree_drag_get_data (ETree *tree,
GdkAtom target,
guint32 time)
{
- ETreePath path;
g_return_if_fail(tree != NULL);
g_return_if_fail(E_IS_TREE(tree));
- path = e_tree_table_adapter_node_at_row(tree->priv->etta, row);
-
gtk_drag_get_data(GTK_WIDGET(tree),
context,
target,
@@ -2633,9 +2626,6 @@ do_drag_motion(ETree *et,
gboolean ret_val = FALSE;
int row, col;
ETreePath path;
- GtkWidget *widget;
-
- widget = GTK_WIDGET (et);
e_tree_get_cell_at (et,
x,
@@ -3008,11 +2998,9 @@ e_tree_class_init (ETreeClass *class)
{
GObjectClass *object_class;
GtkWidgetClass *widget_class;
- GtkContainerClass *container_class;
object_class = (GObjectClass *) class;
widget_class = (GtkWidgetClass *) class;
- container_class = (GtkContainerClass *) class;
parent_class = g_type_class_ref (PARENT_TYPE);
diff --git a/widgets/table/e-tree.h b/widgets/table/e-tree.h
index d4057b0ae6..f244715c9a 100644
--- a/widgets/table/e-tree.h
+++ b/widgets/table/e-tree.h
@@ -289,6 +289,7 @@ void e_tree_load_expanded_state (ETree *et,
char *filename);
int e_tree_row_count (ETree *et);
GtkWidget *e_tree_get_tooltip (ETree *et);
+void e_tree_load_all_expanded_state (ETree *et, gboolean state);
typedef enum {
E_TREE_FIND_NEXT_BACKWARD = 0,