Mercurial > pidgin.yaz
comparison src/gtkplugin.c @ 12174:c7652a910308
[gaim-migrate @ 14476]
KingAnt said:
"And if double-clicking loads a plugin, then double-clicking
again must unload the plugin. However, I think it's better
if double-clicking either opens the preferences or does nothing."
I disagree that double-clicking again must undo what happened from the first time, and in this case, that would totally defeat the goal. Given that this is possibly confusing no matter how we do it, let's take the safest route and not enable the plugin if it's not already. This still accomplishes my main goal of being able to double-click on a plugin I'm using to see its prefs.
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Sun, 20 Nov 2005 22:09:24 +0000 |
parents | 5e24b8e49522 |
children | 1c0fd404e07e |
comparison
equal
deleted
inserted
replaced
12173:81c63578aa39 | 12174:c7652a910308 |
---|---|
347 if (!gtk_tree_selection_get_selected(sel, &model, &iter)) | 347 if (!gtk_tree_selection_get_selected(sel, &model, &iter)) |
348 return; | 348 return; |
349 | 349 |
350 gtk_tree_model_get(model, &iter, 2, &plugin, -1); | 350 gtk_tree_model_get(model, &iter, 2, &plugin, -1); |
351 | 351 |
352 /* If the plugin is not loaded, then load it first. */ | |
353 if (!gaim_plugin_is_loaded(plugin)) | 352 if (!gaim_plugin_is_loaded(plugin)) |
354 { | 353 return; |
355 GtkTreePath *path = gtk_tree_model_get_path(model, &iter); | 354 |
356 gchar *pth = gtk_tree_path_to_string(path); | |
357 gtk_tree_path_free(path); | |
358 plugin_load(NULL, pth, model); | |
359 g_free(pth); | |
360 } | |
361 /* Now show the pref-dialog for the plugin */ | 355 /* Now show the pref-dialog for the plugin */ |
362 plugin_dialog_response_cb(NULL, 98121, sel); | 356 plugin_dialog_response_cb(NULL, 98121, sel); |
363 } | 357 } |
364 | 358 |
365 void gaim_gtk_plugin_dialog_show() | 359 void gaim_gtk_plugin_dialog_show() |