Sun, 23 Oct 2005 01:42:01 +0000
[gaim-migrate @ 14023]
here's what iw as working on, with the bits that activiate it commented out.
its not finished at all, but i'm tired of people breaking it ;)
hopefully this will motivate me to finish it tonight/tomorrow.
| 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
89c2ab8d2ebf
[gaim-migrate @ 13963]
Mark Doliner <markdoliner@pidgin.im>
parents:
11638
diff
changeset
|
33 | #include "savedstatuses.h" |
| 10643 | 34 | #include <gtk/gtktreemodel.h> |
| 35 | #include <gtk/gtktreeview.h> | |
|
10703
7392ab91edf7
[gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10649
diff
changeset
|
36 | #if !GTK_CHECK_VERSION(2,6,0) |
|
7392ab91edf7
[gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10649
diff
changeset
|
37 | # include "gtkcellview.h" |
|
7392ab91edf7
[gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10649
diff
changeset
|
38 | # include "gtkcellviewmenuitem.h" |
|
7392ab91edf7
[gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10649
diff
changeset
|
39 | # if !GTK_CHECK_VERSION(2,4,0) |
|
7392ab91edf7
[gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10649
diff
changeset
|
40 | # include "gtkcelllayout.h" |
|
7392ab91edf7
[gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10649
diff
changeset
|
41 | # include "gtkcombobox.h" |
|
7392ab91edf7
[gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10649
diff
changeset
|
42 | # endif /* Gtk 2.4 */ |
|
7392ab91edf7
[gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10649
diff
changeset
|
43 | #endif /* Gtk 2.6 */ |
| 10643 | 44 | |
| 45 | G_BEGIN_DECLS | |
| 46 | ||
| 47 | #define GTK_GAIM_TYPE_STATUS_BOX (gtk_gaim_status_box_get_type ()) | |
| 48 | #define GTK_GAIM_STATUS_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_GAIM_TYPE_STATUS_BOX, GtkGaimStatusBox)) | |
| 49 | #define GTK_GAIM_STATUS_BOX_CLASS(vtable) (G_TYPE_CHECK_CLASS_CAST ((vtable), GTK_GAIM_TYPE_STATUS_BOX, GtkGaimStatusBoxClass)) | |
| 50 | #define GTK_GAIM_IS_STATUS_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_GAIM_TYPE_STATUS_BOX)) | |
| 51 | #define GTK_GAIM_IS_STATUS_BOX_CLASS(vtable) (G_TYPE_CHECK_CLASS_TYPE ((vtable), GTK_GAIM_TYPE_STATUS_BOX)) | |
| 52 | #define GTK_GAIM_STATUS_BOX_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), GTK_GAIM_TYPE_STATUS_BOX, GtkGaimStatusBoxClass)) | |
| 53 | ||
| 54 | typedef struct _GtkGaimStatusBox GtkGaimStatusBox; | |
| 55 | typedef struct _GtkGaimStatusBoxClass GtkGaimStatusBoxClass; | |
| 56 | ||
| 57 | struct _GtkGaimStatusBox | |
| 58 | { | |
| 59 | GtkComboBox parent_instance; | |
| 60 | ||
| 61 | GtkListStore *store; | |
| 62 | GtkListStore *dropdown_store; | |
| 63 | ||
| 11499 | 64 | GaimAccount *account; |
| 65 | ||
| 10643 | 66 | GtkWidget *vbox, *sw; |
| 67 | GtkWidget *imhtml; | |
| 68 | gboolean imhtml_visible; | |
| 69 | ||
| 70 | GtkWidget *cell_view; | |
| 71 | GtkCellRenderer *icon_rend; | |
| 72 | GtkCellRenderer *text_rend; | |
| 73 | ||
| 74 | GdkPixbuf *error_pixbuf; | |
| 75 | int connecting_index; | |
| 76 | GdkPixbuf *connecting_pixbufs[4]; | |
| 77 | int typing_index; | |
| 78 | GdkPixbuf *typing_pixbufs[4]; | |
| 79 | ||
| 80 | gboolean connecting; | |
| 81 | gboolean typing; | |
| 82 | ||
| 83 | ||
| 84 | GtkTreeIter iter; | |
| 85 | GdkPixbuf *pixbuf; | |
| 86 | char *title; | |
| 87 | char *desc; | |
| 88 | char *error; | |
| 89 | }; | |
| 90 | ||
| 91 | struct _GtkGaimStatusBoxClass | |
| 92 | { | |
| 93 | GtkComboBoxClass parent_class; | |
| 94 | ||
| 95 | /* signals */ | |
| 96 | void (* changed) (GtkComboBox *combo_box); | |
| 97 | ||
| 98 | /* Padding for future expansion */ | |
| 99 | void (*_gtk_reserved0) (void); | |
| 100 | void (*_gtk_reserved1) (void); | |
| 101 | void (*_gtk_reserved2) (void); | |
| 102 | void (*_gtk_reserved3) (void); | |
| 103 | }; | |
| 104 | ||
| 105 | ||
| 106 | GType gtk_gaim_status_box_get_type (void) G_GNUC_CONST; | |
| 107 | GtkWidget *gtk_gaim_status_box_new (void); | |
| 11499 | 108 | GtkWidget *gtk_gaim_status_box_new_with_account (GaimAccount *); |
| 10643 | 109 | |
| 110 | void | |
| 11732 | 111 | gtk_gaim_status_box_add(GtkGaimStatusBox *status_box, GdkPixbuf *pixbuf, const char *text, const char *sec_text, const char *edit); |
| 10643 | 112 | |
| 113 | void | |
| 114 | gtk_gaim_status_box_set_error(GtkGaimStatusBox *status_box, const gchar *error); | |
| 115 | ||
| 116 | void | |
| 117 | gtk_gaim_status_box_set_connecting(GtkGaimStatusBox *status_box, gboolean connecting); | |
| 118 | ||
| 119 | void | |
| 120 | gtk_gaim_status_box_pulse_connecting(GtkGaimStatusBox *status_box); | |
| 121 | ||
|
11638
1821b40269a3
[gaim-migrate @ 13914]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
11499
diff
changeset
|
122 | char *gtk_gaim_status_box_get_active_type(GtkGaimStatusBox *status_box); |
| 10649 | 123 | |
|
11638
1821b40269a3
[gaim-migrate @ 13914]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
11499
diff
changeset
|
124 | char *gtk_gaim_status_box_get_message(GtkGaimStatusBox *status_box); |
| 10649 | 125 | |
| 10643 | 126 | G_END_DECLS |
| 127 | ||
| 128 | #endif /* __GTK_GAIM_GTK_STATUS_COMBO_BOX_H__ */ |