Revision 5e1e1599fddeeecfcd8b76796b71073f780cadfd
sadrul at pidgin.im
sadrul at pidgin.im
Wed Apr 4 16:21:43 EDT 2007
o -----------------------------------------------------------------
|\ Revision: 5e1e1599fddeeecfcd8b76796b71073f780cadfd
| | Ancestor: 015699f55d664f822a057b5980abe9f7317959b7
| | Ancestor: ca14417a95631e3443b63dbefedba1709de9d78d
| | Author: sadrul at pidgin.im
| | Date: 2007-04-04T20:22:19
| | Branch: im.pidgin.pidgin
| |
| | Modified files:
| | finch/libgnt/gntfilesel.c pidgin/gtkconv.c
| |
| | ChangeLog:
| |
| | merge of '015699f55d664f822a057b5980abe9f7317959b7'
| | and 'ca14417a95631e3443b63dbefedba1709de9d78d'
| |
| | ============================================================
| | --- finch/libgnt/gntfilesel.c 2e03db8d836c1587e2d25cbd0f1693ae97dbd0d5
| | +++ finch/libgnt/gntfilesel.c 039ddea95c586f5e771ae93eea1f14ea3b451983
| | @@ -37,6 +37,106 @@ gnt_file_sel_destroy(GntWidget *widget)
| | }
| | }
| |
| | +#if !GLIB_CHECK_VERSION(2,8,0)
| | +/* ripped from glib/gfileutils.c */
| | +static gchar *
| | +g_build_path_va (const gchar *separator,
| | + gchar **str_array)
| | +{
| | + GString *result;
| | + gint separator_len = strlen (separator);
| | + gboolean is_first = TRUE;
| | + gboolean have_leading = FALSE;
| | + const gchar *single_element = NULL;
| | + const gchar *next_element;
| | + const gchar *last_trailing = NULL;
| | + gint i = 0;
| | +
| | + result = g_string_new (NULL);
| | +
| | + next_element = str_array[i++];
| | +
| | + while (TRUE) {
| | + const gchar *element;
| | + const gchar *start;
| | + const gchar *end;
| | +
| | + if (next_element) {
| | + element = next_element;
| | + next_element = str_array[i++];
| | + } else
| | + break;
| | +
| | + /* Ignore empty elements */
| | + if (!*element)
| | + continue;
| | +
| | + start = element;
| | +
| | + if (separator_len) {
| | + while (start &&
| | + strncmp (start, separator, separator_len) == 0)
| | + start += separator_len;
| | + }
| | +
| | + end = start + strlen (start);
| | +
| | + if (separator_len) {
| | + while (end >= start + separator_len &&
| | + strncmp (end - separator_len, separator, separator_len) == 0)
| | + end -= separator_len;
| | +
| | + last_trailing = end;
| | + while (last_trailing >= element + separator_len &&
| | + strncmp (last_trailing - separator_len, separator, separator_len) == 0)
| | + last_trailing -= separator_len;
| | +
| | + if (!have_leading) {
| | + /* If the leading and trailing separator strings are in the
| | + * same element and overlap, the result is exactly that element
| | + */
| | + if (last_trailing <= start)
| | + single_element = element;
| | +
| | + g_string_append_len (result, element, start - element);
| | + have_leading = TRUE;
| | + } else
| | + single_element = NULL;
| | + }
| | +
| | + if (end == start)
| | + continue;
| | +
| | + if (!is_first)
| | + g_string_append (result, separator);
| | +
| | + g_string_append_len (result, start, end - start);
| | + is_first = FALSE;
| | + }
| | +
| | + if (single_element) {
| | + g_string_free (result, TRUE);
| | + return g_strdup (single_element);
| | + } else {
| | + if (last_trailing)
| | + g_string_append (result, last_trailing);
| | +
| | + return g_string_free (result, FALSE);
| | + }
| | +}
| | +
| | +static gchar *
| | +g_build_pathv (const gchar *separator,
| | + gchar **args)
| | +{
| | + if (!args)
| | + return NULL;
| | +
| | + return g_build_path_va (separator, args);
| | +}
| | +
| | +#endif
| | +
| | static char *
| | process_path(const char *path)
| | {
| | @@ -259,6 +359,11 @@ location_key_pressed(GntTree *tree, cons
| | path = g_strdup_printf("%s" G_DIR_SEPARATOR_S "%s", sel->current, str);
| | str = process_path(path);
| | g_free(path);
| | + path = str;
| | +
| | + if (gnt_file_sel_set_current_location(sel, path))
| | + goto success;
| | +
| | path = g_path_get_dirname(str);
| | g_free(str);
| |
| | @@ -298,8 +403,8 @@ location_key_pressed(GntTree *tree, cons
| | gnt_widget_draw(sel->files);
| | }
| | globfree(&gl);
| | +#endif
| | success:
| | -#endif
| | g_free(path);
| | return TRUE;
| | }
| | ============================================================
| | --- pidgin/gtkconv.c e8b186bd4c383763fed35a411ddbd583007132d1
| | +++ pidgin/gtkconv.c aa911795d163c74c02ef975003f7dd29bc856632
| | @@ -3105,8 +3105,13 @@ typing_animation(gpointer data) {
| | static gboolean
| | typing_animation(gpointer data) {
| | PidginConversation *gtkconv = data;
| | + PidginWindow *gtkwin = gtkconv->win;
| | const char *stock_id = NULL;
| | - PidginWindow *gtkwin = gtkconv->win;
| | +
| | + if(gtkconv != pidgin_conv_window_get_active_gtkconv(gtkwin)) {
| | + return FALSE;
| | + }
| | +
| | switch (rand() % 5) {
| | case 0:
| | stock_id = PIDGIN_STOCK_ANIMATION_TYPING0;
| | @@ -3484,16 +3489,16 @@ get_chat_buddy_status_icon(PurpleConvCha
| | if (!pixbuf)
| | return NULL;
| |
| | - scale = gdk_pixbuf_scale_simple(pixbuf, 15, 15, GDK_INTERP_BILINEAR);
| | + scale = gdk_pixbuf_scale_simple(pixbuf, 16, 16, GDK_INTERP_BILINEAR);
| | g_object_unref(pixbuf);
| |
| | if (flags && purple_conv_chat_is_user_ignored(chat, name)) {
| | filename = g_build_filename(DATADIR, "pixmaps", "pidgin", "status", "default", "ignored.png", NULL);
| | pixbuf = gdk_pixbuf_new_from_file(filename, NULL);
| | g_free(filename);
| | - scale2 = gdk_pixbuf_scale_simple(pixbuf, 15, 15, GDK_INTERP_BILINEAR);
| | + scale2 = gdk_pixbuf_scale_simple(pixbuf, 16, 16, GDK_INTERP_BILINEAR);
| | g_object_unref(pixbuf);
| | - gdk_pixbuf_composite(scale2, scale, 0, 0, 15, 15, 0, 0, 1, 1, GDK_INTERP_BILINEAR, 192);
| | + gdk_pixbuf_composite(scale2, scale, 0, 0, 16, 16, 0, 0, 1, 1, GDK_INTERP_BILINEAR, 192);
| | g_object_unref(scale2);
| | }
| |
To get the patch for this revision, please do this:
mtn log --last 1 --diffs --from 5e1e1599fddeeecfcd8b76796b71073f780cadfd
More information about the Commits
mailing list