Wed, 22 Jan 2025 20:47:54 -0600
Prepare for the 2.14.14 release
Testing Done:
Ran `make distcheck`
Reviewed at https://reviews.imfreedom.org/r/3779/
| 14623 | 1 | /* |
| 2 | * @file gtkcellrendererexpander.c GTK+ Cell Renderer Expander | |
|
16254
eeb2bba4dc94
Rename the Doxygen group from gtkui to pidgin.
Richard Laager <rlaager@pidgin.im>
parents:
15931
diff
changeset
|
3 | * @ingroup pidgin |
|
20330
650a7af9c238
remove gpl boilerplate from doxygen docs
Sean Egan <seanegan@pidgin.im>
parents:
20327
diff
changeset
|
4 | */ |
|
650a7af9c238
remove gpl boilerplate from doxygen docs
Sean Egan <seanegan@pidgin.im>
parents:
20327
diff
changeset
|
5 | |
|
650a7af9c238
remove gpl boilerplate from doxygen docs
Sean Egan <seanegan@pidgin.im>
parents:
20327
diff
changeset
|
6 | /* pidgin |
| 14623 | 7 | * |
|
15931
716b5fac1895
Re-sed the copyright notices so they don't all talk about Purple.
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
8 | * Pidgin is the legal property of its developers, whose names are too numerous |
| 14623 | 9 | * to list here. Please refer to the COPYRIGHT file distributed with this |
| 10 | * source distribution. | |
| 11 | * | |
| 12 | * This program is free software; you can redistribute it and/or modify | |
| 13 | * it under the terms of the GNU General Public License as published by | |
| 14 | * the Free Software Foundation; either version 2 of the License, or | |
| 15 | * (at your option) any later version. | |
| 16 | * | |
| 17 | * This program is distributed in the hope that it will be useful, | |
| 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 20 | * GNU General Public License for more details. | |
|
25888
d0fdd378a635
Remove trailing whitespace
Mark Doliner <markdoliner@pidgin.im>
parents:
24379
diff
changeset
|
21 | * |
| 14623 | 22 | * You should have received a copy of the GNU General Public License |
| 23 | * along with this program; if not, write to the Free Software | |
|
19859
71d37b57eff2
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
16254
diff
changeset
|
24 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
| 14623 | 25 | * |
| 26 | */ | |
| 27 | ||
|
25888
d0fdd378a635
Remove trailing whitespace
Mark Doliner <markdoliner@pidgin.im>
parents:
24379
diff
changeset
|
28 | /* This is taken largely from GtkCellRenderer[Text|Pixbuf|Toggle] by |
| 14623 | 29 | * Jonathon Blandford <jrb@redhat.com> for RedHat, Inc. |
| 30 | */ | |
| 31 | ||
|
14719
d2bad68670ed
[gaim-migrate @ 17403]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14654
diff
changeset
|
32 | #include <gtk/gtk.h> |
| 14623 | 33 | #include "gtkcellrendererexpander.h" |
| 34 | ||
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
35 | static void pidgin_cell_renderer_expander_get_property (GObject *object, |
| 14623 | 36 | guint param_id, |
| 37 | GValue *value, | |
| 38 | GParamSpec *pspec); | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
39 | static void pidgin_cell_renderer_expander_set_property (GObject *object, |
| 14623 | 40 | guint param_id, |
| 41 | const GValue *value, | |
| 42 | GParamSpec *pspec); | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
43 | static void pidgin_cell_renderer_expander_init (PidginCellRendererExpander *cellexpander); |
|
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
44 | static void pidgin_cell_renderer_expander_class_init (PidginCellRendererExpanderClass *class); |
|
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
45 | static void pidgin_cell_renderer_expander_get_size (GtkCellRenderer *cell, |
| 14623 | 46 | GtkWidget *widget, |
| 47 | GdkRectangle *cell_area, | |
| 48 | gint *x_offset, | |
| 49 | gint *y_offset, | |
| 50 | gint *width, | |
| 51 | gint *height); | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
52 | static void pidgin_cell_renderer_expander_render (GtkCellRenderer *cell, |
| 14623 | 53 | GdkWindow *window, |
| 54 | GtkWidget *widget, | |
| 55 | GdkRectangle *background_area, | |
| 56 | GdkRectangle *cell_area, | |
| 57 | GdkRectangle *expose_area, | |
| 58 | guint flags); | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
59 | static gboolean pidgin_cell_renderer_expander_activate (GtkCellRenderer *r, |
| 14623 | 60 | GdkEvent *event, |
| 61 | GtkWidget *widget, | |
| 14953 | 62 | const gchar *p, |
| 63 | GdkRectangle *bg, | |
| 64 | GdkRectangle *cell, | |
| 14860 | 65 | GtkCellRendererState flags); |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
66 | static void pidgin_cell_renderer_expander_finalize (GObject *gobject); |
| 14623 | 67 | |
| 68 | enum { | |
| 69 | LAST_SIGNAL | |
| 70 | }; | |
| 71 | ||
| 72 | enum { | |
| 73 | PROP_0, | |
| 74 | PROP_IS_EXPANDER | |
| 75 | }; | |
|
25888
d0fdd378a635
Remove trailing whitespace
Mark Doliner <markdoliner@pidgin.im>
parents:
24379
diff
changeset
|
76 | |
| 14623 | 77 | static gpointer parent_class; |
| 78 | /* static guint expander_cell_renderer_signals [LAST_SIGNAL]; */ | |
| 79 | ||
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
80 | GType pidgin_cell_renderer_expander_get_type (void) |
| 14623 | 81 | { |
| 82 | static GType cell_expander_type = 0; | |
|
25888
d0fdd378a635
Remove trailing whitespace
Mark Doliner <markdoliner@pidgin.im>
parents:
24379
diff
changeset
|
83 | |
| 14623 | 84 | if (!cell_expander_type) |
| 85 | { | |
| 86 | static const GTypeInfo cell_expander_info = | |
| 87 | { | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
88 | sizeof (PidginCellRendererExpanderClass), |
| 14623 | 89 | NULL, /* base_init */ |
| 90 | NULL, /* base_finalize */ | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
91 | (GClassInitFunc) pidgin_cell_renderer_expander_class_init, |
| 14623 | 92 | NULL, /* class_finalize */ |
| 93 | NULL, /* class_data */ | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
94 | sizeof (PidginCellRendererExpander), |
| 14623 | 95 | 0, /* n_preallocs */ |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
96 | (GInstanceInitFunc) pidgin_cell_renderer_expander_init, |
| 14623 | 97 | NULL /* value_table */ |
| 98 | }; | |
|
25888
d0fdd378a635
Remove trailing whitespace
Mark Doliner <markdoliner@pidgin.im>
parents:
24379
diff
changeset
|
99 | |
| 14623 | 100 | cell_expander_type = |
| 101 | g_type_register_static (GTK_TYPE_CELL_RENDERER, | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
102 | "PidginCellRendererExpander", |
| 14623 | 103 | &cell_expander_info, 0); |
| 104 | } | |
|
25888
d0fdd378a635
Remove trailing whitespace
Mark Doliner <markdoliner@pidgin.im>
parents:
24379
diff
changeset
|
105 | |
| 14623 | 106 | return cell_expander_type; |
| 107 | } | |
| 108 | ||
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
109 | static void pidgin_cell_renderer_expander_init (PidginCellRendererExpander *cellexpander) |
| 14623 | 110 | { |
| 111 | GTK_CELL_RENDERER(cellexpander)->mode = GTK_CELL_RENDERER_MODE_ACTIVATABLE; | |
| 14653 | 112 | GTK_CELL_RENDERER(cellexpander)->xpad = 0; |
| 14623 | 113 | GTK_CELL_RENDERER(cellexpander)->ypad = 2; |
| 114 | } | |
| 115 | ||
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
116 | static void pidgin_cell_renderer_expander_class_init (PidginCellRendererExpanderClass *class) |
| 14623 | 117 | { |
| 118 | GObjectClass *object_class = G_OBJECT_CLASS(class); | |
| 119 | GtkCellRendererClass *cell_class = GTK_CELL_RENDERER_CLASS(class); | |
|
25888
d0fdd378a635
Remove trailing whitespace
Mark Doliner <markdoliner@pidgin.im>
parents:
24379
diff
changeset
|
120 | |
| 14623 | 121 | parent_class = g_type_class_peek_parent (class); |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
122 | object_class->finalize = pidgin_cell_renderer_expander_finalize; |
| 14623 | 123 | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
124 | object_class->get_property = pidgin_cell_renderer_expander_get_property; |
|
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
125 | object_class->set_property = pidgin_cell_renderer_expander_set_property; |
|
25888
d0fdd378a635
Remove trailing whitespace
Mark Doliner <markdoliner@pidgin.im>
parents:
24379
diff
changeset
|
126 | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
127 | cell_class->get_size = pidgin_cell_renderer_expander_get_size; |
|
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
128 | cell_class->render = pidgin_cell_renderer_expander_render; |
|
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
129 | cell_class->activate = pidgin_cell_renderer_expander_activate; |
|
25888
d0fdd378a635
Remove trailing whitespace
Mark Doliner <markdoliner@pidgin.im>
parents:
24379
diff
changeset
|
130 | |
| 14623 | 131 | g_object_class_install_property (object_class, |
| 132 | PROP_IS_EXPANDER, | |
| 133 | g_param_spec_boolean ("expander-visible", | |
| 134 | "Is Expander", | |
| 135 | "True if the renderer should draw an expander", | |
| 136 | FALSE, | |
| 137 | G_PARAM_READWRITE)); | |
| 138 | } | |
| 139 | ||
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
140 | static void pidgin_cell_renderer_expander_finalize (GObject *object) |
| 14623 | 141 | { |
| 142 | /* | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
143 | PidginCellRendererExpander *cellexpander = PIDGIN_CELL_RENDERER_EXPANDER(object); |
| 14623 | 144 | */ |
| 145 | ||
| 146 | (* G_OBJECT_CLASS (parent_class)->finalize) (object); | |
| 147 | } | |
| 148 | ||
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
149 | static void pidgin_cell_renderer_expander_get_property (GObject *object, |
| 14623 | 150 | guint param_id, |
| 151 | GValue *value, | |
| 152 | GParamSpec *psec) | |
| 153 | { | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
154 | PidginCellRendererExpander *cellexpander = PIDGIN_CELL_RENDERER_EXPANDER(object); |
| 14623 | 155 | |
| 156 | switch (param_id) | |
| 157 | { | |
| 158 | case PROP_IS_EXPANDER: | |
| 159 | g_value_set_boolean(value, cellexpander->is_expander); | |
| 160 | break; | |
| 161 | default: | |
| 162 | G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, psec); | |
| 163 | break; | |
|
25888
d0fdd378a635
Remove trailing whitespace
Mark Doliner <markdoliner@pidgin.im>
parents:
24379
diff
changeset
|
164 | |
| 14623 | 165 | } |
| 166 | } | |
| 167 | ||
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
168 | static void pidgin_cell_renderer_expander_set_property (GObject *object, |
| 14623 | 169 | guint param_id, |
| 170 | const GValue *value, | |
| 171 | GParamSpec *pspec) | |
| 172 | { | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
173 | PidginCellRendererExpander *cellexpander = PIDGIN_CELL_RENDERER_EXPANDER (object); |
| 14623 | 174 | |
| 175 | switch (param_id) | |
| 176 | { | |
| 177 | case PROP_IS_EXPANDER: | |
| 178 | cellexpander->is_expander = g_value_get_boolean(value); | |
| 179 | break; | |
| 180 | default: | |
| 181 | G_OBJECT_WARN_INVALID_PROPERTY_ID(object, param_id, pspec); | |
| 182 | break; | |
| 183 | } | |
| 184 | } | |
| 185 | ||
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
186 | GtkCellRenderer *pidgin_cell_renderer_expander_new(void) |
| 14623 | 187 | { |
|
15883
969b74a3e27a
According to etags, pidgin/ should be completely clean of references to 'gaim' as a client
Sean Egan <seanegan@pidgin.im>
parents:
15562
diff
changeset
|
188 | return g_object_new(PIDGIN_TYPE_GTK_CELL_RENDERER_EXPANDER, NULL); |
| 14623 | 189 | } |
| 190 | ||
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
191 | static void pidgin_cell_renderer_expander_get_size (GtkCellRenderer *cell, |
| 14623 | 192 | GtkWidget *widget, |
| 193 | GdkRectangle *cell_area, | |
| 194 | gint *x_offset, | |
| 195 | gint *y_offset, | |
| 196 | gint *width, | |
| 197 | gint *height) | |
| 198 | { | |
| 199 | gint calc_width; | |
| 200 | gint calc_height; | |
|
25888
d0fdd378a635
Remove trailing whitespace
Mark Doliner <markdoliner@pidgin.im>
parents:
24379
diff
changeset
|
201 | gint expander_size; |
|
d0fdd378a635
Remove trailing whitespace
Mark Doliner <markdoliner@pidgin.im>
parents:
24379
diff
changeset
|
202 | |
| 14623 | 203 | gtk_widget_style_get(widget, "expander-size", &expander_size, NULL); |
|
25888
d0fdd378a635
Remove trailing whitespace
Mark Doliner <markdoliner@pidgin.im>
parents:
24379
diff
changeset
|
204 | |
| 14623 | 205 | calc_width = (gint) cell->xpad * 2 + expander_size; |
| 206 | calc_height = (gint) cell->ypad * 2 + expander_size; | |
|
25888
d0fdd378a635
Remove trailing whitespace
Mark Doliner <markdoliner@pidgin.im>
parents:
24379
diff
changeset
|
207 | |
| 14623 | 208 | if (width) |
| 209 | *width = calc_width; | |
|
25888
d0fdd378a635
Remove trailing whitespace
Mark Doliner <markdoliner@pidgin.im>
parents:
24379
diff
changeset
|
210 | |
| 14623 | 211 | if (height) |
| 212 | *height = calc_height; | |
|
25888
d0fdd378a635
Remove trailing whitespace
Mark Doliner <markdoliner@pidgin.im>
parents:
24379
diff
changeset
|
213 | |
| 14623 | 214 | if (cell_area) |
| 215 | { | |
| 216 | if (x_offset) | |
| 217 | { | |
| 218 | *x_offset = cell->xalign * (cell_area->width - calc_width); | |
| 219 | *x_offset = MAX (*x_offset, 0); | |
| 220 | } | |
| 221 | if (y_offset) | |
| 222 | { | |
| 223 | *y_offset = cell->yalign * (cell_area->height - calc_height); | |
| 224 | *y_offset = MAX (*y_offset, 0); | |
| 225 | } | |
| 226 | } | |
| 227 | } | |
| 228 | ||
| 229 | ||
|
24379
02a9ca3f4a34
Fixes a bug in the blist theme where a line appears only under the expander
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
20404
diff
changeset
|
230 | static void pidgin_cell_renderer_expander_render(GtkCellRenderer *cell, |
| 14623 | 231 | GdkWindow *window, |
| 232 | GtkWidget *widget, | |
| 233 | GdkRectangle *background_area, | |
| 234 | GdkRectangle *cell_area, | |
| 235 | GdkRectangle *expose_area, | |
| 236 | guint flags) | |
| 237 | { | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
238 | PidginCellRendererExpander *cellexpander = (PidginCellRendererExpander *) cell; |
|
24379
02a9ca3f4a34
Fixes a bug in the blist theme where a line appears only under the expander
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
20404
diff
changeset
|
239 | gboolean set; |
| 14623 | 240 | gint width, height; |
| 241 | GtkStateType state; | |
| 242 | ||
| 243 | if (!cellexpander->is_expander) | |
| 244 | return; | |
| 245 | ||
| 246 | width = cell_area->width; | |
| 247 | height = cell_area->height; | |
|
25888
d0fdd378a635
Remove trailing whitespace
Mark Doliner <markdoliner@pidgin.im>
parents:
24379
diff
changeset
|
248 | |
| 14623 | 249 | if (!cell->sensitive) |
| 250 | state = GTK_STATE_INSENSITIVE; | |
| 251 | else if (flags & GTK_CELL_RENDERER_PRELIT) | |
| 252 | state = GTK_STATE_PRELIGHT; | |
| 253 | else if (GTK_WIDGET_HAS_FOCUS (widget) && flags & GTK_CELL_RENDERER_SELECTED) | |
| 254 | state = GTK_STATE_ACTIVE; | |
| 255 | else | |
| 256 | state = GTK_STATE_NORMAL; | |
| 257 | ||
| 258 | width -= cell->xpad*2; | |
| 259 | height -= cell->ypad*2; | |
| 260 | ||
| 261 | gtk_paint_expander (widget->style, | |
| 262 | window, state, | |
| 263 | NULL, widget, "treeview", | |
| 264 | cell_area->x + cell->xpad + (width / 2), | |
| 265 | cell_area->y + cell->ypad + (height / 2), | |
| 266 | cell->is_expanded ? GTK_EXPANDER_EXPANDED : GTK_EXPANDER_COLLAPSED); | |
|
24379
02a9ca3f4a34
Fixes a bug in the blist theme where a line appears only under the expander
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
20404
diff
changeset
|
267 | |
|
02a9ca3f4a34
Fixes a bug in the blist theme where a line appears only under the expander
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
20404
diff
changeset
|
268 | /* only draw the line if the color isn't set - this prevents a bug where the hline appears only under the expander */ |
|
02a9ca3f4a34
Fixes a bug in the blist theme where a line appears only under the expander
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
20404
diff
changeset
|
269 | g_object_get(cellexpander, "cell-background-set", &set, NULL); |
|
02a9ca3f4a34
Fixes a bug in the blist theme where a line appears only under the expander
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
20404
diff
changeset
|
270 | if (cell->is_expanded && !set) |
|
25888
d0fdd378a635
Remove trailing whitespace
Mark Doliner <markdoliner@pidgin.im>
parents:
24379
diff
changeset
|
271 | gtk_paint_hline (widget->style, window, state, NULL, widget, NULL, 0, |
|
20327
658f3acfbf1f
only draw line on expanded group headers
Sean Egan <seanegan@pidgin.im>
parents:
20308
diff
changeset
|
272 | widget->allocation.width, cell_area->y + cell_area->height); |
| 14623 | 273 | } |
| 274 | ||
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
275 | static gboolean pidgin_cell_renderer_expander_activate(GtkCellRenderer *r, |
| 14623 | 276 | GdkEvent *event, |
| 277 | GtkWidget *widget, | |
| 278 | const gchar *p, | |
| 279 | GdkRectangle *bg, | |
| 280 | GdkRectangle *cell, | |
| 281 | GtkCellRendererState flags) | |
| 282 | { | |
| 283 | GtkTreePath *path = gtk_tree_path_new_from_string(p); | |
| 284 | if (gtk_tree_view_row_expanded(GTK_TREE_VIEW(widget), path)) | |
| 285 | gtk_tree_view_collapse_row(GTK_TREE_VIEW(widget), path); | |
| 286 | else | |
| 287 | gtk_tree_view_expand_row(GTK_TREE_VIEW(widget),path,FALSE); | |
| 288 | gtk_tree_path_free(path); | |
|
14626
964677efbddf
[gaim-migrate @ 17287]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14623
diff
changeset
|
289 | return FALSE; |
| 14623 | 290 | } |