Fri, 18 Nov 2005 16:37:51 +0000
[gaim-migrate @ 14436]
SF Patch #1356575 from Kevin Stange (SimGuy)
"This patch moves buddy pounces out of the menu and into
a new dialog, as suggested by Sean. I'm not ready to
say this is finished, but it's a solid starting point
and it does work.
I changed the namespacing a little from gaim_gtkpounce
to gaim_gtk_pounce to be consistent with the rest of Gaim.
I wanted to try to get more information into the pounce
manager, but I wasn't sure how to display it. I
thought perhaps a column containing a row of icons
representing which events are being watched (so the
user can see which of several pounces for the same
buddy are which), however, while I know how to do this,
there aren't icons in Gaim suitable for representing
all the events. Like "returned from away" and
"idle/unidle", as far as I can see. I'm not sure what
else could be shown to make the manager dialog more
"informative."
The dialog updates automatically to show pounces only
for connected accounts and updates when a pounce is
added, changed, or removed in some other way than the
dialog.
I'd like to get feedback on it if anyone has anything
they think I should change or fix, I'll do that and
update this patch. Otherwise, feel free to commit. :)"
As ridingpigs commented in the tracker, this is "far better than the current menu thing."
I made a few small changes to this. I believe most of them were related to adding hooks to disable things if there were no accounts connected. I also sorte
d the Tools menu a bit and updated the docklet to match.
I wish the plugin action code could sort the items it added.
committer: Richard Laager <rlaager@pidgin.im>
| 8713 | 1 | /** |
| 2 | * @file pluginpref.h Plugin Preferences API | |
| 3 | * @ingroup core | |
| 4 | * | |
| 5 | * gaim | |
| 6 | * | |
| 7 | * Gaim is the legal property of its developers, whose names are too numerous | |
| 8 | * to list here. Please refer to the COPYRIGHT file distributed with this | |
| 9 | * source distribution. | |
| 10 | * | |
| 11 | * This program is free software; you can redistribute it and/or modify | |
| 12 | * it under the terms of the GNU General Public License as published by | |
| 13 | * the Free Software Foundation; either version 2 of the License, or | |
| 14 | * (at your option) any later version. | |
| 15 | * | |
| 16 | * This program is distributed in the hope that it will be useful, | |
| 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 19 | * GNU General Public License for more details. | |
| 20 | * | |
| 21 | * You should have received a copy of the GNU General Public License | |
| 22 | * along with this program; if not, write to the Free Software | |
| 23 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 24 | * | |
| 25 | */ | |
|
9713
bb37562302a1
[gaim-migrate @ 10574]
Mark Doliner <markdoliner@pidgin.im>
parents:
9529
diff
changeset
|
26 | #ifndef _GAIM_PLUGINPREF_H_ |
|
bb37562302a1
[gaim-migrate @ 10574]
Mark Doliner <markdoliner@pidgin.im>
parents:
9529
diff
changeset
|
27 | #define _GAIM_PLUGINPREF_H_ |
| 8713 | 28 | |
| 29 | typedef struct _GaimPluginPrefFrame GaimPluginPrefFrame; | |
| 30 | typedef struct _GaimPluginPref GaimPluginPref; | |
| 31 | ||
| 32 | typedef enum { | |
| 33 | GAIM_PLUGIN_PREF_NONE, | |
|
9529
377b70382202
[gaim-migrate @ 10356]
Christopher O'Brien <siege@pidgin.im>
parents:
9000
diff
changeset
|
34 | GAIM_PLUGIN_PREF_CHOICE, |
|
377b70382202
[gaim-migrate @ 10356]
Christopher O'Brien <siege@pidgin.im>
parents:
9000
diff
changeset
|
35 | GAIM_PLUGIN_PREF_INFO, /**< no-value label */ |
| 8713 | 36 | } GaimPluginPrefType; |
| 37 | ||
| 38 | #include <glib.h> | |
| 39 | #include "prefs.h" | |
| 40 | ||
| 41 | #ifdef __cplusplus | |
| 42 | extern "C" { | |
| 43 | #endif | |
| 44 | ||
| 45 | /**************************************************************************/ | |
| 46 | /** @name Plugin Preference API */ | |
| 47 | /**************************************************************************/ | |
| 48 | /*@{*/ | |
| 49 | ||
| 50 | /** | |
| 51 | * Create a new plugin preference frame | |
| 52 | * | |
| 53 | * @return a new GaimPluginPrefFrame | |
| 54 | */ | |
| 55 | GaimPluginPrefFrame *gaim_plugin_pref_frame_new(); | |
| 56 | ||
| 57 | /** | |
| 58 | * Destroy a plugin preference frame | |
| 59 | * | |
| 60 | * @param frame The plugin frame to destroy | |
| 61 | */ | |
| 62 | void gaim_plugin_pref_frame_destroy(GaimPluginPrefFrame *frame); | |
| 63 | ||
| 64 | /** | |
| 65 | * Adds a plugin preference to a plugin preference frame | |
| 66 | * | |
| 67 | * @param frame The plugin frame to add the preference to | |
| 68 | * @param pref The preference to add to the frame | |
| 69 | */ | |
| 70 | void gaim_plugin_pref_frame_add(GaimPluginPrefFrame *frame, GaimPluginPref *pref); | |
| 71 | ||
| 72 | /** | |
| 73 | * Get the plugin preferences from a plugin preference frame | |
| 74 | * | |
| 75 | * @param frame The plugin frame to get the plugin preferences from | |
| 76 | * @return a GList of plugin preferences | |
| 77 | */ | |
| 78 | GList *gaim_plugin_pref_frame_get_prefs(GaimPluginPrefFrame *frame); | |
|
10414
6b10b76933e1
[gaim-migrate @ 11664]
Mark Doliner <markdoliner@pidgin.im>
parents:
9939
diff
changeset
|
79 | |
| 8713 | 80 | /** |
| 81 | * Create a new plugin preference | |
| 82 | * | |
| 83 | * @return a new GaimPluginPref | |
| 84 | */ | |
| 85 | GaimPluginPref *gaim_plugin_pref_new(); | |
| 86 | ||
| 87 | /** | |
| 88 | * Create a new plugin preference with name | |
| 89 | * | |
| 90 | * @param name The name of the pref | |
| 91 | * @return a new GaimPluginPref | |
| 92 | */ | |
| 93 | GaimPluginPref *gaim_plugin_pref_new_with_name(char *name); | |
| 94 | ||
| 95 | /** | |
| 96 | * Create a new plugin preference with label | |
| 97 | * | |
| 98 | * @param label The label to be displayed | |
| 99 | * @return a new GaimPluginPref | |
| 100 | */ | |
| 101 | GaimPluginPref *gaim_plugin_pref_new_with_label(char *label); | |
| 102 | ||
| 103 | /** | |
| 104 | * Create a new plugin preference with name and label | |
| 105 | * | |
| 106 | * @param name The name of the pref | |
| 107 | * @param label The label to be displayed | |
| 108 | * @return a new GaimPluginPref | |
| 109 | */ | |
| 110 | GaimPluginPref *gaim_plugin_pref_new_with_name_and_label(char *name, char *label); | |
| 111 | ||
| 112 | /** | |
| 113 | * Destroy a plugin preference | |
| 114 | * | |
| 115 | * @param pref The preference to destroy | |
| 116 | */ | |
| 117 | void gaim_plugin_pref_destroy(GaimPluginPref *pref); | |
| 118 | ||
| 119 | /** | |
| 120 | * Set a plugin pref name | |
| 121 | * | |
| 122 | * @param pref The plugin pref | |
| 123 | * @param name The name of the pref | |
| 124 | */ | |
| 125 | void gaim_plugin_pref_set_name(GaimPluginPref *pref, char *name); | |
| 126 | ||
| 127 | /** | |
| 128 | * Get a plugin pref name | |
| 129 | * | |
| 130 | * @param pref The plugin pref | |
| 131 | * @return The name of the pref | |
| 132 | */ | |
| 133 | char *gaim_plugin_pref_get_name(GaimPluginPref *pref); | |
| 134 | ||
| 135 | /** | |
| 136 | * Set a plugin pref label | |
| 137 | * | |
| 138 | * @param pref The plugin pref | |
| 139 | * @param label The label for the plugin pref | |
| 140 | */ | |
| 141 | void gaim_plugin_pref_set_label(GaimPluginPref *pref, char *label); | |
| 142 | ||
| 143 | /** | |
| 144 | * Get a plugin pref label | |
| 145 | * | |
| 146 | * @param pref The plugin pref | |
| 147 | * @return The label for the plugin pref | |
| 148 | */ | |
| 149 | char *gaim_plugin_pref_get_label(GaimPluginPref *pref); | |
| 150 | ||
| 151 | /** | |
| 152 | * Set the bounds for an integer pref | |
| 153 | * | |
| 154 | * @param pref The plugin pref | |
| 155 | * @param min The min value | |
| 156 | * @param max The max value | |
| 157 | */ | |
| 158 | void gaim_plugin_pref_set_bounds(GaimPluginPref *pref, int min, int max); | |
| 159 | ||
| 160 | /** | |
| 161 | * Get the bounds for an integer pref | |
| 162 | * | |
| 163 | * @param pref The plugin pref | |
| 164 | * @param min The min value | |
| 165 | * @param max The max value | |
| 166 | */ | |
| 167 | void gaim_plugin_pref_get_bounds(GaimPluginPref *pref, int *min, int *max); | |
| 168 | ||
| 169 | /** | |
| 170 | * Set the type of a plugin pref | |
| 171 | * | |
| 172 | * @param pref The plugin pref | |
| 173 | * @param type The type | |
| 174 | */ | |
| 175 | void gaim_plugin_pref_set_type(GaimPluginPref *pref, GaimPluginPrefType type); | |
| 176 | ||
| 177 | /** | |
| 178 | * Get the type of a plugin pref | |
| 179 | * | |
| 180 | * @param pref The plugin pref | |
| 181 | * @return The type | |
| 182 | */ | |
| 183 | GaimPluginPrefType gaim_plugin_pref_get_type(GaimPluginPref *pref); | |
| 184 | ||
| 185 | /** | |
| 186 | * Set the choices for a choices plugin pref | |
| 187 | * | |
| 188 | * @param pref The plugin pref | |
| 189 | * @param label The label for the choice | |
| 190 | * @param choice A gpointer of the choice | |
| 191 | */ | |
| 192 | void gaim_plugin_pref_add_choice(GaimPluginPref *pref, char *label, gpointer choice); | |
| 193 | ||
| 194 | /** | |
| 195 | * Get the choices for a choices plugin pref | |
| 196 | * | |
| 197 | * @param pref The plugin pref | |
| 198 | * @return GList of the choices | |
| 199 | */ | |
| 200 | GList *gaim_plugin_pref_get_choices(GaimPluginPref *pref); | |
| 201 | ||
| 202 | /** | |
| 203 | * Set the max length for a string plugin pref | |
| 204 | * | |
| 9000 | 205 | * @param pref The plugin pref |
| 206 | * @param max_length The max length of the string | |
| 8713 | 207 | */ |
| 208 | void gaim_plugin_pref_set_max_length(GaimPluginPref *pref, unsigned int max_length); | |
| 209 | ||
| 210 | /** | |
| 211 | * Get the max length for a string plugin pref | |
| 212 | * | |
| 213 | * @param pref The plugin pref | |
| 214 | * @return the max length | |
| 215 | */ | |
| 216 | unsigned int gaim_plugin_pref_get_max_length(GaimPluginPref *pref); | |
| 217 | ||
| 9841 | 218 | /** |
| 219 | * Sets the masking of a string plugin pref | |
| 220 | * | |
| 9939 | 221 | * @param pref The plugin pref |
| 222 | * @param mask The value to set | |
| 9841 | 223 | */ |
| 224 | void gaim_plugin_pref_set_masked(GaimPluginPref *pref, gboolean mask); | |
| 225 | ||
| 226 | /** | |
| 227 | * Gets the masking of a string plugin pref | |
| 228 | * | |
| 229 | * @param pref The plugin pref | |
| 230 | * @return The masking | |
| 231 | */ | |
| 232 | gboolean gaim_plugin_pref_get_masked(GaimPluginPref *pref); | |
| 233 | ||
| 8713 | 234 | /*@}*/ |
| 235 | ||
| 236 | #ifdef __cplusplus | |
| 237 | } | |
| 238 | #endif | |
| 239 | ||
|
9713
bb37562302a1
[gaim-migrate @ 10574]
Mark Doliner <markdoliner@pidgin.im>
parents:
9529
diff
changeset
|
240 | #endif /* _GAIM_PLUGINPREF_H_ */ |