Mercurial > pidgin.yaz
comparison src/gtkprefs.c @ 8814:c61be128dff3
[gaim-migrate @ 9576]
Gary Kramlich says this fixes bugs in code he wrote, so I don't need
to mention his name. I think he's just trying to pretend his code
didn't have bugs. I'm citing him anyway.
committer: Tailor Script <tailor@pidgin.im>
author | Ethan Blanton <elb@pidgin.im> |
---|---|
date | Mon, 26 Apr 2004 15:46:12 +0000 |
parents | 7329d01bb770 |
children | 61fdef863ffa |
comparison
equal
deleted
inserted
replaced
8813:610bf83cbd93 | 8814:c61be128dff3 |
---|---|
361 if(GAIM_PLUGIN_HAS_PREF_FRAME(plug)) { | 361 if(GAIM_PLUGIN_HAS_PREF_FRAME(plug)) { |
362 GaimPluginUiInfo *prefs_info; | 362 GaimPluginUiInfo *prefs_info; |
363 | 363 |
364 prefs_info = GAIM_PLUGIN_UI_INFO(plug); | 364 prefs_info = GAIM_PLUGIN_UI_INFO(plug); |
365 | 365 |
366 if(prefs_info->frame != NULL) { | |
367 gaim_plugin_pref_frame_destroy(prefs_info->frame); | |
368 prefs_info->frame = NULL; | |
369 } | |
370 | |
366 if(prefs_info->iter != NULL) { | 371 if(prefs_info->iter != NULL) { |
367 g_free(prefs_info->iter); | 372 g_free(prefs_info->iter); |
368 prefs_info->iter = NULL; | 373 prefs_info->iter = NULL; |
369 } | 374 } |
370 } | 375 } |
1854 iter = proto_iter; | 1859 iter = proto_iter; |
1855 else | 1860 else |
1856 iter = plugin_iter; | 1861 iter = plugin_iter; |
1857 | 1862 |
1858 prefs_info = GAIM_PLUGIN_UI_INFO(plug); | 1863 prefs_info = GAIM_PLUGIN_UI_INFO(plug); |
1859 pref_frame = gaim_gtk_plugin_pref_create_frame(prefs_info->get_plugin_pref_frame(plug)); | 1864 prefs_info->frame = prefs_info->get_plugin_pref_frame(plug); |
1865 pref_frame = gaim_gtk_plugin_pref_create_frame(prefs_info->frame); | |
1860 | 1866 |
1861 if(pref_frame != NULL) { | 1867 if(pref_frame != NULL) { |
1862 prefs_info->iter = g_new0(GtkTreeIter, 1); | 1868 prefs_info->iter = g_new0(GtkTreeIter, 1); |
1863 prefs_notebook_add_page(_(plug->info->name), NULL, | 1869 prefs_notebook_add_page(_(plug->info->name), NULL, |
1864 pref_frame, prefs_info->iter, | 1870 pref_frame, prefs_info->iter, |
1892 GaimPluginUiInfo *prefs_info; | 1898 GaimPluginUiInfo *prefs_info; |
1893 | 1899 |
1894 prefs_info = GAIM_PLUGIN_UI_INFO(plug); | 1900 prefs_info = GAIM_PLUGIN_UI_INFO(plug); |
1895 | 1901 |
1896 if(prefs_info != NULL) { | 1902 if(prefs_info != NULL) { |
1903 if(prefs_info->frame != NULL) { | |
1904 gaim_plugin_pref_frame_destroy(prefs_info->frame); | |
1905 prefs_info->frame = NULL; | |
1906 } | |
1907 | |
1897 if(prefs_info->iter != NULL) { | 1908 if(prefs_info->iter != NULL) { |
1898 gtk_tree_store_remove(GTK_TREE_STORE(prefstree), prefs_info->iter); | 1909 gtk_tree_store_remove(GTK_TREE_STORE(prefstree), prefs_info->iter); |
1899 g_free(prefs_info->iter); | 1910 g_free(prefs_info->iter); |
1900 prefs_info->iter = NULL; | 1911 prefs_info->iter = NULL; |
1901 } | 1912 } |
2542 } | 2553 } |
2543 } | 2554 } |
2544 | 2555 |
2545 if(GAIM_PLUGIN_HAS_PREF_FRAME(plug)) { | 2556 if(GAIM_PLUGIN_HAS_PREF_FRAME(plug)) { |
2546 GtkWidget *gtk_frame; | 2557 GtkWidget *gtk_frame; |
2547 GaimPluginPrefFrame *pp_frame; | |
2548 GaimPluginUiInfo *prefs_info; | 2558 GaimPluginUiInfo *prefs_info; |
2549 | 2559 |
2550 prefs_info = GAIM_PLUGIN_UI_INFO(plug); | 2560 prefs_info = GAIM_PLUGIN_UI_INFO(plug); |
2551 pp_frame = prefs_info->get_plugin_pref_frame(plug); | 2561 prefs_info->frame = prefs_info->get_plugin_pref_frame(plug); |
2552 gtk_frame = gaim_gtk_plugin_pref_create_frame(pp_frame); | 2562 gtk_frame = gaim_gtk_plugin_pref_create_frame(prefs_info->frame); |
2553 gaim_plugin_pref_frame_destroy(pp_frame); | |
2554 | 2563 |
2555 if(GTK_IS_WIDGET(gtk_frame)) { | 2564 if(GTK_IS_WIDGET(gtk_frame)) { |
2556 prefs_info->iter = g_new0(GtkTreeIter, 1); | 2565 prefs_info->iter = g_new0(GtkTreeIter, 1); |
2557 prefs_notebook_add_page(_(plug->info->name), NULL, | 2566 prefs_notebook_add_page(_(plug->info->name), NULL, |
2558 gtk_frame, prefs_info->iter, | 2567 gtk_frame, prefs_info->iter, |
2559 (plug->info->type == GAIM_PLUGIN_PROTOCOL) ? &proto_iter : &plugin_iter, | 2568 (plug->info->type == GAIM_PLUGIN_PROTOCOL) ? &proto_iter : &plugin_iter, |
2560 notebook_page++); | 2569 notebook_page++); |
2570 } else if(prefs_info->frame) { | |
2571 /* in the event that there is a pref frame and we can | |
2572 * not make a widget out of it, we free the | |
2573 * pluginpref frame --Gary | |
2574 */ | |
2575 gaim_plugin_pref_frame_destroy(prefs_info->frame); | |
2561 } | 2576 } |
2562 } | 2577 } |
2563 } | 2578 } |
2564 } | 2579 } |
2565 } | 2580 } |