Mercurial > pidgin.yaz
changeset 9206:13bfd59e164f
[gaim-migrate @ 10001]
The action defaults for buddy pounces are now set to the action(s) set for
the last pounce. The main default is once again set to "Send a message."
This is designed to impress the users coming from AIM, but I am of the
belief that a default of "Shiny sparkly" action would be more fitting here.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Sun, 06 Jun 2004 04:48:41 +0000 |
parents | 5b35a6b96726 |
children | 7d50846c1573 |
files | ChangeLog src/gtkpounce.c |
diffstat | 2 files changed, 42 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Sun Jun 06 04:21:33 2004 +0000 +++ b/ChangeLog Sun Jun 06 04:48:41 2004 +0000 @@ -16,6 +16,10 @@ * Added MSN buddy icons (Felipe Contreras) * Added MSN file transfer (Felipe Contreras) * MSN's idle state now actually sets a buddy idle. + * Buddy pounce defaults are now more sane, and apply to the state the + buddy is currently in. For example, if the buddy is idle, set + "Return from idle" by default. The last action(s) used are the + defaults for the next pounce. Bug Fixes: * Non-looping animated icons no longer cause Gaim to freeze
--- a/src/gtkpounce.c Sun Jun 06 04:21:33 2004 +0000 +++ b/src/gtkpounce.c Sun Jun 06 04:48:41 2004 +0000 @@ -188,7 +188,8 @@ name = gtk_entry_get_text(GTK_ENTRY(dialog->buddy_entry)); - if (*name == '\0') { + if (*name == '\0') + { gaim_notify_error(NULL, NULL, _("Please enter a buddy to pounce."), NULL); return; @@ -239,7 +240,7 @@ gaim_pounce_set_pouncee(dialog->pounce, name); } - /* Actions*/ + /* Actions */ gaim_pounce_action_set_enabled(dialog->pounce, "open-window", gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->open_win))); gaim_pounce_action_set_enabled(dialog->pounce, "popup-notify", @@ -258,6 +259,18 @@ gaim_pounce_action_set_attribute(dialog->pounce, "play-sound", "filename", sound); + /* Set the defaults for next time. */ + gaim_prefs_set_bool("/gaim/gtk/pounces/default_actions/open-window", + gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->open_win))); + gaim_prefs_set_bool("/gaim/gtk/pounces/default_actions/popup-notify", + gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->popup))); + gaim_prefs_set_bool("/gaim/gtk/pounces/default_actions/send-message", + gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->send_msg))); + gaim_prefs_set_bool("/gaim/gtk/pounces/default_actions/execute-command", + gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->exec_cmd))); + gaim_prefs_set_bool("/gaim/gtk/pounces/default_actions/play-sound", + gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->play_sound))); + gaim_pounce_set_save(dialog->pounce, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->save_pounce))); @@ -800,8 +813,16 @@ } } - gtk_toggle_button_set_active( - GTK_TOGGLE_BUTTON(dialog->popup), TRUE); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->open_win), + gaim_prefs_get_bool("/gaim/gtk/pounces/default_actions/open-window")); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->popup), + gaim_prefs_get_bool("/gaim/gtk/pounces/default_actions/popup-notify")); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->send_msg), + gaim_prefs_get_bool("/gaim/gtk/pounces/default_actions/send-message")); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->exec_cmd), + gaim_prefs_get_bool("/gaim/gtk/pounces/default_actions/execute-command")); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->play_sound), + gaim_prefs_get_bool("/gaim/gtk/pounces/default_actions/play-sound")); } gtk_widget_show_all(vbox2); @@ -1106,4 +1127,17 @@ { gaim_pounces_register_handler(GAIM_GTK_UI, pounce_cb, new_pounce, free_pounce); + + gaim_prefs_add_none("/gaim/gtk/pounces"); + gaim_prefs_add_none("/gaim/gtk/pounces/default_actions"); + gaim_prefs_add_bool("/gaim/gtk/pounces/default_actions/open-window", + FALSE); + gaim_prefs_add_bool("/gaim/gtk/pounces/default_actions/popup-notify", + FALSE); + gaim_prefs_add_bool("/gaim/gtk/pounces/default_actions/send-message", + TRUE); + gaim_prefs_add_bool("/gaim/gtk/pounces/default_actions/execute-command", + FALSE); + gaim_prefs_add_bool("/gaim/gtk/pounces/default_actions/play-sound", + FALSE); }