gtk/gtkcellviewmenuitem.h

Tue, 17 Oct 2006 08:13:41 +0000

author
Etan Reisner <deryni@pidgin.im>
date
Tue, 17 Oct 2006 08:13:41 +0000
changeset 14801
6554d4d17db8
parent 14253
b63ebf84c42b
child 20470
77693555855f
permissions
-rw-r--r--

[gaim-migrate @ 17495]
This should fix the statusbox issues that were keeping us from releasing beta
4 (and which were just really annoying). Thakn sadrul for most of this, I just
added the if (index == -1) bit. Anyway, the way this works now is that for
saved/popular statuses the primitive underlying that status is where the
dropdown for the statusbox starts. If we don't like that we can change it but
I'm not sure we'll find something better.

Also, this might plug a couple leaks, I'm not really sure but it certainly
looks right.

Up next, the patch to make the docklet use the per-protocol statuses in the
top section.

10703
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
1 /* gtkcellviewmenuitem.h
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
2 * Copyright (C) 2003 Kristian Rietveld <kris@gtk.org>
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
3 *
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
4 * This library is free software; you can redistribute it and/or
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
5 * modify it under the terms of the GNU Library General Public
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
6 * License as published by the Free Software Foundation; either
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
7 * version 2 of the License, or (at your option) any later version.
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
8 *
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
9 * This library is distributed in the hope that it will be useful,
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
12 * Library General Public License for more details.
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
13 *
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
14 * You should have received a copy of the GNU Library General Public
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
15 * License along with this library; if not, write to the
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
17 * Boston, MA 02111-1307, USA.
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
18 */
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
19
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
20 #ifndef __GTK_CELL_VIEW_MENU_ITEM_H__
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
21 #define __GTK_CELL_VIEW_MENU_ITEM_H__
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
22
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
23 #include <gtk/gtkmenuitem.h>
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
24 #include <gtk/gtktreemodel.h>
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
25
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
26 G_BEGIN_DECLS
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
27
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
28 #define GTK_TYPE_CELL_VIEW_MENU_ITEM (gtk_cell_view_menu_item_get_type ())
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
29 #define GTK_CELL_VIEW_MENU_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_CELL_VIEW_MENU_ITEM, GtkCellViewMenuItem))
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
30 #define GTK_CELL_VIEW_MENU_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_CELL_VIEW_MENU_ITEM, GtkCellViewMenuItemClass))
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
31 #define GTK_IS_CELL_VIEW_MENU_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_CELL_VIEW_MENU_ITEM))
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
32 #define GTK_IS_CELL_VIEW_MENU_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CELL_VIEW_MENU_ITEM))
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
33 #define GTK_CELL_VIEW_MENU_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_CELL_VIEW_MENU_ITEM, GtkCellViewMenuItemClass))
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
34
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
35
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
36 typedef struct _GtkCellViewMenuItem GtkCellViewMenuItem;
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
37 typedef struct _GtkCellViewMenuItemClass GtkCellViewMenuItemClass;
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
38 typedef struct _GtkCellViewMenuItemPrivate GtkCellViewMenuItemPrivate;
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
39
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
40 struct _GtkCellViewMenuItem
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
41 {
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
42 GtkMenuItem parent_instance;
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
43
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
44 /*< private >*/
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
45 GtkCellViewMenuItemPrivate *priv;
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
46 };
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
47
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
48 struct _GtkCellViewMenuItemClass
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
49 {
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
50 GtkMenuItemClass parent_class;
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
51 };
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
52
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
53
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
54 GType gtk_cell_view_menu_item_get_type (void);
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
55 GtkWidget *gtk_cell_view_menu_item_new (void);
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
56
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
57 GtkWidget *gtk_cell_view_menu_item_new_with_pixbuf (GdkPixbuf *pixbuf);
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
58 GtkWidget *gtk_cell_view_menu_item_new_with_text (const gchar *text);
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
59 GtkWidget *gtk_cell_view_menu_item_new_with_markup (const gchar *markup);
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
60
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
61 GtkWidget *gtk_cell_view_menu_item_new_from_model (GtkTreeModel *model,
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
62 GtkTreePath *path);
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
63
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
64
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
65 G_END_DECLS
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
66
7392ab91edf7 [gaim-migrate @ 12286]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
diff changeset
67 #endif /* __GTK_CELL_VIEW_MENU_ITEM_H__ */

mercurial