Mercurial > pidgin.yaz
annotate src/gtkstatusbox.h @ 12133:8254bb99f929
[gaim-migrate @ 14433]
SF Patch #1358723 from charkins
"right-click menu of unseen conversations on blist menutray
Adds a right-click context menu of converations with
unseen messages to the menu tray icon on the buddy
list. Selecting the conversation presents that
conversation to the user."
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Fri, 18 Nov 2005 13:54:20 +0000 |
parents | f30a6ad84aff |
children | 6e55515e4b39 |
rev | line source |
---|---|
10643 | 1 /* |
2 * @file gtkstatusbox.c GTK+ Status Selection Widget | |
3 * @ingroup gtkui | |
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 | |
26 | |
27 #ifndef __GTK_GAIM_STATUS_BOX_H__ | |
28 #define __GTK_GAIM_STATUS_BOX_H__ | |
29 | |
30 #include <gtk/gtk.h> | |
31 #include "gtkimhtml.h" | |
11499 | 32 #include "account.h" |
11677 | 33 #include "savedstatuses.h" |
11739 | 34 #include "status.h" |
10643 | 35 #include <gtk/gtktreemodel.h> |
36 #include <gtk/gtktreeview.h> | |
37 | |
38 G_BEGIN_DECLS | |
39 | |
40 #define GTK_GAIM_TYPE_STATUS_BOX (gtk_gaim_status_box_get_type ()) | |
41 #define GTK_GAIM_STATUS_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_GAIM_TYPE_STATUS_BOX, GtkGaimStatusBox)) | |
42 #define GTK_GAIM_STATUS_BOX_CLASS(vtable) (G_TYPE_CHECK_CLASS_CAST ((vtable), GTK_GAIM_TYPE_STATUS_BOX, GtkGaimStatusBoxClass)) | |
43 #define GTK_GAIM_IS_STATUS_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_GAIM_TYPE_STATUS_BOX)) | |
44 #define GTK_GAIM_IS_STATUS_BOX_CLASS(vtable) (G_TYPE_CHECK_CLASS_TYPE ((vtable), GTK_GAIM_TYPE_STATUS_BOX)) | |
45 #define GTK_GAIM_STATUS_BOX_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), GTK_GAIM_TYPE_STATUS_BOX, GtkGaimStatusBoxClass)) | |
46 | |
11739 | 47 /** |
48 * This is a hidden field in the GtkStatusBox that identifies the | |
49 * item in the list store. The item could be a normal | |
50 * GaimStatusPrimitive, or it could be something special like the | |
51 * "Custom..." item, or "Saved..." or a GtkSeparator. | |
52 */ | |
53 typedef enum | |
54 { | |
55 /* | |
56 * The first 0 through GAIM_STATUS_NUM_PRIMITIVES | |
57 * correspond to GaimStatusPrimitives. | |
58 */ | |
59 GTK_GAIM_STATUS_BOX_TYPE_SEPARATOR = GAIM_STATUS_NUM_PRIMITIVES, | |
60 GTK_GAIM_STATUS_BOX_TYPE_CUSTOM, | |
61 GTK_GAIM_STATUS_BOX_TYPE_SAVED, | |
62 GTK_GAIM_STATUS_BOX_NUM_TYPES | |
63 } GtkGaimStatusBoxItemType; | |
64 | |
10643 | 65 typedef struct _GtkGaimStatusBox GtkGaimStatusBox; |
66 typedef struct _GtkGaimStatusBoxClass GtkGaimStatusBoxClass; | |
67 | |
68 struct _GtkGaimStatusBox | |
69 { | |
70 GtkComboBox parent_instance; | |
71 | |
11739 | 72 /** |
73 * This GtkListStore contains only one row--the currently selected status. | |
74 */ | |
10643 | 75 GtkListStore *store; |
11739 | 76 |
77 /** | |
78 * This is the dropdown GtkListStore that contains the available statuses, | |
79 * plus some recently used statuses, plus the "Custom..." and "Saved..." | |
80 * options. | |
81 */ | |
10643 | 82 GtkListStore *dropdown_store; |
83 | |
11499 | 84 GaimAccount *account; |
85 | |
10643 | 86 GtkWidget *vbox, *sw; |
87 GtkWidget *imhtml; | |
12074
950acb2bc835
[gaim-migrate @ 14370]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11960
diff
changeset
|
88 GtkWidget *event; |
10643 | 89 gboolean imhtml_visible; |
90 | |
91 GtkWidget *cell_view; | |
92 GtkCellRenderer *icon_rend; | |
93 GtkCellRenderer *text_rend; | |
94 | |
95 GdkPixbuf *error_pixbuf; | |
96 int connecting_index; | |
97 GdkPixbuf *connecting_pixbufs[4]; | |
98 int typing_index; | |
99 GdkPixbuf *typing_pixbufs[4]; | |
100 | |
101 gboolean connecting; | |
102 gboolean typing; | |
103 | |
104 | |
105 GtkTreeIter iter; | |
106 GdkPixbuf *pixbuf; | |
107 char *title; | |
108 char *desc; | |
109 char *error; | |
11960 | 110 |
111 gulong status_changed_signal; | |
10643 | 112 }; |
113 | |
114 struct _GtkGaimStatusBoxClass | |
115 { | |
116 GtkComboBoxClass parent_class; | |
117 | |
118 /* signals */ | |
119 void (* changed) (GtkComboBox *combo_box); | |
120 | |
121 /* Padding for future expansion */ | |
122 void (*_gtk_reserved0) (void); | |
123 void (*_gtk_reserved1) (void); | |
124 void (*_gtk_reserved2) (void); | |
125 void (*_gtk_reserved3) (void); | |
126 }; | |
127 | |
128 | |
129 GType gtk_gaim_status_box_get_type (void) G_GNUC_CONST; | |
130 GtkWidget *gtk_gaim_status_box_new (void); | |
11499 | 131 GtkWidget *gtk_gaim_status_box_new_with_account (GaimAccount *); |
10643 | 132 |
133 void | |
11739 | 134 gtk_gaim_status_box_add(GtkGaimStatusBox *status_box, GtkGaimStatusBoxItemType type, GdkPixbuf *pixbuf, const char *text, const char *sec_text); |
10643 | 135 |
136 void | |
11738 | 137 gtk_gaim_status_box_add_separator(GtkGaimStatusBox *status_box); |
138 | |
139 void | |
10643 | 140 gtk_gaim_status_box_set_error(GtkGaimStatusBox *status_box, const gchar *error); |
141 | |
142 void | |
143 gtk_gaim_status_box_set_connecting(GtkGaimStatusBox *status_box, gboolean connecting); | |
144 | |
145 void | |
146 gtk_gaim_status_box_pulse_connecting(GtkGaimStatusBox *status_box); | |
147 | |
11739 | 148 GtkGaimStatusBoxItemType gtk_gaim_status_box_get_active_type(GtkGaimStatusBox *status_box); |
10649 | 149 |
11638 | 150 char *gtk_gaim_status_box_get_message(GtkGaimStatusBox *status_box); |
10649 | 151 |
10643 | 152 G_END_DECLS |
153 | |
154 #endif /* __GTK_GAIM_GTK_STATUS_COMBO_BOX_H__ */ |