You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(106) |
Oct
(334) |
Nov
(246) |
Dec
(145) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(42) |
Feb
(53) |
Mar
(232) |
Apr
(109) |
May
(137) |
Jun
(63) |
Jul
(26) |
Aug
(263) |
Sep
(193) |
Oct
(507) |
Nov
(440) |
Dec
(241) |
2003 |
Jan
(567) |
Feb
(195) |
Mar
(504) |
Apr
(481) |
May
(524) |
Jun
(522) |
Jul
(594) |
Aug
(502) |
Sep
(643) |
Oct
(508) |
Nov
(430) |
Dec
(377) |
2004 |
Jan
(361) |
Feb
(251) |
Mar
(219) |
Apr
(499) |
May
(461) |
Jun
(419) |
Jul
(314) |
Aug
(519) |
Sep
(416) |
Oct
(247) |
Nov
(305) |
Dec
(382) |
2005 |
Jan
(267) |
Feb
(282) |
Mar
(327) |
Apr
(338) |
May
(189) |
Jun
(400) |
Jul
(462) |
Aug
(530) |
Sep
(316) |
Oct
(523) |
Nov
(481) |
Dec
(650) |
2006 |
Jan
(536) |
Feb
(361) |
Mar
(287) |
Apr
(146) |
May
(101) |
Jun
(169) |
Jul
(221) |
Aug
(498) |
Sep
(300) |
Oct
(236) |
Nov
(209) |
Dec
(205) |
2007 |
Jan
(30) |
Feb
(23) |
Mar
(26) |
Apr
(15) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Mark D. <ma...@ki...> - 2007-04-09 03:29:25
|
Hi peeps, I'm going to unsubscribe all of you from gai...@li... and subscribe you to co...@pi.... We don't intend to use the Subversion source code repository anymore. This is a good time to tell everyone that we've switched from using Subversion to using Monotone. It's a distributed revision control system. See http://developer.pidgin.im/wiki/UsingPidginMonotone Also, please try to avoid hammering our server. Have a good day! -Mark |
From: <sa...@us...> - 2007-04-07 04:07:31
|
Revision: 18236 http://svn.sourceforge.net/gaim/?rev=18236&view=rev Author: sadrul Date: 2007-04-06 21:06:48 -0700 (Fri, 06 Apr 2007) Log Message: ----------- Allow --with-ncurses-headers= configure option from here too Modified Paths: -------------- trunk/console/libgnt/configure.ac Modified: trunk/console/libgnt/configure.ac =================================================================== --- trunk/console/libgnt/configure.ac 2007-04-04 20:22:16 UTC (rev 18235) +++ trunk/console/libgnt/configure.ac 2007-04-07 04:06:48 UTC (rev 18236) @@ -203,6 +203,9 @@ GNT_CFLAGS= GNT_LIBS= +AC_ARG_WITH(ncurses-headers, [AC_HELP_STRING([--with-ncurses-headers=DIR], + [compile libgnt against the ncurses includes in DIR])], + [ac_ncurses_includes="$withval"], [ac_ncurses_includes=""]) AC_CHECK_LIB(ncursesw, initscr, [GNT_LIBS="-lncursesw"], [enable_gnt=no]) AC_CHECK_LIB(panelw, update_panels, [GNT_LIBS="$GNT_LIBS -lpanelw"], [enable_gnt=no]) @@ -214,8 +217,9 @@ else dnl # Some distros put the headers in ncursesw/, some don't found_ncurses_h=no - for f in /usr/include/ncursesw/ncurses.h /usr/include/ncurses.h + for location in $ac_ncurses_includes /usr/include/ncursesw /usr/include do + f="$location/ncurses.h" AC_CHECK_HEADER($f,[ AC_MSG_CHECKING([if $f supports wide characters]) AC_TRY_COMPILE([ @@ -226,7 +230,7 @@ # error get_wch not found! #endif ], [ - dir=`dirname $f` + dir=$location if test x"$dir" != x"." ; then GNT_CFLAGS="-I$dir/" else @@ -241,13 +245,16 @@ ]) ]) done + if test x"$found_ncurses_h" != "xyes"; then + enable_gnt="no" + fi fi AC_SUBST(GNT_CFLAGS) AC_SUBST(GNT_LIBS) if test "x$enable_gnt" = "xno"; then AC_MSG_ERROR([ -*** You need ncursesw or ncurses.]) +*** You need ncursesw or ncurses and its header files.]) fi AC_OUTPUT([Makefile This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sa...@us...> - 2007-04-04 20:22:17
|
Revision: 18235 http://svn.sourceforge.net/gaim/?rev=18235&view=rev Author: sadrul Date: 2007-04-04 13:22:16 -0700 (Wed, 04 Apr 2007) Log Message: ----------- "elb: g_build_pathv is Glib 2.8" Modified Paths: -------------- trunk/console/libgnt/gntfilesel.c Modified: trunk/console/libgnt/gntfilesel.c =================================================================== --- trunk/console/libgnt/gntfilesel.c 2007-04-04 20:08:27 UTC (rev 18234) +++ trunk/console/libgnt/gntfilesel.c 2007-04-04 20:22:16 UTC (rev 18235) @@ -37,6 +37,106 @@ } } +#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 @@ 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 @@ gnt_widget_draw(sel->files); } globfree(&gl); +#endif success: -#endif g_free(path); return TRUE; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nos...@us...> - 2007-04-04 20:08:54
|
Revision: 18234 http://svn.sourceforge.net/gaim/?rev=18234&view=rev Author: nosnilmot Date: 2007-04-04 13:08:27 -0700 (Wed, 04 Apr 2007) Log Message: ----------- Beta6 happened a while ago, put the version back to 2.0.0dev Modified Paths: -------------- trunk/configure.ac Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2007-04-04 08:37:15 UTC (rev 18233) +++ trunk/configure.ac 2007-04-04 20:08:27 UTC (rev 18234) @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT([gaim], [2.0.0beta6], [gai...@li...]) +AC_INIT([gaim], [2.0.0dev], [gai...@li...]) AC_CANONICAL_SYSTEM AM_CONFIG_HEADER(config.h) AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sa...@us...> - 2007-04-04 08:37:19
|
Revision: 18233 http://svn.sourceforge.net/gaim/?rev=18233&view=rev Author: sadrul Date: 2007-04-04 01:37:15 -0700 (Wed, 04 Apr 2007) Log Message: ----------- Allow using different methods for reading directory entries. Modified Paths: -------------- trunk/console/libgnt/gntfilesel.c trunk/console/libgnt/gntfilesel.h Modified: trunk/console/libgnt/gntfilesel.c =================================================================== --- trunk/console/libgnt/gntfilesel.c 2007-04-04 04:07:16 UTC (rev 18232) +++ trunk/console/libgnt/gntfilesel.c 2007-04-04 08:37:15 UTC (rev 18233) @@ -11,7 +11,9 @@ #include <sys/stat.h> #include <unistd.h> +#if 0 #include <glob.h> +#endif enum { @@ -87,12 +89,76 @@ return find; } +GntFile* gnt_file_new_dir(const char *name) +{ + GntFile *file = g_new0(GntFile, 1); + file->basename = g_strdup(name); + file->type = GNT_FILE_DIR; + return file; +} + +GntFile* gnt_file_new(const char *name, unsigned long size) +{ + GntFile *file = g_new0(GntFile, 1); + file->basename = g_strdup(name); + file->type = GNT_FILE_REGULAR; + file->size = size; + return file; +} + static gboolean -location_changed(GntFileSel *sel, GError **err) +local_read_fn(const char *path, GList **files, GError **error) { GDir *dir; + GntFile *file; const char *str; + + dir = g_dir_open(path, 0, error); + if (dir == NULL || (error && *error)) { + return FALSE; + } + *files = NULL; + if (*path != '\0' && strcmp(path, G_DIR_SEPARATOR_S)) { + file = gnt_file_new_dir(".."); + *files = g_list_prepend(*files, file); + } + + while ((str = g_dir_read_name(dir)) != NULL) { + char *fp = g_build_filename(path, str, NULL); + struct stat st; + + if (stat(fp, &st)) { + g_printerr("Error stating location %s\n", fp); + } else { + if (S_ISDIR(st.st_mode)) { + file = gnt_file_new_dir(str); + } else { + file = gnt_file_new(str, (long)st.st_size); + } + *files = g_list_prepend(*files, file); + } + g_free(fp); + } + + *files = g_list_reverse(*files); + return TRUE; +} + +static void +gnt_file_free(GntFile *file) +{ + g_free(file->fullpath); + g_free(file->basename); + g_free(file); +} + +static gboolean +location_changed(GntFileSel *sel, GError **err) +{ + GList *files, *iter; + gboolean success; + if (!sel->dirs) return TRUE; @@ -105,42 +171,43 @@ gnt_widget_draw(GNT_WIDGET(sel)); return TRUE; } + + /* XXX:\ + * XXX: This is blocking. + * XXX:/ + */ + files = NULL; + if (sel->read_fn) + success = sel->read_fn(sel->current, &files, err); + else + success = local_read_fn(sel->current, &files, err); - dir = g_dir_open(sel->current, 0, err); - if (dir == NULL || *err) { + if (!success || *err) { g_printerr("GntFileSel: error opening location %s (%s)\n", sel->current, *err ? (*err)->message : "reason unknown"); return FALSE; } - if (*sel->current != '\0' && strcmp(sel->current, G_DIR_SEPARATOR_S)) - gnt_tree_add_row_after(GNT_TREE(sel->dirs), g_strdup(".."), - gnt_tree_create_row(GNT_TREE(sel->dirs), ".."), NULL, NULL); + for (iter = files; iter; iter = iter->next) { + GntFile *file = iter->data; + char *str = file->basename; + if (file->type == GNT_FILE_DIR) { + gnt_tree_add_row_after(GNT_TREE(sel->dirs), g_strdup(str), + gnt_tree_create_row(GNT_TREE(sel->dirs), str), NULL, NULL); + if (sel->multiselect && sel->dirsonly && is_tagged(sel, str)) + gnt_tree_set_row_flags(GNT_TREE(sel->dirs), (gpointer)str, GNT_TEXT_FLAG_BOLD); + } else if (!sel->dirsonly) { + char size[128]; + snprintf(size, sizeof(size), "%ld", file->size); - while ((str = g_dir_read_name(dir)) != NULL) { - char *fp = g_build_filename(sel->current, str, NULL); - struct stat st; - - if (stat(fp, &st)) { - g_printerr("Error stating location %s\n", fp); - } else { - if (S_ISDIR(st.st_mode)) { - gnt_tree_add_row_after(GNT_TREE(sel->dirs), g_strdup(str), - gnt_tree_create_row(GNT_TREE(sel->dirs), str), NULL, NULL); - if (sel->multiselect && sel->dirsonly && is_tagged(sel, str)) - gnt_tree_set_row_flags(GNT_TREE(sel->dirs), (gpointer)str, GNT_TEXT_FLAG_BOLD); - } else if (!sel->dirsonly) { - char size[128]; - snprintf(size, sizeof(size), "%ld", (long)st.st_size); - - gnt_tree_add_row_after(GNT_TREE(sel->files), g_strdup(str), - gnt_tree_create_row(GNT_TREE(sel->files), str, size, ""), NULL, NULL); - if (sel->multiselect && is_tagged(sel, str)) - gnt_tree_set_row_flags(GNT_TREE(sel->files), (gpointer)str, GNT_TEXT_FLAG_BOLD); - } + gnt_tree_add_row_after(GNT_TREE(sel->files), g_strdup(str), + gnt_tree_create_row(GNT_TREE(sel->files), str, size, ""), NULL, NULL); + if (sel->multiselect && is_tagged(sel, str)) + gnt_tree_set_row_flags(GNT_TREE(sel->files), (gpointer)str, GNT_TEXT_FLAG_BOLD); } - g_free(fp); } + g_list_foreach(files, (GFunc)gnt_file_free, NULL); + g_list_free(files); if (GNT_WIDGET_IS_FLAG_SET(GNT_WIDGET(sel), GNT_WIDGET_MAPPED)) gnt_widget_draw(GNT_WIDGET(sel)); return TRUE; @@ -151,8 +218,13 @@ { if (strcmp(key, "\r") == 0) { char *str = g_strdup(gnt_tree_get_selection_data(tree)); - char *path = g_build_filename(sel->current, str, NULL); - char *dir = g_path_get_basename(sel->current); + char *path, *dir; + + if (!str) + return TRUE; + + path = g_build_filename(sel->current, str, NULL); + dir = g_path_get_basename(sel->current); if (!gnt_file_sel_set_current_location(sel, path)) { gnt_tree_set_selected(tree, str); } else if (strcmp(str, "..") == 0) { @@ -169,64 +241,67 @@ static gboolean location_key_pressed(GntTree *tree, const char *key, GntFileSel *sel) { - if (strcmp(key, "\r") == 0) { - int count; - glob_t gl; - char *path; - char *str; - struct stat st; - int glob_ret; + char *path; + char *str; +#if 0 + int count; + glob_t gl; + struct stat st; + int glob_ret; +#endif + if (strcmp(key, "\r")) + return FALSE; - str = (char*)gnt_entry_get_text(GNT_ENTRY(sel->location)); - if (*str == G_DIR_SEPARATOR) - path = g_strdup(str); - else - path = g_strdup_printf("%s" G_DIR_SEPARATOR_S "%s", sel->current, str); - str = process_path(path); + str = (char*)gnt_entry_get_text(GNT_ENTRY(sel->location)); + if (*str == G_DIR_SEPARATOR) + path = g_strdup(str); + else + path = g_strdup_printf("%s" G_DIR_SEPARATOR_S "%s", sel->current, str); + str = process_path(path); + g_free(path); + path = g_path_get_dirname(str); + g_free(str); + + if (!gnt_file_sel_set_current_location(sel, path)) { g_free(path); - path = str; + return FALSE; + } +#if 0 + /* XXX: there needs to be a way to allow other methods for globbing, + * like the read_fn stuff. */ + glob_ret = glob(path, GLOB_MARK, NULL, &gl); + if (!glob_ret) { /* XXX: do something with the return value */ + char *loc = g_path_get_dirname(gl.gl_pathv[0]); - if (!stat(path, &st)) { - if (S_ISDIR(st.st_mode)) { - gnt_file_sel_set_current_location(sel, path); - goto success; - } - } - - glob_ret = glob(path, GLOB_MARK, NULL, &gl); - if (!glob_ret) { /* XXX: do something with the return value */ - char *loc = g_path_get_dirname(gl.gl_pathv[0]); - - stat(gl.gl_pathv[0], &st); - gnt_file_sel_set_current_location(sel, loc); /* XXX: check the return value */ - g_free(loc); - if (!S_ISDIR(st.st_mode) && !sel->dirsonly) { - gnt_tree_remove_all(GNT_TREE(sel->files)); - for (count = 0; count < gl.gl_pathc; count++) { - char *tmp = process_path(gl.gl_pathv[count]); - loc = g_path_get_dirname(tmp); - if (g_utf8_collate(sel->current, loc) == 0) { - char *base = g_path_get_basename(tmp); - char size[128]; - snprintf(size, sizeof(size), "%ld", (long)st.st_size); - gnt_tree_add_row_after(GNT_TREE(sel->files), base, - gnt_tree_create_row(GNT_TREE(sel->files), base, size, ""), NULL, NULL); - } - g_free(loc); - g_free(tmp); + stat(gl.gl_pathv[0], &st); + gnt_file_sel_set_current_location(sel, loc); /* XXX: check the return value */ + g_free(loc); + if (!S_ISDIR(st.st_mode) && !sel->dirsonly) { + gnt_tree_remove_all(GNT_TREE(sel->files)); + for (count = 0; count < gl.gl_pathc; count++) { + char *tmp = process_path(gl.gl_pathv[count]); + loc = g_path_get_dirname(tmp); + if (g_utf8_collate(sel->current, loc) == 0) { + char *base = g_path_get_basename(tmp); + char size[128]; + snprintf(size, sizeof(size), "%ld", (long)st.st_size); + gnt_tree_add_row_after(GNT_TREE(sel->files), base, + gnt_tree_create_row(GNT_TREE(sel->files), base, size, ""), NULL, NULL); } - gnt_widget_draw(sel->files); + g_free(loc); + g_free(tmp); } - } else if (sel->files) { - gnt_tree_remove_all(GNT_TREE(sel->files)); gnt_widget_draw(sel->files); } - globfree(&gl); + } else if (sel->files) { + gnt_tree_remove_all(GNT_TREE(sel->files)); + gnt_widget_draw(sel->files); + } + globfree(&gl); success: - g_free(path); - return TRUE; - } - return FALSE; +#endif + g_free(path); + return TRUE; } static void @@ -329,6 +404,24 @@ return TRUE; } +static gboolean +up_directory(GntBindable *bind, GList *null) +{ + char *path, *dir; + GntFileSel *sel = GNT_FILE_SEL(bind); + if (!gnt_widget_has_focus(sel->dirs) && + !gnt_widget_has_focus(sel->files)) + return FALSE; + + path = g_build_filename(sel->current, "..", NULL); + dir = g_path_get_basename(sel->current); + if (gnt_file_sel_set_current_location(sel, path)) + gnt_tree_set_selected(GNT_TREE(sel->dirs), dir); + g_free(dir); + g_free(path); + return TRUE; +} + static void gnt_file_sel_class_init(GntFileSelClass *klass) { @@ -350,6 +443,7 @@ gnt_bindable_class_register_action(bindable, "toggle-tag", toggle_tag_selection, "t", NULL); gnt_bindable_class_register_action(bindable, "clear-tags", clear_tags, "c", NULL); + gnt_bindable_class_register_action(bindable, "up-directory", up_directory, GNT_KEY_BACKSPACE, NULL); gnt_style_read_actions(G_OBJECT_CLASS_TYPE(klass), GNT_BINDABLE_CLASS(klass)); GNTDEBUG; @@ -505,3 +599,9 @@ return list; } +void gnt_file_sel_set_read_fn(GntFileSel *sel, gboolean (*read_fn)(const char *path, GList **files, GError **error)) +{ + sel->read_fn = read_fn; +} + + Modified: trunk/console/libgnt/gntfilesel.h =================================================================== --- trunk/console/libgnt/gntfilesel.h 2007-04-04 04:07:16 UTC (rev 18232) +++ trunk/console/libgnt/gntfilesel.h 2007-04-04 08:37:15 UTC (rev 18233) @@ -20,6 +20,7 @@ typedef struct _GntFileSel GntFileSel; typedef struct _GntFileSelPriv GntFileSelPriv; typedef struct _GntFileSelClass GntFileSelClass; +typedef struct _GntFile GntFile; struct _GntFileSel { @@ -39,6 +40,8 @@ gboolean dirsonly; /* Show only directories */ gboolean multiselect; GList *tags; /* List of tagged files when multiselect is set */ + + gboolean (*read_fn)(const char *path, GList **files, GError **error); }; struct _GntFileSelClass @@ -52,6 +55,20 @@ void (*gnt_reserved4)(void); }; +typedef enum _GntFileType +{ + GNT_FILE_REGULAR, + GNT_FILE_DIR +} GntFileType; + +struct _GntFile +{ + char *fullpath; + char *basename; + GntFileType type; + unsigned long size; +}; + G_BEGIN_DECLS GType gnt_file_sel_get_gtype(void); @@ -76,6 +93,12 @@ void gnt_file_sel_set_suggested_filename(GntFileSel *sel, const char *suggest); +void gnt_file_sel_set_read_fn(GntFileSel *sel, gboolean (*read_fn)(const char *path, GList **files, GError **error)); + +GntFile* gnt_file_new(const char *name, unsigned long size); + +GntFile* gnt_file_new_dir(const char *name); + G_END_DECLS #endif /* GNT_FILE_SEL_H */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mar...@us...> - 2007-04-04 04:07:19
|
Revision: 18232 http://svn.sourceforge.net/gaim/?rev=18232&view=rev Author: markhuetsch Date: 2007-04-03 21:07:16 -0700 (Tue, 03 Apr 2007) Log Message: ----------- Fixed a bug where gaim was playing n x n times user leaving chat room sound when opening a QQ protocol chat room, n equaling the number of users in the chat room. Patch by gnap. Modified Paths: -------------- trunk/libgaim/protocols/qq/group_conv.c trunk/libgaim/protocols/qq/group_im.c Modified: trunk/libgaim/protocols/qq/group_conv.c =================================================================== --- trunk/libgaim/protocols/qq/group_conv.c 2007-04-04 04:02:28 UTC (rev 18231) +++ trunk/libgaim/protocols/qq/group_conv.c 2007-04-04 04:07:16 UTC (rev 18232) @@ -50,7 +50,7 @@ { GList *names, *list, *flags; qq_buddy *member; - gchar *member_name; + gchar *member_name, *member_uid; GaimConversation *conv; gint flag; g_return_if_fail(group != NULL); @@ -63,23 +63,40 @@ list = group->members; while (list != NULL) { member = (qq_buddy *) list->data; - /* always put it even offline */ - names = g_list_append(names, - /* we need unique identifiers for everyone in the chat or else we'll - * run into problems with functions like get_cb_real_name from qq.c */ - (member->nickname != NULL && *(member->nickname) != '\0') ? + /* we need unique identifiers for everyone in the chat or else we'll + * run into problems with functions like get_cb_real_name from qq.c */ + member_name = (member->nickname != NULL && *(member->nickname) != '\0') ? g_strdup_printf("%s (qq-%u)", member->nickname, member->uid) : - g_strdup_printf("(qq-%u)", member->uid)); + g_strdup_printf("(qq-%u)", member->uid); + member_uid = g_strdup_printf("(qq-%u)", member->uid); + flag = 0; /* TYPING to put online above OP and FOUNDER */ - if (is_online(member->status)) flag |= (GAIM_CBFLAGS_TYPING | GAIM_CBFLAGS_VOICE); + if (is_online(member->status)) + flag |= (GAIM_CBFLAGS_TYPING | GAIM_CBFLAGS_VOICE); if(1 == (member->role & 1)) flag |= GAIM_CBFLAGS_OP; if(member->uid == group->creator_uid) flag |= GAIM_CBFLAGS_FOUNDER; + + if(gaim_conv_chat_find_user(GAIM_CONV_CHAT(conv), member_name)) + { + gaim_conv_chat_user_set_flags(GAIM_CONV_CHAT(conv), + member_name, + flag); + }else if (gaim_conv_chat_find_user(GAIM_CONV_CHAT(conv), member_uid)) + { + gaim_conv_chat_user_set_flags(GAIM_CONV_CHAT(conv), + member_uid, + flag); + gaim_conv_chat_rename_user(GAIM_CONV_CHAT(conv), member_uid, member_name); + }else{ + /* always put it even offline */ + names = g_list_append(names, member_name); flags = g_list_append(flags, GINT_TO_POINTER(flag)); + } + g_free(member_uid); list = list->next; } - gaim_conv_chat_clear_users(GAIM_CONV_CHAT(conv)); gaim_conv_chat_add_users(GAIM_CONV_CHAT(conv), names, NULL, flags, FALSE); } /* clean up names */ Modified: trunk/libgaim/protocols/qq/group_im.c =================================================================== --- trunk/libgaim/protocols/qq/group_im.c 2007-04-04 04:02:28 UTC (rev 18231) +++ trunk/libgaim/protocols/qq/group_im.c 2007-04-04 04:07:16 UTC (rev 18232) @@ -63,6 +63,7 @@ g_return_if_fail(group != NULL && msg != NULL); msg_filtered = gaim_markup_strip_html(msg); + gaim_debug(GAIM_DEBUG_INFO, "QQ_MESG", "filterd qq qun mesg: %s\n", msg_filtered); msg_len = strlen(msg_filtered); data_len = 7 + msg_len + QQ_SEND_IM_AFTER_MSG_LEN; raw_data = g_newa(guint8, data_len); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mar...@us...> - 2007-04-04 04:02:29
|
Revision: 18231 http://svn.sourceforge.net/gaim/?rev=18231&view=rev Author: markhuetsch Date: 2007-04-03 21:02:28 -0700 (Tue, 03 Apr 2007) Log Message: ----------- Bug 1658961 fixed by gnap. Modified Paths: -------------- trunk/libgaim/protocols/qq/im.c Modified: trunk/libgaim/protocols/qq/im.c =================================================================== --- trunk/libgaim/protocols/qq/im.c 2007-04-04 03:51:32 UTC (rev 18230) +++ trunk/libgaim/protocols/qq/im.c 2007-04-04 04:02:28 UTC (rev 18231) @@ -123,7 +123,7 @@ const gchar *font_name, gboolean is_bold, gboolean is_italic, gboolean is_underline, gint tail_len) { - gchar *s1, *s2; + gchar *s1; unsigned char *rgb; gint font_name_len; guint8 *send_im_tail; @@ -159,13 +159,19 @@ s1 = g_strndup(font_color + 1, 6); /* Henry: maybe this is a bug of gaim, the string should have * the length of odd number @_@ + * George Ang: This BUG maybe fixed by Gaim. adding new byte would cause a crash. */ - s2 = g_strdup_printf("%sH", s1); - rgb = gaim_base16_decode(s2, NULL); + /* s2 = g_strdup_printf("%sH", s1); */ + rgb = gaim_base16_decode(s1, NULL); g_free(s1); - g_free(s2); - memcpy(send_im_tail + 2, rgb, 3); - g_free(rgb); + /* g_free(s2); */ + if ( rgb ) + { + memcpy(send_im_tail + 2, rgb, 3); + g_free(rgb); + } else { + send_im_tail[2] = send_im_tail[3] = send_im_tail[4] = 0; + } } else { send_im_tail[2] = send_im_tail[3] = send_im_tail[4] = 0; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mar...@us...> - 2007-04-04 03:51:32
|
Revision: 18230 http://svn.sourceforge.net/gaim/?rev=18230&view=rev Author: markhuetsch Date: 2007-04-03 20:51:32 -0700 (Tue, 03 Apr 2007) Log Message: ----------- Bug 1671638 fixed bhpan. Modified Paths: -------------- trunk/libgaim/protocols/qq/buddy_info.c trunk/libgaim/protocols/qq/buddy_info.h trunk/libgaim/protocols/qq/buddy_list.c Modified: trunk/libgaim/protocols/qq/buddy_info.c =================================================================== --- trunk/libgaim/protocols/qq/buddy_info.c 2007-04-04 03:50:24 UTC (rev 18229) +++ trunk/libgaim/protocols/qq/buddy_info.c 2007-04-04 03:51:32 UTC (rev 18230) @@ -741,19 +741,17 @@ qq_send_cmd(gc, QQ_CMD_GET_LEVEL, TRUE, 0, TRUE, buf, 5); } -/* void qq_send_packet_get_buddies_levels(GaimConnection *gc) { - guint8 *buf, *tmp, size; + guint8 *buf, *tmp; + guint16 size; qq_buddy *q_bud; qq_data *qd = (qq_data *) gc->proto_data; GList *node = qd->buddies; if (qd->buddies) { -*/ /* server only sends back levels for online buddies, no point * in asking for anyone else */ -/* size = 4*g_list_length(qd->buddies) + 1; buf = g_new0(guint8, size); tmp = buf + 1; @@ -772,7 +770,6 @@ g_free(buf); } } -*/ void qq_process_get_level_reply(guint8 *buf, gint buf_len, GaimConnection *gc) { Modified: trunk/libgaim/protocols/qq/buddy_info.h =================================================================== --- trunk/libgaim/protocols/qq/buddy_info.h 2007-04-04 03:50:24 UTC (rev 18229) +++ trunk/libgaim/protocols/qq/buddy_info.h 2007-04-04 03:51:32 UTC (rev 18230) @@ -93,9 +93,7 @@ void qq_process_get_info_reply(guint8 *buf, gint buf_len, GaimConnection *gc); void qq_info_query_free(qq_data *qd); void qq_send_packet_get_level(GaimConnection *gc, guint32 uid); -/* void qq_send_packet_get_buddies_levels(GaimConnection *gc); -*/ void qq_process_get_level_reply(guint8 *buf, gint buf_len, GaimConnection *gc); #endif Modified: trunk/libgaim/protocols/qq/buddy_list.c =================================================================== --- trunk/libgaim/protocols/qq/buddy_list.c 2007-04-04 03:50:24 UTC (rev 18229) +++ trunk/libgaim/protocols/qq/buddy_list.c 2007-04-04 03:51:32 UTC (rev 18230) @@ -234,7 +234,7 @@ qq_send_packet_get_buddies_online(gc, position); } else { - /* qq_send_packet_get_buddies_levels(gc); */ + qq_send_packet_get_buddies_levels(gc); qq_refresh_all_buddy_status(gc); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sa...@us...> - 2007-04-04 03:50:24
|
Revision: 18229 http://svn.sourceforge.net/gaim/?rev=18229&view=rev Author: sadrul Date: 2007-04-03 20:50:24 -0700 (Tue, 03 Apr 2007) Log Message: ----------- Add a way to get a list of bindings for a widget. This can be used by, eg, a window-manager to show helpful messages to the user. Modified Paths: -------------- trunk/console/libgnt/gntkeys.c trunk/console/libgnt/gntkeys.h trunk/console/libgnt/gntutils.c trunk/console/libgnt/gntutils.h Modified: trunk/console/libgnt/gntkeys.c =================================================================== --- trunk/console/libgnt/gntkeys.c 2007-04-01 23:59:40 UTC (rev 18228) +++ trunk/console/libgnt/gntkeys.c 2007-04-04 03:50:24 UTC (rev 18229) @@ -134,6 +134,28 @@ return g_hash_table_lookup(specials, name); } +typedef struct { + const char *name; + const char *key; +} gntkey; + +static void +get_key_name(gpointer key, gpointer value, gpointer data) +{ + gntkey *k = data; + if (k->name) + return; + if (g_utf8_collate(value, k->key) == 0) + k->name = key; +} + +const char *gnt_key_lookup(const char *key) +{ + gntkey k = {NULL, key}; + g_hash_table_foreach(specials, get_key_name, &k); + return k.name; +} + /** * The key-bindings will be saved in a tree. When a keystroke happens, GNT will * find the sequence that matches a binding and return the length. Modified: trunk/console/libgnt/gntkeys.h =================================================================== --- trunk/console/libgnt/gntkeys.h 2007-04-01 23:59:40 UTC (rev 18228) +++ trunk/console/libgnt/gntkeys.h 2007-04-04 03:50:24 UTC (rev 18229) @@ -82,6 +82,7 @@ void gnt_init_keys(void); void gnt_keys_refine(char *text); const char *gnt_key_translate(const char *name); +const char *gnt_key_lookup(const char *key); void gnt_keys_add_combination(const char *path); void gnt_keys_del_combination(const char *path); Modified: trunk/console/libgnt/gntutils.c =================================================================== --- trunk/console/libgnt/gntutils.c 2007-04-01 23:59:40 UTC (rev 18228) +++ trunk/console/libgnt/gntutils.c 2007-04-04 03:50:24 UTC (rev 18229) @@ -1,4 +1,5 @@ #include "gntutils.h" +#include "gnttree.h" #include <stdlib.h> #include <string.h> @@ -145,3 +146,47 @@ return continue_emission; } +typedef struct { + GHashTable *hash; + GntTree *tree; +} BindingView; + +static void +add_binding(gpointer key, gpointer value, gpointer data) +{ + BindingView *bv = data; + GntBindableActionParam *act = value; + const char *name = g_hash_table_lookup(bv->hash, act->action); + if (name && *name) { + const char *k = gnt_key_lookup(key); + if (!k) + k = key; + gnt_tree_add_row_after(bv->tree, (gpointer)k, + gnt_tree_create_row(bv->tree, k, name), NULL, NULL); + } +} + +static void +add_action(gpointer key, gpointer value, gpointer data) +{ + BindingView *bv = data; + g_hash_table_insert(bv->hash, value, key); +} + +GntWidget *gnt_widget_bindings_view(GntWidget *widget) +{ + GntBindable *bind = GNT_BINDABLE(widget); + GntWidget *tree = gnt_tree_new_with_columns(2); + GntBindableClass *klass = GNT_BINDABLE_CLASS(GNT_BINDABLE_GET_CLASS(bind)); + GHashTable *hash = g_hash_table_new(g_direct_hash, g_direct_equal); + BindingView bv = {hash, GNT_TREE(tree)}; + + gnt_tree_set_compare_func(bv.tree, (GCompareFunc)g_utf8_collate); + g_hash_table_foreach(klass->actions, add_action, &bv); + g_hash_table_foreach(klass->bindings, add_binding, &bv); + gnt_tree_adjust_columns(bv.tree); + g_hash_table_destroy(hash); + + return tree; +} + Modified: trunk/console/libgnt/gntutils.h =================================================================== --- trunk/console/libgnt/gntutils.h 2007-04-01 23:59:40 UTC (rev 18228) +++ trunk/console/libgnt/gntutils.h 2007-04-04 03:50:24 UTC (rev 18229) @@ -34,3 +34,8 @@ const GValue *handler_return, gpointer dummy); +/** + * Returns a GntTree populated with "key" -> "binding" for the widget. + */ +GntWidget *gnt_widget_bindings_view(GntWidget *widget); + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2007-04-01 23:59:39
|
Revision: 18228 http://svn.sourceforge.net/gaim/?rev=18228&view=rev Author: thekingant Date: 2007-04-01 16:59:40 -0700 (Sun, 01 Apr 2007) Log Message: ----------- sf patch #1574238, from Ka-Hing Cheung "icq away message was only showing in blist and tooltip, this patch adds it to the info window so it can be copy and pasted." Modified Paths: -------------- trunk/libgaim/protocols/oscar/oscar.c Modified: trunk/libgaim/protocols/oscar/oscar.c =================================================================== --- trunk/libgaim/protocols/oscar/oscar.c 2007-04-01 18:59:15 UTC (rev 18227) +++ trunk/libgaim/protocols/oscar/oscar.c 2007-04-01 23:59:40 UTC (rev 18228) @@ -3661,6 +3661,8 @@ GaimConnection *gc; GaimAccount *account; GaimBuddy *buddy; + GaimPresence *presence; + GaimStatus *status; struct buddyinfo *bi; gchar who[16]; GaimNotifyUserInfo *user_info; @@ -3754,7 +3756,19 @@ g_free(buf); g_free(utf8); } - + + if (buddy != NULL) { + const gchar *message; + + presence = gaim_buddy_get_presence(buddy); + status = gaim_presence_get_active_status(presence); + message = gaim_status_get_attr_string(status, "message"); + + if (message != NULL && *message != '\0') + oscar_user_info_convert_and_add(account, + user_info, _("Status"), message); + } + oscar_user_info_convert_and_add(account, user_info, _("Additional Information"), info->info); gaim_notify_user_info_add_section_break(user_info); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2007-04-01 18:59:14
|
Revision: 18227 http://svn.sourceforge.net/gaim/?rev=18227&view=rev Author: thekingant Date: 2007-04-01 11:59:15 -0700 (Sun, 01 Apr 2007) Log Message: ----------- sf patch #1684297, from Atamyrat Hezretguliyev This patch fixes a bug in buddy.c, jabber_buddy_remove_id function. l->data is accessed after l is freed, which crashes GAIM. Modified Paths: -------------- trunk/libgaim/protocols/jabber/buddy.c Modified: trunk/libgaim/protocols/jabber/buddy.c =================================================================== --- trunk/libgaim/protocols/jabber/buddy.c 2007-04-01 17:37:40 UTC (rev 18226) +++ trunk/libgaim/protocols/jabber/buddy.c 2007-04-01 18:59:15 UTC (rev 18227) @@ -732,8 +732,9 @@ while(l) { if(!strcmp(id, l->data)) { + gpointer tmp = l->data; jbi->ids = g_slist_remove(jbi->ids, l->data); - g_free(l->data); + g_free(tmp); return; } l = l->next; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2007-04-01 17:37:40
|
Revision: 18226 http://svn.sourceforge.net/gaim/?rev=18226&view=rev Author: thekingant Date: 2007-04-01 10:37:40 -0700 (Sun, 01 Apr 2007) Log Message: ----------- sf patch #1691784, from William Ehlhardt "Fixes a build-breaker introduced in SVN r18220." It compiled fine for me without including time.h, but I guess his os or distribution might be different. And this change is correct. Modified Paths: -------------- trunk/COPYRIGHT trunk/console/libgnt/gntwm.h Modified: trunk/COPYRIGHT =================================================================== --- trunk/COPYRIGHT 2007-04-01 17:31:56 UTC (rev 18225) +++ trunk/COPYRIGHT 2007-04-01 17:37:40 UTC (rev 18226) @@ -97,6 +97,7 @@ Andrew Echols John Eckerdal Sean Egan <sea...@gm...> +William Ehlhardt Nelson Elhage Ignacio J. Elia Brian Enigma Modified: trunk/console/libgnt/gntwm.h =================================================================== --- trunk/console/libgnt/gntwm.h 2007-04-01 17:31:56 UTC (rev 18225) +++ trunk/console/libgnt/gntwm.h 2007-04-01 17:37:40 UTC (rev 18226) @@ -3,6 +3,7 @@ #include "gntmenu.h" #include <panel.h> +#include <time.h> #define GNT_TYPE_WM (gnt_wm_get_gtype()) #define GNT_WM(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GNT_TYPE_WM, GntWM)) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2007-04-01 17:31:56
|
Revision: 18225 http://svn.sourceforge.net/gaim/?rev=18225&view=rev Author: thekingant Date: 2007-04-01 10:31:56 -0700 (Sun, 01 Apr 2007) Log Message: ----------- sf patch #1689182, from Will Thompson gtkblist: remove code duplication, and plug a leak Over in gtkblist.c, the code to generate plugin action menus is the same for regular plugins and prpls, except that there is non-NULL context in the latter. It was copy-pasted. Now it is not. Incidentally, the version in gaim_gtk_blist_update_accounts_menu was leaking the list every time: a pointer to the start was kept, presumably with the intention that the list be freed, but it never actually was. Modified Paths: -------------- trunk/gtk/gtkblist.c Modified: trunk/gtk/gtkblist.c =================================================================== --- trunk/gtk/gtkblist.c 2007-04-01 08:06:29 UTC (rev 18224) +++ trunk/gtk/gtkblist.c 2007-04-01 17:31:56 UTC (rev 18225) @@ -6202,13 +6202,14 @@ } static void -build_plugin_actions(GtkWidget *menu, GaimPlugin *plugin) +build_plugin_actions(GtkWidget *menu, GaimPlugin *plugin, + GaimConnection *context) { GtkWidget *menuitem; GaimPluginAction *action = NULL; GList *actions, *l; - actions = GAIM_PLUGIN_ACTIONS(plugin, NULL); + actions = GAIM_PLUGIN_ACTIONS(plugin, context); for (l = actions; l != NULL; l = l->next) { @@ -6216,7 +6217,7 @@ { action = (GaimPluginAction *) l->data; action->plugin = plugin; - action->context = NULL; + action->context = context; menuitem = gtk_menu_item_new_with_label(action->label); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); @@ -6288,6 +6289,7 @@ GaimAccount *account = NULL; GaimStatus *status = NULL; GdkPixbuf *pixbuf = NULL; + GaimPlugin *plugin = NULL; account = accounts->data; accel_group = gtk_menu_get_accel_group(GTK_MENU(accountmenu)); @@ -6330,35 +6332,12 @@ gaim_separator(submenu); gc = gaim_account_get_connection(account); - if (gc && GAIM_CONNECTION_IS_CONNECTED(gc)) { - GaimPlugin *plugin = NULL; + plugin = gc ? gc->prpl : NULL; - plugin = gc->prpl; - if (GAIM_PLUGIN_HAS_ACTIONS(plugin)) { - GList *l, *ll = NULL; - GaimPluginAction *action = NULL; - - for (l = ll = GAIM_PLUGIN_ACTIONS(plugin, gc); l; l = l->next) { - if (l->data) { - action = (GaimPluginAction *)l->data; - action->plugin = plugin; - action->context = gc; - - menuitem = gtk_menu_item_new_with_label(action->label); - gtk_menu_shell_append(GTK_MENU_SHELL(submenu), menuitem); - g_signal_connect(G_OBJECT(menuitem), "activate", - G_CALLBACK(plugin_act), action); - g_object_set_data_full(G_OBJECT(menuitem), "plugin_action", action, (GDestroyNotify)gaim_plugin_action_free); - gtk_widget_show(menuitem); - } else - gaim_separator(submenu); - } - } else { - menuitem = gtk_menu_item_new_with_label(_("No actions available")); - gtk_menu_shell_append(GTK_MENU_SHELL(submenu), menuitem); - gtk_widget_set_sensitive(menuitem, FALSE); - gtk_widget_show(menuitem); - } + if (gc && GAIM_CONNECTION_IS_CONNECTED(gc) + && GAIM_PLUGIN_HAS_ACTIONS(plugin)) + { + build_plugin_actions(submenu, plugin, gc); } else { menuitem = gtk_menu_item_new_with_label(_("No actions available")); gtk_menu_shell_append(GTK_MENU_SHELL(submenu), menuitem); @@ -6474,7 +6453,7 @@ gtk_menu_set_accel_path(GTK_MENU(submenu), path); g_free(path); - build_plugin_actions(submenu, plugin); + build_plugin_actions(submenu, plugin, NULL); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sa...@us...> - 2007-04-01 08:06:31
|
Revision: 18224 http://svn.sourceforge.net/gaim/?rev=18224&view=rev Author: sadrul Date: 2007-04-01 01:06:29 -0700 (Sun, 01 Apr 2007) Log Message: ----------- More fixes for resizing when shadow is turned on. Modified Paths: -------------- trunk/console/libgnt/gntwm.c Modified: trunk/console/libgnt/gntwm.c =================================================================== --- trunk/console/libgnt/gntwm.c 2007-04-01 03:53:01 UTC (rev 18223) +++ trunk/console/libgnt/gntwm.c 2007-04-01 08:06:29 UTC (rev 18224) @@ -1359,7 +1359,7 @@ maxy = getmaxy(stdscr) - 1 - shadow; height = MIN(height, maxy); width = MIN(width, maxx); - wresize(node->window, height + shadow, width + shadow); + wresize(node->window, height, width); replace_panel(node->panel, node->window); g_signal_emit(wm, signals[SIG_RESIZED], 0, node); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sa...@us...> - 2007-04-01 03:53:12
|
Revision: 18223 http://svn.sourceforge.net/gaim/?rev=18223&view=rev Author: sadrul Date: 2007-03-31 20:53:01 -0700 (Sat, 31 Mar 2007) Log Message: ----------- Backspace to jump to parent. Modified Paths: -------------- trunk/console/libgnt/gnttree.c Modified: trunk/console/libgnt/gnttree.c =================================================================== --- trunk/console/libgnt/gnttree.c 2007-03-30 08:29:51 UTC (rev 18222) +++ trunk/console/libgnt/gnttree.c 2007-04-01 03:53:01 UTC (rev 18223) @@ -567,6 +567,23 @@ } static gboolean +action_move_parent(GntBindable *bind, GList *null) +{ + GntTree *tree = GNT_TREE(bind); + GntTreeRow *row = tree->current; + if (row->parent) { + int dist; + tree->current = row->parent; + if ((dist = get_distance(tree->current, tree->top)) > 0) + gnt_tree_scroll(tree, -dist); + else + redraw_tree(tree); + tree_selection_changed(tree, row, tree->current); + } + return TRUE; +} + +static gboolean action_up(GntBindable *bind, GList *list) { int dist; @@ -845,6 +862,8 @@ gnt_bindable_class_register_action(bindable, "move-down", action_down, GNT_KEY_DOWN, NULL); gnt_bindable_register_binding(bindable, "move-down", GNT_KEY_CTRL_N, NULL); + gnt_bindable_class_register_action(bindable, "move-parent", action_move_parent, + GNT_KEY_BACKSPACE, NULL); gnt_bindable_class_register_action(bindable, "page-up", action_page_up, GNT_KEY_PGUP, NULL); gnt_bindable_class_register_action(bindable, "page-down", action_page_down, @@ -1506,10 +1525,13 @@ int w = gnt_util_onscreen_width(col->text, NULL); if (i == 0 && row->choice) w += 4; + if (i == 0) { + w += find_depth(row) * TAB_SIZE; + } if (widths[i] < w) widths[i] = w; } - row = row->next; + row = get_next(row); } twidth = 1 + 2 * (!GNT_WIDGET_IS_FLAG_SET(GNT_WIDGET(tree), GNT_WIDGET_NO_BORDER)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sa...@us...> - 2007-03-30 08:29:51
|
Revision: 18222 http://svn.sourceforge.net/gaim/?rev=18222&view=rev Author: sadrul Date: 2007-03-30 01:29:51 -0700 (Fri, 30 Mar 2007) Log Message: ----------- EvilDennisR noticed this. Thanks\! Modified Paths: -------------- trunk/console/gntblist.c Modified: trunk/console/gntblist.c =================================================================== --- trunk/console/gntblist.c 2007-03-30 06:48:32 UTC (rev 18221) +++ trunk/console/gntblist.c 2007-03-30 08:29:51 UTC (rev 18222) @@ -639,8 +639,8 @@ item = gnt_menuitem_new(action->label); if (action->callback) - gnt_menuitem_set_callback(GNT_MENUITEM(item), context_menu_callback, action); - gnt_menu_add_item(menu, GNT_MENUITEM(item)); + gnt_menuitem_set_callback(GNT_MENU_ITEM(item), context_menu_callback, action); + gnt_menu_add_item(menu, GNT_MENU_ITEM(item)); if (action->children) { GntWidget *sub = gnt_menu_new(GNT_MENU_POPUP); @@ -742,7 +742,7 @@ { GaimMenuAction *action = data; gaim_blist_node_set_bool(action->data, "gnt-autojoin", - gnt_menuitem_check_get_checked(GNT_MENUITEM_CHECK(item))); + gnt_menuitem_check_get_checked(GNT_MENU_ITEM_CHECK(item))); } static void @@ -750,7 +750,7 @@ { GaimMenuAction *action = gaim_menu_action_new(_("Auto-join"), NULL, chat, NULL); GntMenuItem *check = gnt_menuitem_check_new(action->label); - gnt_menuitem_check_set_checked(GNT_MENUITEM_CHECK(check), + gnt_menuitem_check_set_checked(GNT_MENU_ITEM_CHECK(check), gaim_blist_node_get_bool((GaimBlistNode*)chat, "gnt-autojoin")); gnt_menu_add_item(menu, check); gnt_menuitem_set_callback(check, autojoin_toggled, action); @@ -2044,23 +2044,23 @@ item = gnt_menuitem_new(_("Send IM...")); gnt_menu_add_item(GNT_MENU(sub), item); - gnt_menuitem_set_callback(GNT_MENUITEM(item), send_im_select, NULL); + gnt_menuitem_set_callback(GNT_MENU_ITEM(item), send_im_select, NULL); item = gnt_menuitem_new(_("Toggle offline buddies")); gnt_menu_add_item(GNT_MENU(sub), item); - gnt_menuitem_set_callback(GNT_MENUITEM(item), show_offline_cb, NULL); + gnt_menuitem_set_callback(GNT_MENU_ITEM(item), show_offline_cb, NULL); item = gnt_menuitem_new(_("Sort by status")); gnt_menu_add_item(GNT_MENU(sub), item); - gnt_menuitem_set_callback(GNT_MENUITEM(item), sort_blist_change_cb, "status"); + gnt_menuitem_set_callback(GNT_MENU_ITEM(item), sort_blist_change_cb, "status"); item = gnt_menuitem_new(_("Sort alphabetically")); gnt_menu_add_item(GNT_MENU(sub), item); - gnt_menuitem_set_callback(GNT_MENUITEM(item), sort_blist_change_cb, "text"); + gnt_menuitem_set_callback(GNT_MENU_ITEM(item), sort_blist_change_cb, "text"); item = gnt_menuitem_new(_("Sort by log size")); gnt_menu_add_item(GNT_MENU(sub), item); - gnt_menuitem_set_callback(GNT_MENUITEM(item), sort_blist_change_cb, "log"); + gnt_menuitem_set_callback(GNT_MENU_ITEM(item), sort_blist_change_cb, "log"); reconstruct_accounts_menu(); gnt_menu_add_item(GNT_MENU(menu), ggblist->accounts); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sa...@us...> - 2007-03-30 06:48:35
|
Revision: 18221 http://svn.sourceforge.net/gaim/?rev=18221&view=rev Author: sadrul Date: 2007-03-29 23:48:32 -0700 (Thu, 29 Mar 2007) Log Message: ----------- Fine tune column hiding. Modified Paths: -------------- trunk/console/libgnt/gnttree.c Modified: trunk/console/libgnt/gnttree.c =================================================================== --- trunk/console/libgnt/gnttree.c 2007-03-30 05:49:39 UTC (rev 18220) +++ trunk/console/libgnt/gnttree.c 2007-03-30 06:48:32 UTC (rev 18221) @@ -223,7 +223,11 @@ GList *iter; int i; gboolean notfirst = FALSE; + int lastvisible = tree->ncol; + while (lastvisible && tree->columns[lastvisible].invisible) + lastvisible--; + for (i = 0, iter = row->columns; i < tree->ncol && iter; i++, iter = iter->next) { GntTreeCol *col = iter->data; @@ -231,10 +235,16 @@ int len = gnt_util_onscreen_width(col->text, NULL); int fl = 0; gboolean cut = FALSE; + int width; if (tree->columns[i].invisible) continue; + if (i == lastvisible) + width = GNT_WIDGET(tree)->priv.width - gnt_util_onscreen_width(string->str, NULL); + else + width = tree->columns[i].width; + if (i == 0) { if (row->choice) @@ -269,8 +279,8 @@ notfirst = TRUE; - if (len > tree->columns[i].width) { - len = tree->columns[i].width - 1; + if (len > width) { + len = width - 1; cut = TRUE; } text = gnt_util_onscreen_width_to_pointer(col->text, len - fl, NULL); @@ -284,7 +294,7 @@ } if (len < tree->columns[i].width && iter->next) - g_string_append_printf(string, "%*s", tree->columns[i].width - len, ""); + g_string_append_printf(string, "%*s", width - len, ""); } return g_string_free(string, FALSE); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sa...@us...> - 2007-03-30 05:49:43
|
Revision: 18220 http://svn.sourceforge.net/gaim/?rev=18220&view=rev Author: sadrul Date: 2007-03-29 22:49:39 -0700 (Thu, 29 Mar 2007) Log Message: ----------- A lot of stuff. Some memory leaks, some bug fixes, some new features. Pretty much everything you could want in a commit. Modified Paths: -------------- trunk/console/libgnt/Makefile.am trunk/console/libgnt/gnt-skel.h trunk/console/libgnt/gnt.h trunk/console/libgnt/gnt.pc.in trunk/console/libgnt/gntbindable.c trunk/console/libgnt/gntbindable.h trunk/console/libgnt/gntbox.c trunk/console/libgnt/gntbox.h trunk/console/libgnt/gntbutton.c trunk/console/libgnt/gntbutton.h trunk/console/libgnt/gntcheckbox.c trunk/console/libgnt/gntcheckbox.h trunk/console/libgnt/gntcolors.c trunk/console/libgnt/gntcolors.h trunk/console/libgnt/gntcombobox.c trunk/console/libgnt/gntcombobox.h trunk/console/libgnt/gntentry.c trunk/console/libgnt/gntentry.h trunk/console/libgnt/gntfilesel.c trunk/console/libgnt/gntfilesel.h trunk/console/libgnt/gntkeys.c trunk/console/libgnt/gntkeys.h trunk/console/libgnt/gntlabel.c trunk/console/libgnt/gntlabel.h trunk/console/libgnt/gntline.c trunk/console/libgnt/gntline.h trunk/console/libgnt/gntmain.c trunk/console/libgnt/gntmenu.c trunk/console/libgnt/gntmenu.h trunk/console/libgnt/gntmenuitem.c trunk/console/libgnt/gntmenuitem.h trunk/console/libgnt/gntmenuitemcheck.c trunk/console/libgnt/gntmenuitemcheck.h trunk/console/libgnt/gntstyle.c trunk/console/libgnt/gntstyle.h trunk/console/libgnt/gnttextview.c trunk/console/libgnt/gnttextview.h trunk/console/libgnt/gnttree.c trunk/console/libgnt/gnttree.h trunk/console/libgnt/gntwidget.c trunk/console/libgnt/gntwidget.h trunk/console/libgnt/gntwindow.c trunk/console/libgnt/gntwindow.h trunk/console/libgnt/gntwm.c trunk/console/libgnt/gntwm.h trunk/console/libgnt/test/key.c trunk/console/libgnt/test/menu.c trunk/console/libgnt/test/tv.c Added Paths: ----------- trunk/console/libgnt/gntclipboard.c trunk/console/libgnt/gntclipboard.h Modified: trunk/console/libgnt/Makefile.am =================================================================== --- trunk/console/libgnt/Makefile.am 2007-03-28 12:42:19 UTC (rev 18219) +++ trunk/console/libgnt/Makefile.am 2007-03-30 05:49:39 UTC (rev 18220) @@ -13,6 +13,7 @@ gntbox.c \ gntbutton.c \ gntcheckbox.c \ + gntclipboard.c \ gntcolors.c \ gntcombobox.c \ gntentry.c \ @@ -37,6 +38,7 @@ gntbox.h \ gntbutton.h \ gntcheckbox.h \ + gntclipboard.h \ gntcolors.h \ gntcombobox.h \ gntentry.h \ @@ -61,7 +63,8 @@ gntmarshal.c gntmarshal.c: genmarshal gntmarshal.h - cat genmarshal | glib-genmarshal --prefix=gnt_closure_marshal --body > $@ + echo "#include \"gntmarshal.h\"" > $@ + cat genmarshal | glib-genmarshal --prefix=gnt_closure_marshal --body >> $@ gntmarshal.h: genmarshal cat genmarshal | glib-genmarshal --prefix=gnt_closure_marshal --header > $@ @@ -75,8 +78,8 @@ libgnt_la_LIBADD = \ $(GLIB_LIBS) \ $(GNT_LIBS) - AM_CPPFLAGS = \ $(GLIB_CFLAGS) \ - $(GNT_CFLAGS) + $(GNT_CFLAGS) \ + $(DEBUG_CFLAGS) Modified: trunk/console/libgnt/gnt-skel.h =================================================================== --- trunk/console/libgnt/gnt-skel.h 2007-03-28 12:42:19 UTC (rev 18219) +++ trunk/console/libgnt/gnt-skel.h 2007-03-30 05:49:39 UTC (rev 18220) @@ -17,16 +17,16 @@ #define GNT_SKEL_SET_FLAGS(obj, flags) (GNT_SKEL_FLAGS(obj) |= flags) #define GNT_SKEL_UNSET_FLAGS(obj, flags) (GNT_SKEL_FLAGS(obj) &= ~(flags)) -typedef struct _GnSkel GntSkel; -typedef struct _GnSkelPriv GntSkelPriv; -typedef struct _GnSkelClass GntSkelClass; +typedef struct _GntSkel GntSkel; +typedef struct _GntSkelPriv GntSkelPriv; +typedef struct _GntSkelClass GntSkelClass; -struct _GnSkel +struct _GntSkel { GntWidget parent; }; -struct _GnSkelClass +struct _GntSkelClass { GntWidgetClass parent; Modified: trunk/console/libgnt/gnt.h =================================================================== --- trunk/console/libgnt/gnt.h 2007-03-28 12:42:19 UTC (rev 18219) +++ trunk/console/libgnt/gnt.h 2007-03-30 05:49:39 UTC (rev 18220) @@ -1,13 +1,14 @@ #include <glib.h> #include "gntwidget.h" +#include "gntclipboard.h" #include "gntcolors.h" #include "gntkeys.h" -void gnt_init(); +void gnt_init(void); -void gnt_main(); +void gnt_main(void); -gboolean gnt_ascii_only(); +gboolean gnt_ascii_only(void); void gnt_screen_occupy(GntWidget *widget); @@ -15,8 +16,6 @@ void gnt_screen_update(GntWidget *widget); -void gnt_screen_take_focus(GntWidget *widget); - void gnt_screen_resize_widget(GntWidget *widget, int width, int height); void gnt_screen_move_widget(GntWidget *widget, int x, int y); @@ -31,5 +30,10 @@ gboolean gnt_screen_menu_show(gpointer menu); -void gnt_quit(); +void gnt_quit(void); +GntClipboard *gnt_get_clipboard(void); + +gchar *gnt_get_clipboard_string(void); + +void gnt_set_clipboard_string(gchar *string); Modified: trunk/console/libgnt/gnt.pc.in =================================================================== --- trunk/console/libgnt/gnt.pc.in 2007-03-28 12:42:19 UTC (rev 18219) +++ trunk/console/libgnt/gnt.pc.in 2007-03-30 05:49:39 UTC (rev 18220) @@ -2,11 +2,12 @@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ +datarootdir=@datarootdir@ datadir=@datadir@ sysconfdir=@sysconfdir@ Name: LibGNT -Description: Gaim Ncurses Toolkit is a collection of curses-widgets. +Description: Glib Ncurses Toolkit is a collection of curses-widgets. Version: @VERSION@ Requires: glib-2.0 Cflags: -I${includedir}/gnt Modified: trunk/console/libgnt/gntbindable.c =================================================================== --- trunk/console/libgnt/gntbindable.c 2007-03-28 12:42:19 UTC (rev 18219) +++ trunk/console/libgnt/gntbindable.c 2007-03-30 05:49:39 UTC (rev 18220) @@ -77,6 +77,7 @@ sizeof(GntBindable), 0, /* n_preallocs */ NULL, /* instance_init */ + NULL /* value_table */ }; type = g_type_register_static(G_TYPE_OBJECT, @@ -155,6 +156,7 @@ if (name == NULL || *name == '\0') { g_hash_table_remove(klass->bindings, (char*)trigger); + gnt_keys_del_combination(trigger); return; } @@ -171,6 +173,7 @@ param->action = action; param->list = list; g_hash_table_replace(klass->bindings, g_strdup(trigger), param); + gnt_keys_add_combination(trigger); } void gnt_bindable_register_binding(GntBindableClass *klass, const char *name, Modified: trunk/console/libgnt/gntbindable.h =================================================================== --- trunk/console/libgnt/gntbindable.h 2007-03-28 12:42:19 UTC (rev 18219) +++ trunk/console/libgnt/gntbindable.h 2007-03-30 05:49:39 UTC (rev 18220) @@ -13,17 +13,17 @@ #define GNT_IS_BINDABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_BINDABLE)) #define GNT_BINDABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_BINDABLE, GntBindableClass)) -#define GNTDEBUG fprintf(stderr, "%s\n", __FUNCTION__) +#define GNTDEBUG g_printerr("%s\n", __FUNCTION__) -typedef struct _GnBindable GntBindable; -typedef struct _GnBindableClass GntBindableClass; +typedef struct _GntBindable GntBindable; +typedef struct _GntBindableClass GntBindableClass; -struct _GnBindable +struct _GntBindable { GObject inherit; }; -struct _GnBindableClass +struct _GntBindableClass { GObjectClass parent; @@ -52,10 +52,10 @@ typedef gboolean (*GntBindableActionCallback) (GntBindable *bindable, GList *params); typedef gboolean (*GntBindableActionCallbackNoParam)(GntBindable *bindable); -typedef struct _GnBindableAction GntBindableAction; -typedef struct _GnBindableActionParam GntBindableActionParam; +typedef struct _GntBindableAction GntBindableAction; +typedef struct _GntBindableActionParam GntBindableActionParam; -struct _GnBindableAction +struct _GntBindableAction { char *name; /* The name of the action */ union { @@ -64,7 +64,7 @@ } u; }; -struct _GnBindableActionParam +struct _GntBindableActionParam { GntBindableAction *action; GList *list; Modified: trunk/console/libgnt/gntbox.c =================================================================== --- trunk/console/libgnt/gntbox.c 2007-03-28 12:42:19 UTC (rev 18219) +++ trunk/console/libgnt/gntbox.c 2007-03-30 05:49:39 UTC (rev 18220) @@ -62,7 +62,7 @@ else wbkgdset(widget->window, '\0' | COLOR_PAIR(GNT_COLOR_TITLE_D)); mvwaddch(widget->window, 0, pos-1, ACS_RTEE | COLOR_PAIR(GNT_COLOR_NORMAL)); - mvwprintw(widget->window, 0, pos, title); + mvwaddstr(widget->window, 0, pos, title); mvwaddch(widget->window, 0, right, ACS_LTEE | COLOR_PAIR(GNT_COLOR_NORMAL)); g_free(title); } @@ -352,11 +352,6 @@ GntBox *box = GNT_BOX(widget); int wchange, hchange; - if (widget->priv.width != width && !GNT_WIDGET_IS_FLAG_SET(widget, GNT_WIDGET_GROW_X)) - return FALSE; - if (widget->priv.height != height && !GNT_WIDGET_IS_FLAG_SET(widget, GNT_WIDGET_GROW_Y)) - return FALSE; - if (!box->list) return TRUE; @@ -387,13 +382,21 @@ gnt_widget_get_size(GNT_WIDGET(i->data), &tw, &th); if (box->vertical) { - if (!gnt_widget_confirm_size(i->data, tw - wchange, th)) - return FALSE; + if (!gnt_widget_confirm_size(i->data, tw - wchange, th)) { + /* If we are decreasing the size and the widget is going + * to be too large to fit into the box, then do not allow + * resizing. */ + if (wchange > 0 && tw >= widget->priv.width) + return FALSE; + } } else { - if (!gnt_widget_confirm_size(i->data, tw, th - hchange)) + if (!gnt_widget_confirm_size(i->data, tw, th - hchange)) { + if (hchange > 0 && th >= widget->priv.height) + return FALSE; return FALSE; + } } } #if 0 @@ -535,6 +538,7 @@ sizeof(GntBox), 0, /* n_preallocs */ gnt_box_init, /* instance_init */ + NULL /* value_table */ }; type = g_type_register_static(GNT_TYPE_WIDGET, @@ -561,17 +565,6 @@ { b->list = g_list_append(b->list, widget); widget->parent = GNT_WIDGET(b); - - if (b->vertical) - { - if (!GNT_WIDGET_IS_FLAG_SET(widget, GNT_WIDGET_GROW_X)) - GNT_WIDGET_UNSET_FLAGS(GNT_WIDGET(b), GNT_WIDGET_GROW_X); - } - else - { - if (!GNT_WIDGET_IS_FLAG_SET(widget, GNT_WIDGET_GROW_Y)) - GNT_WIDGET_UNSET_FLAGS(GNT_WIDGET(b), GNT_WIDGET_GROW_Y); - } } void gnt_box_set_title(GntBox *b, const char *title) Modified: trunk/console/libgnt/gntbox.h =================================================================== --- trunk/console/libgnt/gntbox.h 2007-03-28 12:42:19 UTC (rev 18219) +++ trunk/console/libgnt/gntbox.h 2007-03-30 05:49:39 UTC (rev 18220) @@ -11,8 +11,8 @@ #define GNT_IS_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_BOX)) #define GNT_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_BOX, GntBoxClass)) -typedef struct _GnBox GntBox; -typedef struct _GnBoxClass GntBoxClass; +typedef struct _GntBox GntBox; +typedef struct _GntBoxClass GntBoxClass; typedef enum { @@ -27,7 +27,7 @@ GNT_ALIGN_BOTTOM } GntAlignment; -struct _GnBox +struct _GntBox { GntWidget parent; @@ -49,7 +49,7 @@ void (*gnt_reserved4)(void); }; -struct _GnBoxClass +struct _GntBoxClass { GntWidgetClass parent; Modified: trunk/console/libgnt/gntbutton.c =================================================================== --- trunk/console/libgnt/gntbutton.c 2007-03-28 12:42:19 UTC (rev 18219) +++ trunk/console/libgnt/gntbutton.c 2007-03-30 05:49:39 UTC (rev 18220) @@ -22,7 +22,7 @@ type = GNT_COLOR_NORMAL; wbkgdset(widget->window, '\0' | COLOR_PAIR(type)); - mvwprintw(widget->window, 1, 2, button->priv->text); + mvwaddstr(widget->window, 1, 2, button->priv->text); GNTDEBUG; } @@ -87,8 +87,6 @@ GntButton *button = GNT_BUTTON(instance); button->priv = g_new0(GntButtonPriv, 1); - GNT_WIDGET_SET_FLAGS(widget, GNT_WIDGET_GROW_X); - widget->priv.minw = 4; widget->priv.minh = 3; GNTDEBUG; @@ -112,6 +110,7 @@ sizeof(GntButton), 0, /* n_preallocs */ gnt_button_init, /* instance_init */ + NULL /* value_table */ }; type = g_type_register_static(GNT_TYPE_WIDGET, Modified: trunk/console/libgnt/gntbutton.h =================================================================== --- trunk/console/libgnt/gntbutton.h 2007-03-28 12:42:19 UTC (rev 18219) +++ trunk/console/libgnt/gntbutton.h 2007-03-30 05:49:39 UTC (rev 18220) @@ -13,16 +13,16 @@ #define GNT_IS_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_BUTTON)) #define GNT_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_BUTTON, GntButtonClass)) -typedef struct _GnButton GntButton; -typedef struct _GnButtonPriv GntButtonPriv; -typedef struct _GnButtonClass GntButtonClass; +typedef struct _GntButton GntButton; +typedef struct _GntButtonPriv GntButtonPriv; +typedef struct _GntButtonClass GntButtonClass; -struct _GnButtonPriv +struct _GntButtonPriv { char *text; }; -struct _GnButton +struct _GntButton { GntWidget parent; @@ -34,7 +34,7 @@ void (*gnt_reserved4)(void); }; -struct _GnButtonClass +struct _GntButtonClass { GntWidgetClass parent; Modified: trunk/console/libgnt/gntcheckbox.c =================================================================== --- trunk/console/libgnt/gntcheckbox.c 2007-03-28 12:42:19 UTC (rev 18219) +++ trunk/console/libgnt/gntcheckbox.c 2007-03-30 05:49:39 UTC (rev 18220) @@ -24,11 +24,11 @@ wbkgdset(widget->window, '\0' | COLOR_PAIR(type)); text = g_strdup_printf("[%c]", cb->checked ? 'X' : ' '); - mvwprintw(widget->window, 0, 0, text); + mvwaddstr(widget->window, 0, 0, text); g_free(text); wbkgdset(widget->window, '\0' | COLOR_PAIR(GNT_COLOR_NORMAL)); - mvwprintw(widget->window, 0, 4, GNT_BUTTON(cb)->priv->text); + mvwaddstr(widget->window, 0, 4, GNT_BUTTON(cb)->priv->text); GNTDEBUG; } @@ -117,6 +117,7 @@ sizeof(GntCheckBox), 0, /* n_preallocs */ gnt_check_box_init, /* instance_init */ + NULL /* value_table */ }; type = g_type_register_static(GNT_TYPE_BUTTON, Modified: trunk/console/libgnt/gntcheckbox.h =================================================================== --- trunk/console/libgnt/gntcheckbox.h 2007-03-28 12:42:19 UTC (rev 18219) +++ trunk/console/libgnt/gntcheckbox.h 2007-03-30 05:49:39 UTC (rev 18220) @@ -17,17 +17,17 @@ #define GNT_CHECK_BOX_SET_FLAGS(obj, flags) (GNT_CHECK_BOX_FLAGS(obj) |= flags) #define GNT_CHECK_BOX_UNSET_FLAGS(obj, flags) (GNT_CHECK_BOX_FLAGS(obj) &= ~(flags)) -typedef struct _GnCheckBox GntCheckBox; -typedef struct _GnCheckBoxPriv GntCheckBoxPriv; -typedef struct _GnCheckBoxClass GntCheckBoxClass; +typedef struct _GntCheckBox GntCheckBox; +typedef struct _GntCheckBoxPriv GntCheckBoxPriv; +typedef struct _GntCheckBoxClass GntCheckBoxClass; -struct _GnCheckBox +struct _GntCheckBox { GntButton parent; gboolean checked; }; -struct _GnCheckBoxClass +struct _GntCheckBoxClass { GntButtonClass parent; Added: trunk/console/libgnt/gntclipboard.c =================================================================== --- trunk/console/libgnt/gntclipboard.c (rev 0) +++ trunk/console/libgnt/gntclipboard.c 2007-03-30 05:49:39 UTC (rev 18220) @@ -0,0 +1,74 @@ +#include "gntclipboard.h" + +gchar *string; + +enum { + SIG_CLIPBOARD = 0, + SIGS +}; + +static guint signals[SIGS] = { 0 }; + +static void +gnt_clipboard_class_init(GntClipboardClass *klass) +{ + signals[SIG_CLIPBOARD] = + g_signal_new("clipboard_changed", + G_TYPE_FROM_CLASS(klass), + G_SIGNAL_RUN_LAST, + 0, + NULL, NULL, + g_cclosure_marshal_VOID__POINTER, + G_TYPE_NONE, 1, G_TYPE_POINTER); + +} + +/****************************************************************************** + * GntClipboard API + *****************************************************************************/ + +void +gnt_clipboard_set_string(GntClipboard *clipboard, gchar *string) +{ + g_free(clipboard->string); + clipboard->string = g_strdup(string); + g_signal_emit(clipboard, signals[SIG_CLIPBOARD], 0, clipboard->string); +} + +gchar * +gnt_clipboard_get_string(GntClipboard *clipboard) +{ + return g_strdup(clipboard->string); +} + +static void gnt_clipboard_init(GTypeInstance *instance, gpointer class) { + GntClipboard *clipboard = GNT_CLIPBOARD(instance); + clipboard->string = g_strdup(""); +} + +GType +gnt_clipboard_get_gtype(void) +{ + static GType type = 0; + + if (type == 0) { + static const GTypeInfo info = { + sizeof(GntClipboardClass), + NULL, /* base_init */ + NULL, /* base_finalize */ + (GClassInitFunc)gnt_clipboard_class_init, + NULL, + NULL, /* class_data */ + sizeof(GntClipboard), + 0, /* n_preallocs */ + gnt_clipboard_init, /* instance_init */ + NULL /* value_table */ + }; + + type = g_type_register_static(G_TYPE_OBJECT, + "GntClipboard", + &info, 0); + } + + return type; +} Property changes on: trunk/console/libgnt/gntclipboard.c ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: trunk/console/libgnt/gntclipboard.h =================================================================== --- trunk/console/libgnt/gntclipboard.h (rev 0) +++ trunk/console/libgnt/gntclipboard.h 2007-03-30 05:49:39 UTC (rev 18220) @@ -0,0 +1,46 @@ +#ifndef GNT_CLIPBOARD_H +#define GNT_CLIPBOARD_H + +#include <stdio.h> +#include <glib.h> +#include <glib-object.h> + +#define GNT_TYPE_CLIPBOARD (gnt_clipboard_get_gtype()) +#define GNT_CLIPBOARD(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GNT_TYPE_CLIPBOARD, GntClipboard)) +#define GNT_CLIPBOARD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GNT_TYPE_CLIPBOARD, GntClipboardClass)) +#define GNT_IS_CLIPBOARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GNT_TYPE_CLIPBOARD)) +#define GNT_IS_CLIPBOARD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_CLIPBOARD)) +#define GNT_CLIPBOARD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_CLIPBOARD, GntClipboardClass)) + +#define GNTDEBUG g_printerr("%s\n", __FUNCTION__) + +typedef struct _GntClipboard GntClipboard; +typedef struct _GntClipboardClass GntClipboardClass; + +struct _GntClipboard +{ + GObject inherit; + gchar *string; +}; + +struct _GntClipboardClass +{ + GObjectClass parent; + + void (*gnt_reserved1)(void); + void (*gnt_reserved2)(void); + void (*gnt_reserved3)(void); + void (*gnt_reserved4)(void); +}; + +G_BEGIN_DECLS + +GType gnt_clipboard_get_gtype(void); + +gchar *gnt_clipboard_get_string(GntClipboard *clip); + +void gnt_clipboard_set_string(GntClipboard *clip, gchar *string); + +G_END_DECLS + +#endif Property changes on: trunk/console/libgnt/gntclipboard.h ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Modified: trunk/console/libgnt/gntcolors.c =================================================================== --- trunk/console/libgnt/gntcolors.c 2007-03-28 12:42:19 UTC (rev 18219) +++ trunk/console/libgnt/gntcolors.c 2007-03-30 05:49:39 UTC (rev 18220) @@ -161,7 +161,7 @@ while (nkeys--) { gsize len; - char *key = keys[nkeys]; + gchar *key = keys[nkeys]; char **list = g_key_file_get_string_list(kfile, "colors", key, &len, NULL); if (len == 3) { @@ -170,8 +170,9 @@ int b = atoi(list[2]); int color = -1; - g_ascii_strdown(key, -1); + key = g_ascii_strdown(key, -1); color = get_color(key); + g_free(key); if (color == -1) continue; @@ -204,17 +205,21 @@ while (nkeys--) { gsize len; - char *key = keys[nkeys]; + gchar *key = keys[nkeys]; char **list = g_key_file_get_string_list(kfile, "colorpairs", key, &len, NULL); if (len == 2) { GntColorType type = 0; - int fg = get_color(g_ascii_strdown(list[0], -1)); - int bg = get_color(g_ascii_strdown(list[1], -1)); + gchar *fgc = g_ascii_strdown(list[0], -1); + gchar *bgc = g_ascii_strdown(list[1], -1); + int fg = get_color(fgc); + int bg = get_color(bgc); + g_free(fgc); + g_free(bgc); if (fg == -1 || bg == -1) continue; - g_ascii_strdown(key, -1); + key = g_ascii_strdown(key, -1); if (strcmp(key, "normal") == 0) type = GNT_COLOR_NORMAL; @@ -234,8 +239,11 @@ type = GNT_COLOR_DISABLED; else if (strcmp(key, "urgent") == 0) type = GNT_COLOR_URGENT; - else + else { + g_free(key); continue; + } + g_free(key); init_pair(type, fg, bg); } Modified: trunk/console/libgnt/gntcolors.h =================================================================== --- trunk/console/libgnt/gntcolors.h 2007-03-28 12:42:19 UTC (rev 18219) +++ trunk/console/libgnt/gntcolors.h 2007-03-30 05:49:39 UTC (rev 18220) @@ -33,9 +33,9 @@ }; /* populate some default colors */ -void gnt_init_colors(); +void gnt_init_colors(void); -void gnt_uninit_colors(); +void gnt_uninit_colors(void); #if GLIB_CHECK_VERSION(2,6,0) void gnt_colors_parse(GKeyFile *kfile); Modified: trunk/console/libgnt/gntcombobox.c =================================================================== --- trunk/console/libgnt/gntcombobox.c 2007-03-28 12:42:19 UTC (rev 18219) +++ trunk/console/libgnt/gntcombobox.c 2007-03-30 05:49:39 UTC (rev 18220) @@ -33,6 +33,18 @@ } static void +hide_popup(GntComboBox *box, gboolean set) +{ + gnt_widget_set_size(box->dropdown, + box->dropdown->priv.width - 1, box->dropdown->priv.height); + if (set) + set_selection(box, gnt_tree_get_selection_data(GNT_TREE(box->dropdown))); + else + gnt_tree_set_selected(GNT_TREE(box->dropdown), box->selected); + gnt_widget_hide(box->dropdown->parent); +} + +static void gnt_combo_box_draw(GntWidget *widget) { GntComboBox *box = GNT_COMBO_BOX(widget); @@ -56,7 +68,7 @@ s = (char*)gnt_util_onscreen_width_to_pointer(text, widget->priv.width - 4, &len); *s = '\0'; - mvwprintw(widget->window, 1, 1, text); + mvwaddstr(widget->window, 1, 1, text); whline(widget->window, ' ' | COLOR_PAIR(type), widget->priv.width - 4 - len); mvwaddch(widget->window, 1, widget->priv.width - 3, ACS_VLINE | COLOR_PAIR(GNT_COLOR_NORMAL)); mvwaddch(widget->window, 1, widget->priv.width - 2, ACS_DARROW | COLOR_PAIR(GNT_COLOR_NORMAL)); @@ -121,12 +133,11 @@ { case '\r': case '\t': - set_selection(box, gnt_tree_get_selection_data(GNT_TREE(box->dropdown))); + hide_popup(box, TRUE); + return TRUE; case 27: - gnt_tree_set_selected(GNT_TREE(box->dropdown), box->selected); - gnt_widget_hide(box->dropdown->parent); + hide_popup(box, FALSE); return TRUE; - break; } } if (gnt_widget_key_pressed(box->dropdown, text)) @@ -159,7 +170,7 @@ { GntComboBox *combo = GNT_COMBO_BOX(widget); if (GNT_WIDGET_IS_FLAG_SET(combo->dropdown->parent, GNT_WIDGET_MAPPED)) - gnt_widget_hide(GNT_COMBO_BOX(widget)->dropdown->parent); + hide_popup(combo, FALSE); widget_lost_focus(widget); } @@ -177,8 +188,7 @@ gnt_widget_key_pressed(box->dropdown, GNT_KEY_DOWN); } else if (event == GNT_LEFT_MOUSE_DOWN) { if (dshowing) { - set_selection(box, gnt_tree_get_selection_data(GNT_TREE(box->dropdown))); - gnt_widget_hide(box->dropdown->parent); + hide_popup(box, TRUE); } else { popup_dropdown(GNT_COMBO_BOX(widget)); } @@ -188,6 +198,13 @@ } static void +gnt_combo_box_size_changed(GntWidget *widget, int oldw, int oldh) +{ + GntComboBox *box = GNT_COMBO_BOX(widget); + gnt_widget_set_size(box->dropdown, widget->priv.width - 1, box->dropdown->priv.height); +} + +static void gnt_combo_box_class_init(GntComboBoxClass *klass) { parent_class = GNT_WIDGET_CLASS(klass); @@ -198,6 +215,7 @@ parent_class->size_request = gnt_combo_box_size_request; parent_class->key_pressed = gnt_combo_box_key_pressed; parent_class->clicked = gnt_combo_box_clicked; + parent_class->size_changed = gnt_combo_box_size_changed; widget_lost_focus = parent_class->lost_focus; parent_class->lost_focus = gnt_combo_box_lost_focus; @@ -255,6 +273,7 @@ sizeof(GntComboBox), 0, /* n_preallocs */ gnt_combo_box_init, /* instance_init */ + NULL /* value_table */ }; type = g_type_register_static(GNT_TYPE_WIDGET, Modified: trunk/console/libgnt/gntcombobox.h =================================================================== --- trunk/console/libgnt/gntcombobox.h 2007-03-28 12:42:19 UTC (rev 18219) +++ trunk/console/libgnt/gntcombobox.h 2007-03-30 05:49:39 UTC (rev 18220) @@ -17,11 +17,11 @@ #define GNT_COMBO_BOX_SET_FLAGS(obj, flags) (GNT_COMBO_BOX_FLAGS(obj) |= flags) #define GNT_COMBO_BOX_UNSET_FLAGS(obj, flags) (GNT_COMBO_BOX_FLAGS(obj) &= ~(flags)) -typedef struct _GnComboBox GntComboBox; -typedef struct _GnComboBoxPriv GntComboBoxPriv; -typedef struct _GnComboBoxClass GntComboBoxClass; +typedef struct _GntComboBox GntComboBox; +typedef struct _GntComboBoxPriv GntComboBoxPriv; +typedef struct _GntComboBoxClass GntComboBoxClass; -struct _GnComboBox +struct _GntComboBox { GntWidget parent; @@ -30,7 +30,7 @@ void *selected; /* Currently selected key */ }; -struct _GnComboBoxClass +struct _GntComboBoxClass { GntWidgetClass parent; @@ -44,7 +44,7 @@ GType gnt_combo_box_get_gtype(void); -GntWidget *gnt_combo_box_new(); +GntWidget *gnt_combo_box_new(void); void gnt_combo_box_add_data(GntComboBox *box, gpointer key, const char *text); Modified: trunk/console/libgnt/gntentry.c =================================================================== --- trunk/console/libgnt/gntentry.c 2007-03-28 12:42:19 UTC (rev 18219) +++ trunk/console/libgnt/gntentry.c 2007-03-30 05:49:39 UTC (rev 18220) @@ -16,6 +16,7 @@ static GntWidgetClass *parent_class = NULL; +static gboolean gnt_entry_key_pressed(GntWidget *widget, const char *text); static void gnt_entry_set_text_internal(GntEntry *entry, const char *text); static void @@ -299,9 +300,37 @@ } static gboolean +clipboard_paste(GntBindable *bind, GList *n) +{ + GntEntry *entry = GNT_ENTRY(bind); + gchar *i, *text, *a, *all; + text = i = gnt_get_clipboard_string(); + while (*i != '\0') { + i = g_utf8_next_char(i); + if (*i == '\r' || *i == '\n') + *i = ' '; + } + a = g_strndup(entry->start, entry->cursor - entry->start); + all = g_strconcat(a, text, entry->cursor, NULL); + gnt_entry_set_text_internal(entry, all); + g_free(a); + g_free(text); + g_free(all); + return TRUE; +} + +static gboolean suggest_show(GntBindable *bind, GList *null) { - return show_suggest_dropdown(GNT_ENTRY(bind)); + GntEntry *entry = GNT_ENTRY(bind); + if (entry->ddown) { + if (g_list_length(GNT_TREE(entry->ddown)->list) == 1) + gnt_entry_key_pressed(GNT_WIDGET(entry), "\r"); + else + gnt_bindable_perform_action_named(GNT_BINDABLE(entry->ddown), "move-down"); + return TRUE; + } + return show_suggest_dropdown(entry); } static gboolean @@ -543,7 +572,7 @@ if (entry->end + len - entry->start >= entry->buffer) { /* This will cause the buffer to grow */ - char *tmp = g_strdup_printf("%s%*s", entry->start, len, ""); + char *tmp = g_strdup(entry->start); gnt_entry_set_text_internal(entry, tmp); g_free(tmp); } @@ -673,6 +702,8 @@ GNT_KEY_CTRL_DOWN, NULL); gnt_bindable_class_register_action(bindable, "history-next", history_next, GNT_KEY_CTRL_UP, NULL); + gnt_bindable_class_register_action(bindable, "clipboard-paste", clipboard_paste, + GNT_KEY_CTRL_V, NULL); gnt_style_read_actions(G_OBJECT_CLASS_TYPE(klass), GNT_BINDABLE_CLASS(klass)); GNTDEBUG; @@ -724,6 +755,7 @@ sizeof(GntEntry), 0, /* n_preallocs */ gnt_entry_init, /* instance_init */ + NULL /* value_table */ }; type = g_type_register_static(GNT_TYPE_WIDGET, Modified: trunk/console/libgnt/gntentry.h =================================================================== --- trunk/console/libgnt/gntentry.h 2007-03-28 12:42:19 UTC (rev 18219) +++ trunk/console/libgnt/gntentry.h 2007-03-30 05:49:39 UTC (rev 18220) @@ -19,9 +19,9 @@ #define ENTRY_CHAR '_' /* The character to use to fill in the blank places */ -typedef struct _GnEntry GntEntry; -typedef struct _GnEntryPriv GntEntryPriv; -typedef struct _GnEntryClass GntEntryClass; +typedef struct _GntEntry GntEntry; +typedef struct _GntEntryPriv GntEntryPriv; +typedef struct _GntEntryClass GntEntryClass; typedef enum { @@ -34,7 +34,7 @@ #define GNT_ENTRY_FLAG_ALL (GNT_ENTRY_FLAG_ALPHA | GNT_ENTRY_FLAG_INT) -struct _GnEntry +struct _GntEntry { GntWidget parent; @@ -60,7 +60,7 @@ GntWidget *ddown; /* The dropdown with the suggested list */ }; -struct _GnEntryClass +struct _GntEntryClass { GntWidgetClass parent; Modified: trunk/console/libgnt/gntfilesel.c =================================================================== --- trunk/console/libgnt/gntfilesel.c 2007-03-28 12:42:19 UTC (rev 18219) +++ trunk/console/libgnt/gntfilesel.c 2007-03-30 05:49:39 UTC (rev 18220) @@ -28,6 +28,11 @@ { GntFileSel *sel = GNT_FILE_SEL(widget); g_free(sel->current); + g_free(sel->suggest); + if (sel->tags) { + g_list_foreach(sel->tags, (GFunc)g_free, NULL); + g_list_free(sel->tags); + } } static char * @@ -66,13 +71,23 @@ { char *old; const char *tmp; - tmp = (const char*)gnt_tree_get_selection_data(sel->dirsonly ? GNT_TREE(sel->dirs) : GNT_TREE(sel->files)); + tmp = sel->suggest ? sel->suggest : + (const char*)gnt_tree_get_selection_data(sel->dirsonly ? GNT_TREE(sel->dirs) : GNT_TREE(sel->files)); old = g_strdup_printf("%s%s%s", sel->current, sel->current[1] ? G_DIR_SEPARATOR_S : "", tmp ? tmp : ""); gnt_entry_set_text(GNT_ENTRY(sel->location), old); g_free(old); } static gboolean +is_tagged(GntFileSel *sel, const char *f) +{ + char *ret = g_strdup_printf("%s%s%s", sel->current, sel->current[1] ? G_DIR_SEPARATOR_S : "", f); + gboolean find = g_list_find_custom(sel->tags, ret, (GCompareFunc)g_utf8_collate) != NULL; + g_free(ret); + return find; +} + +static gboolean location_changed(GntFileSel *sel, GError **err) { GDir *dir; @@ -109,15 +124,19 @@ if (stat(fp, &st)) { g_printerr("Error stating location %s\n", fp); } else { - if (S_ISDIR(st.st_mode)) + if (S_ISDIR(st.st_mode)) { gnt_tree_add_row_after(GNT_TREE(sel->dirs), g_strdup(str), gnt_tree_create_row(GNT_TREE(sel->dirs), str), NULL, NULL); - else if (!sel->dirsonly) { + if (sel->multiselect && sel->dirsonly && is_tagged(sel, str)) + gnt_tree_set_row_flags(GNT_TREE(sel->dirs), (gpointer)str, GNT_TEXT_FLAG_BOLD); + } else if (!sel->dirsonly) { char size[128]; snprintf(size, sizeof(size), "%ld", (long)st.st_size); gnt_tree_add_row_after(GNT_TREE(sel->files), g_strdup(str), gnt_tree_create_row(GNT_TREE(sel->files), str, size, ""), NULL, NULL); + if (sel->multiselect && is_tagged(sel, str)) + gnt_tree_set_row_flags(GNT_TREE(sel->files), (gpointer)str, GNT_TEXT_FLAG_BOLD); } } g_free(fp); @@ -131,7 +150,6 @@ dir_key_pressed(GntTree *tree, const char *key, GntFileSel *sel) { if (strcmp(key, "\r") == 0) { - /* XXX: if we are moving up the tree, make sure the current node is selected after the redraw */ char *str = g_strdup(gnt_tree_get_selection_data(tree)); char *path = g_build_filename(sel->current, str, NULL); char *dir = g_path_get_basename(sel->current); @@ -214,6 +232,8 @@ static void file_sel_changed(GntWidget *widget, gpointer old, gpointer current, GntFileSel *sel) { + g_free(sel->suggest); + sel->suggest = NULL; update_location(sel); } @@ -225,7 +245,7 @@ vbox = gnt_vbox_new(FALSE); gnt_box_set_pad(GNT_BOX(vbox), 0); - gnt_box_set_alignment(GNT_BOX(vbox), GNT_ALIGN_LEFT); + gnt_box_set_alignment(GNT_BOX(vbox), GNT_ALIGN_MID); /* The dir. and files list */ hbox = gnt_hbox_new(FALSE); @@ -253,9 +273,66 @@ update_location(sel); } +static gboolean +toggle_tag_selection(GntBindable *bind, GList *null) +{ + GntFileSel *sel = GNT_FILE_SEL(bind); + char *str; + GList *find; + char *file; + GntWidget *tree; + + if (!sel->multiselect) + return FALSE; + tree = sel->dirsonly ? sel->dirs : sel->files; + if (!gnt_widget_has_focus(tree)) + return FALSE; + + file = gnt_tree_get_selection_data(sel->dirsonly ? GNT_TREE(sel->dirs) : GNT_TREE(sel->files)); + + str = gnt_file_sel_get_selected_file(sel); + if ((find = g_list_find_custom(sel->tags, str, (GCompareFunc)g_utf8_collate)) != NULL) { + g_free(find->data); + sel->tags = g_list_delete_link(sel->tags, find); + gnt_tree_set_row_flags(GNT_TREE(tree), file, GNT_TEXT_FLAG_NORMAL); + g_free(str); + } else { + sel->tags = g_list_prepend(sel->tags, str); + gnt_tree_set_row_flags(GNT_TREE(tree), file, GNT_TEXT_FLAG_BOLD); + } + + gnt_bindable_perform_action_named(GNT_BINDABLE(tree), "move-down", NULL); + + return TRUE; +} + +static gboolean +clear_tags(GntBindable *bind, GList *null) +{ + GntFileSel *sel = GNT_FILE_SEL(bind); + GntWidget *tree; + GList *iter; + + if (!sel->multiselect) + return FALSE; + tree = sel->dirsonly ? sel->dirs : sel->files; + if (!gnt_widget_has_focus(tree)) + return FALSE; + + g_list_foreach(sel->tags, (GFunc)g_free, NULL); + g_list_free(sel->tags); + sel->tags = NULL; + + for (iter = GNT_TREE(tree)->list; iter; iter = iter->next) + gnt_tree_set_row_flags(GNT_TREE(tree), iter->data, GNT_TEXT_FLAG_NORMAL); + + return TRUE; +} + static void gnt_file_sel_class_init(GntFileSelClass *klass) { + GntBindableClass *bindable = GNT_BINDABLE_CLASS(klass); GntWidgetClass *kl = GNT_WIDGET_CLASS(klass); parent_class = GNT_WINDOW_CLASS(klass); kl->destroy = gnt_file_sel_destroy; @@ -270,6 +347,9 @@ NULL, NULL, gnt_closure_marshal_VOID__STRING_STRING, G_TYPE_NONE, 0); + + gnt_bindable_class_register_action(bindable, "toggle-tag", toggle_tag_selection, "t", NULL); + gnt_bindable_class_register_action(bindable, "clear-tags", clear_tags, "c", NULL); gnt_style_read_actions(G_OBJECT_CLASS_TYPE(klass), GNT_BINDABLE_CLASS(klass)); GNTDEBUG; @@ -312,7 +392,7 @@ return type; } -GntWidget *gnt_file_sel_new() +GntWidget *gnt_file_sel_new(void) { GntWidget *widget = g_object_new(GNT_TYPE_FILE_SEL, NULL); GntFileSel *sel = GNT_FILE_SEL(widget); @@ -375,12 +455,19 @@ return sel->dirsonly; } +void gnt_file_sel_set_suggested_filename(GntFileSel *sel, const char *suggest) +{ + sel->suggest = g_strdup(suggest); +} + char *gnt_file_sel_get_selected_file(GntFileSel *sel) { char *ret; - const char *tmp; - tmp = (const char*)gnt_tree_get_selection_data(sel->dirsonly ? GNT_TREE(sel->dirs) : GNT_TREE(sel->files)); - ret = g_strdup_printf("%s%s%s", sel->current, sel->current[1] ? G_DIR_SEPARATOR_S : "", tmp ? tmp : ""); + if (sel->dirsonly) { + ret = g_path_get_dirname(gnt_entry_get_text(GNT_ENTRY(sel->location))); + } else { + ret = g_strdup(gnt_entry_get_text(GNT_ENTRY(sel->location))); + } return ret; } @@ -395,3 +482,26 @@ return sel->must_exist; } +void gnt_file_sel_set_multi_select(GntFileSel *sel, gboolean set) +{ + sel->multiselect = set; +} + +GList *gnt_file_sel_get_selected_multi_files(GntFileSel *sel) +{ + GList *list = NULL, *iter; + char *str = gnt_file_sel_get_selected_file(sel); + + for (iter = sel->tags; iter; iter = iter->next) { + list = g_list_prepend(list, g_strdup(iter->data)); + if (g_utf8_collate(str, iter->data)) { + g_free(str); + str = NULL; + } + } + if (str) + list = g_list_prepend(list, str); + list = g_list_reverse(list); + return list; +} + Modified: trunk/console/libgnt/gntfilesel.h =================================================================== --- trunk/console/libgnt/gntfilesel.h 2007-03-28 12:42:19 UTC (rev 18219) +++ trunk/console/libgnt/gntfilesel.h 2007-03-30 05:49:39 UTC (rev 18220) @@ -17,11 +17,11 @@ #define GNT_FILE_SEL_SET_FLAGS(obj, flags) (GNT_FILE_SEL_FLAGS(obj) |= flags) #define GNT_FILE_SEL_UNSET_FLAGS(obj, flags) (GNT_FILE_SEL_FLAGS(obj) &= ~(flags)) -typedef struct _GnFileSel GntFileSel; -typedef struct _GnFileSelPriv GntFileSelPriv; -typedef struct _GnFileSelClass GntFileSelClass; +typedef struct _GntFileSel GntFileSel; +typedef struct _GntFileSelPriv GntFileSelPriv; +typedef struct _GntFileSelClass GntFileSelClass; -struct _GnFileSel +struct _GntFileSel { GntWindow parent; @@ -33,12 +33,15 @@ GntWidget *cancel; /* cancel button */ char *current; /* Full path of the current location */ + char *suggest; /* Suggested filename */ /* XXX: someone should make these useful */ gboolean must_exist; /* Make sure the selected file (the name entered in 'location') exists */ gboolean dirsonly; /* Show only directories */ + gboolean multiselect; + GList *tags; /* List of tagged files when multiselect is set */ }; -struct _GnFileSelClass +struct _GntFileSelClass { GntWindowClass parent; @@ -53,12 +56,10 @@ GType gnt_file_sel_get_gtype(void); -GntWidget *gnt_file_sel_new(); +GntWidget *gnt_file_sel_new(void); gboolean gnt_file_sel_set_current_location(GntFileSel *sel, const char *path); -const char *gnt_file_sel_get_current_location(GntFileSel *sel); - void gnt_file_sel_set_dirs_only(GntFileSel *sel, gboolean dirs); gboolean gnt_file_sel_get_dirs_only(GntFileSel *sel); @@ -69,6 +70,13 @@ char *gnt_file_sel_get_selected_file(GntFileSel *sel); /* The returned value should be free'd */ +GList *gnt_file_sel_get_selected_multi_files(GntFileSel *sel); + +void gnt_file_sel_set_multi_select(GntFileSel *sel, gboolean set); + +void gnt_file_sel_set_suggested_filename(GntFileSel *sel, const char *suggest); + G_END_DECLS #endif /* GNT_FILE_SEL_H */ + Modified: trunk/console/libgnt/gntkeys.c =================================================================== --- trunk/console/libgnt/gntkeys.c 2007-03-28 12:42:19 UTC (rev 18219) +++ trunk/console/libgnt/gntkeys.c 2007-03-30 05:49:39 UTC (rev 18220) @@ -1,5 +1,6 @@ #include "gntkeys.h" +#include <glib.h> #include <stdlib.h> #include <string.h> @@ -8,11 +9,16 @@ char *gnt_key_cleft; char *gnt_key_cright; - static const char *term; +static GHashTable *specials; void gnt_init_keys() { + const char *controls[] = {"", "c-", "ctrl-", "ctr-", "ctl-", NULL}; + const char *alts[] = {"", "alt-", "a-", "m-", "meta-", NULL}; + int c, a, ch; + char key[32]; + if (term == NULL) { term = getenv("TERM"); if (!term) @@ -30,11 +36,86 @@ gnt_key_cright = "\033" "Oc"; gnt_key_cleft = "\033" "Od"; } + + specials = g_hash_table_new(g_str_hash, g_str_equal); + +#define INSERT_KEY(k, code) do { \ + g_hash_table_insert(specials, g_strdup(k), g_strdup(code)); \ + gnt_keys_add_combination(code); \ + } while (0) + + INSERT_KEY("home", GNT_KEY_HOME); + INSERT_KEY("end", GNT_KEY_END); + INSERT_KEY("pageup", GNT_KEY_PGUP); + INSERT_KEY("pagedown", GNT_KEY_PGDOWN); + INSERT_KEY("insert", GNT_KEY_INS); + INSERT_KEY("delete", GNT_KEY_DEL); + + INSERT_KEY("left", GNT_KEY_LEFT); + INSERT_KEY("right", GNT_KEY_RIGHT); + INSERT_KEY("up", GNT_KEY_UP); + INSERT_KEY("down", GNT_KEY_DOWN); + + INSERT_KEY("tab", "\t"); + INSERT_KEY("menu", GNT_KEY_POPUP); + + INSERT_KEY("f1", GNT_KEY_F1); + INSERT_KEY("f2", GNT_KEY_F2); + INSERT_KEY("f3", GNT_KEY_F3); + INSERT_KEY("f4", GNT_KEY_F4); + INSERT_KEY("f5", GNT_KEY_F5); + INSERT_KEY("f6", GNT_KEY_F6); + INSERT_KEY("f7", GNT_KEY_F7); + INSERT_KEY("f8", GNT_KEY_F8); + INSERT_KEY("f9", GNT_KEY_F9); + INSERT_KEY("f10", GNT_KEY_F10); + INSERT_KEY("f11", GNT_KEY_F11); + INSERT_KEY("f12", GNT_KEY_F12); + +#define REM_LENGTH (sizeof(key) - (cur - key)) +#define INSERT_COMB(k, code) do { \ + snprintf(key, sizeof(key), "%s%s%s", controls[c], alts[a], k); \ + INSERT_KEY(key, code); \ + } while (0); + + /* Lower-case alphabets */ + for (a = 0, c = 0; controls[c]; c++, a = 0) { + if (c) { + INSERT_COMB("up", gnt_key_cup); + INSERT_COMB("down", gnt_key_cdown); + INSERT_COMB("left", gnt_key_cleft); + INSERT_COMB("right", gnt_key_cright); + } + + for (a = 0; alts[a]; a++) { + for (ch = 0; ch < 26; ch++) { + char str[2] = {'a' + ch, 0}, code[4] = "\0\0\0\0"; + int ind = 0; + if (a) + code[ind++] = '\033'; + code[ind] = (c ? 1 : 'a') + ch; + INSERT_COMB(str, code); + } + } + } + c = 0; + for (a = 0; alts[a]; a++) { + /* Upper-case alphabets */ + for (ch = 0; ch < 26; ch++) { + char str[2] = {'A' + ch, 0}, code[] = {'\033', 'A' + ch, 0}; + INSERT_COMB(str, code); + } + /* Digits */ + for (ch = 0; ch < 10; ch++) { + char str[2] = {'0' + ch, 0}, code[] = {'\033', '0' + ch, 0}; + INSERT_COMB(str, code); + } + } } void gnt_keys_refine(char *text) { - if (*text == 27 && *(text + 1) == '[' && *(text + 3) == '\0' && + if (*text == 27 && *(text + 1) == '[' && (*(text + 2) >= 'A' && *(text + 2) <= 'D')) { /* Apparently this is necessary for urxvt and screen and xterm */ if (strcmp(term, "screen") == 0 || strcmp(term, "rxvt-unicode") == 0 || @@ -48,3 +129,115 @@ } } +const char *gnt_key_translate(const char *name) +{ + return g_hash_table_lookup(specials, name); +} + +/** + * The key-bindings will be saved in a tree. When a keystroke happens, GNT will + * find the sequence that matches a binding and return the length. + * A sequence should not be a prefix of another sequence. If it is, then only + * the shortest one will be processed. If we want to change that, we will need + * to allow getting the k-th prefix that matches the input, and pay attention + * to the return value of gnt_wm_process_input in gntmain.c. + */ +#define SIZE 256 + +#define IS_END 1 << 0 +struct _node +{ + struct _node *next[SIZE]; + int ref; + int flags; +}; + +static struct _node root = {.ref = 1, .flags = 0}; + +static void add_path(struct _node *node, const char *path) +{ + struct _node *n = NULL; + if (!path || !*path) { + node->flags |= IS_END; + return; + } + while (*path && node->next[*path]) { + node = node->next[*path]; + node->ref++; + path++; + } + if (!*path) + return; + n = g_new0(struct _node, 1); + n->ref = 1; + node->next[*path++] = n; + add_path(n, path); +} + +void gnt_keys_add_combination(const char *path) +{ + add_path(&root, path); +} + +static void del_path(struct _node *node, const char *path) +{ + struct _node *next = NULL; + + if (!*path) + return; + next = node->next[*path]; + if (!next) + return; + del_path(next, path + 1); + next->ref--; + if (next->ref == 0) { + node->next[*path] = NULL; + g_free(next); + } +} + +void gnt_keys_del_combination(const char *path) +{ + del_path(&root, path); +} + +int gnt_keys_find_combination(const char *path) +{ + int depth = 0; + struct _node *n = &root; + + root.flags &= ~IS_END; + while (*path && n->next[*path] && !(n->flags & IS_END)) { + if (g_utf8_find_next_char(path, NULL) - path > 1) + return 0; + n = n->next[*path++]; + depth++; + } + + if (!(n->flags & IS_END)) + depth = 0; + return depth; +} + +static void +print_path(struct _node *node, int depth) +{ + int i; + for (i = 0; i < SIZE; i++) { + if (node->next[i]) { + g_printerr("%*c (%d:%d)\n", depth * 4, i, node->next[i]->ref, + node->next[i]->flags); + print_path(node->next[i], depth + 1); + } + } +} + +/* this is purely for debugging purposes. */ +void gnt_keys_print_combinations(void); +void gnt_keys_print_combinations() +{ + g_printerr("--------\n"); + print_path(&root, 1); + g_printerr("--------\n"); +} + Modified: trunk/console/libgnt/gntkeys.h =================================================================== --- trunk/console/libgnt/gntkeys.h 2007-03-28 12:42:19 UTC (rev 18219) +++ trunk/console/libgnt/gntkeys.h 2007-03-30 05:49:39 UTC (rev 18220) @@ -79,10 +79,15 @@ /** * This will do stuff with the terminal settings and stuff. */ -void gnt_init_keys(); +void gnt_init_keys(void); void gnt_keys_refine(char *text); +const char *gnt_key_translate(const char *name); +void gnt_keys_add_combination(const char *path); +void gnt_keys_del_combination(const char *path); +int gnt_keys_find_combination(const char *path); + /* A lot of commonly used variable names are defined in <term.h>. * #undef them to make life easier for everyone. */ Modified: trunk/console/libgnt/gntlabel.c =================================================================== --- trunk/console/libgnt/gntlabel.c 2007-03-28 12:42:19 UTC (rev 18219) +++ trunk/console/libgnt/gntlabel.c 2007-03-30 05:49:39 UTC (rev 18220) @@ -24,7 +24,7 @@ chtype flag = gnt_text_format_flag_to_chtype(label->flags); wbkgdset(widget->window, '\0' | flag); - mvwprintw(widget->window, 0, 0, label->text); + mvwaddstr(widget->window, 0, 0, label->text); GNTDEBUG; } @@ -80,6 +80,7 @@ sizeof(GntLabel), 0, /* n_preallocs */ gnt_label_init, /* instance_init */ + NULL /* value_table */ }; type = g_type_register_static(GNT_TYPE_WIDGET, Modified: trunk/console/libgnt/gntlabel.h =================================================================== --- trunk/console/libgnt/gntlabel.h 2007-03-28 12:42:19 UTC (rev 18219) +++ trunk/console/libgnt/gntlabel.h 2007-03-30 05:49:39 UTC (rev 18220) @@ -12,10 +12,10 @@ #define GNT_IS_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_LABEL)) #define GNT_LABEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_LABEL, GntLabelClass)) -typedef struct _GnLabel GntLabel; -typedef struct _GnLabelClass GntLabelClass; +typedef struct _GntLabel GntLabel; +typedef struct _GntLabelClass GntLabelClass; -struct _GnLabel +struct _GntLabel { GntWidget parent; @@ -28,7 +28,7 @@ void (*gnt_reserved4)(void); }; -struct _GnLabelClass +struct _GntLabelClass { GntWidgetClass parent; Modified: trunk/console/libgnt/gntline.c =================================================================== --- trunk/console/libgnt/gntline.c 2007-03-28 12:42:19 UTC (rev 18219) +++ trunk/console/libgnt/gntline.c 2007-03-30 05:49:39 UTC (rev 18220) @@ -83,6 +83,7 @@ sizeof(GntLine), 0, /* n_preallocs */ gnt_line_init, /* instance_init */ + NULL /* value_table */ }; type = g_type_register_static(GNT_TYPE_WIDGET, Modified: trunk/console/libgnt/gntline.h =================================================================== --- trunk/console/libgnt/gntline.h 2007-03-28 12:42:19 UTC (rev 18219) +++ trunk/console/libgnt/gntline.h 2007-03-30 05:49:39 UTC (rev 18220) @@ -17,18 +17,18 @@ #define GNT_LINE_SET_FLAGS(obj, flags) (GNT_LINE_FLAGS(obj) |= flags) #define GNT_LINE_UNSET_FLAGS(obj, flags) (GNT_LINE_FLAGS(obj) &= ~(flags)) -typedef struct _GnLine GntLine; -typedef struct _GnLinePriv GntLinePriv; -typedef struct _GnLineClass GntLineClass; +typedef struct _GntLine GntLine; +typedef struct _GntLinePriv GntLinePriv; +typedef struct _GntLineClass GntLineClass; -struct _GnLine +struct _GntLine { GntWidget parent; gboolean vertical; }; -struct _GnLineClass +struct _GntLineClass { GntWidgetClass parent; Modified: trunk/console/libgnt/gntmain.c =================================================================== --- trunk/console/libgnt/gntmain.c 2007-03-28 12:42:19 UTC (rev 18219) +++ trunk/console/libgnt/gntmain.c 2007-03-30 05:49:39 UTC (rev 18220) @@ -7,9 +7,13 @@ #include <gmodule.h> +#include <sys/types.h> +#include <sys/wait.h> + #include "gnt.h" #include "gntbox.h" #include "gntcolors.h" +#include "gntclipboard.h" #include "gntkeys.h" #include "gntmenu.h" #include "gntstyle.h" @@ -28,9 +32,6 @@ #include <ctype.h> #include <errno.h> -#include <sys/types.h> -#include <sys/wait.h> - /** * Notes: Interesting functions to look at: * scr_dump, scr_init, scr_restore: for workspaces @@ -43,12 +44,27 @@ static gboolean ascii_only; static gboolean mouse_enabled; -static void setup_io(); +static void setup_io(void); static gboolean refresh_screen(); GntWM *wm; +static GntClipboard *clipboard; +#define HOLDING_ESCAPE (escape_stuff.timer != 0) + +static struct { + int timer; +} escape_stuff; + +static gboolean +escape_timeout(gpointer data) +{ + gnt_wm_process_input(wm, "\033"); + escape_stuff.timer = 0; + return FALSE; +} + /** * Mouse support: * - bring a window on top if you click on its taskbar @@ -178,7 +194,8 @@ io_invoke(GIOChannel *source, GIOCondition cond, gpointer null) { char keys[256]; - int rd = read(STDIN_FILENO, keys, sizeof(keys) - 1); + int rd = read(STDIN_FILENO, keys + HOLDING_ESCAPE, sizeof(keys) - 1 - HOLDING_ESCAPE); + char *k; if (rd < 0) { int ch = getch(); /* This should return ERR, but let's see what it really returns */ @@ -194,14 +211,39 @@ raise(SIGABRT); } + rd += HOLDING_ESCAPE; keys[rd] = 0; - gnt_keys_refine(keys); - if (mouse_enabled && detect_mouse_action(keys)) return TRUE; - - gnt_wm_process_input(wm, keys); + if (HOLDING_ESCAPE) + keys[0] = '\033'; + k = keys; + while (rd) { + char back; + int p; + + if (k[0] == '\033' && rd == 1) { + if (escape_stuff.timer) { + gnt_wm_process_input(wm, "\033\033"); + g_source_remove(escape_stuff.timer); + escape_stuff.timer = 0; + break; + } + escape_stuff.timer = g_timeout_add(250, escape_timeout, NULL); + break; + } + + gnt_keys_refine(k); + p = MAX(1, gnt_keys_find_combination(k)); + back = k[p]; + k[p] = '\0'; + gnt_wm_process_input(wm, k); /* XXX: */ + k[p] = back; + rd -= p; + k += p; + } + return TRUE; } @@ -210,10 +252,11 @@ { int result; channel = g_io_channel_unix_new(STDIN_FILENO); + g_io_channel_set_close_on_unref(channel, TRUE); +#if 0 g_io_channel_set_encoding(channel, NULL, NULL); g_io_channel_set_buffered(channel, FALSE); -#if 0 g_io_channel_set_flags(channel, G_IO_FLAG_NONBLOCK, NULL ); #endif @@ -303,10 +346,10 @@ if (channel) return; + locale = setlocale(LC_ALL, ""); + setup_io(); - locale = setlocale(LC_ALL, ""); - if (locale && (strstr(locale, "UTF") || strstr(locale, "utf"))) ascii_only = FALSE; else @@ -317,6 +360,7 @@ noecho(); curs_set(0); + gnt_init_keys(); gnt_init_styles(); filename = g_build_filename(g_get_home_dir(), ".gntrc", NULL); @@ -324,7 +368,6 @@ g_free(filename); gnt_init_colors(); - gnt_init_keys(); wbkgdset(stdscr, '\0' | COLOR_PAIR(GNT_COLOR_NORMAL)); refresh(); @@ -347,6 +390,8 @@ g_type_init(); init_wm(); + + clipboard = g_object_new(GNT_TYPE_CLIPBOARD, NULL); } void gnt_main() @@ -475,3 +520,16 @@ return TRUE; } +void gnt_set_clipboard_string(gchar *string) +{ + gnt_clipboard_set_string(clipboard, string); +} + +GntClipboard *gnt_get_clipboard() +{ + return clipboard; +} +gchar *gnt_get_clipboard_string() +{ + return gnt_clipboard_get_string(clipboard); +} Modified: trunk/console/libgnt/gntmenu.c =================================================================== --- trunk/console/libgnt/gntmenu.c 2007-03-28 12:42:19 UTC (rev 18219) +++ trunk/console/libgnt/gntmenu.c 2007-03-30 05:49:39 UTC (rev 18220) @@ -28,7 +28,7 @@ werase(widget->window); for (i = 0, iter = menu->list; iter; iter = iter->next, i++) { - GntMenuItem *item = GNT_MENUITEM(iter->data); + GntMenuItem *item = GNT_MENU_ITEM(iter->data); type = ' ' | COLOR_PAIR(GNT_COLOR_HIGHLIGHT); if (i == menu->selected) type |= A_REVERSE; @@ -61,10 +61,10 @@ static void menu_tree_add(GntMenu *menu, GntMenuItem *item, GntMenuItem *parent) { - if (GNT_IS_MENUITEM_CHECK(item)) { + if (GNT_IS_MENU_ITEM_CHECK(item)) { gnt_tree_add_choice(GNT_TREE(menu), item, gnt_tree_create_row(GNT_TREE(menu), item->text, " "), parent, NULL); - gnt_tree_set_choice(GNT_TREE(menu), item, gnt_menuitem_check_get_checked(GNT_MENUITEM_CHECK(item))); + gnt_tree_set_choice(GNT_TREE(menu), item, gnt_menuitem_check_get_checked(GNT_MENU_ITEM_CHECK(item))); } else gnt_tree_add_row_last(GNT_TREE(menu), item, gnt_tree_create_row(GNT_TREE(menu), item->text, item->submenu ? ">" : " "), parent); @@ -73,7 +73,7 @@ GntMenu *sub = GNT_MENU(item->submenu); GList *iter; for (iter = sub->list; iter; iter = iter->next) { - GntMenuItem *it = GNT_MENUITEM(iter->data); + GntMenuItem *it = GNT_MENU_ITEM(iter->data); menu_tree_add(menu, it, item); } } @@ -91,7 +91,7 @@ GList *iter; gnt_tree_remove_all(GNT_TREE(widget)); for (iter = menu->list; iter; iter = iter->next) { - GntMenuItem *item = GNT_MENUITEM(iter->data); + GntMenuItem *item = GNT_MENU_ITEM(iter->data); menu_tree_add(menu, item, NULL); } org_map(widget); @@ -134,7 +134,8 @@ int current = menu->selected; if (menu->submenu) { - return (gnt_widget_key_pressed(GNT_WIDGET(menu->submenu), text)); + do menu = menu->submenu; while (menu->submenu); + return (gnt_widget_key_pressed(GNT_WIDGET(menu), text)); } if (text[0] == 27 && text[1] == 0) { @@ -184,10 +185,10 @@ static void gnt_menu_toggled(GntTree *tree, gpointer key) { - GntMenuItem *item = GNT_MENUITEM(key); + GntMenuItem *item = GNT_MENU_ITEM(key); GntMenu *menu = GNT_MENU(tree); - gboolean check = gnt_menuitem_check_get_checked(GNT_MENUITEM_CHECK(item)); - gnt_menuitem_check_set_checked(GNT_MENUITEM_CHECK(item), !check); + gboolean check = gnt_menuitem_check_get_checked(GNT_MENU_ITEM_CHECK(item)); + gnt_menuitem_check_set_checked(GNT_MENU_ITEM_CHECK(item), !check); if (item->callback) item->callback(item, item->callbackdata); while (menu) { @@ -209,7 +210,7 @@ } if (item) { - if (GNT_IS_MENUITEM_CHECK(item)) + if (GNT_IS_MENU_ITEM_CHECK(item)) gnt_menu_toggled(GNT_TREE(widget), item); else menuitem_activate(menu, item); @@ -277,6 +278,7 @@ sizeof(GntMenu), 0, /* n_preallocs */ gnt_menu_init, /* instance_init */ + NULL /* value_table */ }; type = g_type_register_static(GNT_TYPE_TREE, Modified: trunk/console/libgnt/gntmenu.h =================================================================== --- trunk/console/libgnt/gntmenu.h 2007-03-28 12:42:19 UTC (rev 18219) +++ trunk/console/libgnt/gntmenu.h 2007-03-30 05:49:39 UTC (rev 18220) @@ -16,9 +16,9 @@ #define GNT_MENU_SET_FLAGS(obj, flags) (GNT_MENU_FLAGS(obj) |= flags) #define GNT_MENU_UNSET_FLAGS(obj, flags) (GNT_MENU_FLAGS(obj) &= ~(flags)) -typedef struct _GnMenu GntMenu; -typedef struct _GnMenuPriv GntMenuPriv; -typedef struct _GnMenuClass GntMenuClass; +typedef struct _GntMenu GntMenu; +typedef struct _GntMenuPriv GntMenuPriv; +typedef struct _GntMenuClass GntMenuClass; #include "gntmenuitem.h" @@ -33,7 +33,7 @@ GNT_MENU_POPUP, /* A popup menu */ } GntMenuType; -struct _GnMenu +struct _GntMenu { GntTree parent; GntMenuType type; @@ -47,7 +47,7 @@ GntMenu *parentmenu; }; -struct _GnMenuClass +struct _GntMenuClass { GntTreeClass parent; Modified: trunk/console/libgnt/gntmenuitem.c =================================================================== --- trunk/console/libgnt/gntmenuitem.c 2007-03-28 12:42:19 UTC (rev 18219) +++ trunk/console/libgnt/gntmenuitem.c 2007-03-30 05:49:39 UTC (rev 18220) @@ -6,7 +6,7 @@ static void gnt_menuitem_destroy(GObject *obj) { - GntMenuItem *item = GNT_MENUITEM(obj); + GntMenuItem *item = GNT_MENU_ITEM(obj); g_free(item->text); item->text = NULL; if (item->submenu) @@ -48,6 +48,7 @@ sizeof(GntMenuItem), 0, /* n_preallocs */ gnt_menuitem_init, /* instance_init */ + NULL /* value_table */ }; type = g_type_register_static(G_TYPE_OBJECT, @@ -60,8 +61,8 @@ GntMenuItem *gnt_menuitem_new(const char *text) { - GObject *item = g_object_new(GNT_TYPE_MENUITEM, NULL); - GntMenuItem *menuitem = GNT_MENUITEM(item); + GObject *item = g_object_new(GNT_TYPE_MENU_ITEM, NULL); + GntMenuItem *menuitem = GNT_MENU_ITEM(item); menuitem->text = g_strdup(text); Modified: trunk/console/libgnt/gntmenuitem.h =================================================================== --- trunk/console/libgnt/gntmenuitem.h 2007-03-28 12:42:19 UTC (rev 18219) +++ trunk/console/libgnt/gntmenuitem.h 2007-03-30 05:49:39 UTC (rev 18220) @@ -4,24 +4,24 @@ #include <glib.h> #include <glib-object.h> -#define GNT_TYPE_MENUITEM (gnt_menuitem_get_gtype()) -#define GNT_MENUITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GNT_TYPE_MENUITEM, GntMenuItem)) -#define GNT_MENUITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GNT_TYPE_MENUITEM, GntMenuItemClass)) -#define GNT_IS_MENUITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GNT_TYPE_MENUITEM)) -#define GNT_IS_MENUITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_MENUITEM)) -#define GNT_MENUITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_MENUITEM, GntMenuItemClass)) +#define GNT_TYPE_MENU_ITEM (gnt_menuitem_get_gtype()) +#define GNT_MENU_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GNT_TYPE_MENU_ITEM, GntMenuItem)) +#define GNT_MENU_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GNT_TYPE_MENU_ITEM, GntMenuItemClass)) +#define GNT_IS_MENU_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GNT_TYPE_MENU_ITEM)) +#define GNT_IS_MENU_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_MENU_ITEM)) +#define GNT_MENU_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_MENU_ITEM, GntMenuItemClass)) -#define GNT_MENUITEM_FLAGS(obj) (GNT_MENUITEM(obj)->priv.flags) -#define GNT_MENUITEM_SET_FLAGS(obj, flags) (GNT_MENUITEM_FLAGS(obj) |= flags) -#define GNT_MENUITEM_UNSET_FLAGS(obj, flags) (GNT_MENUITEM_FLAGS(obj) &= ~(flags)) +#define GNT_MENU_ITEM_FLAGS(obj) (GNT_MENU_ITEM(obj)->priv.flags) +#define GNT_MENU_ITEM_SET_FLAGS(obj, flags) (GNT_MENU_ITEM_FLAGS(obj) |= flags) +#define GNT_MENU_ITEM_UNSET_FLAGS(obj, flags) (GNT_MENU_ITEM_FLAGS(obj) &= ~(flags)) -typedef struct _GnMenuItem GntMenuItem; -typedef struct _GnMenuItemPriv GntMenuItemPriv; -typedef struct _GnMenuItemClass GntMenuItemClass; +typedef struct _GntMenuItem GntMenuItem; +typedef struct _GntMenuItemPriv GntMenuItemPriv; +typedef struct _GntMenuItemClass GntMenuItemClass; #include "gntmenu.h" -struct _GnMenuItemPriv +struct _GntMenuItemPriv { /* These will be used to determine the position of the submenu */ int x; @@ -30,7 +30,7 @@ typedef void (*GntMenuItemCallback)(GntMenuItem *item, gpointer data); -struct _GnMenuItem +struct _GntMenuItem { GObject parent; GntMenuItemPriv priv; @@ -46,7 +46,7 @@ GntMenu *submenu; }; -struct _GnMenuItemClass +struct _GntMenuItemClass { GObjectClass parent; Modified: trunk/console/libgnt/gntmenuitemcheck.c =================================================================== --- trunk/console/libgnt/gntmenuitemcheck.c 2007-03-28 12:42:19 UTC (rev 18219) +++ trunk/console/libgnt/gntmenuitemcheck.c 2007-03-30 05:49:39 UTC (rev 18220) @@ -5,7 +5,7 @@ static void gnt_menuitem_check_class_init(GntMenuItemCheckClass *klass) { - parent_class = GNT_MENUITEM_CLASS(klass); + parent_class = GNT_MENU_ITEM_CLASS(klass); GNTDEBUG; } @@ -36,9 +36,10 @@ sizeof(GntMenuItemCheck), 0, /* n_preallocs */ gnt_menuitem_check_init, /* instance_init */ + NULL /* value_table */ }; - type = g_type_register_static(GNT_TYPE_MENUITEM, + type = g_type_register_static(GNT_TYPE_MENU_ITEM, "GntMenuItemCheck", &info, 0); } @@ -48,8 +49,8 @@ GntMenuItem *gnt_menuitem_check_new(const char *text) { - GntMenuItem *item = g_object_new(GNT_TYPE_MENUITEM_CHECK, NULL); - GntMenuItem *menuitem = GNT_MENUITEM(item); + GntMenuItem *item = g_object_new(GNT_TYPE_MENU_ITEM_CHECK, NULL); + GntMenuItem *menuitem = GNT_MENU_ITEM(item); menuitem->text = g_strdup(text); return item; Modified: trunk/console/libgnt/gntmenuitemcheck.h =================================================================== --- trunk/console/libgnt/gntmenuitemcheck.h 2007-03-28 12:42:19 UTC (rev 18219) +++ trunk/console/libgnt/gntmenuitemcheck.h 2007-03-30 05:49:39 UTC (rev 18220) @@ -1,33 +1,33 @@ -#ifndef GNT_MENUITEM_CHECK_H -#define GNT_MENUITEM_CHECK_H +#ifndef GNT_MENU_ITEM_CHECK_H +#define GNT_MENU_ITEM_CHECK_H #include "gnt.h" #include "gntcolors.h" #include "gntkeys.h" #include "gntmenuitem.h" -#define GNT_TYPE_MENUITEM_CHECK (gnt_menuitem_check_get_gtype()) -#define GNT_MENUITEM_CHECK(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GNT_TYPE_MENUITEM_CHECK, GntMenuItemCheck)) -#define GNT_MENUITEM_CHECK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GNT_TYPE_MENUITEM_CHECK, GntMenuItemCheckClass)) -#... [truncated message content] |
From: <fac...@us...> - 2007-03-28 12:42:20
|
Revision: 18219 http://svn.sourceforge.net/gaim/?rev=18219&view=rev Author: faceprint Date: 2007-03-28 05:42:19 -0700 (Wed, 28 Mar 2007) Log Message: ----------- fix that jabber duplicate buddy thing (ugh) Modified Paths: -------------- trunk/libgaim/protocols/jabber/presence.c Modified: trunk/libgaim/protocols/jabber/presence.c =================================================================== --- trunk/libgaim/protocols/jabber/presence.c 2007-03-27 21:15:40 UTC (rev 18218) +++ trunk/libgaim/protocols/jabber/presence.c 2007-03-28 12:42:19 UTC (rev 18219) @@ -286,7 +286,7 @@ if (buddy) { jb = jabber_buddy_find(js, from, TRUE); - if ((jb->subscription & JABBER_SUB_TO) == 0) + if ((jb->subscription & JABBER_SUB_TO)) onlist = TRUE; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lsc...@us...> - 2007-03-27 21:15:46
|
Revision: 18218 http://svn.sourceforge.net/gaim/?rev=18218&view=rev Author: lschiere Date: 2007-03-27 14:15:40 -0700 (Tue, 27 Mar 2007) Log Message: ----------- translation updates Modified Paths: -------------- trunk/po/es.po trunk/po/sk.po Modified: trunk/po/es.po =================================================================== --- trunk/po/es.po 2007-03-24 17:48:08 UTC (rev 18217) +++ trunk/po/es.po 2007-03-27 21:15:40 UTC (rev 18218) @@ -52,8 +52,8 @@ msgstr "" "Project-Id-Version: Gaim\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2007-01-19 00:00-0500\n" -"PO-Revision-Date: 2007-01-19 23:51+0100\n" +"POT-Creation-Date: 2007-03-26 00:00-0400\n" +"PO-Revision-Date: 2007-03-26 13:03+0200\n" "Last-Translator: Javier Fernández-Sanguino <jf...@de...>\n" "Language-Team: Spanish team <es...@li...>\n" "MIME-Version: 1.0\n" @@ -77,10 +77,10 @@ #: ../console/gntblist.c:390 ../console/gntblist.c:403 #: ../console/gntplugin.c:154 ../console/gntplugin.c:199 #: ../console/gntstatus.c:291 ../console/gntstatus.c:299 -#: ../libgaim/protocols/jabber/buddy.c:1399 +#: ../libgaim/protocols/jabber/buddy.c:1404 #: ../libgaim/protocols/jabber/chat.c:679 #: ../libgaim/protocols/jabber/chat.c:690 -#: ../libgaim/protocols/jabber/jabber.c:1210 +#: ../libgaim/protocols/jabber/jabber.c:1215 #: ../libgaim/protocols/qq/group_join.c:324 #: ../libgaim/protocols/silc/ops.c:1451 msgid "Error" @@ -149,11 +149,11 @@ #: ../libgaim/protocols/gg/gg.c:498 ../libgaim/protocols/gg/gg.c:656 #: ../libgaim/protocols/gg/gg.c:792 ../libgaim/protocols/gg/gg.c:871 #: ../libgaim/protocols/jabber/buddy.c:588 -#: ../libgaim/protocols/jabber/buddy.c:1761 -#: ../libgaim/protocols/jabber/buddy.c:1795 +#: ../libgaim/protocols/jabber/buddy.c:1766 +#: ../libgaim/protocols/jabber/buddy.c:1800 #: ../libgaim/protocols/jabber/chat.c:788 -#: ../libgaim/protocols/jabber/jabber.c:861 -#: ../libgaim/protocols/jabber/jabber.c:1365 +#: ../libgaim/protocols/jabber/jabber.c:864 +#: ../libgaim/protocols/jabber/jabber.c:1370 #: ../libgaim/protocols/jabber/xdata.c:338 ../libgaim/protocols/msn/msn.c:249 #: ../libgaim/protocols/msn/msn.c:264 ../libgaim/protocols/msn/msn.c:279 #: ../libgaim/protocols/msn/msn.c:294 ../libgaim/protocols/msn/msn.c:311 @@ -309,7 +309,7 @@ #: ../console/gntblist.c:369 ../gtk/gtkplugin.c:579 ../gtk/gtkroomlist.c:621 #: ../gtk/plugins/gevolution/add_buddy_dialog.c:132 #: ../gtk/plugins/gevolution/assoc-buddy.c:123 -#: ../libgaim/protocols/jabber/jabber.c:792 +#: ../libgaim/protocols/jabber/jabber.c:795 #: ../libgaim/protocols/msn/msn.c:1535 ../libgaim/protocols/msn/msn.c:1600 #: ../libgaim/protocols/msn/msn.c:1627 ../libgaim/protocols/qq/buddy_info.c:44 msgid "Name" @@ -443,10 +443,10 @@ #: ../libgaim/protocols/gg/gg.c:627 ../libgaim/protocols/gg/gg.c:1035 #: ../libgaim/protocols/gg/gg.c:1110 ../libgaim/protocols/gg/gg.c:2207 #: ../libgaim/protocols/jabber/buddy.c:274 -#: ../libgaim/protocols/jabber/buddy.c:814 -#: ../libgaim/protocols/jabber/buddy.c:1562 -#: ../libgaim/protocols/jabber/buddy.c:1744 -#: ../libgaim/protocols/jabber/jabber.c:802 +#: ../libgaim/protocols/jabber/buddy.c:819 +#: ../libgaim/protocols/jabber/buddy.c:1567 +#: ../libgaim/protocols/jabber/buddy.c:1749 +#: ../libgaim/protocols/jabber/jabber.c:805 #: ../libgaim/protocols/msn/msn.c:1370 ../libgaim/protocols/msn/msn.c:1538 #: ../libgaim/protocols/qq/buddy_info.c:43 #: ../libgaim/protocols/silc/buddy.c:1528 ../libgaim/protocols/silc/ops.c:1036 @@ -458,8 +458,8 @@ #. Idle stuff #: ../console/gntblist.c:1181 ../gtk/gtkblist.c:2754 ../gtk/gtkblist.c:3307 #: ../gtk/gtkprefs.c:1807 ../libgaim/protocols/bonjour/bonjour.c:333 -#: ../libgaim/protocols/jabber/buddy.c:645 -#: ../libgaim/protocols/jabber/buddy.c:683 ../libgaim/protocols/msn/msn.c:548 +#: ../libgaim/protocols/jabber/buddy.c:646 +#: ../libgaim/protocols/jabber/buddy.c:686 ../libgaim/protocols/msn/msn.c:548 #: ../libgaim/protocols/msn/state.c:32 #: ../libgaim/protocols/novell/novell.c:2860 #: ../libgaim/protocols/oscar/oscar.c:2873 @@ -531,7 +531,7 @@ #: ../gtk/gtkdialogs.c:684 ../gtk/gtkdialogs.c:821 ../gtk/gtkdialogs.c:912 #: ../gtk/gtkrequest.c:269 ../libgaim/account.c:960 ../libgaim/account.c:1148 #: ../libgaim/protocols/gg/gg.c:497 ../libgaim/protocols/gg/gg.c:655 -#: ../libgaim/protocols/gg/gg.c:791 ../libgaim/protocols/jabber/jabber.c:1364 +#: ../libgaim/protocols/gg/gg.c:791 ../libgaim/protocols/jabber/jabber.c:1369 #: ../libgaim/protocols/jabber/xdata.c:337 ../libgaim/protocols/msn/msn.c:248 #: ../libgaim/protocols/msn/msn.c:263 ../libgaim/protocols/msn/msn.c:278 #: ../libgaim/protocols/msn/msn.c:293 ../libgaim/protocols/oscar/oscar.c:6042 @@ -638,7 +638,9 @@ msgid "" "\n" "%s is typing..." -msgstr "\n%s está escribiendo..." +msgstr "" +"\n" +"%s está escribiendo..." #: ../console/gntconv.c:399 msgid "<AUTO-REPLY> " @@ -774,7 +776,7 @@ msgid "You have mail!" msgstr "¡Tiene correo!" -#: ../console/gntnotify.c:155 ../libgaim/protocols/jabber/jabber.c:1155 +#: ../console/gntnotify.c:155 ../libgaim/protocols/jabber/jabber.c:1160 msgid "From" msgstr "De" @@ -941,7 +943,7 @@ #: ../console/gntstatus.c:174 ../console/gntstatus.c:526 #: ../gtk/gtksavedstatuses.c:463 ../libgaim/protocols/jabber/buddy.c:286 -#: ../libgaim/protocols/jabber/buddy.c:931 +#: ../libgaim/protocols/jabber/buddy.c:936 #: ../libgaim/protocols/novell/novell.c:1484 msgid "Title" msgstr "Título" @@ -959,12 +961,12 @@ #: ../libgaim/protocols/gg/gg.c:1609 ../libgaim/protocols/gg/gg.c:1619 #: ../libgaim/protocols/gg/gg.c:1625 ../libgaim/protocols/gg/gg.c:1634 #: ../libgaim/protocols/gg/gg.c:1639 ../libgaim/protocols/irc/irc.c:244 -#: ../libgaim/protocols/jabber/jabber.c:1227 -#: ../libgaim/protocols/jabber/jabber.c:1237 -#: ../libgaim/protocols/jabber/jabber.c:1247 -#: ../libgaim/protocols/jabber/jabber.c:1257 -#: ../libgaim/protocols/jabber/jabber.c:1267 -#: ../libgaim/protocols/jabber/jabber.c:1279 +#: ../libgaim/protocols/jabber/jabber.c:1232 +#: ../libgaim/protocols/jabber/jabber.c:1242 +#: ../libgaim/protocols/jabber/jabber.c:1252 +#: ../libgaim/protocols/jabber/jabber.c:1262 +#: ../libgaim/protocols/jabber/jabber.c:1272 +#: ../libgaim/protocols/jabber/jabber.c:1284 #: ../libgaim/protocols/novell/novell.c:2873 #: ../libgaim/protocols/novell/novell.c:2976 #: ../libgaim/protocols/novell/novell.c:2982 @@ -1037,8 +1039,8 @@ #: ../libgaim/protocols/gg/gg.c:1024 ../libgaim/protocols/gg/gg.c:1588 #: ../libgaim/protocols/gg/gg.c:1596 ../libgaim/protocols/jabber/buddy.c:637 #: ../libgaim/protocols/jabber/buddy.c:641 -#: ../libgaim/protocols/jabber/buddy.c:674 -#: ../libgaim/protocols/jabber/jabber.c:1195 +#: ../libgaim/protocols/jabber/buddy.c:676 +#: ../libgaim/protocols/jabber/jabber.c:1200 #: ../libgaim/protocols/msn/msn.c:547 #: ../libgaim/protocols/novell/novell.c:2870 #: ../libgaim/protocols/oscar/oscar.c:800 @@ -1331,7 +1333,7 @@ msgstr "_Avanzadas" #. Register button -#: ../gtk/gtkaccount.c:1478 ../libgaim/protocols/jabber/jabber.c:860 +#: ../gtk/gtkaccount.c:1478 ../libgaim/protocols/jabber/jabber.c:863 msgid "Register" msgstr "Registrar" @@ -1358,7 +1360,9 @@ "<span size='larger' weight='bold'>¡Bienvenido a Gaim!</span>\n" "\n" "No tiene configurada ninguna cuenta de MI. Para conectarse con Gaim debe \n" -"pulsar el botón <b>Añadir</b> que tiene más abajo y configurar su primera cuenta. Si quiere que Gaim se conecte a múltiples cuentas de MI deberá pulsar <b>Añadir</b> otra vez para configurarlas todas." +"pulsar el botón <b>Añadir</b> que tiene más abajo y configurar su primera " +"cuenta. Si quiere que Gaim se conecte a múltiples cuentas de MI deberá " +"pulsar <b>Añadir</b> otra vez para configurarlas todas." #: ../gtk/gtkaccount.c:2483 #, c-format @@ -1609,7 +1613,7 @@ #: ../gtk/gtkblist.c:2798 ../gtk/gtkblist.c:3286 ../gtk/gtkdocklet.c:471 #: ../gtk/gtkstatusbox.c:990 ../libgaim/protocols/gg/gg.c:993 -#: ../libgaim/protocols/jabber/buddy.c:1401 +#: ../libgaim/protocols/jabber/buddy.c:1406 #: ../libgaim/protocols/novell/novell.c:2863 #: ../libgaim/protocols/oscar/oscar.c:807 #: ../libgaim/protocols/oscar/oscar.c:5551 ../libgaim/protocols/qq/qq.c:170 @@ -1620,7 +1624,7 @@ #: ../gtk/gtkblist.c:2809 ../gtk/gtkprefs.c:680 #: ../libgaim/protocols/jabber/buddy.c:289 -#: ../libgaim/protocols/jabber/buddy.c:937 +#: ../libgaim/protocols/jabber/buddy.c:942 #: ../libgaim/protocols/jabber/chat.c:777 msgid "Description" msgstr "Descripción" @@ -1751,7 +1755,10 @@ msgstr "" "<span size='larger' weight='bold'>¡Bienvenido a Gaim!</span>\n" "\n" -"No tiene ninguna cuenta activa. Puede activar sus cuentas de MI en la ventana de <b>Cuentas</b> en <b>Cuentas->Añadir/Editar</b>. Podrá conectarse, fijar su estado y hablar con sus amigos una vez active sus cuentas." +"No tiene ninguna cuenta activa. Puede activar sus cuentas de MI en la " +"ventana de <b>Cuentas</b> en <b>Cuentas->Añadir/Editar</b>. Podrá " +"conectarse, fijar su estado y hablar con sus amigos una vez active sus " +"cuentas." #. set the Show Offline Buddies option. must be done #. * after the treeview or faceprint gets mad. -Robot101 @@ -1862,7 +1869,8 @@ msgstr "" "%s\n" "\n" -"Gaim no intentará reconectarse a esta cuenta hasta que corrija el error y reactive la cuenta." +"Gaim no intentará reconectarse a esta cuenta hasta que corrija el error y " +"reactive la cuenta." #: ../gtk/gtkconv.c:766 ../gtk/gtkconv.c:792 msgid "That buddy is not on the same protocol as this chat." @@ -2595,7 +2603,16 @@ "file distributed with Gaim. Gaim is copyrighted by its contributors. See " "the 'COPYRIGHT' file for the complete list of contributors. We provide no " "warranty for this program.<BR><BR>" -msgstr "Gaim es un cliente de mensajería modular capaz de utilizar AIM, MSN, Yahoo!, Jabber, ICQ, IRC, SILC, SIP/SIMPLE, Novell GroupWise, Lotus Sametime, Bonjour, Zephyr, Gadu-Gadu y QQ todos al mismo tiempo. Está escrito utilizando GTK+.<BR><BR>Puede modificar y redistribuir este programa bajo los términos de la GPL (versión 2 o posterior). Se incluye una copia de la licencia GPL en el archivo «COPYING» que se distribuye con Gaim. Las personas que han contribuido a Gaim tienen los derechos de copia. Lea el archivo «COPYRIGHT» si desea consultar la lista completa de personas que han contribuido. Este programa se distribuye sin ninguna garantía.<BR><BR>" +msgstr "" +"Gaim es un cliente de mensajería modular capaz de utilizar AIM, MSN, Yahoo!, " +"Jabber, ICQ, IRC, SILC, SIP/SIMPLE, Novell GroupWise, Lotus Sametime, " +"Bonjour, Zephyr, Gadu-Gadu y QQ todos al mismo tiempo. Está escrito " +"utilizando GTK+.<BR><BR>Puede modificar y redistribuir este programa bajo " +"los términos de la GPL (versión 2 o posterior). Se incluye una copia de la " +"licencia GPL en el archivo «COPYING» que se distribuye con Gaim. Las " +"personas que han contribuido a Gaim tienen los derechos de copia. Lea el " +"archivo «COPYRIGHT» si desea consultar la lista completa de personas que han " +"contribuido. Este programa se distribuye sin ninguna garantía.<BR><BR>" #: ../gtk/gtkdialogs.c:350 msgid "<FONT SIZE=\"4\">IRC:</FONT> #wingaim on irc.freenode.net<BR><BR>" @@ -2775,7 +2792,7 @@ msgstr "Cambiar estado:" #: ../gtk/gtkdocklet.c:459 ../gtk/gtkstatusbox.c:987 -#: ../libgaim/protocols/gg/gg.c:996 ../libgaim/protocols/jabber/buddy.c:1403 +#: ../libgaim/protocols/gg/gg.c:996 ../libgaim/protocols/jabber/buddy.c:1408 #: ../libgaim/protocols/msn/state.c:29 ../libgaim/protocols/msn/state.c:30 #: ../libgaim/protocols/msn/state.c:37 ../libgaim/protocols/msn/state.c:38 #: ../libgaim/protocols/novell/novell.c:2851 @@ -2789,7 +2806,7 @@ #: ../gtk/gtkdocklet.c:463 ../gtk/gtkprefs.c:1821 ../gtk/gtkstatusbox.c:988 #: ../libgaim/protocols/gg/gg.c:999 ../libgaim/protocols/irc/irc.c:524 #: ../libgaim/protocols/irc/msgs.c:226 -#: ../libgaim/protocols/jabber/buddy.c:1407 +#: ../libgaim/protocols/jabber/buddy.c:1412 #: ../libgaim/protocols/novell/novell.c:2854 #: ../libgaim/protocols/oscar/oscar.c:712 #: ../libgaim/protocols/oscar/oscar.c:4498 @@ -2840,8 +2857,8 @@ #: ../gtk/gtkft.c:159 ../libgaim/account.c:1714 #: ../libgaim/protocols/gg/gg.c:1002 ../libgaim/protocols/jabber/buddy.c:641 -#: ../libgaim/protocols/jabber/buddy.c:1397 -#: ../libgaim/protocols/jabber/buddy.c:1414 +#: ../libgaim/protocols/jabber/buddy.c:1402 +#: ../libgaim/protocols/jabber/buddy.c:1419 #: ../libgaim/protocols/novell/novell.c:2866 ../libgaim/protocols/qq/qq.c:230 msgid "Unknown" msgstr "Desconocido" @@ -4285,7 +4302,7 @@ #. connect to the server #: ../gtk/gtkstatusbox.c:569 ../libgaim/protocols/irc/irc.c:329 -#: ../libgaim/protocols/jabber/jabber.c:1021 +#: ../libgaim/protocols/jabber/jabber.c:1026 #: ../libgaim/protocols/msn/session.c:344 #: ../libgaim/protocols/novell/novell.c:2183 #: ../libgaim/protocols/oscar/oscar.c:1267 ../libgaim/protocols/qq/qq.c:136 @@ -4401,25 +4418,27 @@ msgid "Buddy Icon" msgstr "Icono de amigo" -#: ../gtk/gtkutils.c:2653 +#: ../gtk/gtkutils.c:2657 #, c-format msgid "The file '%s' is too large for %s. Please try a smaller image.\n" -msgstr "El fichero «%s» es demasiado grande para %s. Intente utilizar una imagen más pequeña.\n" +msgstr "" +"El fichero «%s» es demasiado grande para %s. Intente utilizar una imagen más " +"pequeña.\n" -#: ../gtk/gtkutils.c:2655 +#: ../gtk/gtkutils.c:2659 msgid "Icon Error" msgstr "Error en icono" -#: ../gtk/gtkutils.c:2656 +#: ../gtk/gtkutils.c:2660 msgid "Could not set icon" msgstr "No se pudo fijar el icono" -#: ../gtk/gtkutils.c:2757 +#: ../gtk/gtkutils.c:2761 #, c-format msgid "Failed to open file '%s': %s" msgstr "No se pudo abrir el archivo «%s»: %s" -#: ../gtk/gtkutils.c:2806 +#: ../gtk/gtkutils.c:2810 #, c-format msgid "" "Failed to load image '%s': reason not known, probably a corrupt image file" @@ -4853,7 +4872,7 @@ #. "Search" #: ../gtk/plugins/gevolution/add_buddy_dialog.c:473 #: ../gtk/plugins/gevolution/assoc-buddy.c:358 -#: ../libgaim/protocols/jabber/buddy.c:1760 +#: ../libgaim/protocols/jabber/buddy.c:1765 #: ../libgaim/protocols/qq/group.c:123 ../libgaim/protocols/qq/group_im.c:139 #: ../libgaim/protocols/qq/sys_msg.c:162 ../libgaim/protocols/qq/sys_msg.c:232 #: ../libgaim/protocols/qq/sys_msg.c:250 @@ -4894,7 +4913,7 @@ #: ../gtk/plugins/gevolution/eds-utils.c:73 #: ../gtk/plugins/gevolution/eds-utils.c:86 -#: ../libgaim/protocols/jabber/jabber.c:1162 +#: ../libgaim/protocols/jabber/jabber.c:1167 msgid "None" msgstr "Ninguno" @@ -5044,7 +5063,8 @@ #: ../gtk/plugins/markerline.c:25 ../gtk/plugins/markerline.c:26 msgid "Draw a line to indicate new messages in a conversation." -msgstr "Dibuja una línea para indicar que hay nuevos mensajes en una conversación." +msgstr "" +"Dibuja una línea para indicar que hay nuevos mensajes en una conversación." #: ../gtk/plugins/markerline.c:246 msgid "Draw Markerline in " @@ -5450,6 +5470,53 @@ "Este complemento permite al usuario configurar los formatos de marca de " "tiempo para los mensajes en conversaciones y guardados en el registro." +#: ../gtk/plugins/xmppconsole.c:665 +msgid "<font color='#777777'>Logged out.</font>" +msgstr "<font color='#777777'>Desconectado.</font>" + +#. *< type +#. *< ui_requirement +#. *< flags +#. *< dependencies +#. *< priority +#. *< id +#: ../gtk/plugins/xmppconsole.c:745 ../gtk/plugins/xmppconsole.c:841 +#: ../gtk/plugins/xmppconsole.c:860 +msgid "XMPP Console" +msgstr "Consola XMPP" + +#: ../gtk/plugins/xmppconsole.c:753 +msgid "Account: " +msgstr "Cuenta: " + +#: ../gtk/plugins/xmppconsole.c:780 +msgid "<font color='#777777'>Not connected to XMPP</font>" +msgstr "<font color='#777777'>No conectado a XMPP</font>" + +#: ../gtk/plugins/xmppconsole.c:790 +msgid "Insert an <iq/> stanza." +msgstr "Introducir una entrada <iq/>." + +#: ../gtk/plugins/xmppconsole.c:799 +msgid "Insert a <presence/> stanza." +msgstr "Introducir una entrada <presence/>." + +#: ../gtk/plugins/xmppconsole.c:808 +msgid "Insert a <message/> stanza." +msgstr "Insertar una entrada <messag/>." + +#. *< name +#. *< version +#. * summary +#: ../gtk/plugins/xmppconsole.c:863 +msgid "Send and receive raw XMPP stanzas." +msgstr "Enviar y recibir entradas XMPP en crudo." + +#. * description +#: ../gtk/plugins/xmppconsole.c:865 +msgid "This plugin is useful for debbuging XMPP servers or clients." +msgstr "Este complemento es útil para depurar clientes o servidores XMPP." + #: ../gtk/plugins/win32/transparency/win2ktrans.c:183 #: ../gtk/plugins/win32/transparency/win2ktrans.c:569 #: ../gtk/plugins/win32/transparency/win2ktrans.c:616 @@ -5595,7 +5662,7 @@ msgstr "Falta el complemento de protocolo para %s" #: ../libgaim/account.c:1085 ../libgaim/protocols/gg/gg.c:696 -#: ../libgaim/protocols/jabber/jabber.c:1317 +#: ../libgaim/protocols/jabber/jabber.c:1322 msgid "New passwords do not match." msgstr "Las nuevas contraseñas no coinciden." @@ -5992,55 +6059,73 @@ msgid "" "True if the command specified in the \"command\" key should handle \"aim\" " "URLs." -msgstr "Cierto si la orden especificada en la tecla «command» debería gestionar URLs «aim»." +msgstr "" +"Cierto si la orden especificada en la tecla «command» debería gestionar URLs " +"«aim»." #: ../libgaim/gconf/gaim.schemas.in.h:19 msgid "" "True if the command specified in the \"command\" key should handle \"gg\" " "URLs." -msgstr "Cierto si la orden especificada en la tecla «command» debería gestionar URLs «gg»." +msgstr "" +"Cierto si la orden especificada en la tecla «command» debería gestionar URLs " +"«gg»." #: ../libgaim/gconf/gaim.schemas.in.h:20 msgid "" "True if the command specified in the \"command\" key should handle \"icq\" " "URLs." -msgstr "Cierto si la orden especificada en la tecla «command» debería gestionar URLs «icq»." +msgstr "" +"Cierto si la orden especificada en la tecla «command» debería gestionar URLs " +"«icq»." #: ../libgaim/gconf/gaim.schemas.in.h:21 msgid "" "True if the command specified in the \"command\" key should handle \"irc\" " "URLs." -msgstr "Cierto si la orden especificada en la tecla «command» debería gestionar URLs «irc»." +msgstr "" +"Cierto si la orden especificada en la tecla «command» debería gestionar URLs " +"«irc»." #: ../libgaim/gconf/gaim.schemas.in.h:22 msgid "" "True if the command specified in the \"command\" key should handle \"msnim\" " "URLs." -msgstr "Cierto si la orden especificada en la tecla «command» debería gestionar URLs «msnim»." +msgstr "" +"Cierto si la orden especificada en la tecla «command» debería gestionar URLs " +"«msnim»." #: ../libgaim/gconf/gaim.schemas.in.h:23 msgid "" "True if the command specified in the \"command\" key should handle \"sip\" " "URLs." -msgstr "Cierto si la orden especificada en la tecla «command» debería gestionar URLs «sip»." +msgstr "" +"Cierto si la orden especificada en la tecla «command» debería gestionar URLs " +"«sip»." #: ../libgaim/gconf/gaim.schemas.in.h:24 msgid "" "True if the command specified in the \"command\" key should handle \"xmpp\" " "URLs." -msgstr "Cierto si la orden especificada en la tecla «command» debería gestionar URLs «xmpp»." +msgstr "" +"Cierto si la orden especificada en la tecla «command» debería gestionar URLs " +"«xmpp»." #: ../libgaim/gconf/gaim.schemas.in.h:25 msgid "" "True if the command specified in the \"command\" key should handle \"ymsgr\" " "URLs." -msgstr "Cierto si la orden especificada en la tecla «command» debería gestionar URLs «ymsgr»." +msgstr "" +"Cierto si la orden especificada en la tecla «command» debería gestionar URLs " +"«ymsgr»." #: ../libgaim/gconf/gaim.schemas.in.h:26 msgid "" "True if the command used to handle this type of URL should be run in a " "terminal." -msgstr "Cierto si la orden especifica para gestionar este tipo de URLs debería ejecutarse en un terminal." +msgstr "" +"Cierto si la orden especifica para gestionar este tipo de URLs debería " +"ejecutarse en un terminal." #: ../libgaim/gconf/gaim.schemas.in.h:27 msgid "Whether the specified command should handle \"aim\" URLs" @@ -6132,7 +6217,7 @@ msgid "(%s) %s <AUTO-REPLY>: %s\n" msgstr "(%s) %s <RESPUESTA AUTOMÁTICA>: %s\n" -#: ../libgaim/plugin.c:282 ../libgaim/protocols/jabber/buddy.c:1685 +#: ../libgaim/plugin.c:282 ../libgaim/protocols/jabber/buddy.c:1690 #: ../libgaim/protocols/msn/servconn.c:139 #: ../libgaim/protocols/msn/session.c:321 #: ../libgaim/protocols/oscar/oscar.c:2719 @@ -6144,23 +6229,27 @@ msgid "You are using %s, but this plugin requires %s." msgstr "Está utilizando %s, pero este complemento requiere %s." -#: ../libgaim/plugin.c:434 +#: ../libgaim/plugin.c:380 +msgid "This plugin has not defined an ID." +msgstr "No se ha definido un identificador para este complemento." + +#: ../libgaim/plugin.c:448 #, c-format msgid "Plugin magic mismatch %d (need %d)" msgstr "" "No hubo coincidencia en el número mágico del complemento %d (necesitaba %d)" -#: ../libgaim/plugin.c:451 +#: ../libgaim/plugin.c:465 #, c-format msgid "ABI version mismatch %d.%d.x (need %d.%d.x)" msgstr "" "No hubo coincidencia en el número de versión ABI %d.%d.x (necesitaba %d.%d.x)" -#: ../libgaim/plugin.c:468 +#: ../libgaim/plugin.c:482 msgid "Plugin does not implement all required functions" msgstr "El complemento no implementa todas las funciones necesarias" -#: ../libgaim/plugin.c:533 +#: ../libgaim/plugin.c:547 #, c-format msgid "" "The required plugin %s was not found. Please install this plugin and try " @@ -6169,25 +6258,25 @@ "No se encontró el complemento necesario %s. Por favor, instale este " "complemento e inténtelo de nuevo." -#: ../libgaim/plugin.c:538 +#: ../libgaim/plugin.c:552 msgid "Gaim encountered errors loading the plugin." msgstr "Gaim encontró un error mientras cargaba este complemento." -#: ../libgaim/plugin.c:560 +#: ../libgaim/plugin.c:574 #, c-format msgid "The required plugin %s was unable to load." msgstr "No se pudo cargar el complemento necesario %s." -#: ../libgaim/plugin.c:564 +#: ../libgaim/plugin.c:578 msgid "Gaim was unable to load your plugin." msgstr "Gaim no pudo cargar su complemento." -#: ../libgaim/plugin.c:664 +#: ../libgaim/plugin.c:678 #, c-format msgid "The dependent plugin %s failed to unload." msgstr "No se pudo cargar el complemento dependiente %s." -#: ../libgaim/plugin.c:669 +#: ../libgaim/plugin.c:683 msgid "Gaim encountered errors unloading the plugin." msgstr "Gaim encontró errores mientras descargaba el complemento." @@ -6197,12 +6286,16 @@ #: ../libgaim/plugins/autoaccept.c:25 ../libgaim/plugins/autoaccept.c:26 msgid "Auto-accept file transfer requests from selected users." -msgstr "Autoaceptar las solicitud de transferencia de archivo de los usuarios seleccionados." +msgstr "" +"Autoaceptar las solicitud de transferencia de archivo de los usuarios " +"seleccionados." #: ../libgaim/plugins/autoaccept.c:80 #, c-format msgid "Autoaccepted file transfer of \"%s\" from \"%s\" completed." -msgstr "Se completó la solicitud autoaceptada de transferencia de archivo de «%s» enviado por «%s»." +msgstr "" +"Se completó la solicitud autoaceptada de transferencia de archivo de «%s» " +"enviado por «%s»." #: ../libgaim/plugins/autoaccept.c:82 msgid "Autoaccept complete" @@ -6262,14 +6355,17 @@ #: ../libgaim/plugins/autoaccept.c:216 msgid "Automatically reject from users not in buddy list" -msgstr "Rechazar automáticamente las transferencias de usuarios que no están en mi lista de amigos" +msgstr "" +"Rechazar automáticamente las transferencias de usuarios que no están en mi " +"lista de amigos" #: ../libgaim/plugins/autoaccept.c:220 msgid "" "Notify with a popup when an autoaccepted file transfer is complete\n" "(only when there's no conversation with the sender)" msgstr "" -"Notificar con una ventana cuando se haya completado una transferencia de ficheros autoaceptada\n" +"Notificar con una ventana cuando se haya completado una transferencia de " +"ficheros autoaceptada\n" "(sólo cuando no hay ya una conversación con el que la envía)" #: ../libgaim/plugins/autoreply.c:23 @@ -6287,7 +6383,15 @@ "specific autoreply message for a particular buddy, right click on the buddy " "in the buddy-list window. To set autoreply messages for some account, go to " "the `Advanced' tab of the Account-edit dialog." -msgstr "Este complemento permite configurar un mensaje de respuesta automática para cualquier protocolo. Puede configurar el mensaje de respuesta automática global en el diálogo de las opciones del complemento. Si quiere establecer mensajes de respuesta particulares para un amigo sólo tiene que pulsar con el botón derecho sobre el amigo en la ventana con la lista de amigos. Vaya a la pestaña «Avanzadas» en el diálogo de edición de cuentas si quiere configurar un mensaje de respuesta automática para sólo alguna de sus cuentas." +msgstr "" +"Este complemento permite configurar un mensaje de respuesta automática para " +"cualquier protocolo. Puede configurar el mensaje de respuesta automática " +"global en el diálogo de las opciones del complemento. Si quiere establecer " +"mensajes de respuesta particulares para un amigo sólo tiene que pulsar con " +"el botón derecho sobre el amigo en la ventana con la lista de amigos. Vaya a " +"la pestaña «Avanzadas» en el diálogo de edición de cuentas si quiere " +"configurar un mensaje de respuesta automática para sólo alguna de sus " +"cuentas." #. XXX: There should be a way to reset to the default/account-default autoreply #: ../libgaim/plugins/autoreply.c:218 @@ -6303,7 +6407,9 @@ msgid "" "The following message will be sent to the buddy when the buddy sends you a " "message and autoreply is enabled." -msgstr "Se mostrara el mensaje indicado a continuación a un amigo cuando el amigo le envíe un mensaje y esté activada la respuesta automática." +msgstr "" +"Se mostrara el mensaje indicado a continuación a un amigo cuando el amigo le " +"envíe un mensaje y esté activada la respuesta automática." #: ../libgaim/plugins/autoreply.c:238 msgid "Set _Autoreply Message" @@ -6365,7 +6471,9 @@ msgid "" "I am currently not available. Please leave your message, and I will get back " "to you as soon as possible." -msgstr "Ahora mismo no estoy disponible. Por favor, deja un mensaje y me pondré en contacto contigo lo antes posible." +msgstr "" +"Ahora mismo no estoy disponible. Por favor, deja un mensaje y me pondré en " +"contacto contigo lo antes posible." #: ../libgaim/plugins/buddynote.c:46 ../libgaim/protocols/msn/msn.c:1611 #: ../libgaim/protocols/msn/msn.c:1641 @@ -6399,7 +6507,8 @@ #. * summary #: ../libgaim/plugins/buddynote.c:90 msgid "Adds the option to store notes for buddies on your buddy list." -msgstr "Añade la opción de guardar notas sobre los amigos en su lista de amigos." +msgstr "" +"Añade la opción de guardar notas sobre los amigos en su lista de amigos." #. *< type #. *< ui_requirement @@ -6681,12 +6790,12 @@ "AVISO: Este complemento aún es código en «alpha» y puede bloquearse con " "frecuencia. ¡Uselo bajo su propia responsabilidad!" -#: ../libgaim/plugins/mono/loader/mono.c:213 +#: ../libgaim/plugins/mono/loader/mono.c:211 msgid "Mono Plugin Loader" msgstr "Cargador de complementos Mono" -#: ../libgaim/plugins/mono/loader/mono.c:215 -#: ../libgaim/plugins/mono/loader/mono.c:216 +#: ../libgaim/plugins/mono/loader/mono.c:213 +#: ../libgaim/plugins/mono/loader/mono.c:214 msgid "Loads .NET plugins with Mono." msgstr "Cargar complementos .NET con Mono." @@ -6715,7 +6824,9 @@ msgid "" "Prepends a newline to messages so that the rest of the message appears below " "the screen name in the conversation window." -msgstr "Añade una línea en blanco a los mensajes para que el resto del mensaje se muestre por debajo del nombre de usuario en la ventana de conversación." +msgstr "" +"Añade una línea en blanco a los mensajes para que el resto del mensaje se " +"muestre por debajo del nombre de usuario en la ventana de conversación." #: ../libgaim/plugins/offlinemsg.c:23 msgid "Offline Message Emulation" @@ -6729,14 +6840,18 @@ msgid "" "The rest of the messages will be saved as pounce. You can edit/delete the " "pounce from the `Buddy Pounce' dialog." -msgstr "El resto de los mensajes se guardarán como un aviso. Puede editar y eliminar los avisos en el diálogo «Aviso de amigo»." +msgstr "" +"El resto de los mensajes se guardarán como un aviso. Puede editar y eliminar " +"los avisos en el diálogo «Aviso de amigo»." #: ../libgaim/plugins/offlinemsg.c:152 #, c-format msgid "" "\"%s\" is currently offline. Do you want to save the rest of the messages in " "a pounce and automatically send them when \"%s\" logs back in?" -msgstr "«%s» está actualmente desconectado. ¿Desea guardar el resto del mensaje como un aviso y enviarlo de forma automática cuando «%s» se vuelva a conectar?" +msgstr "" +"«%s» está actualmente desconectado. ¿Desea guardar el resto del mensaje como " +"un aviso y enviarlo de forma automática cuando «%s» se vuelva a conectar?" #: ../libgaim/plugins/offlinemsg.c:156 msgid "Offline Message" @@ -6962,19 +7077,21 @@ "Notifica en una ventana de conversación cuando un amigo se ausenta o vuelve " "o está inactivo." -#: ../libgaim/plugins/tcl/tcl.c:413 +#: ../libgaim/plugins/tcl/tcl.c:415 msgid "Tcl Plugin Loader" msgstr "Cargador de complementos Tcl" -#: ../libgaim/plugins/tcl/tcl.c:415 ../libgaim/plugins/tcl/tcl.c:416 +#: ../libgaim/plugins/tcl/tcl.c:417 ../libgaim/plugins/tcl/tcl.c:418 msgid "Provides support for loading Tcl plugins" msgstr "Provee soporte para cargar complementos Tcl" -#: ../libgaim/plugins/tcl/tcl.c:481 +#: ../libgaim/plugins/tcl/tcl.c:483 msgid "" "Unable to detect ActiveTCL installation. If you wish to use TCL plugins, " "install ActiveTCL from http://www.activestate.com\n" -msgstr "No se pudo detectar la instalación de ActiveTCL. Debe instalar ActiveTCL de http://www.activestate.com si desea utilizar los complementos TCL\n" +msgstr "" +"No se pudo detectar la instalación de ActiveTCL. Debe instalar ActiveTCL de " +"http://www.activestate.com si desea utilizar los complementos TCL\n" #. Send a message about the connection error #: ../libgaim/protocols/bonjour/bonjour.c:111 @@ -7018,17 +7135,17 @@ #. Creating the options for the protocol #: ../libgaim/protocols/bonjour/bonjour.c:582 ../libgaim/protocols/gg/gg.c:622 -#: ../libgaim/protocols/jabber/jabber.c:807 +#: ../libgaim/protocols/jabber/jabber.c:810 msgid "First name" msgstr "Nombre:" #: ../libgaim/protocols/bonjour/bonjour.c:585 ../libgaim/protocols/gg/gg.c:617 -#: ../libgaim/protocols/jabber/jabber.c:812 +#: ../libgaim/protocols/jabber/jabber.c:815 msgid "Last name" msgstr "Apellidos:" #: ../libgaim/protocols/bonjour/bonjour.c:588 ../libgaim/protocols/gg/gg.c:468 -#: ../libgaim/protocols/jabber/jabber.c:797 +#: ../libgaim/protocols/jabber/jabber.c:800 #: ../libgaim/protocols/silc/silc.c:695 ../libgaim/protocols/silc/silc.c:935 msgid "E-mail" msgstr "Correo electrónico" @@ -7146,8 +7263,8 @@ msgstr "¡Se completó el registro con éxito!" #: ../libgaim/protocols/gg/gg.c:473 ../libgaim/protocols/gg/gg.c:764 -#: ../libgaim/protocols/jabber/jabber.c:786 -#: ../libgaim/protocols/jabber/jabber.c:1352 +#: ../libgaim/protocols/jabber/jabber.c:789 +#: ../libgaim/protocols/jabber/jabber.c:1357 msgid "Password" msgstr "Contraseña" @@ -7172,7 +7289,7 @@ msgstr "Por favor, rellene los siguientes campos" #: ../libgaim/protocols/gg/gg.c:632 ../libgaim/protocols/gg/gg.c:1039 -#: ../libgaim/protocols/gg/gg.c:1113 ../libgaim/protocols/jabber/jabber.c:822 +#: ../libgaim/protocols/gg/gg.c:1113 ../libgaim/protocols/jabber/jabber.c:825 #: ../libgaim/protocols/oscar/oscar.c:3764 #: ../libgaim/protocols/oscar/oscar.c:3777 #: ../libgaim/protocols/qq/buddy_info.c:49 @@ -7266,8 +7383,8 @@ msgstr "UIN" #: ../libgaim/protocols/gg/gg.c:1031 ../libgaim/protocols/gg/gg.c:1107 -#: ../libgaim/protocols/jabber/buddy.c:1558 -#: ../libgaim/protocols/jabber/buddy.c:1734 +#: ../libgaim/protocols/jabber/buddy.c:1563 +#: ../libgaim/protocols/jabber/buddy.c:1739 #: ../libgaim/protocols/oscar/oscar.c:3704 #: ../libgaim/protocols/silc/ops.c:1024 msgid "First Name" @@ -7473,8 +7590,8 @@ msgid "IRC nicks may not contain whitespace" msgstr "Los apodos de IRC no pueden tener espacios en blanco" -#: ../libgaim/protocols/irc/irc.c:337 ../libgaim/protocols/jabber/jabber.c:582 -#: ../libgaim/protocols/jabber/jabber.c:927 +#: ../libgaim/protocols/irc/irc.c:337 ../libgaim/protocols/jabber/jabber.c:585 +#: ../libgaim/protocols/jabber/jabber.c:930 msgid "SSL support unavailable" msgstr "Soporte SSL no disponible" @@ -7531,7 +7648,7 @@ #. host to connect to #: ../libgaim/protocols/irc/irc.c:923 ../libgaim/protocols/irc/msgs.c:239 -#: ../libgaim/protocols/jabber/jabber.c:1984 +#: ../libgaim/protocols/jabber/jabber.c:1989 #: ../libgaim/protocols/msn/msn.c:2056 ../libgaim/protocols/oscar/libaim.c:133 #: ../libgaim/protocols/oscar/libicq.c:133 ../libgaim/protocols/qq/qq.c:758 #: ../libgaim/protocols/sametime/sametime.c:5727 @@ -7555,7 +7672,7 @@ msgstr "Codificaciones" #: ../libgaim/protocols/irc/irc.c:932 ../libgaim/protocols/irc/msgs.c:232 -#: ../libgaim/protocols/jabber/jabber.c:782 +#: ../libgaim/protocols/jabber/jabber.c:785 #: ../libgaim/protocols/silc/buddy.c:1532 ../libgaim/protocols/silc/ops.c:1191 #: ../libgaim/protocols/silc/ops.c:1194 ../libgaim/protocols/silc/ops.c:1340 #: ../libgaim/protocols/silc/ops.c:1343 ../libgaim/protocols/silc/silc.c:929 @@ -7878,7 +7995,7 @@ "names [canal]: Obtener la lista de los usuarios que están en el canal." #: ../libgaim/protocols/irc/parse.c:131 -#: ../libgaim/protocols/jabber/jabber.c:1788 +#: ../libgaim/protocols/jabber/jabber.c:1793 msgid "nick <new nickname>: Change your nickname." msgstr "nick <nuevo apodo>: Cambia su apodo." @@ -8012,12 +8129,12 @@ msgid "Server requires plaintext authentication over an unencrypted stream" msgstr "El servidor solicita autenticación en claro sobre un canal no cifrado" -#: ../libgaim/protocols/jabber/auth.c:232 +#: ../libgaim/protocols/jabber/auth.c:226 msgid "Server couldn't authenticate you without a password" msgstr "El servidor no pudo autenticarle sin una contraseña" -#: ../libgaim/protocols/jabber/auth.c:235 -#: ../libgaim/protocols/jabber/auth.c:236 +#: ../libgaim/protocols/jabber/auth.c:229 +#: ../libgaim/protocols/jabber/auth.c:230 #: ../libgaim/protocols/jabber/auth.c:404 #: ../libgaim/protocols/jabber/auth.c:405 #: ../libgaim/protocols/jabber/auth.c:486 @@ -8025,7 +8142,7 @@ msgid "Plaintext Authentication" msgstr "Autenticación en claro" -#: ../libgaim/protocols/jabber/auth.c:237 +#: ../libgaim/protocols/jabber/auth.c:231 #: ../libgaim/protocols/jabber/auth.c:406 #: ../libgaim/protocols/jabber/auth.c:488 msgid "" @@ -8035,7 +8152,7 @@ "El servidor solicita autenticación en claro sobre un canal no cifrado. " "¿Permitir ésto y continuar con el proceso de autenticación?" -#: ../libgaim/protocols/jabber/auth.c:243 +#: ../libgaim/protocols/jabber/auth.c:237 #: ../libgaim/protocols/jabber/auth.c:414 #: ../libgaim/protocols/jabber/auth.c:496 msgid "Server does not use any supported authentication method" @@ -8061,91 +8178,91 @@ msgstr "Error de SASL" #: ../libgaim/protocols/jabber/buddy.c:271 -#: ../libgaim/protocols/jabber/buddy.c:783 +#: ../libgaim/protocols/jabber/buddy.c:788 #: ../libgaim/protocols/sametime/sametime.c:4148 #: ../libgaim/protocols/silc/ops.c:1020 msgid "Full Name" msgstr "Nombre completo" #: ../libgaim/protocols/jabber/buddy.c:272 -#: ../libgaim/protocols/jabber/buddy.c:796 +#: ../libgaim/protocols/jabber/buddy.c:801 #: ../libgaim/protocols/silc/ops.c:1032 msgid "Family Name" msgstr "Apellidos" #: ../libgaim/protocols/jabber/buddy.c:273 -#: ../libgaim/protocols/jabber/buddy.c:800 +#: ../libgaim/protocols/jabber/buddy.c:805 msgid "Given Name" msgstr "Nombre propio" #: ../libgaim/protocols/jabber/buddy.c:275 -#: ../libgaim/protocols/jabber/jabber.c:842 +#: ../libgaim/protocols/jabber/jabber.c:845 msgid "URL" msgstr "URL" #: ../libgaim/protocols/jabber/buddy.c:276 -#: ../libgaim/protocols/jabber/buddy.c:852 +#: ../libgaim/protocols/jabber/buddy.c:857 msgid "Street Address" msgstr "Calle" #: ../libgaim/protocols/jabber/buddy.c:277 -#: ../libgaim/protocols/jabber/buddy.c:848 +#: ../libgaim/protocols/jabber/buddy.c:853 msgid "Extended Address" msgstr "Dirección extendida" #: ../libgaim/protocols/jabber/buddy.c:278 -#: ../libgaim/protocols/jabber/buddy.c:856 +#: ../libgaim/protocols/jabber/buddy.c:861 msgid "Locality" msgstr "Localidad" #: ../libgaim/protocols/jabber/buddy.c:279 -#: ../libgaim/protocols/jabber/buddy.c:860 +#: ../libgaim/protocols/jabber/buddy.c:865 msgid "Region" msgstr "Región" #: ../libgaim/protocols/jabber/buddy.c:280 -#: ../libgaim/protocols/jabber/buddy.c:864 +#: ../libgaim/protocols/jabber/buddy.c:869 msgid "Postal Code" msgstr "Código postal" #: ../libgaim/protocols/jabber/buddy.c:281 -#: ../libgaim/protocols/jabber/buddy.c:869 +#: ../libgaim/protocols/jabber/buddy.c:874 #: ../libgaim/protocols/silc/silc.c:939 msgid "Country" msgstr "País" #: ../libgaim/protocols/jabber/buddy.c:282 -#: ../libgaim/protocols/jabber/buddy.c:880 -#: ../libgaim/protocols/jabber/buddy.c:887 +#: ../libgaim/protocols/jabber/buddy.c:885 +#: ../libgaim/protocols/jabber/buddy.c:892 msgid "Telephone" msgstr "Teléfono" #: ../libgaim/protocols/jabber/buddy.c:283 -#: ../libgaim/protocols/jabber/buddy.c:898 -#: ../libgaim/protocols/jabber/buddy.c:906 -#: ../libgaim/protocols/jabber/buddy.c:1564 +#: ../libgaim/protocols/jabber/buddy.c:903 +#: ../libgaim/protocols/jabber/buddy.c:911 +#: ../libgaim/protocols/jabber/buddy.c:1569 #: ../libgaim/protocols/silc/ops.c:1075 ../libgaim/protocols/silc/util.c:553 #: ../libgaim/protocols/yahoo/yahoo_profile.c:1037 msgid "E-Mail" msgstr "Correo electrónico" #: ../libgaim/protocols/jabber/buddy.c:284 -#: ../libgaim/protocols/jabber/buddy.c:921 +#: ../libgaim/protocols/jabber/buddy.c:926 msgid "Organization Name" msgstr "Nombre de la organización" #: ../libgaim/protocols/jabber/buddy.c:285 -#: ../libgaim/protocols/jabber/buddy.c:925 +#: ../libgaim/protocols/jabber/buddy.c:930 msgid "Organization Unit" msgstr "Grupo de trabajo" #: ../libgaim/protocols/jabber/buddy.c:287 -#: ../libgaim/protocols/jabber/buddy.c:934 +#: ../libgaim/protocols/jabber/buddy.c:939 msgid "Role" msgstr "Rol" #: ../libgaim/protocols/jabber/buddy.c:288 -#: ../libgaim/protocols/jabber/buddy.c:817 ../libgaim/protocols/msn/msn.c:1609 +#: ../libgaim/protocols/jabber/buddy.c:822 ../libgaim/protocols/msn/msn.c:1609 #: ../libgaim/protocols/oscar/oscar.c:3743 msgid "Birthday" msgstr "Cumpleaños" @@ -8163,37 +8280,37 @@ "Todos los campos siguientes son opcionales. Introduzca sólo la información " "con la que se sienta cómodo." -#: ../libgaim/protocols/jabber/buddy.c:652 -#: ../libgaim/protocols/jabber/buddy.c:691 +#: ../libgaim/protocols/jabber/buddy.c:654 +#: ../libgaim/protocols/jabber/buddy.c:695 msgid "Client" msgstr "Cliente" -#: ../libgaim/protocols/jabber/buddy.c:656 -#: ../libgaim/protocols/jabber/buddy.c:695 +#: ../libgaim/protocols/jabber/buddy.c:658 +#: ../libgaim/protocols/jabber/buddy.c:699 msgid "Operating System" msgstr "Sistema operativo" -#: ../libgaim/protocols/jabber/buddy.c:666 -#: ../libgaim/protocols/jabber/jabber.c:1987 +#: ../libgaim/protocols/jabber/buddy.c:668 +#: ../libgaim/protocols/jabber/jabber.c:1992 msgid "Resource" msgstr "Recurso" -#: ../libgaim/protocols/jabber/buddy.c:668 -#: ../libgaim/protocols/jabber/jabber.c:1226 -#: ../libgaim/protocols/jabber/jabber.c:1236 -#: ../libgaim/protocols/jabber/jabber.c:1246 -#: ../libgaim/protocols/jabber/jabber.c:1256 -#: ../libgaim/protocols/jabber/jabber.c:1266 +#: ../libgaim/protocols/jabber/buddy.c:670 +#: ../libgaim/protocols/jabber/jabber.c:1231 +#: ../libgaim/protocols/jabber/jabber.c:1241 +#: ../libgaim/protocols/jabber/jabber.c:1251 +#: ../libgaim/protocols/jabber/jabber.c:1261 +#: ../libgaim/protocols/jabber/jabber.c:1271 msgid "Priority" msgstr "Prioridad" -#: ../libgaim/protocols/jabber/buddy.c:804 +#: ../libgaim/protocols/jabber/buddy.c:809 #: ../libgaim/protocols/silc/ops.c:1028 msgid "Middle Name" msgstr "Nombre medio" -#: ../libgaim/protocols/jabber/buddy.c:837 -#: ../libgaim/protocols/jabber/jabber.c:817 +#: ../libgaim/protocols/jabber/buddy.c:842 +#: ../libgaim/protocols/jabber/jabber.c:820 #: ../libgaim/protocols/oscar/oscar.c:3763 #: ../libgaim/protocols/oscar/oscar.c:3776 #: ../libgaim/protocols/qq/buddy_info.c:56 @@ -8201,75 +8318,75 @@ msgid "Address" msgstr "Dirección" -#: ../libgaim/protocols/jabber/buddy.c:844 +#: ../libgaim/protocols/jabber/buddy.c:849 msgid "P.O. Box" msgstr "Código postal" -#: ../libgaim/protocols/jabber/buddy.c:958 +#: ../libgaim/protocols/jabber/buddy.c:963 msgid "Photo" msgstr "Foto" -#: ../libgaim/protocols/jabber/buddy.c:958 +#: ../libgaim/protocols/jabber/buddy.c:963 msgid "Logo" msgstr "Logotipo" -#: ../libgaim/protocols/jabber/buddy.c:1344 +#: ../libgaim/protocols/jabber/buddy.c:1349 msgid "Un-hide From" msgstr "No ocultarse de" -#: ../libgaim/protocols/jabber/buddy.c:1348 +#: ../libgaim/protocols/jabber/buddy.c:1353 msgid "Temporarily Hide From" msgstr "Ocultarse temporalmente de" #. && NOT ME -#: ../libgaim/protocols/jabber/buddy.c:1356 +#: ../libgaim/protocols/jabber/buddy.c:1361 msgid "Cancel Presence Notification" msgstr "Cancelar notificación de presencia" -#: ../libgaim/protocols/jabber/buddy.c:1363 +#: ../libgaim/protocols/jabber/buddy.c:1368 msgid "(Re-)Request authorization" msgstr "Volver a pedir autorización" #. if(NOT ME) #. shouldn't this just happen automatically when the buddy is #. removed? -#: ../libgaim/protocols/jabber/buddy.c:1372 +#: ../libgaim/protocols/jabber/buddy.c:1377 msgid "Unsubscribe" msgstr "De-suscribir" -#: ../libgaim/protocols/jabber/buddy.c:1405 -#: ../libgaim/protocols/jabber/jabber.c:1235 +#: ../libgaim/protocols/jabber/buddy.c:1410 +#: ../libgaim/protocols/jabber/jabber.c:1240 msgid "Chatty" msgstr "Hablador" -#: ../libgaim/protocols/jabber/buddy.c:1409 ../libgaim/status.c:159 +#: ../libgaim/protocols/jabber/buddy.c:1414 ../libgaim/status.c:159 msgid "Extended Away" msgstr "Ausencia extendida" -#: ../libgaim/protocols/jabber/buddy.c:1411 -#: ../libgaim/protocols/jabber/jabber.c:1265 +#: ../libgaim/protocols/jabber/buddy.c:1416 +#: ../libgaim/protocols/jabber/jabber.c:1270 #: ../libgaim/protocols/oscar/oscar.c:706 #: ../libgaim/protocols/oscar/oscar.c:5760 #: ../libgaim/protocols/sametime/sametime.c:3319 msgid "Do Not Disturb" msgstr "No molestar" -#: ../libgaim/protocols/jabber/buddy.c:1556 +#: ../libgaim/protocols/jabber/buddy.c:1561 msgid "JID" msgstr "JID" -#: ../libgaim/protocols/jabber/buddy.c:1560 -#: ../libgaim/protocols/jabber/buddy.c:1739 +#: ../libgaim/protocols/jabber/buddy.c:1565 +#: ../libgaim/protocols/jabber/buddy.c:1744 #: ../libgaim/protocols/oscar/oscar.c:3705 msgid "Last Name" msgstr "Apellidos" -#: ../libgaim/protocols/jabber/buddy.c:1592 +#: ../libgaim/protocols/jabber/buddy.c:1597 msgid "The following are the results of your search" msgstr "Éstos son los resultados de su búsqueda" #. current comment from Jabber User Directory users.jabber.org -#: ../libgaim/protocols/jabber/buddy.c:1667 +#: ../libgaim/protocols/jabber/buddy.c:1672 msgid "" "Find a contact by entering the search criteria in the given fields. Note: " "Each field supports wild card searches (%)" @@ -8277,52 +8394,52 @@ "Encuentra un contacto al introducir los criterios de búsqueda en los campos " "proporcionados. Nota: puede hacer búsquedas con comodines (%) en cada campo." -#: ../libgaim/protocols/jabber/buddy.c:1687 +#: ../libgaim/protocols/jabber/buddy.c:1692 msgid "Directory Query Failed" msgstr "Falló la consulta al directorio" -#: ../libgaim/protocols/jabber/buddy.c:1688 +#: ../libgaim/protocols/jabber/buddy.c:1693 msgid "Could not query the directory server." msgstr "No se pudo consultar con el servidor de directorio." #. Try to translate the message (see static message #. list in jabber_user_dir_comments[]) -#: ../libgaim/protocols/jabber/buddy.c:1722 +#: ../libgaim/protocols/jabber/buddy.c:1727 #, c-format msgid "Server Instructions: %s" msgstr "Instrucciones del servidor: %s" -#: ../libgaim/protocols/jabber/buddy.c:1729 +#: ../libgaim/protocols/jabber/buddy.c:1734 msgid "Fill in one or more fields to search for any matching Jabber users." msgstr "" "Rellene uno o más de los campos mostrados a continuación para buscar a un " "usuario Jabber que los tengan." -#: ../libgaim/protocols/jabber/buddy.c:1749 +#: ../libgaim/protocols/jabber/buddy.c:1754 #: ../libgaim/protocols/novell/novell.c:1488 #: ../libgaim/protocols/oscar/oscar.c:3708 #: ../libgaim/protocols/oscar/oscar.c:3717 msgid "E-Mail Address" msgstr "Dirección de correo electrónico" -#: ../libgaim/protocols/jabber/buddy.c:1758 -#: ../libgaim/protocols/jabber/buddy.c:1759 +#: ../libgaim/protocols/jabber/buddy.c:1763 +#: ../libgaim/protocols/jabber/buddy.c:1764 msgid "Search for Jabber users" msgstr "Buscar usuarios Jabber" -#: ../libgaim/protocols/jabber/buddy.c:1773 +#: ../libgaim/protocols/jabber/buddy.c:1778 msgid "Invalid Directory" msgstr "Directorio inválido" -#: ../libgaim/protocols/jabber/buddy.c:1790 +#: ../libgaim/protocols/jabber/buddy.c:1795 msgid "Enter a User Directory" msgstr "Introduzca un directorio de usuario" -#: ../libgaim/protocols/jabber/buddy.c:1791 +#: ../libgaim/protocols/jabber/buddy.c:1796 msgid "Select a user directory to search" msgstr "Selecciona un directorio de usuario donde buscar" -#: ../libgaim/protocols/jabber/buddy.c:1794 +#: ../libgaim/protocols/jabber/buddy.c:1799 msgid "Search Directory" msgstr "Buscar en el directorio" @@ -8431,410 +8548,410 @@ msgid "Read Error" msgstr "Error de lectura" -#: ../libgaim/protocols/jabber/jabber.c:504 +#: ../libgaim/protocols/jabber/jabber.c:507 msgid "Unable to create socket" msgstr "No se pudo crear el socket" -#: ../libgaim/protocols/jabber/jabber.c:552 -#: ../libgaim/protocols/jabber/jabber.c:895 +#: ../libgaim/protocols/jabber/jabber.c:555 +#: ../libgaim/protocols/jabber/jabber.c:898 msgid "Invalid Jabber ID" msgstr "ID de Jabber no válido" -#: ../libgaim/protocols/jabber/jabber.c:623 +#: ../libgaim/protocols/jabber/jabber.c:626 #, c-format msgid "Registration of %s@%s successful" msgstr "Registro de %s@%s efectuado con éxito" -#: ../libgaim/protocols/jabber/jabber.c:625 -#: ../libgaim/protocols/jabber/jabber.c:626 +#: ../libgaim/protocols/jabber/jabber.c:628 +#: ../libgaim/protocols/jabber/jabber.c:629 msgid "Registration Successful" msgstr "Éxito en el registro" -#: ../libgaim/protocols/jabber/jabber.c:632 -#: ../libgaim/protocols/jabber/jabber.c:1501 +#: ../libgaim/protocols/jabber/jabber.c:635 +#: ../libgaim/protocols/jabber/jabber.c:1506 msgid "Unknown Error" msgstr "Error desconocido" -#: ../libgaim/protocols/jabber/jabber.c:634 -#: ../libgaim/protocols/jabber/jabber.c:635 +#: ../libgaim/protocols/jabber/jabber.c:637 +#: ../libgaim/protocols/jabber/jabber.c:638 msgid "Registration Failed" msgstr "Falló el registro" -#: ../libgaim/protocols/jabber/jabber.c:750 -#: ../libgaim/protocols/jabber/jabber.c:751 +#: ../libgaim/protocols/jabber/jabber.c:753 +#: ../libgaim/protocols/jabber/jabber.c:754 msgid "Already Registered" msgstr "Ya está registrado" -#: ../libgaim/protocols/jabber/jabber.c:827 +#: ../libgaim/protocols/jabber/jabber.c:830 #: ../libgaim/protocols/oscar/oscar.c:3765 #: ../libgaim/protocols/oscar/oscar.c:3778 msgid "State" msgstr "Estado" -#: ../libgaim/protocols/jabber/jabber.c:832 +#: ../libgaim/protocols/jabber/jabber.c:835 msgid "Postal code" msgstr "Código postal" -#: ../libgaim/protocols/jabber/jabber.c:837 +#: ../libgaim/protocols/jabber/jabber.c:840 #: ../libgaim/protocols/silc/ops.c:1069 ../libgaim/protocols/silc/silc.c:697 #: ../libgaim/protocols/silc/util.c:555 msgid "Phone" msgstr "Teléfono" -#: ../libgaim/protocols/jabber/jabber.c:847 +#: ../libgaim/protocols/jabber/jabber.c:850 msgid "Date" msgstr "Fecha" -#: ../libgaim/protocols/jabber/jabber.c:855 +#: ../libgaim/protocols/jabber/jabber.c:858 msgid "Please fill out the information below to register your new account." msgstr "" "Por favor, rellene la información abajo indicada para registrar su nueva " "cuenta." -#: ../libgaim/protocols/jabber/jabber.c:858 -#: ../libgaim/protocols/jabber/jabber.c:859 +#: ../libgaim/protocols/jabber/jabber.c:861 +#: ../libgaim/protocols/jabber/jabber.c:862 msgid "Register New Jabber Account" msgstr "Registrando cuenta nueva de Jabber" -#: ../libgaim/protocols/jabber/jabber.c:1025 +#: ../libgaim/protocols/jabber/jabber.c:1030 msgid "Initializing Stream" msgstr "Inicializando flujo" -#: ../libgaim/protocols/jabber/jabber.c:1030 +#: ../libgaim/protocols/jabber/jabber.c:1035 #: ../libgaim/protocols/msn/session.c:350 msgid "Authenticating" msgstr "Autenticando" -#: ../libgaim/protocols/jabber/jabber.c:1039 +#: ../libgaim/protocols/jabber/jabber.c:1044 msgid "Re-initializing Stream" msgstr "Reinicializando flujo" -#: ../libgaim/protocols/jabber/jabber.c:1109 -#: ../libgaim/protocols/jabber/jabber.c:1479 -#: ../libgaim/protocols/jabber/jabber.c:1520 -#: ../libgaim/protocols/jabber/jabber.c:1554 +#: ../libgaim/protocols/jabber/jabber.c:1114 +#: ../libgaim/protocols/jabber/jabber.c:1484 +#: ../libgaim/protocols/jabber/jabber.c:1525 +#: ../libgaim/protocols/jabber/jabber.c:1559 #: ../libgaim/protocols/oscar/oscar.c:805 #: ../libgaim/protocols/oscar/oscar.c:5549 msgid "Not Authorized" msgstr "No autorizado" -#: ../libgaim/protocols/jabber/jabber.c:1151 +#: ../libgaim/protocols/jabber/jabber.c:1156 msgid "Both" msgstr "Ambos" -#: ../libgaim/protocols/jabber/jabber.c:1153 +#: ../libgaim/protocols/jabber/jabber.c:1158 msgid "From (To pending)" msgstr "Desde (Destino pendiente)" -#: ../libgaim/protocols/jabber/jabber.c:1158 +#: ../libgaim/protocols/jabber/jabber.c:1163 msgid "To" msgstr "A" -#: ../libgaim/protocols/jabber/jabber.c:1160 +#: ../libgaim/protocols/jabber/jabber.c:1165 msgid "None (To pending)" msgstr "Nadie (Destino pendiente)" -#: ../libgaim/protocols/jabber/jabber.c:1165 +#: ../libgaim/protocols/jabber/jabber.c:1170 msgid "Subscription" msgstr "Subscripción" -#: ../libgaim/protocols/jabber/jabber.c:1295 +#: ../libgaim/protocols/jabber/jabber.c:1300 msgid "Password Changed" msgstr "Contraseña modificada" -#: ../libgaim/protocols/jabber/jabber.c:1296 +#: ../libgaim/protocols/jabber/jabber.c:1301 msgid "Your password has been changed." msgstr "Su contraseña ha sido modificada." -#: ../libgaim/protocols/jabber/jabber.c:1300 -#: ../libgaim/protocols/jabber/jabber.c:1301 +#: ../libgaim/protocols/jabber/jabber.c:1305 +#: ../libgaim/protocols/jabber/jabber.c:1306 msgid "Error changing password" msgstr "Error al cambiar la contraseña" -#: ../libgaim/protocols/jabber/jabber.c:1357 +#: ../libgaim/protocols/jabber/jabber.c:1362 msgid "Password (again)" msgstr "Contraseña (de nuevo)" -#: ../libgaim/protocols/jabber/jabber.c:1362 -#: ../libgaim/protocols/jabber/jabber.c:1363 +#: ../libgaim/protocols/jabber/jabber.c:1367 +#: ../libgaim/protocols/jabber/jabber.c:1368 msgid "Change Jabber Password" msgstr "Cambiar contraseña de Jabber" -#: ../libgaim/protocols/jabber/jabber.c:1363 +#: ../libgaim/protocols/jabber/jabber.c:1368 msgid "Please enter your new password" msgstr "Por favor, indique su nueva contraseña" -#: ../libgaim/protocols/jabber/jabber.c:1373 +#: ../libgaim/protocols/jabber/jabber.c:1378 #: ../libgaim/protocols/oscar/oscar.c:6355 #: ../libgaim/protocols/silc/silc.c:1019 msgid "Set User Info..." msgstr "Establecer su información de usuario..." #. if (js->protocol_options & CHANGE_PASSWORD) { -#: ../libgaim/protocols/jabber/jabber.c:1378 +#: ../libgaim/protocols/jabber/jabber.c:1383 #: ../libgaim/protocols/oscar/oscar.c:6366 #: ../libgaim/protocols/silc/silc.c:1015 msgid "Change Password..." msgstr "Cambiar su contraseña..." #. } -#: ../libgaim/protocols/jabber/jabber.c:1383 +#: ../libgaim/protocols/jabber/jabber.c:1388 msgid "Search for Users..." msgstr "Buscar usuarios..." -#: ../libgaim/protocols/jabber/jabber.c:1459 +#: ../libgaim/protocols/jabber/jabber.c:1464 msgid "Bad Request" msgstr "Solicitud errónea" -#: ../libgaim/protocols/jabber/jabber.c:1461 +#: ../libgaim/protocols/jabber/jabber.c:1466 msgid "Conflict" msgstr "Conflicto" -#: ../libgaim/protocols/jabber/jabber.c:1463 +#: ../libgaim/protocols/jabber/jabber.c:1468 msgid "Feature Not Implemented" msgstr "Funcionalidad no implementada" -#: ../libgaim/protocols/jabber/jabber.c:1465 +#: ../libgaim/protocols/jabber/jabber.c:1470 msgid "Forbidden" msgstr "Prohibido" -#: ../libgaim/protocols/jabber/jabber.c:1467 +#: ../libgaim/protocols/jabber/jabber.c:1472 msgid "Gone" msgstr "Se fue" -#: ../libgaim/protocols/jabber/jabber.c:1469 -#: ../libgaim/protocols/jabber/jabber.c:1544 +#: ../libgaim/protocols/jabber/jabber.c:1474 +#: ../libgaim/protocols/jabber/jabber.c:1549 msgid "Internal Server Error" msgstr "Error interno del servidor" -#: ../libgaim/protocols/jabber/jabber.c:1471 +#: ../libgaim/protocols/jabber/jabber.c:1476 msgid "Item Not Found" msgstr "Elemento no encontrado" -#: ../libgaim/protocols/jabber/jabber.c:1473 +#: ../libgaim/protocols/jabber/jabber.c:1478 msgid "Malformed Jabber ID" msgstr "ID de Jabber no válido" -#: ../libgaim/protocols/jabber/jabber.c:1475 +#: ../libgaim/protocols/jabber/jabber.c:1480 msgid "Not Acceptable" msgstr "No aceptable" -#: ../libgaim/protocols/jabber/jabber.c:1477 +#: ../libgaim/protocols/jabber/jabber.c:1482 msgid "Not Allowed" msgstr "No permitido" -#: ../libgaim/protocols/jabber/jabber.c:1481 +#: ../libgaim/protocols/jabber/jabber.c:1486 msgid "Payment Required" msgstr "Pago necesario" -#: ../libgaim/protocols/jabber/jabber.c:1483 +#: ../libgaim/protocols/jabber/jabber.c:1488 msgid "Recipient Unavailable" msgstr "Destinatario no disponible" -#: ../libgaim/protocols/jabber/jabber.c:1487 +#: ../libgaim/protocols/jabber/jabber.c:1492 msgid "Registration Required" msgstr "Registro necesario" -#: ../libgaim/protocols/jabber/jabber.c:1489 +#: ../libgaim/protocols/jabber/jabber.c:1494 msgid "Remote Server Not Found" msgstr "No se encontró el servidor remoto" -#: ../libgaim/protocols/jabber/jabber.c:1491 +#: ../libgaim/protocols/jabber/jabber.c:1496 msgid "Remote Server Timeout" msgstr "Expiró el tiempo del servidor remoto" -#: ../libgaim/protocols/jabber/jabber.c:1493 +#: ../libgaim/protocols/jabber/jabber.c:1498 msgid "Server Overloaded" msgstr "Servidor sobrecargado" -#: ../libgaim/protocols/jabber/jabber.c:1495 +#: ../libgaim/protocols/jabber/jabber.c:1500 msgid "Service Unavailable" msgstr "Servicio no disponible" -#: ../libgaim/protocols/jabber/jabber.c:1497 +#: ../libgaim/protocols/jabber/jabber.c:1502 msgid "Subscription Required" msgstr "Subscripción necesaria" -#: ../libgaim/protocols/jabber/jabber.c:1499 +#: ../libgaim/protocols/jabber/jabber.c:1504 msgid "Unexpected Request" msgstr "Solicitud no esperada" -#: ../libgaim/protocols/jabber/jabber.c:1506 +#: ../libgaim/protocols/jabber/jabber.c:1511 msgid "Authorization Aborted" msgstr "Autorización interrumpida" -#: ../libgaim/protocols/jabber/jabber.c:1508 +#: ../libgaim/protocols/jabber/jabber.c:1513 msgid "Incorrect encoding in authorization" msgstr "Codificación incorrecta en la autorización" -#: ../libgaim/protocols/jabber/jabber.c:1511 +#: ../libgaim/protocols/jabber/jabber.c:1516 msgid "Invalid authzid" msgstr "Authzid inválido" -#: ../libgaim/protocols/jabber/jabber.c:1514 +#: ../libgaim/protocols/jabber/jabber.c:1519 msgid "Invalid Authorization Mechanism" msgstr "Mecanismo de autorización inválido" -#: ../libgaim/protocols/jabber/jabber.c:1517 +#: ../libgaim/protocols/jabber/jabber.c:1522 msgid "Authorization mechanism too weak" msgstr "Mecanismo de autorización demasiado débil" -#: ../libgaim/protocols/jabber/jabber.c:1522 +#: ../libgaim/protocols/jabber/jabber.c:1527 msgid "Temporary Authentication Failure" msgstr "Falló temporal de la autenticación" -#: ../libgaim/protocols/jabber/jabber.c:1525 +#: ../libgaim/protocols/jabber/jabber.c:1530 msgid "Authentication Failure" msgstr "Falló de autenticación" -#: ../libgaim/protocols/jabber/jabber.c:1529 +#: ../libgaim/protocols/jabber/jabber.c:1534 msgid "Bad Format" msgstr "Formato erróneo" -#: ../libgaim/protocols/jabber/jabber.c:1531 +#: ../libgaim/protocols/jabber/jabber.c:1536 msgid "Bad Namespace Prefix" msgstr "Prefijo del espacio de nombres erróneo" -#: ../libgaim/protocols/jabber/jabber.c:1534 +#: ../libgaim/protocols/jabber/jabber.c:1539 msgid "Resource Conflict" msgstr "Conflicto de recursos" -#: ../libgaim/protocols/jabber/jabber.c:1536 +#: ../libgaim/protocols/jabber/jabber.c:1541 #: ../libgaim/protocols/silc/ops.c:1729 msgid "Connection Timeout" msgstr "Expiró la conexión" -#: ../libgaim/protocols/jabber/jabber.c:1538 +#: ../libgaim/protocols/jabber/jabber.c:1543 msgid "Host Gone" msgstr "Servidor desaparecido" -#: ../libgaim/protocols/jabber/jabber.c:1540 +#: ../libgaim/protocols/jabber/jabber.c:1545 msgid "Host Unknown" msgstr "Servidor desconocido" -#: ../libgaim/protocols/jabber/jabber.c:1542 +#: ../libgaim/protocols/jabber/jabber.c:1547 msgid "Improper Addressing" msgstr "Direccionamiento incorrecto" -#: ../libgaim/protocols/jabber/jabber.c:1546 +#: ../libgaim/protocols/jabber/jabber.c:1551 msgid "Invalid ID" msgstr "ID no válido" -#: ../libgaim/protocols/jabber/jabber.c:1548 +#: ../libgaim/protocols/jabber/jabber.c:1553 msgid "Invalid Namespace" msgstr "Espacio de nombres no válido" -#: ../libgaim/protocols/jabber/jabber.c:1550 +#: ../libgaim/protocols/jabber/jabber.c:1555 msgid "Invalid XML" msgstr "XML inválido" -#: ../libgaim/protocols/jabber/jabber.c:1552 +#: ../libgaim/protocols/jabber/jabber.c:1557 msgid "Non-matching Hosts" msgstr "No existen servidores coincidentes" -#: ../libgaim/protocols/jabber/jabber.c:1556 +#: ../libgaim/protocols/jabber/jabber.c:1561 msgid "Policy Violation" msgstr "Violación de la política" -#: ../libgaim/protocols/jabber/jabber.c:1558 +#: ../libgaim/protocols/jabber/jabber.c:1563 msgid "Remote Connection Failed" msgstr "Falló la conexión remota" -#: ../libgaim/protocols/jabber/jabber.c:1560 +#: ../libgaim/protocols/jabber/jabber.c:1565 msgid "Resource Constraint" msgstr "Restricción de recursos" -#: ../libgaim/protocols/jabber/jabber.c:1562 +#: ../libgaim/protocols/jabber/jabber.c:1567 msgid "Restricted XML" msgstr "XML restringido" -#: ../libgaim/protocols/jabber/jabber.c:1564 +#: ../libgaim/protocols/jabber/jabber.c:1569 msgid "See Other Host" msgstr "Ver otros servidores" -#: ../libgaim/protocols/jabber/jabber.c:1566 +#: ../libgaim/protocols/jabber/jabber.c:1571 msgid "System Shutdown" msgstr "Parada del sistema" -#: ../libgaim/protocols/jabber/jabber.c:1568 +#: ../libgaim/protocols/jabber/jabber.c:1573 msgid "Undefined Condition" msgstr "Condición no definida" -#: ../libgaim/protocols/jabber/jabber.c:1570 +#: ../libgaim/protocols/jabber/jabber.c:1575 msgid "Unsupported Encoding" msgstr "Codificación no soportada" -#: ../libgaim/protocols/jabber/jabber.c:1572 +#: ../libgaim/protocols/jabber/jabber.c:1577 msgid "Unsupported Stanza Type" msgstr "Tipo de «stanza» no soportado" -#: ../libgaim/protocols/jabber/jabber.c:1574 +#: ../libgaim/protocols/jabber/jabber.c:1579 msgid "Unsupported Version" msgstr "Versión no soportada" -#: ../libgaim/protocols/jabber/jabber.c:1576 +#: ../libgaim/protocols/jabber/jabber.c:1581 msgid "XML Not Well Formed" msgstr "XML malformado" -#: ../libgaim/protocols/jabber/jabber.c:1578 +#: ../libgaim/protocols/jabber/jabber.c:1583 msgid "Stream Error" msgstr "Error de flujo" -#: ../libgaim/protocols/jabber/jabber.c:1645 +#: ../libgaim/protocols/jabber/jabber.c:1650 #, c-format msgid "Unable to ban user %s" msgstr "No puede echar al usuario %s" -#: ../libgaim/protocols/jabber/jabber.c:1665 +#: ../libgaim/protocols/jabber/jabber.c:1670 #, c-format msgid "Unknown affiliation: \"%s\"" msgstr "Afiliación desconocida: \"%s\"" -#: ../libgaim/protocols/jabber/jabber.c:1670 +#: ../libgaim/protocols/jabber/jabber.c:1675 #, c-format msgid "Unable to affiliate user %s as \"%... [truncated message content] |
From: <sa...@us...> - 2007-03-24 17:48:08
|
Revision: 18217 http://svn.sourceforge.net/gaim/?rev=18217&view=rev Author: sadrul Date: 2007-03-24 10:48:08 -0700 (Sat, 24 Mar 2007) Log Message: ----------- Use 'make -f Makefile.oot' if you are building out-of-tree. Modified Paths: -------------- trunk/libgaim/example/nullclient.c Added Paths: ----------- trunk/libgaim/example/Makefile.oot Added: trunk/libgaim/example/Makefile.oot =================================================================== --- trunk/libgaim/example/Makefile.oot (rev 0) +++ trunk/libgaim/example/Makefile.oot 2007-03-24 17:48:08 UTC (rev 18217) @@ -0,0 +1,7 @@ +CFLAGS=`pkg-config --cflags gaim` +LDFLAGS=`pkg-config --libs gaim` + +all: nullclient + +clean: + @rm -f *.o nullclient Property changes on: trunk/libgaim/example/Makefile.oot ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Modified: trunk/libgaim/example/nullclient.c =================================================================== --- trunk/libgaim/example/nullclient.c 2007-03-24 05:34:01 UTC (rev 18216) +++ trunk/libgaim/example/nullclient.c 2007-03-24 17:48:08 UTC (rev 18217) @@ -6,7 +6,6 @@ #include "ft.h" #include "log.h" #include "notify.h" -#include "prefix.h" #include "prefs.h" #include "prpl.h" #include "pounce.h" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rl...@us...> - 2007-03-24 05:35:19
|
Revision: 18216 http://svn.sourceforge.net/gaim/?rev=18216&view=rev Author: rlaager Date: 2007-03-23 22:34:01 -0700 (Fri, 23 Mar 2007) Log Message: ----------- SF Patch #1686400 from Eoin Coffey ("ecoffey") ecoffey described the changes: 1) Small tweaks to the loader to bring it up to speed with new mono versions and API wrapper changes that grim had made. (was in original patch, just forgot about it :-P) 2) .NET Plugins are now required to define an Id as part of their info. 3) Modified gaim_probe_plugin to check for existence of info->id and to make sure it's not empty; Prints an error, stores an error in the plugin and sets plugin->unloadable = TRUE. Modified Paths: -------------- trunk/libgaim/plugin.c trunk/libgaim/plugins/mono/BooPlugin.boo trunk/libgaim/plugins/mono/GetBuddyBack.cs trunk/libgaim/plugins/mono/MPlugin.cs trunk/libgaim/plugins/mono/api/GaimPlugin.cs trunk/libgaim/plugins/mono/loader/mono-helper.c trunk/libgaim/plugins/mono/loader/mono-helper.h trunk/libgaim/plugins/mono/loader/mono.c Modified: trunk/libgaim/plugin.c =================================================================== --- trunk/libgaim/plugin.c 2007-03-23 06:58:04 UTC (rev 18215) +++ trunk/libgaim/plugin.c 2007-03-24 05:34:01 UTC (rev 18216) @@ -369,6 +369,20 @@ return plugin; } + /* + * Check to make sure a plugin has defined an id. + * Not having this check caused gaim_plugin_unload to + * enter an infinite loop in certain situations by passing + * gaim_find_plugin_by_id a NULL value. -- ecoffey + */ + if (!plugin->info->id || !strcmp(plugin->info->id, "")) + { + plugin->error = g_strdup_printf(_("This plugin has not defined an ID.")); + gaim_debug_error("plugins", "%s is not loadable: info->id is not defined.\n", plugin->path); + plugin->unloadable = TRUE; + return plugin; + } + /* Really old plugins. */ if (plugin->info->magic != GAIM_PLUGIN_MAGIC) { Modified: trunk/libgaim/plugins/mono/BooPlugin.boo =================================================================== --- trunk/libgaim/plugins/mono/BooPlugin.boo 2007-03-23 06:58:04 UTC (rev 18215) +++ trunk/libgaim/plugins/mono/BooPlugin.boo 2007-03-24 05:34:01 UTC (rev 18216) @@ -18,5 +18,5 @@ Debug.debug(Debug.INFO, "booplugin", "destroying...\n") override def Info(): - return GaimPluginInfo("Boo Plugin", "0.1", "Test Boo Plugin", "Longer Description", "Eoin Coffey", "urled") + return GaimPluginInfo("mono-boo", "Boo Plugin", "0.1", "Test Boo Plugin", "Longer Description", "Eoin Coffey", "urled") Modified: trunk/libgaim/plugins/mono/GetBuddyBack.cs =================================================================== --- trunk/libgaim/plugins/mono/GetBuddyBack.cs 2007-03-23 06:58:04 UTC (rev 18215) +++ trunk/libgaim/plugins/mono/GetBuddyBack.cs 2007-03-24 05:34:01 UTC (rev 18216) @@ -2,7 +2,7 @@ public class GetBuddyBack : Plugin { - private static PluginInfo info = new PluginInfo("C# Get Buddy Back", "0.1", "Prints when a Buddy returns", "Longer Description", "Eoin Coffey", "urled"); + private static PluginInfo info = new PluginInfo("mono-buddyback", "C# Get Buddy Back", "0.1", "Prints when a Buddy returns", "Longer Description", "Eoin Coffey", "urled"); public GetBuddyBack() : base (info) @@ -21,7 +21,7 @@ Debug.debug(Debug.INFO, "buddyback", "loading...\n"); /*Signal.connect(BuddyList.GetHandle(), this, "buddy-back", new Signal.Handler(HandleSig));*/ - /*BuddyList.OnBuddyBack.connect(this, new Signal.Handler(HandleSig));*/ + BuddyList.OnBuddyStatusChanged.connect(this, new Signal.Handler(HandleSig)); } public override void Unload() Modified: trunk/libgaim/plugins/mono/MPlugin.cs =================================================================== --- trunk/libgaim/plugins/mono/MPlugin.cs 2007-03-23 06:58:04 UTC (rev 18215) +++ trunk/libgaim/plugins/mono/MPlugin.cs 2007-03-24 05:34:01 UTC (rev 18216) @@ -2,7 +2,7 @@ public class MPlugin : Plugin { - private static PluginInfo info = new PluginInfo("C# Plugin", "0.1", "Test C# Plugin", "Longer Description", "Eoin Coffey", "urled"); + private static PluginInfo info = new PluginInfo("mono-mplugin", "C# Plugin", "0.1", "Test C# Plugin", "Longer Description", "Eoin Coffey", "urled"); public MPlugin() : base(info) Modified: trunk/libgaim/plugins/mono/api/GaimPlugin.cs =================================================================== --- trunk/libgaim/plugins/mono/api/GaimPlugin.cs 2007-03-23 06:58:04 UTC (rev 18215) +++ trunk/libgaim/plugins/mono/api/GaimPlugin.cs 2007-03-24 05:34:01 UTC (rev 18216) @@ -1,5 +1,6 @@ namespace Gaim { public class PluginInfo { + private string id; private string name; private string version; private string summary; @@ -7,9 +8,10 @@ private string author; private string homepage; - public PluginInfo(string name, string version, string summary, + public PluginInfo(string id, string name, string version, string summary, string description, string author, string homepage) { + this.id = id; this.name = name; this.version = version; this.summary = summary; @@ -18,6 +20,10 @@ this.homepage = homepage; } + public string Id { + get { return id; } + } + public string Name { get { return name; } } Modified: trunk/libgaim/plugins/mono/loader/mono-helper.c =================================================================== --- trunk/libgaim/plugins/mono/loader/mono-helper.c 2007-03-23 06:58:04 UTC (rev 18215) +++ trunk/libgaim/plugins/mono/loader/mono-helper.c 2007-03-24 05:34:01 UTC (rev 18216) @@ -84,10 +84,13 @@ total = mono_image_get_table_rows (image, MONO_TABLE_TYPEDEF); for (i = 1; i <= total; ++i) { klass = mono_class_get (image, MONO_TOKEN_TYPE_DEF | i); + pklass = mono_class_get_parent(klass); - if (pklass) - if (strcmp("GaimPlugin", mono_class_get_name(pklass)) == 0) + if (pklass) { + + if (strcmp("Plugin", mono_class_get_name(pklass)) == 0) return klass; + } } return NULL; @@ -126,6 +129,18 @@ return mono_string_to_utf8(str); } +MonoObject* ml_get_info_prop(MonoObject *obj) +{ + MonoClass *klass; + MonoProperty *prop; + + klass = mono_class_get_parent(mono_object_get_class(obj)); + + prop = mono_class_get_property_from_name(klass, "Info"); + + return mono_property_get_value(prop, obj, NULL, NULL); +} + gboolean ml_is_api_dll(MonoImage *image) { MonoClass *klass; Modified: trunk/libgaim/plugins/mono/loader/mono-helper.h =================================================================== --- trunk/libgaim/plugins/mono/loader/mono-helper.h 2007-03-23 06:58:04 UTC (rev 18215) +++ trunk/libgaim/plugins/mono/loader/mono-helper.h 2007-03-24 05:34:01 UTC (rev 18216) @@ -40,6 +40,8 @@ void ml_set_prop_string(MonoObject *obj, char *field, char *data); +MonoObject* ml_get_info_prop(MonoObject *obj); + gboolean ml_is_api_dll(MonoImage *image); MonoDomain* ml_get_domain(void); Modified: trunk/libgaim/plugins/mono/loader/mono.c =================================================================== --- trunk/libgaim/plugins/mono/loader/mono.c 2007-03-23 06:58:04 UTC (rev 18215) +++ trunk/libgaim/plugins/mono/loader/mono.c 2007-03-24 05:34:01 UTC (rev 18216) @@ -26,9 +26,8 @@ { MonoAssembly *assm; MonoMethod *m = NULL; - MonoMethod *info_method = NULL; MonoObject *plugin_info; - gboolean found_load = FALSE, found_unload = FALSE, found_destroy = FALSE, found_info = FALSE; + gboolean found_load = FALSE, found_unload = FALSE, found_destroy = FALSE; gpointer iter = NULL; GaimPluginInfo *info; @@ -71,6 +70,7 @@ mono_runtime_object_init(mplug->obj); while ((m = mono_class_get_methods(mplug->klass, &iter))) { + gaim_debug(GAIM_DEBUG_INFO, "mono", "plugin method: %s\n", mono_method_get_name(m)); if (strcmp(mono_method_get_name(m), "Load") == 0) { mplug->load = m; found_load = TRUE; @@ -80,22 +80,20 @@ } else if (strcmp(mono_method_get_name(m), "Destroy") == 0) { mplug->destroy = m; found_destroy = TRUE; - } else if (strcmp(mono_method_get_name(m), "Info") == 0) { - info_method = m; - found_info = TRUE; } } - if (!(found_load && found_unload && found_destroy && found_info)) { + if (!(found_load && found_unload && found_destroy)) { gaim_debug(GAIM_DEBUG_ERROR, "mono", "did not find the required methods\n"); return FALSE; } + + plugin_info = ml_get_info_prop(mplug->obj); - plugin_info = ml_invoke(info_method, mplug->obj, NULL); - /* now that the methods are filled out we can populate the info struct with all the needed info */ + info->id = ml_get_prop_string(plugin_info, "Id"); info->name = ml_get_prop_string(plugin_info, "Name"); info->version = ml_get_prop_string(plugin_info, "Version"); info->summary = ml_get_prop_string(plugin_info, "Summary"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2007-03-23 06:58:08
|
Revision: 18215 http://svn.sourceforge.net/gaim/?rev=18215&view=rev Author: thekingant Date: 2007-03-22 23:58:04 -0700 (Thu, 22 Mar 2007) Log Message: ----------- Trixy Tabbin's Modified Paths: -------------- web/htdocs/faq2.txt Modified: web/htdocs/faq2.txt =================================================================== --- web/htdocs/faq2.txt 2007-03-23 06:52:10 UTC (rev 18214) +++ web/htdocs/faq2.txt 2007-03-23 06:58:04 UTC (rev 18215) @@ -1067,14 +1067,14 @@ !SECTION Development -!ANCHOR contribute +!ANCHOR contribute Q: Can I help? A: Yes! We especially need small patches for small bugs, and lots of bug triaging. There are a slew of a bug reports in Gaim's bug report tracker - you could pick one and try to tackle it and submit a patch. We love patches. - +<p> Bug triaging is when you look at a bug report and determine whether it is a duplicate of an earlier report, or whether it is user error, or maybe you need to request additional information to be able to reproduce @@ -1083,6 +1083,7 @@ appropriate changes. <a href="http://sourceforge.net/tracker/?func=browse&group_id=235&atid=100235">Dig in.</a> +</p> Q: Gaim never leaves a core file. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2007-03-23 06:52:11
|
Revision: 18214 http://svn.sourceforge.net/gaim/?rev=18214&view=rev Author: thekingant Date: 2007-03-22 23:52:10 -0700 (Thu, 22 Mar 2007) Log Message: ----------- We should really try to motivate young, potential future developers more Modified Paths: -------------- web/htdocs/faq2.txt Modified: web/htdocs/faq2.txt =================================================================== --- web/htdocs/faq2.txt 2007-03-21 08:33:15 UTC (rev 18213) +++ web/htdocs/faq2.txt 2007-03-23 06:52:10 UTC (rev 18214) @@ -1067,16 +1067,23 @@ !SECTION Development +!ANCHOR contribute Q: Can I help? -A: But of course. Just find something that's bugging you and fix it. -There are a slew of a bug reports in Gaim's bug report tracker - you could -pick one and try to tackle it and submit a patch. You could also help -with general bug triage by going through the bug reports and leaving -comments such as "this has been fixed" or "this is a duplicate of bug -#12345." As always, make sure you follow the same coding style used in -Gaim, and make sure you don't break the core/UI split. +A: Yes! We especially need small patches for small bugs, and lots of +bug triaging. There are a slew of a bug reports in Gaim's bug report +tracker - you could pick one and try to tackle it and submit a patch. +We love patches. +Bug triaging is when you look at a bug report and determine whether it +is a duplicate of an earlier report, or whether it is user error, or +maybe you need to request additional information to be able to reproduce +the bug. SourceForge won't let random users modify the settings on bugs, +but if you leave helpful comments we can go through and make the +appropriate changes. <a +href="http://sourceforge.net/tracker/?func=browse&group_id=235&atid=100235">Dig +in.</a> + Q: Gaim never leaves a core file. A: On most installs core files are limited in size to 0 bytes, and are @@ -1091,7 +1098,10 @@ video chat? A: We hope to add voice and video support in Gaim 3.0.0. We don't -have a timeline for when this will be finished. +have a timeline for when this will be finished. Voice and video is +a very time intensive feature, and many of the core group of Gaim +developers are very busy. <a href="#contribute">Help ease their +burden!</a> Q: Where should I report bugs? This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sa...@us...> - 2007-03-21 08:33:18
|
Revision: 18213 http://svn.sourceforge.net/gaim/?rev=18213&view=rev Author: sadrul Date: 2007-03-21 01:33:15 -0700 (Wed, 21 Mar 2007) Log Message: ----------- A file selector Modified Paths: -------------- trunk/console/libgnt/Makefile.am Added Paths: ----------- trunk/console/libgnt/gntfilesel.c trunk/console/libgnt/gntfilesel.h Modified: trunk/console/libgnt/Makefile.am =================================================================== --- trunk/console/libgnt/Makefile.am 2007-03-20 16:42:41 UTC (rev 18212) +++ trunk/console/libgnt/Makefile.am 2007-03-21 08:33:15 UTC (rev 18213) @@ -16,6 +16,7 @@ gntcolors.c \ gntcombobox.c \ gntentry.c \ + gntfilesel.c \ gntkeys.c \ gntlabel.c \ gntline.c \ @@ -39,6 +40,7 @@ gntcolors.h \ gntcombobox.h \ gntentry.h \ + gntfilesel.h \ gntkeys.h \ gntlabel.h \ gntline.h \ @@ -73,6 +75,7 @@ libgnt_la_LIBADD = \ $(GLIB_LIBS) \ $(GNT_LIBS) + AM_CPPFLAGS = \ $(GLIB_CFLAGS) \ Added: trunk/console/libgnt/gntfilesel.c =================================================================== --- trunk/console/libgnt/gntfilesel.c (rev 0) +++ trunk/console/libgnt/gntfilesel.c 2007-03-21 08:33:15 UTC (rev 18213) @@ -0,0 +1,397 @@ +#include "gntbutton.h" +#include "gntentry.h" +#include "gntfilesel.h" +#include "gntlabel.h" +#include "gntmarshal.h" +#include "gntstyle.h" +#include "gnttree.h" + +#include <string.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <unistd.h> + +#include <glob.h> + +enum +{ + SIG_FILE_SELECTED, + SIGS +}; + +static GntWindowClass *parent_class = NULL; +static guint signals[SIGS] = { 0 }; +static void (*orig_map)(GntWidget *widget); + +static void +gnt_file_sel_destroy(GntWidget *widget) +{ + GntFileSel *sel = GNT_FILE_SEL(widget); + g_free(sel->current); +} + +static char * +process_path(const char *path) +{ + char **splits = NULL; + int i, j; + char *str, *ret; + + splits = g_strsplit(path, G_DIR_SEPARATOR_S, -1); + for (i = 0, j = 0; splits[i]; i++) { + if (strcmp(splits[i], ".") == 0) { + } else if (strcmp(splits[i], "..") == 0) { + if (j) + j--; + } else { + if (i != j) { + g_free(splits[j]); + splits[j] = splits[i]; + splits[i] = NULL; + } + j++; + } + } + g_free(splits[j]); + splits[j] = NULL; + str = g_build_pathv(G_DIR_SEPARATOR_S, splits); + ret = g_strdup_printf(G_DIR_SEPARATOR_S "%s", str); + g_free(str); + g_strfreev(splits); + return ret; +} + +static void +update_location(GntFileSel *sel) +{ + char *old; + const char *tmp; + tmp = (const char*)gnt_tree_get_selection_data(sel->dirsonly ? GNT_TREE(sel->dirs) : GNT_TREE(sel->files)); + old = g_strdup_printf("%s%s%s", sel->current, sel->current[1] ? G_DIR_SEPARATOR_S : "", tmp ? tmp : ""); + gnt_entry_set_text(GNT_ENTRY(sel->location), old); + g_free(old); +} + +static gboolean +location_changed(GntFileSel *sel, GError **err) +{ + GDir *dir; + const char *str; + + if (!sel->dirs) + return TRUE; + + gnt_tree_remove_all(GNT_TREE(sel->dirs)); + if (sel->files) + gnt_tree_remove_all(GNT_TREE(sel->files)); + gnt_entry_set_text(GNT_ENTRY(sel->location), NULL); + if (sel->current == NULL) { + if (GNT_WIDGET_IS_FLAG_SET(GNT_WIDGET(sel), GNT_WIDGET_MAPPED)) + gnt_widget_draw(GNT_WIDGET(sel)); + return TRUE; + } + + dir = g_dir_open(sel->current, 0, err); + if (dir == NULL || *err) { + g_printerr("GntFileSel: error opening location %s (%s)\n", + sel->current, *err ? (*err)->message : "reason unknown"); + return FALSE; + } + + if (*sel->current != '\0' && strcmp(sel->current, G_DIR_SEPARATOR_S)) + gnt_tree_add_row_after(GNT_TREE(sel->dirs), g_strdup(".."), + gnt_tree_create_row(GNT_TREE(sel->dirs), ".."), NULL, NULL); + + while ((str = g_dir_read_name(dir)) != NULL) { + char *fp = g_build_filename(sel->current, str, NULL); + struct stat st; + + if (stat(fp, &st)) { + g_printerr("Error stating location %s\n", fp); + } else { + if (S_ISDIR(st.st_mode)) + gnt_tree_add_row_after(GNT_TREE(sel->dirs), g_strdup(str), + gnt_tree_create_row(GNT_TREE(sel->dirs), str), NULL, NULL); + else if (!sel->dirsonly) { + char size[128]; + snprintf(size, sizeof(size), "%ld", (long)st.st_size); + + gnt_tree_add_row_after(GNT_TREE(sel->files), g_strdup(str), + gnt_tree_create_row(GNT_TREE(sel->files), str, size, ""), NULL, NULL); + } + } + g_free(fp); + } + if (GNT_WIDGET_IS_FLAG_SET(GNT_WIDGET(sel), GNT_WIDGET_MAPPED)) + gnt_widget_draw(GNT_WIDGET(sel)); + return TRUE; +} + +static gboolean +dir_key_pressed(GntTree *tree, const char *key, GntFileSel *sel) +{ + if (strcmp(key, "\r") == 0) { + /* XXX: if we are moving up the tree, make sure the current node is selected after the redraw */ + char *str = g_strdup(gnt_tree_get_selection_data(tree)); + char *path = g_build_filename(sel->current, str, NULL); + char *dir = g_path_get_basename(sel->current); + if (!gnt_file_sel_set_current_location(sel, path)) { + gnt_tree_set_selected(tree, str); + } else if (strcmp(str, "..") == 0) { + gnt_tree_set_selected(tree, dir); + } + g_free(dir); + g_free(str); + g_free(path); + return TRUE; + } + return FALSE; +} + +static gboolean +location_key_pressed(GntTree *tree, const char *key, GntFileSel *sel) +{ + if (strcmp(key, "\r") == 0) { + int count; + glob_t gl; + char *path; + char *str; + struct stat st; + int glob_ret; + + str = (char*)gnt_entry_get_text(GNT_ENTRY(sel->location)); + if (*str == G_DIR_SEPARATOR) + path = g_strdup(str); + else + path = g_strdup_printf("%s" G_DIR_SEPARATOR_S "%s", sel->current, str); + str = process_path(path); + g_free(path); + path = str; + + if (!stat(path, &st)) { + if (S_ISDIR(st.st_mode)) { + gnt_file_sel_set_current_location(sel, path); + goto success; + } + } + + glob_ret = glob(path, GLOB_MARK, NULL, &gl); + if (!glob_ret) { /* XXX: do something with the return value */ + char *loc = g_path_get_dirname(gl.gl_pathv[0]); + + stat(gl.gl_pathv[0], &st); + gnt_file_sel_set_current_location(sel, loc); /* XXX: check the return value */ + g_free(loc); + if (!S_ISDIR(st.st_mode) && !sel->dirsonly) { + gnt_tree_remove_all(GNT_TREE(sel->files)); + for (count = 0; count < gl.gl_pathc; count++) { + char *tmp = process_path(gl.gl_pathv[count]); + loc = g_path_get_dirname(tmp); + if (g_utf8_collate(sel->current, loc) == 0) { + char *base = g_path_get_basename(tmp); + char size[128]; + snprintf(size, sizeof(size), "%ld", (long)st.st_size); + gnt_tree_add_row_after(GNT_TREE(sel->files), base, + gnt_tree_create_row(GNT_TREE(sel->files), base, size, ""), NULL, NULL); + } + g_free(loc); + g_free(tmp); + } + gnt_widget_draw(sel->files); + } + } else if (sel->files) { + gnt_tree_remove_all(GNT_TREE(sel->files)); + gnt_widget_draw(sel->files); + } + globfree(&gl); +success: + g_free(path); + return TRUE; + } + return FALSE; +} + +static void +file_sel_changed(GntWidget *widget, gpointer old, gpointer current, GntFileSel *sel) +{ + update_location(sel); +} + +static void +gnt_file_sel_map(GntWidget *widget) +{ + GntFileSel *sel = GNT_FILE_SEL(widget); + GntWidget *hbox, *vbox; + + vbox = gnt_vbox_new(FALSE); + gnt_box_set_pad(GNT_BOX(vbox), 0); + gnt_box_set_alignment(GNT_BOX(vbox), GNT_ALIGN_LEFT); + + /* The dir. and files list */ + hbox = gnt_hbox_new(FALSE); + gnt_box_set_pad(GNT_BOX(hbox), 0); + + gnt_box_add_widget(GNT_BOX(hbox), sel->dirs); + + if (!sel->dirsonly) { + gnt_box_add_widget(GNT_BOX(hbox), sel->files); + } else { + g_signal_connect(G_OBJECT(sel->dirs), "selection_changed", G_CALLBACK(file_sel_changed), sel); + } + + gnt_box_add_widget(GNT_BOX(vbox), hbox); + gnt_box_add_widget(GNT_BOX(vbox), sel->location); + + /* The buttons */ + hbox = gnt_hbox_new(FALSE); + gnt_box_add_widget(GNT_BOX(hbox), sel->cancel); + gnt_box_add_widget(GNT_BOX(hbox), sel->select); + gnt_box_add_widget(GNT_BOX(vbox), hbox); + + gnt_box_add_widget(GNT_BOX(sel), vbox); + orig_map(widget); + update_location(sel); +} + +static void +gnt_file_sel_class_init(GntFileSelClass *klass) +{ + GntWidgetClass *kl = GNT_WIDGET_CLASS(klass); + parent_class = GNT_WINDOW_CLASS(klass); + kl->destroy = gnt_file_sel_destroy; + orig_map = kl->map; + kl->map = gnt_file_sel_map; + + signals[SIG_FILE_SELECTED] = + g_signal_new("file_selected", + G_TYPE_FROM_CLASS(klass), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET(GntFileSelClass, file_selected), + NULL, NULL, + gnt_closure_marshal_VOID__STRING_STRING, + G_TYPE_NONE, 0); + gnt_style_read_actions(G_OBJECT_CLASS_TYPE(klass), GNT_BINDABLE_CLASS(klass)); + + GNTDEBUG; +} + +static void +gnt_file_sel_init(GTypeInstance *instance, gpointer class) +{ + GNTDEBUG; +} + +/****************************************************************************** + * GntFileSel API + *****************************************************************************/ +GType +gnt_file_sel_get_gtype(void) +{ + static GType type = 0; + + if(type == 0) + { + static const GTypeInfo info = { + sizeof(GntFileSelClass), + NULL, /* base_init */ + NULL, /* base_finalize */ + (GClassInitFunc)gnt_file_sel_class_init, + NULL, /* class_finalize */ + NULL, /* class_data */ + sizeof(GntFileSel), + 0, /* n_preallocs */ + gnt_file_sel_init, /* instance_init */ + NULL + }; + + type = g_type_register_static(GNT_TYPE_WINDOW, + "GntFileSel", + &info, 0); + } + + return type; +} + +GntWidget *gnt_file_sel_new() +{ + GntWidget *widget = g_object_new(GNT_TYPE_FILE_SEL, NULL); + GntFileSel *sel = GNT_FILE_SEL(widget); + + sel->dirs = gnt_tree_new(); + gnt_tree_set_compare_func(GNT_TREE(sel->dirs), (GCompareFunc)g_utf8_collate); + gnt_tree_set_hash_fns(GNT_TREE(sel->dirs), g_str_hash, g_str_equal, g_free); + gnt_tree_set_column_titles(GNT_TREE(sel->dirs), "Directories"); + gnt_tree_set_show_title(GNT_TREE(sel->dirs), TRUE); + gnt_tree_set_col_width(GNT_TREE(sel->dirs), 0, 20); + g_signal_connect(G_OBJECT(sel->dirs), "key_pressed", G_CALLBACK(dir_key_pressed), sel); + + sel->files = gnt_tree_new_with_columns(2); /* Name, Size */ + gnt_tree_set_compare_func(GNT_TREE(sel->files), (GCompareFunc)g_utf8_collate); + gnt_tree_set_column_titles(GNT_TREE(sel->files), "Filename", "Size"); + gnt_tree_set_show_title(GNT_TREE(sel->files), TRUE); + gnt_tree_set_col_width(GNT_TREE(sel->files), 0, 25); + gnt_tree_set_col_width(GNT_TREE(sel->files), 1, 10); + g_signal_connect(G_OBJECT(sel->files), "selection_changed", G_CALLBACK(file_sel_changed), sel); + + /* The location entry */ + sel->location = gnt_entry_new(NULL); + g_signal_connect(G_OBJECT(sel->location), "key_pressed", G_CALLBACK(location_key_pressed), sel); + + sel->cancel = gnt_button_new("Cancel"); + sel->select = gnt_button_new("Select"); + + return widget; +} + +gboolean gnt_file_sel_set_current_location(GntFileSel *sel, const char *path) +{ + char *old; + GError *error = NULL; + gboolean ret = TRUE; + + old = sel->current; + sel->current = process_path(path); + if (!location_changed(sel, &error)) { + g_error_free(error); + error = NULL; + g_free(sel->current); + sel->current = old; + location_changed(sel, &error); + ret = FALSE; + } else + g_free(old); + + update_location(sel); + return ret; +} + +void gnt_file_sel_set_dirs_only(GntFileSel *sel, gboolean dirs) +{ + sel->dirsonly = dirs; +} + +gboolean gnt_file_sel_get_dirs_only(GntFileSel *sel) +{ + return sel->dirsonly; +} + +char *gnt_file_sel_get_selected_file(GntFileSel *sel) +{ + char *ret; + const char *tmp; + tmp = (const char*)gnt_tree_get_selection_data(sel->dirsonly ? GNT_TREE(sel->dirs) : GNT_TREE(sel->files)); + ret = g_strdup_printf("%s%s%s", sel->current, sel->current[1] ? G_DIR_SEPARATOR_S : "", tmp ? tmp : ""); + return ret; +} + +void gnt_file_sel_set_must_exist(GntFileSel *sel, gboolean must) +{ + /*XXX: What do I do with this? */ + sel->must_exist = must; +} + +gboolean gnt_file_sel_get_must_exist(GntFileSel *sel) +{ + return sel->must_exist; +} + Property changes on: trunk/console/libgnt/gntfilesel.c ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: trunk/console/libgnt/gntfilesel.h =================================================================== --- trunk/console/libgnt/gntfilesel.h (rev 0) +++ trunk/console/libgnt/gntfilesel.h 2007-03-21 08:33:15 UTC (rev 18213) @@ -0,0 +1,74 @@ +#ifndef GNT_FILE_SEL_H +#define GNT_FILE_SEL_H + +#include "gntwindow.h" +#include "gnt.h" +#include "gntcolors.h" +#include "gntkeys.h" + +#define GNT_TYPE_FILE_SEL (gnt_file_sel_get_gtype()) +#define GNT_FILE_SEL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GNT_TYPE_FILE_SEL, GntFileSel)) +#define GNT_FILE_SEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GNT_TYPE_FILE_SEL, GntFileSelClass)) +#define GNT_IS_FILE_SEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GNT_TYPE_FILE_SEL)) +#define GNT_IS_FILE_SEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_FILE_SEL)) +#define GNT_FILE_SEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_FILE_SEL, GntFileSelClass)) + +#define GNT_FILE_SEL_FLAGS(obj) (GNT_FILE_SEL(obj)->priv.flags) +#define GNT_FILE_SEL_SET_FLAGS(obj, flags) (GNT_FILE_SEL_FLAGS(obj) |= flags) +#define GNT_FILE_SEL_UNSET_FLAGS(obj, flags) (GNT_FILE_SEL_FLAGS(obj) &= ~(flags)) + +typedef struct _GnFileSel GntFileSel; +typedef struct _GnFileSelPriv GntFileSelPriv; +typedef struct _GnFileSelClass GntFileSelClass; + +struct _GnFileSel +{ + GntWindow parent; + + GntWidget *dirs; /* list of files */ + GntWidget *files; /* list of directories */ + GntWidget *location; /* location entry */ + + GntWidget *select; /* select button */ + GntWidget *cancel; /* cancel button */ + + char *current; /* Full path of the current location */ + /* XXX: someone should make these useful */ + gboolean must_exist; /* Make sure the selected file (the name entered in 'location') exists */ + gboolean dirsonly; /* Show only directories */ +}; + +struct _GnFileSelClass +{ + GntWindowClass parent; + + void (*file_selected)(GntFileSel *sel, const char *path, const char *filename); + void (*gnt_reserved1)(void); + void (*gnt_reserved2)(void); + void (*gnt_reserved3)(void); + void (*gnt_reserved4)(void); +}; + +G_BEGIN_DECLS + +GType gnt_file_sel_get_gtype(void); + +GntWidget *gnt_file_sel_new(); + +gboolean gnt_file_sel_set_current_location(GntFileSel *sel, const char *path); + +const char *gnt_file_sel_get_current_location(GntFileSel *sel); + +void gnt_file_sel_set_dirs_only(GntFileSel *sel, gboolean dirs); + +gboolean gnt_file_sel_get_dirs_only(GntFileSel *sel); + +void gnt_file_sel_set_must_exist(GntFileSel *sel, gboolean must); + +gboolean gnt_file_sel_get_must_exist(GntFileSel *sel); + +char *gnt_file_sel_get_selected_file(GntFileSel *sel); /* The returned value should be free'd */ + +G_END_DECLS + +#endif /* GNT_FILE_SEL_H */ Property changes on: trunk/console/libgnt/gntfilesel.h ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |