Mercurial > pidgin.yaz
comparison src/buddy.c @ 3510:e23909729192
[gaim-migrate @ 3576]
A GNOME2 docklet. This follows the opendesktop.org specs used by GNOME2 and
(I think) KDE in Redhat's null (I don't think vanilla KDE supports it yet)
For GNOME--you will need to have the GNOME Panel Notification Area installed.
This replaces the applet--thanks Robert McQueen.
CVS: ----------------------------------------------------------------------
CVS: Enter Log. Lines beginning with `CVS:' are removed automatically
CVS:
CVS: Committing in .
CVS:
CVS: Modified Files:
CVS: configure.ac configure.in plugins/Makefile.am src/aim.c
CVS: src/buddy.c src/core.h src/module.c src/multi.c src/perl.c
CVS: src/server.c src/ui.h
CVS: ----------------------------------------------------------------------
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Sat, 14 Sep 2002 23:27:28 +0000 |
parents | b8783a46e476 |
children | 6b0cb60162f4 |
comparison
equal
deleted
inserted
replaced
3509:8bad870eaea1 | 3510:e23909729192 |
---|---|
1993 return g; | 1993 return g; |
1994 } | 1994 } |
1995 | 1995 |
1996 /* used by this file, and by iconaway.so */ | 1996 /* used by this file, and by iconaway.so */ |
1997 void hide_buddy_list() { | 1997 void hide_buddy_list() { |
1998 if (!blist) return; | 1998 if (blist) { |
1999 if (!connections || docklet_refcount) { | 1999 if (!connections || docklet_refcount) { |
2000 gtk_widget_hide(blist); | 2000 gtk_widget_hide(blist); |
2001 } else { | 2001 } else { |
2002 gtk_window_iconify(GTK_WINDOW(blist)); | 2002 gtk_window_iconify(GTK_WINDOW(blist)); |
2003 } | |
2004 blist_hidden = TRUE; | |
2005 } | |
2006 | |
2007 /* shared code... not in lschiere/faceprint tree though. oh well */ | |
2008 static void move_buddy_list() { | |
2009 if (blist_options & OPT_BLIST_SAVED_WINDOWS) { | |
2010 if (blist_pos.width != 0) { /* Sanity check! */ | |
2011 gtk_widget_set_uposition(blist, blist_pos.x - blist_pos.xoff, | |
2012 blist_pos.y - blist_pos.yoff); | |
2013 gtk_widget_set_usize(blist, blist_pos.width, blist_pos.height); | |
2014 } | 2003 } |
2015 } | 2004 } |
2016 } | 2005 } |
2017 | 2006 |
2018 /* mostly used by code in this file */ | 2007 /* mostly used by code in this file */ |
2019 void unhide_buddy_list() { | 2008 void unhide_buddy_list() { |
2020 if (!blist) return; | 2009 if (blist) { |
2021 gtk_window_present(GTK_WINDOW(blist)); | 2010 gtk_window_present(GTK_WINDOW(blist)); |
2022 move_buddy_list(); | 2011 if (blist_options & OPT_BLIST_SAVED_WINDOWS) { |
2023 blist_hidden = FALSE; | 2012 if (blist_pos.width != 0) { /* Sanity check! */ |
2024 } | 2013 gtk_widget_set_uposition(blist, blist_pos.x - blist_pos.xoff, |
2025 | 2014 blist_pos.y - blist_pos.yoff); |
2026 /* used by the docklet */ | 2015 gtk_widget_set_usize(blist, blist_pos.width, blist_pos.height); |
2027 void toggle_buddy_list() { | 2016 } |
2028 if (blist_hidden) { | 2017 } |
2029 unhide_buddy_list(); | |
2030 } else { | |
2031 hide_buddy_list(); | |
2032 } | 2018 } |
2033 } | 2019 } |
2034 | 2020 |
2035 /* for the delete_event handler */ | 2021 /* for the delete_event handler */ |
2036 static void close_buddy_list() { | 2022 static void close_buddy_list() { |
2440 int x, y, width, height; | 2426 int x, y, width, height; |
2441 int save = 0; | 2427 int save = 0; |
2442 gdk_window_get_position(blist->window, &x, &y); | 2428 gdk_window_get_position(blist->window, &x, &y); |
2443 gdk_window_get_size(blist->window, &width, &height); | 2429 gdk_window_get_size(blist->window, &width, &height); |
2444 | 2430 |
2445 /* fixme: docklet * | |
2446 * if (applet_buddy_show){ */ | |
2447 | |
2448 if (e->send_event) { /* Is a position event */ | 2431 if (e->send_event) { /* Is a position event */ |
2449 if (blist_pos.x != x || blist_pos.y != y) | 2432 if (blist_pos.x != x || blist_pos.y != y) |
2450 save = 1; | 2433 save = 1; |
2451 blist_pos.x = x; | 2434 blist_pos.x = x; |
2452 blist_pos.y = y; | 2435 blist_pos.y = y; |
2908 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(tbox), | 2891 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(tbox), |
2909 GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); | 2892 GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); |
2910 | 2893 |
2911 | 2894 |
2912 gtk_window_set_title(GTK_WINDOW(blist), _("Gaim - Buddy List")); | 2895 gtk_window_set_title(GTK_WINDOW(blist), _("Gaim - Buddy List")); |
2913 move_buddy_list(); | 2896 |
2914 blist_hidden = FALSE; | 2897 /* this conveniently moves it to the right place and stuff */ |
2898 unhide_buddy_list(); | |
2915 } | 2899 } |
2916 | 2900 |
2917 void refresh_buddy_window() | 2901 void refresh_buddy_window() |
2918 { | 2902 { |
2919 build_edit_tree(); | 2903 build_edit_tree(); |