Mercurial > pidgin
comparison src/gtkprefs.c @ 6040:80e3641ee9eb
[gaim-migrate @ 6490]
Various minor memleak fixes, and a rephrasing of an oscar error message.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sun, 06 Jul 2003 06:57:42 +0000 |
parents | 0c4d0c93c8c5 |
children | 8469f83b6cae |
comparison
equal
deleted
inserted
replaced
6039:0c4d0c93c8c5 | 6040:80e3641ee9eb |
---|---|
1625 GtkTreeModel *model = (GtkTreeModel *)data; | 1625 GtkTreeModel *model = (GtkTreeModel *)data; |
1626 GtkTreeIter iter; | 1626 GtkTreeIter iter; |
1627 GtkTreePath *path = gtk_tree_path_new_from_string(pth); | 1627 GtkTreePath *path = gtk_tree_path_new_from_string(pth); |
1628 GaimPlugin *plug; | 1628 GaimPlugin *plug; |
1629 gchar buf[1024]; | 1629 gchar buf[1024]; |
1630 gchar *name = NULL, *description = NULL; | |
1630 | 1631 |
1631 GdkCursor *wait = gdk_cursor_new (GDK_WATCH); | 1632 GdkCursor *wait = gdk_cursor_new (GDK_WATCH); |
1632 gdk_window_set_cursor(prefs->window, wait); | 1633 gdk_window_set_cursor(prefs->window, wait); |
1633 gdk_cursor_unref(wait); | 1634 gdk_cursor_unref(wait); |
1634 | 1635 |
1693 gaim_plugin_unload(plug); | 1694 gaim_plugin_unload(plug); |
1694 } | 1695 } |
1695 | 1696 |
1696 gdk_window_set_cursor(prefs->window, NULL); | 1697 gdk_window_set_cursor(prefs->window, NULL); |
1697 | 1698 |
1699 name = g_markup_escape_text(_(plug->info->name), -1); | |
1700 description = g_markup_escape_text(_(plug->info->description), -1); | |
1698 if (plug->error != NULL) { | 1701 if (plug->error != NULL) { |
1702 gchar *error = g_markup_escape_text(plug->error, -1); | |
1699 g_snprintf(buf, sizeof(buf), | 1703 g_snprintf(buf, sizeof(buf), |
1700 "<span size=\"larger\">%s %s</span>\n\n" | 1704 "<span size=\"larger\">%s %s</span>\n\n" |
1701 "<span weight=\"bold\" color=\"red\">%s</span>\n\n" | 1705 "<span weight=\"bold\" color=\"red\">%s</span>\n\n" |
1702 "%s", | 1706 "%s", |
1703 g_markup_escape_text(_(plug->info->name), -1), | 1707 name, plug->info->version, error, description); |
1704 plug->info->version, | 1708 g_free(error); |
1705 g_markup_escape_text(plug->error, -1), | 1709 } else { |
1706 g_markup_escape_text(_(plug->info->description), -1)); | |
1707 } | |
1708 else { | |
1709 g_snprintf(buf, sizeof(buf), | 1710 g_snprintf(buf, sizeof(buf), |
1710 "<span size=\"larger\">%s %s</span>\n\n%s", | 1711 "<span size=\"larger\">%s %s</span>\n\n%s", |
1711 g_markup_escape_text(_(plug->info->name), -1), | 1712 name, plug->info->version, description); |
1712 plug->info->version, | 1713 } |
1713 g_markup_escape_text(_(plug->info->description), -1)); | 1714 g_free(name); |
1714 } | 1715 g_free(description); |
1715 | 1716 |
1716 gtk_label_set_markup(GTK_LABEL(plugin_description), buf); | 1717 gtk_label_set_markup(GTK_LABEL(plugin_description), buf); |
1717 gtk_list_store_set (GTK_LIST_STORE (model), &iter, 0, | 1718 gtk_list_store_set (GTK_LIST_STORE (model), &iter, 0, |
1718 gaim_plugin_is_loaded(plug), -1); | 1719 gaim_plugin_is_loaded(plug), -1); |
1719 | 1720 |