comparison pidgin/plugins/adiumthemes/webkit.c @ 32097:f00af06ef995

Removed some unused code.
author tdrhq@soc.pidgin.im
date Tue, 11 Aug 2009 00:09:01 +0000
parents d5b2b5021851
children 64a3d266e6ff
comparison
equal deleted inserted replaced
32096:d5b2b5021851 32097:f00af06ef995
917 917
918 static GtkWidget * 918 static GtkWidget *
919 get_variant_config_frame() 919 get_variant_config_frame()
920 { 920 {
921 PidginMessageStyle *style = pidgin_message_style_load (cur_style_dir); 921 PidginMessageStyle *style = pidgin_message_style_load (cur_style_dir);
922 GList *variants = get_variant_files(style); 922 GList *variants = get_variant_files(style), *iter;
923 GList *iter = variants;
924 char *curdir = NULL;
925 GtkWidget *combobox = gtk_combo_box_new_text(); 923 GtkWidget *combobox = gtk_combo_box_new_text();
926 int def = -1, index = 0; 924 int def = -1, index = 0;
927 char* css_path = g_strdup (style->css_path); 925 char* css_path = g_strdup (style->css_path);
928 926
929 pidgin_message_style_unref (style); 927 pidgin_message_style_unref (style);
930 928
931 for (; iter; iter = g_list_next (iter)) { 929 for (iter = variants; iter; iter = g_list_next (iter)) {
932 char *basename = g_path_get_basename(iter->data); 930 char *basename = g_path_get_basename(iter->data);
933 char *dirname = g_path_get_dirname(iter->data); 931 char *dirname = g_path_get_dirname(iter->data);
934 if (!curdir || !g_str_equal (curdir, dirname)) { 932 char *temp = g_strndup (basename, strlen(basename)-4);
935 char *plist, *plist_xml; 933 gtk_combo_box_append_text (GTK_COMBO_BOX(combobox), temp);
936 gsize plist_len; 934 g_free (temp);
937 xmlnode *node; 935
938 g_free(curdir);
939 curdir = strdup(dirname);
940 plist = g_build_filename(curdir, "..", "..", "Info.plist", NULL);
941 if (!g_file_get_contents(plist, &plist_xml, &plist_len, NULL)) {
942 continue;
943 }
944 node = xmlnode_from_str(plist_xml, plist_len);
945 if (!node) continue;
946 node = xmlnode_get_child(node, "dict");
947 if (!node) continue;
948 node = xmlnode_get_child(node, "key");
949 while (node && strcmp(xmlnode_get_data(node), "CFBundleName")) {
950 node = xmlnode_get_next_twin(node);
951 }
952 if (!node) continue;
953 node = node->next;
954 while (node && node->type != XMLNODE_TYPE_TAG) {
955 node = node->next;
956 }
957
958 }
959
960 {
961 char *temp = g_strndup (basename, strlen(basename)-4);
962 gtk_combo_box_append_text (GTK_COMBO_BOX(combobox), temp);
963 g_free (temp);
964 }
965 if (g_str_has_suffix (css_path, basename)) 936 if (g_str_has_suffix (css_path, basename))
966 def = index; 937 def = index;
967 index ++; 938 index ++;
968 939
969 g_free (basename); 940 g_free (basename);