summaryrefslogtreecommitdiff
path: root/src/totem-subtitle-encoding.c
diff options
context:
space:
mode:
authorPhilip Withnall <philip@tecnocode.co.uk>2009-07-18 19:32:09 +0100
committerPhilip Withnall <philip@tecnocode.co.uk>2009-07-18 19:38:04 +0100
commitcce286bf32d4b800000aa9f731adbd8574ca5339 (patch)
tree3773eb87cc8f4b03f884f1b1f0144d8c7c0bf4ef /src/totem-subtitle-encoding.c
parentf53e438e0e530e5cbbd7ed607df498310645013d (diff)
downloadtotem-cce286bf32d4b800000aa9f731adbd8574ca5339.tar.gz
Fixed some strict gcc warnings
2009-07-18 Philip Withnall <philip@tecnocode.co.uk> * src/backend/bacon-resize.c (bacon_resize_resize), (bacon_resize_restore): * src/backend/bacon-video-widget-gst-0.10.c (bacon_video_widget_open), (bacon_video_widget_seek_time), (bacon_video_widget_set_logo): * src/backend/bacon-video-widget.h: * src/backend/bvw-test.c (test_bvw_set_mrl), (on_redirect), (on_eos_event), (main): * src/backend/video-utils.c (totem_time_to_string), (totem_time_to_string_text): * src/plugins/brasero-disc-recorder/totem-disc-recorder.c (totem_disc_recorder_plugin_start_burning): * src/plugins/properties/bacon-video-widget-properties.c (bacon_video_widget_properties_from_time): * src/plugins/properties/bacon-video-widget-properties.h: * src/plugins/publish/totem-publish.c (totem_publish_plugin_playlist_cb): * src/plugins/screenshot/totem-gallery.c (dialog_response_callback): * src/plugins/screenshot/totem-screenshot.c (drag_data_get): * src/plugins/skipto/totem-skipto-plugin.c (totem_skipto_update_from_state): * src/plugins/skipto/totem-skipto.c (totem_skipto_update_range), (totem_skipto_get_range), (totem_skipto_set_current): * src/plugins/skipto/totem-skipto.h: * src/plugins/totem-plugins-engine.c (load_plugin_module), (totem_plugins_engine_plugin_active_cb), (totem_plugins_engine_plugin_visible_cb): * src/plugins/youtube/totem-youtube.c (starting_video_cb): * src/totem-menu.c (add_lang_action), (totem_action_add_recent): * src/totem-object.c (totem_get_title_at_playlist_pos), (totem_action_load_media), (window_state_event_cb), (totem_action_set_mrl_with_warning), (totem_time_within_seconds), (totem_seek_time_rel), (drop_video_cb), (drag_motion_video_cb), (drop_playlist_cb), (drag_motion_playlist_cb), (drag_video_cb), (seek_slider_changed_cb), (totem_action_set_playlist_index), (totem_action_remote), (totem_action_handle_key_release), (window_key_press_event_cb): * src/totem-options.c (totem_options_process_late): * src/totem-options.h: * src/totem-playlist.c (drop_cb), (playlist_show_popup_menu), (totem_playlist_set_reorderable), (totem_playlist_clear_with_compare), (totem_playlist_get_title), (totem_playlist_get_current), (totem_playlist_set_current): * src/totem-playlist.h: * src/totem-preferences.c (totem_setup_preferences): * src/totem-private.h: * src/totem-session.c (totem_save_state_cb): * src/totem-statusbar.c (totem_statusbar_update_time), (totem_statusbar_set_time), (totem_statusbar_set_time_and_length): * src/totem-subtitle-encoding.c (subtitle_encoding_get_charset), (subtitle_encoding_create_store), (totem_subtitle_encoding_get_selected), (totem_subtitle_encoding_set): * src/totem-time-label.c (totem_time_label_init), (totem_time_label_set_time): * src/totem-video-thumbnailer.c (create_gallery), (main): * src/totem.c (totem_message_received_cb), (main): * src/totem.h: Fixed some strict gcc warnings.
Diffstat (limited to 'src/totem-subtitle-encoding.c')
-rw-r--r--src/totem-subtitle-encoding.c31
1 files changed, 15 insertions, 16 deletions
diff --git a/src/totem-subtitle-encoding.c b/src/totem-subtitle-encoding.c
index b5ddd234c..ac4b5b4e0 100644
--- a/src/totem-subtitle-encoding.c
+++ b/src/totem-subtitle-encoding.c
@@ -143,11 +143,10 @@ typedef enum
} SubtitleEncodingIndex;
-typedef struct
-{
+typedef struct {
int index;
const char *charset;
- char *name;
+ const char *name;
} SubtitleEncoding;
@@ -382,16 +381,16 @@ subtitle_encoding_get_index (const char *charset)
}
static const char *
-subtitle_encoding_get_charset (int index)
+subtitle_encoding_get_charset (int charset_index)
{
const SubtitleEncoding *e;
- if (index >= SUBTITLE_ENCODING_LAST)
+ if (charset_index >= SUBTITLE_ENCODING_LAST)
e = &encodings[SUBTITLE_ENCODING_CURRENT_LOCALE];
- else if (index < SUBTITLE_ENCODING_CURRENT_LOCALE)
+ else if (charset_index < SUBTITLE_ENCODING_CURRENT_LOCALE)
e = &encodings[SUBTITLE_ENCODING_CURRENT_LOCALE];
else
- e = &encodings[index];
+ e = &encodings[charset_index];
return e->charset;
}
@@ -434,7 +433,7 @@ static GtkTreeModel *
subtitle_encoding_create_store (void)
{
gchar *label;
- gchar *lastlang = "";
+ const gchar *lastlang = "";
GtkTreeIter iter, iter2;
GtkTreeStore *store;
int i;
@@ -479,15 +478,15 @@ totem_subtitle_encoding_get_selected (GtkComboBox * combo)
{
GtkTreeModel *model;
GtkTreeIter iter;
- gint index = -1;
+ gint charset_index = -1;
model = gtk_combo_box_get_model (combo);
if (gtk_combo_box_get_active_iter (combo, &iter)) {
- gtk_tree_model_get (model, &iter, INDEX_COL, &index, -1);
+ gtk_tree_model_get (model, &iter, INDEX_COL, &charset_index, -1);
}
- if (index == -1)
+ if (charset_index == -1)
return NULL;
- return subtitle_encoding_get_charset (index);
+ return subtitle_encoding_get_charset (charset_index);
}
void
@@ -495,12 +494,12 @@ totem_subtitle_encoding_set (GtkComboBox * combo, const char *encoding)
{
GtkTreeModel *model;
GtkTreeIter iter, iter2;
- gint index, i;
+ gint enc_index, i;
g_return_if_fail (encoding != NULL);
model = gtk_combo_box_get_model (combo);
- index = subtitle_encoding_get_index (encoding);
+ enc_index = subtitle_encoding_get_index (encoding);
gtk_tree_model_get_iter_first (model, &iter);
do {
if (!gtk_tree_model_iter_has_child (model, &iter))
@@ -509,10 +508,10 @@ totem_subtitle_encoding_set (GtkComboBox * combo, const char *encoding)
continue;
do {
gtk_tree_model_get (model, &iter2, INDEX_COL, &i, -1);
- if (i == index)
+ if (i == enc_index)
break;
} while (gtk_tree_model_iter_next (model, &iter2));
- if (i == index)
+ if (i == enc_index)
break;
} while (gtk_tree_model_iter_next (model, &iter));
gtk_combo_box_set_active_iter (combo, &iter2);