comparison HACKING @ 10814:364a2ef907ae

[gaim-migrate @ 12468] same thing here, changing to consistently using GTK+, by rlaager committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Mon, 11 Apr 2005 12:24:47 +0000
parents 61852117568f
children 9f793948154a
comparison
equal deleted inserted replaced
10813:290131d5f626 10814:364a2ef907ae
16 you going. 16 you going.
17 17
18 If you don't know how event-driven programs work, stop right now. Gaim 18 If you don't know how event-driven programs work, stop right now. Gaim
19 uses GTK+'s main loop (actually GLib's but I won't talk about how GTK 19 uses GTK+'s main loop (actually GLib's but I won't talk about how GTK
20 works) and uses GLib functions for timeouts and socket notification. If 20 works) and uses GLib functions for timeouts and socket notification. If
21 you don't know GTK you should go learn that first. 21 you don't know GTK+ you should go learn that first.
22 22
23 If you're going to hack gaim, PLEASE, PLEASE PLEASE PLEASE send patches 23 If you're going to hack gaim, PLEASE, PLEASE PLEASE PLEASE send patches
24 against the absolute latest CVS. I get really annoyed when I get patches 24 against the absolute latest CVS. I get really annoyed when I get patches
25 against the last released version, especially since I don't usually have 25 against the last released version, especially since I don't usually have
26 a copy of it on my computer, and gaim tends to change a lot between 26 a copy of it on my computer, and gaim tends to change a lot between
129 open (checked by calling find_conversation), show_conv is called to 129 open (checked by calling find_conversation), show_conv is called to
130 create the new window. All sorts of neat things happen there, but it's 130 create the new window. All sorts of neat things happen there, but it's
131 mostly drawing the window. show_conv is the best place to edit the UI. 131 mostly drawing the window. show_conv is the best place to edit the UI.
132 132
133 That's pretty much it for the quick tutorial. I know it wasn't much but 133 That's pretty much it for the quick tutorial. I know it wasn't much but
134 it's enough to get you started. Make sure you know GTK before you get too 134 it's enough to get you started. Make sure you know GTK+ before you get too
135 involved. Most of the back-end stuff is pretty basic; most of gaim is GTK. 135 involved. Most of the back-end stuff is pretty basic; most of gaim is GTK+.
136 136
137 137
138 SOURCE FILES (this should probly be utterly removed) 138 SOURCE FILES (this should probly be utterly removed)
139 ============ 139 ============
140 140
254 stuff that happened to be thrown into it for no apparent reason. None 254 stuff that happened to be thrown into it for no apparent reason. None
255 of it is particularly tasty; it's all just utility functions. Just 255 of it is particularly tasty; it's all just utility functions. Just
256 like the name says. 256 like the name says.
257 257
258 plugins/ticker/gtkticker.c: 258 plugins/ticker/gtkticker.c:
259 Syd, our resident GTK God, wrote a GtkWidget, GtkTicker. This is that 259 Syd, our resident GTK+ God, wrote a GtkWidget, GtkTicker. This is that
260 widget. It's cool, and it's tiny. This is actually a really good example 260 widget. It's cool, and it's tiny. This is actually a really good example
261 widget for those of you looking to write your own. 261 widget for those of you looking to write your own.
262 262
263 plugins/ticker/ticker.c: 263 plugins/ticker/ticker.c:
264 Syd is just so cool. I really can't get over it. He let me come 264 Syd is just so cool. I really can't get over it. He let me come
424 instead of PROTO_NEWPROTO, oscar_init instead of newproto_init). Then 424 instead of PROTO_NEWPROTO, oscar_init instead of newproto_init). Then
425 populate your struct prpl; the most important function is actually name(), 425 populate your struct prpl; the most important function is actually name(),
426 because without it, Gaim will most likely segfault. The second most 426 because without it, Gaim will most likely segfault. The second most
427 important function is login(). Not all functions need to be implemented. 427 important function is login(). Not all functions need to be implemented.
428 428
429 There should be absolutely *ZERO* GTK in the PRPLs. PRPLs should *NEVER* 429 There should be absolutely *ZERO* GTK+ in the PRPLs. PRPLs should *NEVER*
430 say what the UI *looks* like, only what information needs to be there. 430 say what the UI *looks* like, only what information needs to be there.
431 There's currently an effort to get the GTK that is contained in the PRPLs 431 There's currently an effort to get the GTK+ that is contained in the PRPLs
432 directory out of there. If you submit a patch that adds GTK to those 432 directory out of there. If you submit a patch that adds GTK+ to those
433 directories it's very likely to be refused, unless if I'm in a good mood 433 directories it's very likely to be refused, unless if I'm in a good mood
434 and decide to relocate things for you. That's not likely. 434 and decide to relocate things for you. That's not likely.
435 435
436 You're probably wondering how you can do certain things without GTK. Well, 436 You're probably wondering how you can do certain things without GTK+. Well,
437 you're just going to have to make do. Rely on the UI, that's why it's 437 you're just going to have to make do. Rely on the UI, that's why it's
438 there. A PRPL should have absolutely ZERO interaction with the user, it 438 there. A PRPL should have absolutely ZERO interaction with the user, it
439 should all be handled by the UI. 439 should all be handled by the UI.
440 440
441 Don't use the _options variables at all. The core should take care of all 441 Don't use the _options variables at all. The core should take care of all