aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc
diff options
context:
space:
mode:
authorKjartan Maraas <kmaraas@gnome.org>2006-01-30 20:28:21 +0800
committerKjartan Maraas <kmaraas@src.gnome.org>2006-01-30 20:28:21 +0800
commit4a4b322c39f2bccddd9b9f41dead3429dab80f57 (patch)
treefebc1d25336e811d024c4fefde19555b07ce8737 /widgets/misc
parent4ce156ab5a105682005b33d6636bf7db87f05bcb (diff)
downloadgsoc2013-evolution-4a4b322c39f2bccddd9b9f41dead3429dab80f57.tar.gz
gsoc2013-evolution-4a4b322c39f2bccddd9b9f41dead3429dab80f57.tar.zst
gsoc2013-evolution-4a4b322c39f2bccddd9b9f41dead3429dab80f57.zip
Tons of cleanups of the following sort: - remove unused vars - remove
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 svn path=/trunk/; revision=31371
Diffstat (limited to 'widgets/misc')
-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
22 files changed, 24 insertions, 150 deletions
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);