aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-10-22 21:37:26 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-10-22 21:37:26 +0800
commit6843cf006192fecf2382b1dd87a2fb8531a34b5f (patch)
tree385719873f29bdc6c90f536df9a87efc2700a2be /libempathy-gtk
parenta6eb75f8fddea5331c938c1ce42d08f962275f97 (diff)
parenta28c3a40ece7da5304ca084e1f30d26dbf006b56 (diff)
downloadgsoc2013-empathy-6843cf006192fecf2382b1dd87a2fb8531a34b5f.tar
gsoc2013-empathy-6843cf006192fecf2382b1dd87a2fb8531a34b5f.tar.gz
gsoc2013-empathy-6843cf006192fecf2382b1dd87a2fb8531a34b5f.tar.bz2
gsoc2013-empathy-6843cf006192fecf2382b1dd87a2fb8531a34b5f.tar.lz
gsoc2013-empathy-6843cf006192fecf2382b1dd87a2fb8531a34b5f.tar.xz
gsoc2013-empathy-6843cf006192fecf2382b1dd87a2fb8531a34b5f.tar.zst
gsoc2013-empathy-6843cf006192fecf2382b1dd87a2fb8531a34b5f.zip
Merge branch 'trivia'
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-account-widget.c2
-rw-r--r--libempathy-gtk/empathy-avatar-chooser.c34
-rw-r--r--libempathy-gtk/empathy-avatar-image.c3
-rw-r--r--libempathy-gtk/empathy-chat-text-view.c10
-rw-r--r--libempathy-gtk/empathy-contact-widget.c22
-rw-r--r--libempathy-gtk/empathy-status-preset-dialog.c4
-rw-r--r--libempathy-gtk/empathy-theme-adium.c4
-rw-r--r--libempathy-gtk/empathy-theme-boxes.c6
-rw-r--r--libempathy-gtk/empathy-theme-manager.c8
-rw-r--r--libempathy-gtk/empathy-ui-utils.c8
-rw-r--r--libempathy-gtk/totem-subtitle-encoding.c26
11 files changed, 65 insertions, 62 deletions
diff --git a/libempathy-gtk/empathy-account-widget.c b/libempathy-gtk/empathy-account-widget.c
index a750d471a..05911144a 100644
--- a/libempathy-gtk/empathy-account-widget.c
+++ b/libempathy-gtk/empathy-account-widget.c
@@ -1155,7 +1155,7 @@ do_constructed (GObject *obj)
EmpathyAccountWidgetPriv *priv = GET_PRIV (self);
EmpathyAccount *account;
const gchar *protocol, *cm_name;
- int i = 0;
+ guint i = 0;
struct {
const gchar *cm_name;
const gchar *protocol;
diff --git a/libempathy-gtk/empathy-avatar-chooser.c b/libempathy-gtk/empathy-avatar-chooser.c
index 26528ef0c..df47d48e8 100644
--- a/libempathy-gtk/empathy-avatar-chooser.c
+++ b/libempathy-gtk/empathy-avatar-chooser.c
@@ -411,7 +411,7 @@ avatar_chooser_maybe_convert_and_scale (EmpathyAvatarChooser *chooser,
guint max_width = 0, max_height = 0, max_size = 0;
gchar **mime_types = NULL;
gboolean needs_conversion = FALSE;
- gint width, height;
+ guint width, height;
gchar *new_format_name = NULL;
gchar *new_mime_type = NULL;
gdouble min_factor, max_factor;
@@ -550,11 +550,11 @@ avatar_chooser_maybe_convert_and_scale (EmpathyAvatarChooser *chooser,
* a difference of 1k.
*/
} while (min_factor != max_factor &&
- ABS (max_size - converted_image_size) > 1024);
+ abs (max_size - converted_image_size) > 1024);
g_free (new_format_name);
/* Takes ownership of new_mime_type and converted_image_data */
- avatar = empathy_avatar_new (converted_image_data,
+ avatar = empathy_avatar_new ((guchar *) converted_image_data,
converted_image_size, new_mime_type, NULL, NULL);
return avatar;
@@ -599,7 +599,7 @@ avatar_chooser_set_image_from_data (EmpathyAvatarChooser *chooser,
}
/* avatar takes ownership of data and mime_type */
- avatar = empathy_avatar_new (data, size, mime_type, NULL, NULL);
+ avatar = empathy_avatar_new ((guchar *) data, size, mime_type, NULL, NULL);
avatar_chooser_set_image (chooser, avatar, pixbuf, set_locally);
}
@@ -614,7 +614,7 @@ avatar_chooser_set_image_from_avatar (EmpathyAvatarChooser *chooser,
g_assert (avatar != NULL);
- pixbuf = empathy_pixbuf_from_data_and_mime (avatar->data,
+ pixbuf = empathy_pixbuf_from_data_and_mime ((gchar *) avatar->data,
avatar->len,
&mime_type);
if (pixbuf == NULL) {
@@ -704,7 +704,7 @@ avatar_chooser_drag_motion_cb (GtkWidget *widget,
GdkDragContext *context,
gint x,
gint y,
- guint time,
+ guint time_,
EmpathyAvatarChooser *chooser)
{
EmpathyAvatarChooserPriv *priv;
@@ -719,7 +719,7 @@ avatar_chooser_drag_motion_cb (GtkWidget *widget,
if (!strcmp (possible_type, URI_LIST_TYPE)) {
g_free (possible_type);
- gdk_drag_status (context, GDK_ACTION_COPY, time);
+ gdk_drag_status (context, GDK_ACTION_COPY, time_);
return TRUE;
}
@@ -733,7 +733,7 @@ avatar_chooser_drag_motion_cb (GtkWidget *widget,
static void
avatar_chooser_drag_leave_cb (GtkWidget *widget,
GdkDragContext *context,
- guint time,
+ guint time_,
EmpathyAvatarChooser *chooser)
{
}
@@ -743,7 +743,7 @@ avatar_chooser_drag_drop_cb (GtkWidget *widget,
GdkDragContext *context,
gint x,
gint y,
- guint time,
+ guint time_,
EmpathyAvatarChooser *chooser)
{
EmpathyAvatarChooserPriv *priv;
@@ -763,7 +763,7 @@ avatar_chooser_drag_drop_cb (GtkWidget *widget,
g_free (possible_type);
gtk_drag_get_data (widget, context,
GDK_POINTER_TO_ATOM (p->data),
- time);
+ time_);
return TRUE;
}
@@ -781,7 +781,7 @@ avatar_chooser_drag_data_received_cb (GtkWidget *widget,
gint y,
GtkSelectionData *selection_data,
guint info,
- guint time,
+ guint time_,
EmpathyAvatarChooser *chooser)
{
gchar *target_type;
@@ -794,17 +794,19 @@ avatar_chooser_drag_data_received_cb (GtkWidget *widget,
gchar *data = NULL;
gsize bytes_read;
- nl = strstr (gtk_selection_data_get_data (selection_data), "\r\n");
+ nl = strstr ((gchar *) gtk_selection_data_get_data (selection_data),
+ "\r\n");
if (nl) {
gchar *uri;
- uri = g_strndup (gtk_selection_data_get_data (selection_data),
+ uri = g_strndup ((gchar *) gtk_selection_data_get_data (selection_data),
nl - (gchar *) gtk_selection_data_get_data (selection_data));
file = g_file_new_for_uri (uri);
g_free (uri);
} else {
- file = g_file_new_for_uri (gtk_selection_data_get_data (selection_data));
+ file = g_file_new_for_uri ((gchar *) gtk_selection_data_get_data (
+ selection_data));
}
handled = g_file_load_contents (file, NULL, &data, &bytes_read,
@@ -822,7 +824,7 @@ avatar_chooser_drag_data_received_cb (GtkWidget *widget,
g_object_unref (file);
}
- gtk_drag_finish (context, handled, FALSE, time);
+ gtk_drag_finish (context, handled, FALSE, time_);
}
static void
@@ -1049,7 +1051,7 @@ empathy_avatar_chooser_get_image_data (EmpathyAvatarChooser *chooser,
if (priv->avatar != NULL) {
if (data != NULL) {
- *data = priv->avatar->data;
+ *data = (gchar *) priv->avatar->data;
}
if (data_size != NULL) {
*data_size = priv->avatar->len;
diff --git a/libempathy-gtk/empathy-avatar-image.c b/libempathy-gtk/empathy-avatar-image.c
index f7898e1bd..03f638336 100644
--- a/libempathy-gtk/empathy-avatar-image.c
+++ b/libempathy-gtk/empathy-avatar-image.c
@@ -306,7 +306,8 @@ empathy_avatar_image_set (EmpathyAvatarImage *avatar_image,
}
if (avatar) {
- priv->pixbuf = empathy_pixbuf_from_data (avatar->data, avatar->len);
+ priv->pixbuf = empathy_pixbuf_from_data ((gchar *) avatar->data,
+ avatar->len);
}
if (!priv->pixbuf) {
diff --git a/libempathy-gtk/empathy-chat-text-view.c b/libempathy-gtk/empathy-chat-text-view.c
index 894f9b84c..5822a429d 100644
--- a/libempathy-gtk/empathy-chat-text-view.c
+++ b/libempathy-gtk/empathy-chat-text-view.c
@@ -359,7 +359,7 @@ chat_text_view_maybe_trim_buffer (EmpathyChatTextView *view)
EmpathyChatTextViewPriv *priv;
GtkTextIter top, bottom;
gint line;
- gint remove;
+ gint remove_;
GtkTextTagTable *table;
GtkTextTag *tag;
@@ -371,11 +371,11 @@ chat_text_view_maybe_trim_buffer (EmpathyChatTextView *view)
return;
}
- remove = line - MAX_LINES;
+ remove_ = line - MAX_LINES;
gtk_text_buffer_get_start_iter (priv->buffer, &top);
bottom = top;
- if (!gtk_text_iter_forward_lines (&bottom, remove)) {
+ if (!gtk_text_iter_forward_lines (&bottom, remove_)) {
return;
}
@@ -506,7 +506,7 @@ chat_text_view_drag_motion (GtkWidget *widget,
GdkDragContext *context,
gint x,
gint y,
- guint time)
+ guint time_)
{
/* Don't handle drag motion, since we don't want the view to scroll as
* the result of dragging something across it. */
@@ -1342,7 +1342,7 @@ empathy_chat_text_view_append_body (EmpathyChatTextView *view,
g_match_info_free (match_info);
g_regex_unref (uri_regex);
- if (last < strlen (body)) {
+ if (last < (gint) strlen (body)) {
gtk_text_buffer_get_end_iter (priv->buffer, &iter);
chat_text_view_insert_text_with_emoticons (view,
&iter,
diff --git a/libempathy-gtk/empathy-contact-widget.c b/libempathy-gtk/empathy-contact-widget.c
index d6f806360..17bed7298 100644
--- a/libempathy-gtk/empathy-contact-widget.c
+++ b/libempathy-gtk/empathy-contact-widget.c
@@ -496,19 +496,19 @@ save_avatar_menu_activate_cb (GtkWidget *widget,
if (!empathy_avatar_save_to_file (avatar, filename, &error))
{
/* Save error */
- GtkWidget *dialog;
+ GtkWidget *error_dialog;
- dialog = gtk_message_dialog_new (NULL, 0,
+ error_dialog = gtk_message_dialog_new (NULL, 0,
GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
_("Unable to save avatar"));
gtk_message_dialog_format_secondary_text (
- GTK_MESSAGE_DIALOG (dialog), "%s", error->message);
+ GTK_MESSAGE_DIALOG (error_dialog), "%s", error->message);
- g_signal_connect (dialog, "response",
+ g_signal_connect (error_dialog, "response",
G_CALLBACK (gtk_widget_destroy), NULL);
- gtk_window_present (GTK_WINDOW (dialog));
+ gtk_window_present (GTK_WINDOW (error_dialog));
g_clear_error (&error);
}
@@ -1356,12 +1356,12 @@ contact_widget_location_update (EmpathyContactWidget *information)
gchar *user_date;
gchar *text;
gint64 stamp;
- time_t time;
+ time_t time_;
stamp = g_value_get_int64 (value);
- time = stamp;
+ time_ = stamp;
- user_date = empathy_time_to_string_relative (time);
+ user_date = empathy_time_to_string_relative (time_);
text = g_strconcat ( _("<b>Location</b>, "), user_date, NULL);
gtk_label_set_markup (GTK_LABEL (information->label_location), text);
@@ -1410,10 +1410,10 @@ contact_widget_location_update (EmpathyContactWidget *information)
}
else if (G_VALUE_TYPE (gvalue) == G_TYPE_INT64)
{
- time_t time;
+ time_t time_;
- time = g_value_get_int64 (value);
- svalue = empathy_time_to_string_utc (time, _("%B %e, %Y at %R UTC"));
+ time_ = g_value_get_int64 (value);
+ svalue = empathy_time_to_string_utc (time_, _("%B %e, %Y at %R UTC"));
}
if (svalue != NULL)
diff --git a/libempathy-gtk/empathy-status-preset-dialog.c b/libempathy-gtk/empathy-status-preset-dialog.c
index 802d116e7..0337d16a3 100644
--- a/libempathy-gtk/empathy-status-preset-dialog.c
+++ b/libempathy-gtk/empathy-status-preset-dialog.c
@@ -117,7 +117,7 @@ status_preset_dialog_presets_update (EmpathyStatusPresetDialog *self)
{
EmpathyStatusPresetDialogPriv *priv = GET_PRIV (self);
GtkListStore *store;
- int i;
+ guint i;
store = GTK_LIST_STORE (gtk_tree_view_get_model (
GTK_TREE_VIEW (priv->presets_treeview)));
@@ -167,7 +167,7 @@ status_preset_dialog_setup_add_combobox (EmpathyStatusPresetDialog *self)
GtkWidget *combobox = priv->add_combobox;
GtkListStore *store;
GtkCellRenderer *renderer;
- int i;
+ guint i;
store = gtk_list_store_new (ADD_COMBO_N_COLS,
G_TYPE_UINT, /* ADD_COMBO_STATE */
diff --git a/libempathy-gtk/empathy-theme-adium.c b/libempathy-gtk/empathy-theme-adium.c
index 0f2288e2a..49a76c24c 100644
--- a/libempathy-gtk/empathy-theme-adium.c
+++ b/libempathy-gtk/empathy-theme-adium.c
@@ -59,7 +59,7 @@ typedef struct {
} EmpathyThemeAdiumPriv;
struct _EmpathyAdiumData {
- guint ref_count;
+ gint ref_count;
gchar *path;
gchar *basedir;
gchar *default_avatar_filename;
@@ -235,7 +235,7 @@ theme_adium_parse_body (EmpathyThemeAdium *theme,
last = e;
} while (g_match_info_next (match_info, NULL));
- if (e < strlen (text)) {
+ if (e < (gint) strlen (text)) {
/* Append the text after the last link */
g_string_append_len (string, text + e, strlen (text) - e);
}
diff --git a/libempathy-gtk/empathy-theme-boxes.c b/libempathy-gtk/empathy-theme-boxes.c
index 3d8b8ae7d..e6a606de1 100644
--- a/libempathy-gtk/empathy-theme-boxes.c
+++ b/libempathy-gtk/empathy-theme-boxes.c
@@ -193,7 +193,7 @@ theme_boxes_maybe_append_header (EmpathyThemeBoxes *theme,
GtkTextChildAnchor *anchor;
GtkWidget *box;
gchar *str;
- time_t time;
+ time_t time_;
gchar *tmp;
GtkTextIter start;
gboolean color_set;
@@ -259,8 +259,8 @@ theme_boxes_maybe_append_header (EmpathyThemeBoxes *theme,
g_free (str);
/* Add the message receive time */
- time = empathy_message_get_timestamp (msg);
- tmp = empathy_time_to_string_local (time,
+ time_ = empathy_message_get_timestamp (msg);
+ tmp = empathy_time_to_string_local (time_,
EMPATHY_TIME_FORMAT_DISPLAY_SHORT);
str = g_strdup_printf ("<i>%s</i>", tmp);
label2 = g_object_new (GTK_TYPE_LABEL,
diff --git a/libempathy-gtk/empathy-theme-manager.c b/libempathy-gtk/empathy-theme-manager.c
index fea2eca51..cda978330 100644
--- a/libempathy-gtk/empathy-theme-manager.c
+++ b/libempathy-gtk/empathy-theme-manager.c
@@ -573,24 +573,24 @@ GList *
empathy_theme_manager_get_adium_themes (void)
{
#ifdef HAVE_WEBKIT
- GList *themes = NULL;
+ GList *themes_list = NULL;
gchar *userpath = NULL;
const gchar *const *paths = NULL;
gint i = 0;
userpath = g_build_path (G_DIR_SEPARATOR_S, g_get_user_data_dir (), "adium/message-styles", NULL);
- find_themes (&themes, userpath);
+ find_themes (&themes_list, userpath);
g_free (userpath);
paths = g_get_system_data_dirs ();
for (i = 0; paths[i] != NULL; i++) {
userpath = g_build_path (G_DIR_SEPARATOR_S, paths[i],
"adium/message-styles", NULL);
- find_themes (&themes, userpath);
+ find_themes (&themes_list, userpath);
g_free (userpath);
}
- return themes;
+ return themes_list;
#else
return NULL;
#endif /* HAVE_WEBKIT */
diff --git a/libempathy-gtk/empathy-ui-utils.c b/libempathy-gtk/empathy-ui-utils.c
index aeb665c74..4bbc3b81c 100644
--- a/libempathy-gtk/empathy-ui-utils.c
+++ b/libempathy-gtk/empathy-ui-utils.c
@@ -152,13 +152,13 @@ empathy_builder_connect (GtkBuilder *gui,
{
va_list args;
const gchar *name;
- const gchar *signal;
+ const gchar *sig;
GObject *object;
GCallback callback;
va_start (args, first_object);
for (name = first_object; name; name = va_arg (args, const gchar *)) {
- signal = va_arg (args, const gchar *);
+ sig = va_arg (args, const gchar *);
callback = va_arg (args, GCallback);
object = gtk_builder_get_object (gui, name);
@@ -167,7 +167,7 @@ empathy_builder_connect (GtkBuilder *gui,
continue;
}
- g_signal_connect (object, signal, callback, user_data);
+ g_signal_connect (object, sig, callback, user_data);
}
va_end (args);
@@ -250,7 +250,7 @@ empathy_pixbuf_from_data_and_mime (gchar *data,
}
loader = gdk_pixbuf_loader_new ();
- if (!gdk_pixbuf_loader_write (loader, data, data_size, &error)) {
+ if (!gdk_pixbuf_loader_write (loader, (guchar *) data, data_size, &error)) {
DEBUG ("Failed to write to pixbuf loader: %s",
error ? error->message : "No error given");
goto out;
diff --git a/libempathy-gtk/totem-subtitle-encoding.c b/libempathy-gtk/totem-subtitle-encoding.c
index 112f169fd..285c5acf3 100644
--- a/libempathy-gtk/totem-subtitle-encoding.c
+++ b/libempathy-gtk/totem-subtitle-encoding.c
@@ -429,18 +429,18 @@ subtitle_encoding_get_index (const char *charset)
}
static const char *
-subtitle_encoding_get_charset (int index)
+subtitle_encoding_get_charset (int index_)
{
const SubtitleEncoding *e;
- if (index >= SUBTITLE_ENCODING_LAST)
+ if (index_ >= SUBTITLE_ENCODING_LAST)
e = &encodings[SUBTITLE_ENCODING_CURRENT_LOCALE];
- else if (index < SUBTITLE_ENCODING_CURRENT_LOCALE)
+ else if (index_ < SUBTITLE_ENCODING_CURRENT_LOCALE)
e = &encodings[SUBTITLE_ENCODING_CURRENT_LOCALE];
- else if (!encodings[index].valid)
+ else if (!encodings[index_].valid)
e = &encodings[SUBTITLE_ENCODING_CURRENT_LOCALE];
else
- e = &encodings[index];
+ e = &encodings[index_];
return e->charset;
}
@@ -530,15 +530,15 @@ totem_subtitle_encoding_get_selected (GtkComboBox * combo)
{
GtkTreeModel *model;
GtkTreeIter iter;
- gint index = -1;
+ gint 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, &index_, -1);
}
- if (index == -1)
+ if (index_ == -1)
return NULL;
- return subtitle_encoding_get_charset (index);
+ return subtitle_encoding_get_charset (index_);
}
void
@@ -546,12 +546,12 @@ totem_subtitle_encoding_set (GtkComboBox * combo, const char *encoding)
{
GtkTreeModel *model;
GtkTreeIter iter, iter2;
- gint index, i;
+ gint index_, i;
g_return_if_fail (encoding != NULL);
model = gtk_combo_box_get_model (combo);
- index = subtitle_encoding_get_index (encoding);
+ index_ = subtitle_encoding_get_index (encoding);
gtk_tree_model_get_iter_first (model, &iter);
do {
if (!gtk_tree_model_iter_has_child (model, &iter))
@@ -560,10 +560,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 == index_)
break;
} while (gtk_tree_model_iter_next (model, &iter2));
- if (i == index)
+ if (i == index_)
break;
} while (gtk_tree_model_iter_next (model, &iter));
gtk_combo_box_set_active_iter (combo, &iter2);