Mercurial > pidgin
annotate src/gtkmenutray.h @ 12115:e9790eb93216
[gaim-migrate @ 14415]
quoth charkins:
" This patch has a few small fixes for the visibility
stuff in gtkblist.c.
First, tracking of the ICONIFIED state of the blist was
removed. This was intended to allow the blist to
"remember" if it was minimized between restarts.
Unfortunately, this is not possible because the
ICONIFIED state gets set when the blist is on a
different desktop with many window managers.
Second, while talking about the ICONIFIED issue on
#gtk@GIMPNet, muntyan_ asked about a bug where the
blist would get shown on an account re-connect with
1.5.0. Luke mentioned something about this with cvs as
well. This patch introduces a check in
gaim_gtk_blist_show() to prevent the window from being
shown if it already exists and is visible.
Third, sadrul pointed me to a one-line fix for the
missing blist on startup. I added a second line to make
sure the blist restores its proper size as well.
Finally, when the last visibility manager is removed,
gaim will now minimize the blist if it was previously
hidden, rather than showing it. This could prevent a
race condition with out-of-process applets, preventing
gaim from maintaining the visibility state properly
between restarts.
This was 'cvs diff'ed against the last available anon
cvs from Friday. Hopefully it'll apply cleanly."
it did.
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Wed, 16 Nov 2005 17:55:26 +0000 |
parents | 34ea75bdd0c9 |
children | fc464a0abccc |
rev | line source |
---|---|
11553 | 1 /** |
2 * @file gtkmenutray.h GTK+ Tray menu item | |
3 * @ingroup gtkui | |
4 * | |
5 * Gaim is the legal property of its developers, whose names are too numerous | |
6 * to list here. Please refer to the COPYRIGHT file distributed with this | |
7 * source distribution. | |
8 * | |
9 * This program is free software; you can redistribute it and/or modify | |
10 * under the terms of the GNU General Public License as published by | |
11 * the Free Software Foundation; either version 2 of the License, or | |
12 * (at your option) any later version. | |
13 * | |
14 * This program is distributed in the hope that it will be useful, | |
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 * GNU General Public License for more details. | |
18 * | |
19 * You should have received a copy of the GNU General Public License | |
20 * along with this program; if not, write to the Free Software | |
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
22 */ | |
23 #ifndef GAIM_GTK_MENU_TRAY_H | |
24 #define GAIM_GTK_MENU_TRAY_H | |
25 | |
26 #include <gtk/gtkhbox.h> | |
27 #include <gtk/gtkmenuitem.h> | |
11908
34ea75bdd0c9
[gaim-migrate @ 14199]
Richard Laager <rlaager@wiktel.com>
parents:
11599
diff
changeset
|
28 #include <gtk/gtktooltips.h> |
11553 | 29 |
30 #define GAIM_GTK_TYPE_MENU_TRAY (gaim_gtk_menu_tray_get_gtype()) | |
31 #define GAIM_GTK_MENU_TRAY(obj) (GTK_CHECK_CAST((obj), GAIM_GTK_TYPE_MENU_TRAY, GaimGtkMenuTray)) | |
32 #define GAIM_GTK_MENU_TRAY_CLASS(klass) (GTK_CHECK_CLASS_CAST((klass), GAIM_GTK_TYPE_MENU_TRAY, GaimGtkMenuTrayClass)) | |
33 #define GAIM_GTK_IS_MENU_TRAY(obj) (GTK_CHECK_TYPE((obj), GAIM_GTK_TYPE_MENU_TRAY)) | |
34 #define GAIM_GTK_IS_MENU_TRAY_CLASS(klass) (GTK_CHECK_CLASS_TYPE((klass), GAIM_GTK_TYPE_MENU_TRAY)) | |
35 #define GAIM_GTK_MENU_TRAY_GET_CLASS(obj) (GTK_CHECK_GET_CLASS((obj), GAIM_GTK_TYPE_MENU_TRAY, GaimGtkMenuTrayClass)) | |
36 | |
37 typedef struct _GaimGtkMenuTray GaimGtkMenuTray; | |
38 typedef struct _GaimGtkMenuTrayClass GaimGtkMenuTrayClass; | |
39 | |
40 /** A GaimGtkMenuTray */ | |
41 struct _GaimGtkMenuTray { | |
42 GtkMenuItem gparent; /**< The parent instance */ | |
11599
767e3c0c5062
[gaim-migrate @ 13869]
Gary Kramlich <grim@reaperworld.com>
parents:
11558
diff
changeset
|
43 GtkWidget *tray; /**< The tray */ |
11908
34ea75bdd0c9
[gaim-migrate @ 14199]
Richard Laager <rlaager@wiktel.com>
parents:
11599
diff
changeset
|
44 GtkTooltips *tooltips; /**< Tooltips */ |
11553 | 45 }; |
46 | |
47 /** A GaimGtkMenuTrayClass */ | |
48 struct _GaimGtkMenuTrayClass { | |
49 GtkMenuItemClass gparent; /**< The parent class */ | |
50 }; | |
51 | |
52 G_BEGIN_DECLS | |
53 | |
54 /** | |
55 * Registers the GaimGtkMenuTray class if necessary and returns the | |
56 * type ID assigned to it. | |
57 * | |
58 * @return The GaimGtkMenuTray type ID | |
59 */ | |
60 GType gaim_gtk_menu_tray_get_gtype(void); | |
61 | |
62 /** | |
63 * Creates a new GaimGtkMenuTray | |
64 * | |
65 * @return A new GaimGtkMenuTray | |
66 */ | |
67 GtkWidget *gaim_gtk_menu_tray_new(); | |
68 | |
69 /** | |
70 * Gets the box for the GaimGtkMenuTray | |
71 * | |
72 * @param menu_tray The GaimGtkMenuTray | |
73 * | |
74 * @return The box that this menu tray is using | |
75 */ | |
76 GtkWidget *gaim_gtk_menu_tray_get_box(GaimGtkMenuTray *menu_tray); | |
77 | |
78 /** | |
79 * Appends a widget into the tray | |
80 * | |
81 * @param menu_tray The tray | |
82 * @param widget The widget | |
11908
34ea75bdd0c9
[gaim-migrate @ 14199]
Richard Laager <rlaager@wiktel.com>
parents:
11599
diff
changeset
|
83 * @param tooltip The tooltip for this widget (widget requires its own X-window) |
11553 | 84 */ |
11908
34ea75bdd0c9
[gaim-migrate @ 14199]
Richard Laager <rlaager@wiktel.com>
parents:
11599
diff
changeset
|
85 void gaim_gtk_menu_tray_append(GaimGtkMenuTray *menu_tray, GtkWidget *widget, const char *tooltip); |
11553 | 86 |
87 /** | |
88 * Prepends a widget into the tray | |
89 * | |
11908
34ea75bdd0c9
[gaim-migrate @ 14199]
Richard Laager <rlaager@wiktel.com>
parents:
11599
diff
changeset
|
90 * @param menu_tray The tray |
11553 | 91 * @param widget The widget |
11908
34ea75bdd0c9
[gaim-migrate @ 14199]
Richard Laager <rlaager@wiktel.com>
parents:
11599
diff
changeset
|
92 * @param tooltip The tooltip for this widget (widget requires its own X-window) |
11553 | 93 */ |
11908
34ea75bdd0c9
[gaim-migrate @ 14199]
Richard Laager <rlaager@wiktel.com>
parents:
11599
diff
changeset
|
94 void gaim_gtk_menu_tray_prepend(GaimGtkMenuTray *menu_tray, GtkWidget *widget, const char *tooltip); |
34ea75bdd0c9
[gaim-migrate @ 14199]
Richard Laager <rlaager@wiktel.com>
parents:
11599
diff
changeset
|
95 |
34ea75bdd0c9
[gaim-migrate @ 14199]
Richard Laager <rlaager@wiktel.com>
parents:
11599
diff
changeset
|
96 /** |
34ea75bdd0c9
[gaim-migrate @ 14199]
Richard Laager <rlaager@wiktel.com>
parents:
11599
diff
changeset
|
97 * Set the tooltip for a widget |
34ea75bdd0c9
[gaim-migrate @ 14199]
Richard Laager <rlaager@wiktel.com>
parents:
11599
diff
changeset
|
98 * |
34ea75bdd0c9
[gaim-migrate @ 14199]
Richard Laager <rlaager@wiktel.com>
parents:
11599
diff
changeset
|
99 * @param menu_tray The tray |
34ea75bdd0c9
[gaim-migrate @ 14199]
Richard Laager <rlaager@wiktel.com>
parents:
11599
diff
changeset
|
100 * @param widget The widget |
34ea75bdd0c9
[gaim-migrate @ 14199]
Richard Laager <rlaager@wiktel.com>
parents:
11599
diff
changeset
|
101 * @param tooltip The tooltip to set for the widget (widget requires its own X-window) |
34ea75bdd0c9
[gaim-migrate @ 14199]
Richard Laager <rlaager@wiktel.com>
parents:
11599
diff
changeset
|
102 */ |
34ea75bdd0c9
[gaim-migrate @ 14199]
Richard Laager <rlaager@wiktel.com>
parents:
11599
diff
changeset
|
103 void gaim_gtk_menu_tray_set_tooltip(GaimGtkMenuTray *menu_tray, GtkWidget *widget, const char *tooltip); |
11553 | 104 |
105 G_END_DECLS | |
106 | |
107 #endif /* GAIM_GTK_MENU_TRAY_H */ |