Debian Codegraph @

gtk/deprecated/gtkappchooserbutton.c

raw symbols SCIP
1 /* gtkappchooserbutton.c: an app-chooser button
2 *
3 * Copyright (C) 2010 Red Hat, Inc.
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public License as
7 * published by the Free Software Foundation; either version 2 of the
8 * License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
14 *
15 * You should have received a copy of the GNU Library General Public
16 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
17 *
18 * Authors: Cosimo Cecchi <[email protected]>
19 */
20
21 /**
22 * GtkAppChooserButton:
23 *
24 * The `GtkAppChooserButton` lets the user select an application.
25 *
26 * <picture>
27 * <source srcset="appchooserbutton-dark.png" media="(prefers-color-scheme: dark)">
28 * <img alt="An example GtkAppChooserButton" src="appchooserbutton.png">
29 * </picture>
30 *
31 * Initially, a `GtkAppChooserButton` selects the first application
32 * in its list, which will either be the most-recently used application
33 * or, if [[email protected]:show-default-item] is %TRUE, the
34 * default application.
35 *
36 * The list of applications shown in a `GtkAppChooserButton` includes
37 * the recommended applications for the given content type. When
38 * [[email protected]:show-default-item] is set, the default
39 * application is also included. To let the user chooser other applications,
40 * you can set the [[email protected]:show-dialog-item] property,
41 * which allows to open a full [[email protected]].
42 *
43 * It is possible to add custom items to the list, using
44 * [[email protected]_custom_item]. These items cause
45 * the [[email protected]::custom-item-activated] signal to be
46 * emitted when they are selected.
47 *
48 * To track changes in the selected application, use the
49 * [[email protected]::changed] signal.
50 *
51 * ## CSS nodes
52 *
53 * `GtkAppChooserButton` has a single CSS node with the name “appchooserbutton”.
54 *
55 * Deprecated: 4.10: The application selection widgets should be
56 * implemented according to the design of each platform and/or
57 * application requiring them.
58 */
59 #include "config.h"cxx . . $ `<file>/build/config.h`/
60
61 #include "gtkappchooserbutton.h"cxx . . $ `<file>/gtk/deprecated/gtkappchooserbutton.h`/
62
63 #include "gtkappchooser.h"cxx . . $ `<file>/gtk/deprecated/gtkappchooser.h`/
64 #include "gtkappchooserdialog.h"cxx . . $ `<file>/gtk/deprecated/gtkappchooserdialog.h`/
65 #include "gtkappchooserprivate.h"cxx . . $ `<file>/gtk/deprecated/gtkappchooserprivate.h`/
66 #include "gtkcelllayout.h"cxx . . $ `<file>/gtk/deprecated/gtkcelllayout.h`/
67 #include "gtkcellrendererpixbuf.h"cxx . . $ `<file>/gtk/deprecated/gtkcellrendererpixbuf.h`/
68 #include "gtkcellrenderertext.h"cxx . . $ `<file>/gtk/deprecated/gtkcellrenderertext.h`/
69 #include "gtkcombobox.h"cxx . . $ `<file>/gtk/deprecated/gtkcombobox.h`/
70 #include "gtkwidgetprivate.h"cxx . . $ `<file>/gtk/gtkwidgetprivate.h`/
71 #include "gtkdialog.h"cxx . . $ `<file>/gtk/deprecated/gtkdialog.h`/
72 #include <glib/gi18n-lib.h>
73 #include "gtkmarshalers.h"cxx . . $ `<file>/build/gtk/gtkmarshalers.h`/
74 #include "gtkliststore.h"cxx . . $ `<file>/gtk/deprecated/gtkliststore.h`/
75 #include "gtkprivate.h"cxx . . $ `<file>/gtk/gtkprivate.h`/
76
77 G_GNUC_BEGIN_IGNORE_DEPRECATIONScxx . . $ `<external>/12741050725406041920/gmacros.h:771:9`!
78
79 enumcxx . . $ $anonymous_type_4125f5ba23ea086_0# {
80 PROP_SHOW_DIALOG_ITEMcxx . . $ PROP_SHOW_DIALOG_ITEM. = 1,
81 PROP_SHOW_DEFAULT_ITEMcxx . . $ PROP_SHOW_DEFAULT_ITEM.,
82 PROP_HEADINGcxx . . $ PROP_HEADING.,
83 PROP_MODALcxx . . $ PROP_MODAL.,
84 NUM_PROPERTIEScxx . . $ NUM_PROPERTIES.,
85
86 PROP_CONTENT_TYPEcxx . . $ PROP_CONTENT_TYPE. = NUM_PROPERTIEScxx . . $ NUM_PROPERTIES.
87 };
88
89 enumcxx . . $ $anonymous_type_4125f5ba23ea086_1# {
90 SIGNAL_CHANGEDcxx . . $ SIGNAL_CHANGED.,
91 SIGNAL_CUSTOM_ITEM_ACTIVATEDcxx . . $ SIGNAL_CUSTOM_ITEM_ACTIVATED.,
92 ACTIVATEcxx . . $ ACTIVATE.,
93 NUM_SIGNALScxx . . $ NUM_SIGNALS.
94 };
95
96 enumcxx . . $ $anonymous_type_4125f5ba23ea086_2# {
97 COLUMN_APP_INFOcxx . . $ COLUMN_APP_INFO.,
98 COLUMN_NAMEcxx . . $ COLUMN_NAME.,
99 COLUMN_LABELcxx . . $ COLUMN_LABEL.,
100 COLUMN_ICONcxx . . $ COLUMN_ICON.,
101 COLUMN_CUSTOMcxx . . $ COLUMN_CUSTOM.,
102 COLUMN_SEPARATORcxx . . $ COLUMN_SEPARATOR.,
103 NUM_COLUMNScxx . . $ NUM_COLUMNS.,
104 };
105
106 #define CUSTOM_ITEM_OTHER_APPcxx . . $ `gtk/deprecated/gtkappchooserbutton.c:106:9`! "gtk-internal-item-other-app"
107
108 static void app_chooser_iface_initcxx . . $ app_chooser_iface_init(d829ff16bc5900f0). (GtkAppChooserIfacecxx . . $ GtkAppChooserIface# *iface);
109
110 static void real_insert_custom_itemcxx . . $ real_insert_custom_item(46651e8c09da9f51). (GtkAppChooserButtoncxx . . $ GtkAppChooserButton# *self,
111 const char *name,
112 const char *label,
113 GIconcxx . . $ GIcon# *icon,
114 gbooleancxx . . $ gboolean# custom,
115 GtkTreeItercxx . . $ GtkTreeIter# *iter);
116
117 static void real_insert_separatorcxx . . $ real_insert_separator(f723e87b7bd21dee). (GtkAppChooserButtoncxx . . $ GtkAppChooserButton# *self,
118 gbooleancxx . . $ gboolean# custom,
119 GtkTreeItercxx . . $ GtkTreeIter# *iter);
120
121 static guintcxx . . $ guint# signalscxx . . $ signals.[NUM_SIGNALScxx . . $ NUM_SIGNALS.] = { 0, };
122 static GParamSpeccxx . . $ GParamSpec# *propertiescxx . . $ properties.[NUM_PROPERTIEScxx . . $ NUM_PROPERTIES.];
123
124 typedef struct _GtkAppChooserButtonClasscxx . . $ _GtkAppChooserButtonClass# GtkAppChooserButtonClasscxx . . $ GtkAppChooserButtonClass#;
125
126 struct _GtkAppChooserButtoncxx . . $ _GtkAppChooserButton# {
127 GtkWidgetcxx . . $ GtkWidget# parent_instancecxx . . $ _GtkAppChooserButton#parent_instance.;
128
129 GtkWidgetcxx . . $ GtkWidget# *comboboxcxx . . $ _GtkAppChooserButton#combobox.;
130 GtkListStorecxx . . $ GtkListStore# *storecxx . . $ _GtkAppChooserButton#store.;
131
132 char *content_typecxx . . $ _GtkAppChooserButton#content_type.;
133 char *headingcxx . . $ _GtkAppChooserButton#heading.;
134 int last_activecxx . . $ _GtkAppChooserButton#last_active.;
135 gbooleancxx . . $ gboolean# show_dialog_itemcxx . . $ _GtkAppChooserButton#show_dialog_item.;
136 gbooleancxx . . $ gboolean# show_default_itemcxx . . $ _GtkAppChooserButton#show_default_item.;
137 gbooleancxx . . $ gboolean# modalcxx . . $ _GtkAppChooserButton#modal.;
138
139 GHashTablecxx . . $ GHashTable# *custom_item_namescxx . . $ _GtkAppChooserButton#custom_item_names.;
140 };
141
142 struct _GtkAppChooserButtonClasscxx . . $ _GtkAppChooserButtonClass# {
143 GtkWidgetClasscxx . . $ GtkWidgetClass# parent_classcxx . . $ _GtkAppChooserButtonClass#parent_class.;
144
145 void (* changedcxx . . $ _GtkAppChooserButtonClass#changed.) (GtkAppChooserButtoncxx . . $ GtkAppChooserButton# *self);
146 void (* custom_item_activatedcxx . . $ _GtkAppChooserButtonClass#custom_item_activated.) (GtkAppChooserButtoncxx . . $ GtkAppChooserButton# *self,
147 const char *item_name);
148 void (* activatecxx . . $ _GtkAppChooserButtonClass#activate.) (GtkAppChooserButtoncxx . . $ GtkAppChooserButton# *self);
149 };
150
151 G_DEFINE_TYPE_WITH_CODEcxx . . $ `<external>/9567554376676449156/gtype.h:1850:9`! (GtkAppChooserButton, gtk_app_chooser_button, GTK_TYPE_WIDGETcxx . . $ `gtk/gtkwidget.h:43:9`!,
152 G_IMPLEMENT_INTERFACEcxx . . $ `<external>/9567554376676449156/gtype.h:2115:9`! (GTK_TYPE_APP_CHOOSERcxx . . $ `gtk/deprecated/gtkappchooser.h:34:9`!,
153 app_chooser_iface_init));
154
155 static gbooleancxx . . $ gboolean#
156 row_separator_funccxx . . $ row_separator_func(cceb7144d7f20ae). (GtkTreeModelcxx . . $ GtkTreeModel# *model,
157 GtkTreeItercxx . . $ GtkTreeIter# *iter,
158 gpointercxx . . $ gpointer# user_data)
159 {
160 gbooleancxx . . $ gboolean# separator;
161
162 gtk_tree_model_getcxx . . $ gtk_tree_model_get(6d4913a405196bb7). (model, iter,
163 COLUMN_SEPARATORcxx . . $ COLUMN_SEPARATOR., &separator,
164 -1);
165
166 return separator;
167 }
168
169 static void
170 get_first_itercxx . . $ get_first_iter(7985347529222355). (GtkListStorecxx . . $ GtkListStore# *store,
171 GtkTreeItercxx . . $ GtkTreeIter# *iter)
172 {
173 GtkTreeItercxx . . $ GtkTreeIter# iter2;
174
175 if (!gtk_tree_model_get_iter_firstcxx . . $ gtk_tree_model_get_iter_first(f5bae890eedecc7d). (GTK_TREE_MODELcxx . . $ `gtk/deprecated/gtktreemodel.h:30:9`! (store), iter))
176 {
177 /* the model is empty, append */
178 gtk_list_store_appendcxx . . $ gtk_list_store_append(7985347529222355). (store, iter);
179 }
180 else
181 {
182 gtk_list_store_insert_beforecxx . . $ gtk_list_store_insert_before(e9f3d454ac7d6acd). (store, &iter2, iter);
183 *iter = iter2;
184 }
185 }
186
187 typedef structcxx . . $ $anonymous_type_4125f5ba23ea086_3# {
188 GtkAppChooserButtoncxx . . $ GtkAppChooserButton# *selfcxx . . $ $anonymous_type_4125f5ba23ea086_3#self.;
189 GAppInfocxx . . $ GAppInfo# *infocxx . . $ $anonymous_type_4125f5ba23ea086_3#info.;
190 int active_indexcxx . . $ $anonymous_type_4125f5ba23ea086_3#active_index.;
191 } SelectAppDatacxx . . $ SelectAppData#;
192
193 static void
194 select_app_data_freecxx . . $ select_app_data_free(236aefc3e424aa10). (SelectAppDatacxx . . $ SelectAppData# *data)
195 {
196 g_clear_objectcxx . . $ `<external>/1341695927569185362/gobject.h:695:9`! (&data->self);
197 g_clear_objectcxx . . $ `<external>/1341695927569185362/gobject.h:695:9`! (&data->info);
198
199 g_slice_freecxx . . $ `<external>/11282907415350287124/gslice.h:89:9`! (SelectAppData, data);
200 }
201
202 static gbooleancxx . . $ gboolean#
203 select_application_func_cbcxx . . $ select_application_func_cb(b48434c5af0e88bd). (GtkTreeModelcxx . . $ GtkTreeModel# *model,
204 GtkTreePathcxx . . $ GtkTreePath# *path,
205 GtkTreeItercxx . . $ GtkTreeIter# *iter,
206 gpointercxx . . $ gpointer# user_data)
207 {
208 SelectAppDatacxx . . $ SelectAppData# *data = user_data;
209 GtkAppChooserButtoncxx . . $ GtkAppChooserButton# *self = data->selfcxx . . $ $anonymous_type_4125f5ba23ea086_3#self.;
210 GAppInfocxx . . $ GAppInfo# *app_to_match = data->infocxx . . $ $anonymous_type_4125f5ba23ea086_3#info.;
211 GAppInfocxx . . $ GAppInfo# *app = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
212 gbooleancxx . . $ gboolean# custom;
213 gbooleancxx . . $ gboolean# result;
214
215 gtk_tree_model_getcxx . . $ gtk_tree_model_get(6d4913a405196bb7). (model, iter,
216 COLUMN_APP_INFOcxx . . $ COLUMN_APP_INFO., &app,
217 COLUMN_CUSTOMcxx . . $ COLUMN_CUSTOM., &custom,
218 -1);
219
220 /* custom items are always after GAppInfos, so iterating further here
221 * is just useless.
222 */
223 if (custom)
224 result = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!;
225 else if (g_app_info_equalcxx . . $ g_app_info_equal(a16346e85fc8c5fe). (app, app_to_match))
226 {
227 gtk_combo_box_set_active_itercxx . . $ gtk_combo_box_set_active_iter(d315ff5d1c40d93a). (GTK_COMBO_BOXcxx . . $ `gtk/deprecated/gtkcombobox.h:31:9`! (self->combobox), iter);
228 result = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!;
229 }
230 else
231 result = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!;
232
233 g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8). (app);
234
235 return result;
236 }
237
238 static void
239 gtk_app_chooser_button_select_applicationcxx . . $ gtk_app_chooser_button_select_application(c354dd95108d67e8). (GtkAppChooserButtoncxx . . $ GtkAppChooserButton# *self,
240 GAppInfocxx . . $ GAppInfo# *info)
241 {
242 SelectAppDatacxx . . $ SelectAppData# *data;
243
244 data = g_slice_new0cxx . . $ `<external>/11282907415350287124/gslice.h:61:11`! (SelectAppData);
245 data->selfcxx . . $ $anonymous_type_4125f5ba23ea086_3#self. = g_object_refcxx . . $ `<external>/1341695927569185362/gobject.h:533:9`! (self);
246 data->infocxx . . $ $anonymous_type_4125f5ba23ea086_3#info. = g_object_refcxx . . $ `<external>/1341695927569185362/gobject.h:533:9`! (info);
247
248 gtk_tree_model_foreachcxx . . $ gtk_tree_model_foreach(f62bc634465d8c2c). (GTK_TREE_MODELcxx . . $ `gtk/deprecated/gtktreemodel.h:30:9`! (self->store),
249 select_application_func_cbcxx . . $ select_application_func_cb(b48434c5af0e88bd)., data);
250
251 select_app_data_freecxx . . $ select_app_data_free(236aefc3e424aa10). (data);
252 }
253
254 static void
255 other_application_dialog_response_cbcxx . . $ other_application_dialog_response_cb(b2a0974d30eb7ad). (GtkDialogcxx . . $ GtkDialog# *dialog,
256 int response_id,
257 gpointercxx . . $ gpointer# user_data)
258 {
259 GtkAppChooserButtoncxx . . $ GtkAppChooserButton# *self = user_data;
260 GAppInfocxx . . $ GAppInfo# *info;
261
262 if (response_id != GTK_RESPONSE_OKcxx . . $ GTK_RESPONSE_OK.)
263 {
264 /* reset the active item, otherwise we are stuck on
265 * 'Other application…'
266 */
267 gtk_combo_box_set_activecxx . . $ gtk_combo_box_set_active(786f96f974cbfb1d). (GTK_COMBO_BOXcxx . . $ `gtk/deprecated/gtkcombobox.h:31:9`! (self->combobox), self->last_activecxx . . $ _GtkAppChooserButton#last_active.);
268 gtk_window_destroycxx . . $ gtk_window_destroy(f2417dd135ed86f3). (GTK_WINDOWcxx . . $ `gtk/gtkwindow.h:39:9`! (dialog));
269 return;
270 }
271
272 info = gtk_app_chooser_get_app_infocxx . . $ gtk_app_chooser_get_app_info(b2393f95df7b836b). (GTK_APP_CHOOSERcxx . . $ `gtk/deprecated/gtkappchooser.h:35:9`! (dialog));
273
274 gtk_window_destroycxx . . $ gtk_window_destroy(f2417dd135ed86f3). (GTK_WINDOWcxx . . $ `gtk/gtkwindow.h:39:9`! (dialog));
275
276 /* refresh the combobox to get the new application */
277 gtk_app_chooser_refreshcxx . . $ gtk_app_chooser_refresh(eafac33094b01ac8). (GTK_APP_CHOOSERcxx . . $ `gtk/deprecated/gtkappchooser.h:35:9`! (self));
278 gtk_app_chooser_button_select_applicationcxx . . $ gtk_app_chooser_button_select_application(c354dd95108d67e8). (self, info);
279
280 g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8). (info);
281 }
282
283 static void
284 other_application_item_activated_cbcxx . . $ other_application_item_activated_cb(54f913b2544b6b70). (GtkAppChooserButtoncxx . . $ GtkAppChooserButton# *self)
285 {
286 GtkWidgetcxx . . $ GtkWidget# *dialog, *widget;
287 GtkRootcxx . . $ GtkRoot# *root;
288
289 root = gtk_widget_get_rootcxx . . $ gtk_widget_get_root(978ce13b0a79da4). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self));
290 dialog = gtk_app_chooser_dialog_new_for_content_typecxx . . $ gtk_app_chooser_dialog_new_for_content_type(4767e54a76fc5499). (GTK_WINDOWcxx . . $ `gtk/gtkwindow.h:39:9`! (root),
291 GTK_DIALOG_DESTROY_WITH_PARENTcxx . . $ GTK_DIALOG_DESTROY_WITH_PARENT.,
292 self->content_typecxx . . $ _GtkAppChooserButton#content_type.);
293 gtk_window_set_modalcxx . . $ gtk_window_set_modal(3adb53e0a0f76453). (GTK_WINDOWcxx . . $ `gtk/gtkwindow.h:39:9`! (dialog), self->modalcxx . . $ _GtkAppChooserButton#modal. | gtk_window_get_modalcxx . . $ gtk_window_get_modal(b9ada049f487cdbd). (GTK_WINDOWcxx . . $ `gtk/gtkwindow.h:39:9`! (root)));
294 gtk_app_chooser_dialog_set_headingcxx . . $ gtk_app_chooser_dialog_set_heading(fc234639b59342c). (GTK_APP_CHOOSER_DIALOGcxx . . $ `gtk/deprecated/gtkappchooserdialog.h:37:9`! (dialog), self->headingcxx . . $ _GtkAppChooserButton#heading.);
295
296 widget = gtk_app_chooser_dialog_get_widgetcxx . . $ gtk_app_chooser_dialog_get_widget(8489cb91e4ad603d). (GTK_APP_CHOOSER_DIALOGcxx . . $ `gtk/deprecated/gtkappchooserdialog.h:37:9`! (dialog));
297 g_object_setcxx . . $ g_object_set(1ac911bdc4e9a14d). (widget,
298 "show-fallback", TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!,
299 "show-other", TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!,
300 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
301 gtk_widget_showcxx . . $ gtk_widget_show(d7cf858254b37903). (dialog);
302
303 g_signal_connectcxx . . $ `<external>/15952772511652638895/gsignal.h:548:9`! (dialog, "response",
304 G_CALLBACKcxx . . $ `<external>/16473872192229286895/gclosure.h:73:9`! (other_application_dialog_response_cb), self);
305 }
306
307 static void
308 gtk_app_chooser_button_ensure_dialog_itemcxx . . $ gtk_app_chooser_button_ensure_dialog_item(fd99cb66dd81c71a). (GtkAppChooserButtoncxx . . $ GtkAppChooserButton# *self,
309 GtkTreeItercxx . . $ GtkTreeIter# *prev_iter)
310 {
311 GtkTreeItercxx . . $ GtkTreeIter# iter, iter2;
312
313 if (!self->show_dialog_itemcxx . . $ _GtkAppChooserButton#show_dialog_item. || !self->content_typecxx . . $ _GtkAppChooserButton#content_type.)
314 return;
315
316 if (prev_iter == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
317 gtk_list_store_appendcxx . . $ gtk_list_store_append(7985347529222355). (self->storecxx . . $ _GtkAppChooserButton#store., &iter);
318 else
319 gtk_list_store_insert_aftercxx . . $ gtk_list_store_insert_after(e9f3d454ac7d6acd). (self->storecxx . . $ _GtkAppChooserButton#store., &iter, prev_iter);
320
321 real_insert_separatorcxx . . $ real_insert_separator(f723e87b7bd21dee). (self, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, &iter);
322 iter2 = iter;
323
324 gtk_list_store_insert_aftercxx . . $ gtk_list_store_insert_after(e9f3d454ac7d6acd). (self->storecxx . . $ _GtkAppChooserButton#store., &iter, &iter2);
325 real_insert_custom_itemcxx . . $ real_insert_custom_item(46651e8c09da9f51). (self, CUSTOM_ITEM_OTHER_APPcxx . . $ `gtk/deprecated/gtkappchooserbutton.c:106:9`!,
326 _cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:32:10`!("Other app…"), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!,
327 FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, &iter);
328 }
329
330 static void
331 insert_one_applicationcxx . . $ insert_one_application(15fe000d66d1c5b0). (GtkAppChooserButtoncxx . . $ GtkAppChooserButton# *self,
332 GAppInfocxx . . $ GAppInfo# *app,
333 GtkTreeItercxx . . $ GtkTreeIter# *iter)
334 {
335 GIconcxx . . $ GIcon# *icon;
336
337 icon = g_app_info_get_iconcxx . . $ g_app_info_get_icon(f181187f439c8eeb). (app);
338
339 if (icon == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
340 icon = g_themed_icon_newcxx . . $ g_themed_icon_new(325c2ed61a9b94ee). ("application-x-executable");
341 else
342 g_object_refcxx . . $ `<external>/1341695927569185362/gobject.h:533:9`! (icon);
343
344 gtk_list_store_setcxx . . $ gtk_list_store_set(92396b3ceb945e67). (self->storecxx . . $ _GtkAppChooserButton#store., iter,
345 COLUMN_APP_INFOcxx . . $ COLUMN_APP_INFO., app,
346 COLUMN_LABELcxx . . $ COLUMN_LABEL., g_app_info_get_namecxx . . $ g_app_info_get_name(946cbaa9210a41). (app),
347 COLUMN_ICONcxx . . $ COLUMN_ICON., icon,
348 COLUMN_CUSTOMcxx . . $ COLUMN_CUSTOM., FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!,
349 -1);
350
351 g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8). (icon);
352 }
353
354 static void
355 gtk_app_chooser_button_populatecxx . . $ gtk_app_chooser_button_populate(54f913b2544b6b70). (GtkAppChooserButtoncxx . . $ GtkAppChooserButton# *self)
356 {
357 GListcxx . . $ GList# *recommended_apps = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, *l;
358 GAppInfocxx . . $ GAppInfo# *app, *default_app = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
359 GtkTreeItercxx . . $ GtkTreeIter# iter, iter2;
360 gbooleancxx . . $ gboolean# cycled_recommended;
361
362 #ifndef G_OS_WIN32
363 if (self->content_typecxx . . $ _GtkAppChooserButton#content_type.)
364 recommended_apps = g_app_info_get_recommended_for_typecxx . . $ g_app_info_get_recommended_for_type(39546108f7976f40). (self->content_typecxx . . $ _GtkAppChooserButton#content_type.);
365 #endif
366 cycled_recommended = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!;
367
368 if (self->show_default_itemcxx . . $ _GtkAppChooserButton#show_default_item.)
369 {
370 if (self->content_typecxx . . $ _GtkAppChooserButton#content_type.)
371 default_app = g_app_info_get_default_for_typecxx . . $ g_app_info_get_default_for_type(9f5189d3a3bca4f7). (self->content_typecxx . . $ _GtkAppChooserButton#content_type., FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!);
372
373 if (default_app != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
374 {
375 get_first_itercxx . . $ get_first_iter(7985347529222355). (self->storecxx . . $ _GtkAppChooserButton#store., &iter);
376 cycled_recommended = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!;
377
378 insert_one_applicationcxx . . $ insert_one_application(15fe000d66d1c5b0). (self, default_app, &iter);
379
380 g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8). (default_app);
381 }
382 }
383
384 for (l = recommended_apps; l != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; l = l->nextcxx . . $ _GList#next.)
385 {
386 app = l->datacxx . . $ _GList#data.;
387
388 if (default_app != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! && g_app_info_equalcxx . . $ g_app_info_equal(a16346e85fc8c5fe). (app, default_app))
389 continue;
390
391 if (cycled_recommended)
392 {
393 gtk_list_store_insert_aftercxx . . $ gtk_list_store_insert_after(e9f3d454ac7d6acd). (self->storecxx . . $ _GtkAppChooserButton#store., &iter2, &iter);
394 iter = iter2;
395 }
396 else
397 {
398 get_first_itercxx . . $ get_first_iter(7985347529222355). (self->storecxx . . $ _GtkAppChooserButton#store., &iter);
399 cycled_recommended = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!;
400 }
401
402 insert_one_applicationcxx . . $ insert_one_application(15fe000d66d1c5b0). (self, app, &iter);
403 }
404
405 if (recommended_apps != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
406 g_list_free_fullcxx . . $ g_list_free_full(5ba5b0738c7ed753). (recommended_apps, g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8).);
407
408 if (!cycled_recommended)
409 gtk_app_chooser_button_ensure_dialog_itemcxx . . $ gtk_app_chooser_button_ensure_dialog_item(fd99cb66dd81c71a). (self, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
410 else
411 gtk_app_chooser_button_ensure_dialog_itemcxx . . $ gtk_app_chooser_button_ensure_dialog_item(fd99cb66dd81c71a). (self, &iter);
412
413 gtk_combo_box_set_activecxx . . $ gtk_combo_box_set_active(786f96f974cbfb1d). (GTK_COMBO_BOXcxx . . $ `gtk/deprecated/gtkcombobox.h:31:9`! (self->combobox), 0);
414 }
415
416 static void
417 gtk_app_chooser_button_build_uicxx . . $ gtk_app_chooser_button_build_ui(54f913b2544b6b70). (GtkAppChooserButtoncxx . . $ GtkAppChooserButton# *self)
418 {
419 GtkCellRenderercxx . . $ GtkCellRenderer# *cell;
420 GtkCellAreacxx . . $ GtkCellArea# *area;
421
422 gtk_combo_box_set_modelcxx . . $ gtk_combo_box_set_model(60ebebe6d2f9366d). (GTK_COMBO_BOXcxx . . $ `gtk/deprecated/gtkcombobox.h:31:9`! (self->combobox),
423 GTK_TREE_MODELcxx . . $ `gtk/deprecated/gtktreemodel.h:30:9`! (self->store));
424
425 area = gtk_cell_layout_get_areacxx . . $ gtk_cell_layout_get_area(ebae739605725821). (GTK_CELL_LAYOUTcxx . . $ `gtk/deprecated/gtkcelllayout.h:32:9`! (self->combobox));
426
427 gtk_combo_box_set_row_separator_funccxx . . $ gtk_combo_box_set_row_separator_func(36fca2a2fe24c7e0). (GTK_COMBO_BOXcxx . . $ `gtk/deprecated/gtkcombobox.h:31:9`! (self->combobox),
428 row_separator_funccxx . . $ row_separator_func(cceb7144d7f20ae)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
429
430 cell = gtk_cell_renderer_pixbuf_newcxx . . $ gtk_cell_renderer_pixbuf_new(6d6b6a1a12ffe86f). ();
431 gtk_cell_area_add_with_propertiescxx . . $ gtk_cell_area_add_with_properties(9414d0009354b1db). (area, cell,
432 "align", FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!,
433 "expand", FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!,
434 "fixed-size", FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!,
435 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
436 gtk_cell_layout_set_attributescxx . . $ gtk_cell_layout_set_attributes(e786233378383675). (GTK_CELL_LAYOUTcxx . . $ `gtk/deprecated/gtkcelllayout.h:32:9`! (self->combobox), cell,
437 "gicon", COLUMN_ICONcxx . . $ COLUMN_ICON.,
438 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
439
440 cell = gtk_cell_renderer_text_newcxx . . $ gtk_cell_renderer_text_new(6d6b6a1a12ffe86f). ();
441 gtk_cell_area_add_with_propertiescxx . . $ gtk_cell_area_add_with_properties(9414d0009354b1db). (area, cell,
442 "align", FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!,
443 "expand", TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!,
444 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
445 gtk_cell_layout_set_attributescxx . . $ gtk_cell_layout_set_attributes(e786233378383675). (GTK_CELL_LAYOUTcxx . . $ `gtk/deprecated/gtkcelllayout.h:32:9`! (self->combobox), cell,
446 "text", COLUMN_LABELcxx . . $ COLUMN_LABEL.,
447 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
448
449 gtk_app_chooser_button_populatecxx . . $ gtk_app_chooser_button_populate(54f913b2544b6b70). (self);
450 }
451
452 static void
453 gtk_app_chooser_button_remove_non_customcxx . . $ gtk_app_chooser_button_remove_non_custom(54f913b2544b6b70). (GtkAppChooserButtoncxx . . $ GtkAppChooserButton# *self)
454 {
455 GtkTreeModelcxx . . $ GtkTreeModel# *model;
456 GtkTreeItercxx . . $ GtkTreeIter# iter;
457 gbooleancxx . . $ gboolean# custom, res;
458
459 model = GTK_TREE_MODELcxx . . $ `gtk/deprecated/gtktreemodel.h:30:9`! (self->store);
460
461 if (!gtk_tree_model_get_iter_firstcxx . . $ gtk_tree_model_get_iter_first(f5bae890eedecc7d). (model, &iter))
462 return;
463
464 do {
465 gtk_tree_model_getcxx . . $ gtk_tree_model_get(6d4913a405196bb7). (model, &iter,
466 COLUMN_CUSTOMcxx . . $ COLUMN_CUSTOM., &custom,
467 -1);
468 if (custom)
469 res = gtk_tree_model_iter_nextcxx . . $ gtk_tree_model_iter_next(f5bae890eedecc7d). (model, &iter);
470 else
471 res = gtk_list_store_removecxx . . $ gtk_list_store_remove(5649624234d597de). (GTK_LIST_STOREcxx . . $ `gtk/deprecated/gtkliststore.h:33:9`! (model), &iter);
472 } while (res);
473 }
474
475 static void
476 gtk_app_chooser_button_changedcxx . . $ gtk_app_chooser_button_changed(af2105e950cb2b53). (GtkComboBoxcxx . . $ GtkComboBox# *object,
477 gpointercxx . . $ gpointer# user_data)
478 {
479 GtkAppChooserButtoncxx . . $ GtkAppChooserButton# *self = user_data;
480 GtkTreeItercxx . . $ GtkTreeIter# iter;
481 char *name = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
482 gbooleancxx . . $ gboolean# custom;
483 GQuarkcxx . . $ GQuark# name_quark;
484
485 if (!gtk_combo_box_get_active_itercxx . . $ gtk_combo_box_get_active_iter(fc491ad567338652). (object, &iter))
486 return;
487
488 gtk_tree_model_getcxx . . $ gtk_tree_model_get(6d4913a405196bb7). (GTK_TREE_MODELcxx . . $ `gtk/deprecated/gtktreemodel.h:30:9`! (self->store), &iter,
489 COLUMN_NAMEcxx . . $ COLUMN_NAME., &name,
490 COLUMN_CUSTOMcxx . . $ COLUMN_CUSTOM., &custom,
491 -1);
492
493 if (name != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
494 {
495 if (custom)
496 {
497 name_quark = g_quark_from_stringcxx . . $ g_quark_from_string(c61c63047ce273de). (name);
498 g_signal_emitcxx . . $ g_signal_emit(cc3f7c2ba1c6a182). (self, signalscxx . . $ signals.[SIGNAL_CUSTOM_ITEM_ACTIVATEDcxx . . $ SIGNAL_CUSTOM_ITEM_ACTIVATED.], name_quark, name);
499 self->last_activecxx . . $ _GtkAppChooserButton#last_active. = gtk_combo_box_get_activecxx . . $ gtk_combo_box_get_active(86225318ecdc1bc). (object);
500 }
501 else
502 {
503 /* trigger the dialog internally */
504 other_application_item_activated_cbcxx . . $ other_application_item_activated_cb(54f913b2544b6b70). (self);
505 }
506
507 g_freecxx . . $ g_free(5d22bdacc48458e8). (name);
508 }
509 else
510 self->last_activecxx . . $ _GtkAppChooserButton#last_active. = gtk_combo_box_get_activecxx . . $ gtk_combo_box_get_active(86225318ecdc1bc). (object);
511
512 g_signal_emitcxx . . $ g_signal_emit(cc3f7c2ba1c6a182). (self, signalscxx . . $ signals.[SIGNAL_CHANGEDcxx . . $ SIGNAL_CHANGED.], 0);
513 }
514
515 static void
516 gtk_app_chooser_button_refreshcxx . . $ gtk_app_chooser_button_refresh(eafac33094b01ac8). (GtkAppChoosercxx . . $ GtkAppChooser# *object)
517 {
518 GtkAppChooserButtoncxx . . $ GtkAppChooserButton# *self = GTK_APP_CHOOSER_BUTTONcxx . . $ `gtk/deprecated/gtkappchooserbutton.h:34:9`! (object);
519
520 gtk_app_chooser_button_remove_non_customcxx . . $ gtk_app_chooser_button_remove_non_custom(54f913b2544b6b70). (self);
521 gtk_app_chooser_button_populatecxx . . $ gtk_app_chooser_button_populate(54f913b2544b6b70). (self);
522 }
523
524 static GAppInfocxx . . $ GAppInfo# *
525 gtk_app_chooser_button_get_app_infocxx . . $ gtk_app_chooser_button_get_app_info(b2393f95df7b836b). (GtkAppChoosercxx . . $ GtkAppChooser# *object)
526 {
527 GtkAppChooserButtoncxx . . $ GtkAppChooserButton# *self = GTK_APP_CHOOSER_BUTTONcxx . . $ `gtk/deprecated/gtkappchooserbutton.h:34:9`! (object);
528 GtkTreeItercxx . . $ GtkTreeIter# iter;
529 GAppInfocxx . . $ GAppInfo# *info;
530
531 if (!gtk_combo_box_get_active_itercxx . . $ gtk_combo_box_get_active_iter(fc491ad567338652). (GTK_COMBO_BOXcxx . . $ `gtk/deprecated/gtkcombobox.h:31:9`! (self->combobox), &iter))
532 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
533
534 gtk_tree_model_getcxx . . $ gtk_tree_model_get(6d4913a405196bb7). (GTK_TREE_MODELcxx . . $ `gtk/deprecated/gtktreemodel.h:30:9`! (self->store), &iter,
535 COLUMN_APP_INFOcxx . . $ COLUMN_APP_INFO., &info,
536 -1);
537
538 return info;
539 }
540
541 static void
542 gtk_app_chooser_button_constructedcxx . . $ gtk_app_chooser_button_constructed(6087475fa43034d3). (GObjectcxx . . $ GObject# *obj)
543 {
544 GtkAppChooserButtoncxx . . $ GtkAppChooserButton# *self = GTK_APP_CHOOSER_BUTTONcxx . . $ `gtk/deprecated/gtkappchooserbutton.h:34:9`! (obj);
545
546 if (G_OBJECT_CLASScxx . . $ `<external>/1341695927569185362/gobject.h:61:9`! (gtk_app_chooser_button_parent_class)->constructedcxx . . $ _GObjectClass#constructed. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
547 G_OBJECT_CLASScxx . . $ `<external>/1341695927569185362/gobject.h:61:9`! (gtk_app_chooser_button_parent_class)->constructedcxx . . $ _GObjectClass#constructed. (obj);
548
549 gtk_app_chooser_button_build_uicxx . . $ gtk_app_chooser_button_build_ui(54f913b2544b6b70). (self);
550 }
551
552 static void
553 gtk_app_chooser_button_set_propertycxx . . $ gtk_app_chooser_button_set_property(d7c4bb29f36c0dc4). (GObjectcxx . . $ GObject# *obj,
554 guintcxx . . $ guint# property_id,
555 const GValuecxx . . $ GValue# *value,
556 GParamSpeccxx . . $ GParamSpec# *pspec)
557 {
558 GtkAppChooserButtoncxx . . $ GtkAppChooserButton# *self = GTK_APP_CHOOSER_BUTTONcxx . . $ `gtk/deprecated/gtkappchooserbutton.h:34:9`! (obj);
559
560 switch (property_id)
561 {
562 case PROP_CONTENT_TYPEcxx . . $ PROP_CONTENT_TYPE.:
563 self->content_typecxx . . $ _GtkAppChooserButton#content_type. = g_value_dup_stringcxx . . $ g_value_dup_string(602930317b8318e8). (value);
564 break;
565 case PROP_SHOW_DIALOG_ITEMcxx . . $ PROP_SHOW_DIALOG_ITEM.:
566 gtk_app_chooser_button_set_show_dialog_itemcxx . . $ gtk_app_chooser_button_set_show_dialog_item(ecc296e49ce82a4b). (self, g_value_get_booleancxx . . $ g_value_get_boolean(f890c5c75ead5b21). (value));
567 break;
568 case PROP_SHOW_DEFAULT_ITEMcxx . . $ PROP_SHOW_DEFAULT_ITEM.:
569 gtk_app_chooser_button_set_show_default_itemcxx . . $ gtk_app_chooser_button_set_show_default_item(ecc296e49ce82a4b). (self, g_value_get_booleancxx . . $ g_value_get_boolean(f890c5c75ead5b21). (value));
570 break;
571 case PROP_HEADINGcxx . . $ PROP_HEADING.:
572 gtk_app_chooser_button_set_headingcxx . . $ gtk_app_chooser_button_set_heading(85467b90c2e6ea3b). (self, g_value_get_stringcxx . . $ g_value_get_string(cc0a2be2b8f7bdc8). (value));
573 break;
574 case PROP_MODALcxx . . $ PROP_MODAL.:
575 gtk_app_chooser_button_set_modalcxx . . $ gtk_app_chooser_button_set_modal(ecc296e49ce82a4b). (self, g_value_get_booleancxx . . $ g_value_get_boolean(f890c5c75ead5b21). (value));
576 break;
577 default:
578 G_OBJECT_WARN_INVALID_PROPERTY_IDcxx . . $ `<external>/1341695927569185362/gobject.h:690:9`! (obj, property_id, pspec);
579 break;
580 }
581 }
582
583 static void
584 gtk_app_chooser_button_get_propertycxx . . $ gtk_app_chooser_button_get_property(cee2c52f22407c66). (GObjectcxx . . $ GObject# *obj,
585 guintcxx . . $ guint# property_id,
586 GValuecxx . . $ GValue# *value,
587 GParamSpeccxx . . $ GParamSpec# *pspec)
588 {
589 GtkAppChooserButtoncxx . . $ GtkAppChooserButton# *self = GTK_APP_CHOOSER_BUTTONcxx . . $ `gtk/deprecated/gtkappchooserbutton.h:34:9`! (obj);
590
591 switch (property_id)
592 {
593 case PROP_CONTENT_TYPEcxx . . $ PROP_CONTENT_TYPE.:
594 g_value_set_stringcxx . . $ g_value_set_string(65b9ea7708b82b9b). (value, self->content_typecxx . . $ _GtkAppChooserButton#content_type.);
595 break;
596 case PROP_SHOW_DIALOG_ITEMcxx . . $ PROP_SHOW_DIALOG_ITEM.:
597 g_value_set_booleancxx . . $ g_value_set_boolean(b698c61e8e30c4ea). (value, self->show_dialog_itemcxx . . $ _GtkAppChooserButton#show_dialog_item.);
598 break;
599 case PROP_SHOW_DEFAULT_ITEMcxx . . $ PROP_SHOW_DEFAULT_ITEM.:
600 g_value_set_booleancxx . . $ g_value_set_boolean(b698c61e8e30c4ea). (value, self->show_default_itemcxx . . $ _GtkAppChooserButton#show_default_item.);
601 break;
602 case PROP_HEADINGcxx . . $ PROP_HEADING.:
603 g_value_set_stringcxx . . $ g_value_set_string(65b9ea7708b82b9b). (value, self->headingcxx . . $ _GtkAppChooserButton#heading.);
604 break;
605 case PROP_MODALcxx . . $ PROP_MODAL.:
606 g_value_set_booleancxx . . $ g_value_set_boolean(b698c61e8e30c4ea). (value, self->modalcxx . . $ _GtkAppChooserButton#modal.);
607 break;
608 default:
609 G_OBJECT_WARN_INVALID_PROPERTY_IDcxx . . $ `<external>/1341695927569185362/gobject.h:690:9`! (obj, property_id, pspec);
610 break;
611 }
612 }
613
614 static void
615 gtk_app_chooser_button_finalizecxx . . $ gtk_app_chooser_button_finalize(6087475fa43034d3). (GObjectcxx . . $ GObject# *obj)
616 {
617 GtkAppChooserButtoncxx . . $ GtkAppChooserButton# *self = GTK_APP_CHOOSER_BUTTONcxx . . $ `gtk/deprecated/gtkappchooserbutton.h:34:9`! (obj);
618
619 g_hash_table_destroycxx . . $ g_hash_table_destroy(ce4eddf544b9218). (self->custom_item_namescxx . . $ _GtkAppChooserButton#custom_item_names.);
620 g_freecxx . . $ g_free(5d22bdacc48458e8). (self->content_typecxx . . $ _GtkAppChooserButton#content_type.);
621 g_freecxx . . $ g_free(5d22bdacc48458e8). (self->headingcxx . . $ _GtkAppChooserButton#heading.);
622 g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8). (self->storecxx . . $ _GtkAppChooserButton#store.);
623 gtk_widget_unparentcxx . . $ gtk_widget_unparent(d7cf858254b37903). (self->comboboxcxx . . $ _GtkAppChooserButton#combobox.);
624
625 G_OBJECT_CLASScxx . . $ `<external>/1341695927569185362/gobject.h:61:9`! (gtk_app_chooser_button_parent_class)->finalizecxx . . $ _GObjectClass#finalize. (obj);
626 }
627
628 static void
629 gtk_app_chooser_button_measurecxx . . $ gtk_app_chooser_button_measure(d91afbd837fc0c19). (GtkWidgetcxx . . $ GtkWidget# *widget,
630 GtkOrientationcxx . . $ GtkOrientation# orientation,
631 int for_size,
632 int *minimum,
633 int *natural,
634 int *minimum_baseline,
635 int *natural_baseline)
636 {
637 GtkAppChooserButtoncxx . . $ GtkAppChooserButton# *self = GTK_APP_CHOOSER_BUTTONcxx . . $ `gtk/deprecated/gtkappchooserbutton.h:34:9`! (widget);
638
639 gtk_widget_measurecxx . . $ gtk_widget_measure(d91afbd837fc0c19). (self->comboboxcxx . . $ _GtkAppChooserButton#combobox., orientation, for_size,
640 minimum, natural,
641 minimum_baseline, natural_baseline);
642 }
643
644 static void
645 gtk_app_chooser_button_size_allocatecxx . . $ gtk_app_chooser_button_size_allocate(598a503332136822). (GtkWidgetcxx . . $ GtkWidget# *widget,
646 int width,
647 int height,
648 int baseline)
649 {
650 GtkAppChooserButtoncxx . . $ GtkAppChooserButton# *self = GTK_APP_CHOOSER_BUTTONcxx . . $ `gtk/deprecated/gtkappchooserbutton.h:34:9`! (widget);
651
652 gtk_widget_size_allocatecxx . . $ gtk_widget_size_allocate(6dbef67925be57e3). (self->comboboxcxx . . $ _GtkAppChooserButton#combobox., &(GtkAllocationcxx . . $ GtkAllocation#){0, 0, width, height}, baseline);
653 }
654
655 static void
656 app_chooser_iface_initcxx . . $ app_chooser_iface_init(d829ff16bc5900f0). (GtkAppChooserIfacecxx . . $ GtkAppChooserIface# *iface)
657 {
658 iface->get_app_infocxx . . $ _GtkAppChooserIface#get_app_info. = gtk_app_chooser_button_get_app_infocxx . . $ gtk_app_chooser_button_get_app_info(b2393f95df7b836b).;
659 iface->refreshcxx . . $ _GtkAppChooserIface#refresh. = gtk_app_chooser_button_refreshcxx . . $ gtk_app_chooser_button_refresh(eafac33094b01ac8).;
660 }
661
662 static void
663 gtk_app_chooser_button_activatecxx . . $ gtk_app_chooser_button_activate(54f913b2544b6b70). (GtkAppChooserButtoncxx . . $ GtkAppChooserButton# *self)
664 {
665 gtk_widget_activatecxx . . $ gtk_widget_activate(9247ef2dc26c5426). (self->comboboxcxx . . $ _GtkAppChooserButton#combobox.);
666 }
667
668 static void
669 gtk_app_chooser_button_class_initcxx . . $ gtk_app_chooser_button_class_init(97ac9389098f239d). (GtkAppChooserButtonClasscxx . . $ GtkAppChooserButtonClass# *klass)
670 {
671 GObjectClasscxx . . $ GObjectClass# *oclass = G_OBJECT_CLASScxx . . $ `<external>/1341695927569185362/gobject.h:61:9`! (klass);
672 GtkWidgetClasscxx . . $ GtkWidgetClass# *widget_class = GTK_WIDGET_CLASScxx . . $ `gtk/gtkwidget.h:45:9`! (klass);
673
674 oclass->set_propertycxx . . $ _GObjectClass#set_property. = gtk_app_chooser_button_set_propertycxx . . $ gtk_app_chooser_button_set_property(d7c4bb29f36c0dc4).;
675 oclass->get_propertycxx . . $ _GObjectClass#get_property. = gtk_app_chooser_button_get_propertycxx . . $ gtk_app_chooser_button_get_property(cee2c52f22407c66).;
676 oclass->finalizecxx . . $ _GObjectClass#finalize. = gtk_app_chooser_button_finalizecxx . . $ gtk_app_chooser_button_finalize(6087475fa43034d3).;
677 oclass->constructedcxx . . $ _GObjectClass#constructed. = gtk_app_chooser_button_constructedcxx . . $ gtk_app_chooser_button_constructed(6087475fa43034d3).;
678
679 widget_class->measurecxx . . $ _GtkWidgetClass#measure. = gtk_app_chooser_button_measurecxx . . $ gtk_app_chooser_button_measure(d91afbd837fc0c19).;
680 widget_class->size_allocatecxx . . $ _GtkWidgetClass#size_allocate. = gtk_app_chooser_button_size_allocatecxx . . $ gtk_app_chooser_button_size_allocate(598a503332136822).;
681 widget_class->grab_focuscxx . . $ _GtkWidgetClass#grab_focus. = gtk_widget_grab_focus_childcxx . . $ gtk_widget_grab_focus_child(9247ef2dc26c5426).;
682 widget_class->focuscxx . . $ _GtkWidgetClass#focus. = gtk_widget_focus_childcxx . . $ gtk_widget_focus_child(8bb1c65c821a69cd).;
683
684 klass->activatecxx . . $ _GtkAppChooserButtonClass#activate. = gtk_app_chooser_button_activatecxx . . $ gtk_app_chooser_button_activate(54f913b2544b6b70).;
685
686 g_object_class_override_propertycxx . . $ g_object_class_override_property(3aa56717d1bf1f20). (oclass, PROP_CONTENT_TYPEcxx . . $ PROP_CONTENT_TYPE., "content-type");
687
688 /**
689 * GtkAppChooserButton:show-dialog-item:
690 *
691 * Determines whether the dropdown menu shows an item to open
692 * a `GtkAppChooserDialog`.
693 */
694 propertiescxx . . $ properties.[PROP_SHOW_DIALOG_ITEMcxx . . $ PROP_SHOW_DIALOG_ITEM.] =
695 g_param_spec_booleancxx . . $ g_param_spec_boolean(315d86b79c0116e0). ("show-dialog-item", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!,
696 FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!,
697 G_PARAM_READWRITEcxx . . $ G_PARAM_READWRITE.|G_PARAM_CONSTRUCTcxx . . $ G_PARAM_CONSTRUCT.|G_PARAM_STATIC_STRINGScxx . . $ `<external>/7453068347527694854/gparam.h:187:9`!|G_PARAM_EXPLICIT_NOTIFYcxx . . $ G_PARAM_EXPLICIT_NOTIFY.);
698
699 /**
700 * GtkAppChooserButton:show-default-item:
701 *
702 * Determines whether the dropdown menu shows the default application
703 * on top for the provided content type.
704 */
705 propertiescxx . . $ properties.[PROP_SHOW_DEFAULT_ITEMcxx . . $ PROP_SHOW_DEFAULT_ITEM.] =
706 g_param_spec_booleancxx . . $ g_param_spec_boolean(315d86b79c0116e0). ("show-default-item", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!,
707 FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!,
708 G_PARAM_READWRITEcxx . . $ G_PARAM_READWRITE.|G_PARAM_CONSTRUCTcxx . . $ G_PARAM_CONSTRUCT.|G_PARAM_STATIC_STRINGScxx . . $ `<external>/7453068347527694854/gparam.h:187:9`!|G_PARAM_EXPLICIT_NOTIFYcxx . . $ G_PARAM_EXPLICIT_NOTIFY.);
709
710 /**
711 * GtkAppChooserButton:heading:
712 *
713 * The text to show at the top of the dialog that can be
714 * opened from the button.
715 *
716 * The string may contain Pango markup.
717 */
718 propertiescxx . . $ properties.[PROP_HEADINGcxx . . $ PROP_HEADING.] =
719 g_param_spec_stringcxx . . $ g_param_spec_string(378e8746be5cd899). ("heading", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!,
720 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!,
721 G_PARAM_READWRITEcxx . . $ G_PARAM_READWRITE.|G_PARAM_STATIC_STRINGScxx . . $ `<external>/7453068347527694854/gparam.h:187:9`!|G_PARAM_EXPLICIT_NOTIFYcxx . . $ G_PARAM_EXPLICIT_NOTIFY.);
722
723 /**
724 * GtkAppChooserButton:modal:
725 *
726 * Whether the app chooser dialog should be modal.
727 */
728 propertiescxx . . $ properties.[PROP_MODALcxx . . $ PROP_MODAL.] =
729 g_param_spec_booleancxx . . $ g_param_spec_boolean(315d86b79c0116e0). ("modal", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!,
730 TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!,
731 G_PARAM_READWRITEcxx . . $ G_PARAM_READWRITE.|G_PARAM_CONSTRUCTcxx . . $ G_PARAM_CONSTRUCT.|G_PARAM_STATIC_STRINGScxx . . $ `<external>/7453068347527694854/gparam.h:187:9`!|G_PARAM_EXPLICIT_NOTIFYcxx . . $ G_PARAM_EXPLICIT_NOTIFY.);
732 g_object_class_install_propertiescxx . . $ g_object_class_install_properties(569d03e6a4088541). (oclass, NUM_PROPERTIEScxx . . $ NUM_PROPERTIES., propertiescxx . . $ properties.);
733
734 /**
735 * GtkAppChooserButton::changed:
736 * @self: the object which received the signal
737 *
738 * Emitted when the active application changes.
739 */
740 signalscxx . . $ signals.[SIGNAL_CHANGEDcxx . . $ SIGNAL_CHANGED.] =
741 g_signal_newcxx . . $ g_signal_new(b0aa5e8090fb95c0). (I_cxx . . $ `gdk/gdkprivate.h:35:9`!("changed"),
742 G_OBJECT_CLASS_TYPEcxx . . $ `<external>/1341695927569185362/gobject.h:117:9`! (klass),
743 G_SIGNAL_RUN_LASTcxx . . $ G_SIGNAL_RUN_LAST.,
744 G_STRUCT_OFFSETcxx . . $ `<external>/12741050725406041920/gmacros.h:1005:9`! (GtkAppChooserButtonClass, changed),
745 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!,
746 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!,
747 G_TYPE_NONEcxx . . $ `<external>/9567554376676449156/gtype.h:72:9`!, 0);
748
749
750 /**
751 * GtkAppChooserButton::custom-item-activated:
752 * @self: the object which received the signal
753 * @item_name: the name of the activated item
754 *
755 * Emitted when a custom item is activated.
756 *
757 * Use [[email protected]_custom_item],
758 * to add custom items.
759 */
760 signalscxx . . $ signals.[SIGNAL_CUSTOM_ITEM_ACTIVATEDcxx . . $ SIGNAL_CUSTOM_ITEM_ACTIVATED.] =
761 g_signal_newcxx . . $ g_signal_new(b0aa5e8090fb95c0). (I_cxx . . $ `gdk/gdkprivate.h:35:9`!("custom-item-activated"),
762 GTK_TYPE_APP_CHOOSER_BUTTONcxx . . $ `gtk/deprecated/gtkappchooserbutton.h:33:9`!,
763 G_SIGNAL_RUN_FIRSTcxx . . $ G_SIGNAL_RUN_FIRST. | G_SIGNAL_DETAILEDcxx . . $ G_SIGNAL_DETAILED.,
764 G_STRUCT_OFFSETcxx . . $ `<external>/12741050725406041920/gmacros.h:1005:9`! (GtkAppChooserButtonClass, custom_item_activated),
765 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!,
766 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!,
767 G_TYPE_NONEcxx . . $ `<external>/9567554376676449156/gtype.h:72:9`!,
768 1, G_TYPE_STRINGcxx . . $ `<external>/9567554376676449156/gtype.h:165:9`!);
769
770 /**
771 * GtkAppChooserButton::activate:
772 * @widget: the object which received the signal.
773 *
774 * Emitted to when the button is activated.
775 *
776 * The `::activate` signal on `GtkAppChooserButton` is an action signal and
777 * emitting it causes the button to pop up its dialog.
778 *
779 * Since: 4.4
780 */
781 signalscxx . . $ signals.[ACTIVATEcxx . . $ ACTIVATE.] =
782 g_signal_newcxx . . $ g_signal_new(b0aa5e8090fb95c0). (I_cxx . . $ `gdk/gdkprivate.h:35:9`! ("activate"),
783 G_OBJECT_CLASS_TYPEcxx . . $ `<external>/1341695927569185362/gobject.h:117:9`! (oclass),
784 G_SIGNAL_RUN_FIRSTcxx . . $ G_SIGNAL_RUN_FIRST. | G_SIGNAL_ACTIONcxx . . $ G_SIGNAL_ACTION.,
785 G_STRUCT_OFFSETcxx . . $ `<external>/12741050725406041920/gmacros.h:1005:9`! (GtkAppChooserButtonClass, activate),
786 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!,
787 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!,
788 G_TYPE_NONEcxx . . $ `<external>/9567554376676449156/gtype.h:72:9`!, 0);
789
790 gtk_widget_class_set_activate_signalcxx . . $ gtk_widget_class_set_activate_signal(53d965ee418c3db). (widget_class, signalscxx . . $ signals.[ACTIVATEcxx . . $ ACTIVATE.]);
791
792
793 gtk_widget_class_set_css_namecxx . . $ gtk_widget_class_set_css_name(6333614c746ab65a). (widget_class, I_cxx . . $ `gdk/gdkprivate.h:35:9`!("appchooserbutton"));
794 }
795
796 static void
797 gtk_app_chooser_button_initcxx . . $ gtk_app_chooser_button_init(54f913b2544b6b70). (GtkAppChooserButtoncxx . . $ GtkAppChooserButton# *self)
798 {
799 self->modalcxx . . $ _GtkAppChooserButton#modal. = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!;
800
801 self->custom_item_namescxx . . $ _GtkAppChooserButton#custom_item_names. = g_hash_table_new_fullcxx . . $ g_hash_table_new_full(e2dd12b570de7430). (g_str_hashcxx . . $ g_str_hash(b11f534102b1ad6)., g_str_equalcxx . . $ g_str_equal(9148c8c3ff42c9d8)., g_freecxx . . $ g_free(5d22bdacc48458e8)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
802 self->storecxx . . $ _GtkAppChooserButton#store. = gtk_list_store_newcxx . . $ gtk_list_store_new(1a34f8e4a243e892). (NUM_COLUMNScxx . . $ NUM_COLUMNS.,
803 G_TYPE_APP_INFOcxx . . $ `<external>/6793221688627496808/gappinfo.h:34:9`!,
804 G_TYPE_STRINGcxx . . $ `<external>/9567554376676449156/gtype.h:165:9`!, /* name */
805 G_TYPE_STRINGcxx . . $ `<external>/9567554376676449156/gtype.h:165:9`!, /* label */
806 G_TYPE_ICONcxx . . $ `<external>/8661236154227042850/gicon.h:34:9`!,
807 G_TYPE_BOOLEANcxx . . $ `<external>/9567554376676449156/gtype.h:99:9`!, /* separator */
808 G_TYPE_BOOLEANcxx . . $ `<external>/9567554376676449156/gtype.h:99:9`!); /* custom */
809 self->comboboxcxx . . $ _GtkAppChooserButton#combobox. = gtk_combo_box_new_with_modelcxx . . $ gtk_combo_box_new_with_model(7a6f141aae8e5984). (GTK_TREE_MODELcxx . . $ `gtk/deprecated/gtktreemodel.h:30:9`! (self->store));
810 gtk_widget_set_parentcxx . . $ gtk_widget_set_parent(4f261c0971c30e7). (self->comboboxcxx . . $ _GtkAppChooserButton#combobox., GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self));
811
812 g_signal_connectcxx . . $ `<external>/15952772511652638895/gsignal.h:548:9`! (self->combobox, "changed",
813 G_CALLBACKcxx . . $ `<external>/16473872192229286895/gclosure.h:73:9`! (gtk_app_chooser_button_changed), self);
814 }
815
816 static gbooleancxx . . $ gboolean#
817 app_chooser_button_iter_from_custom_namecxx . . $ app_chooser_button_iter_from_custom_name(4a5c0a3858a45a37). (GtkAppChooserButtoncxx . . $ GtkAppChooserButton# *self,
818 const char *name,
819 GtkTreeItercxx . . $ GtkTreeIter# *set_me)
820 {
821 GtkTreeItercxx . . $ GtkTreeIter# iter;
822 char *custom_name = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
823
824 if (!gtk_tree_model_get_iter_firstcxx . . $ gtk_tree_model_get_iter_first(f5bae890eedecc7d). (GTK_TREE_MODELcxx . . $ `gtk/deprecated/gtktreemodel.h:30:9`! (self->store), &iter))
825 return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!;
826
827 do {
828 gtk_tree_model_getcxx . . $ gtk_tree_model_get(6d4913a405196bb7). (GTK_TREE_MODELcxx . . $ `gtk/deprecated/gtktreemodel.h:30:9`! (self->store), &iter,
829 COLUMN_NAMEcxx . . $ COLUMN_NAME., &custom_name,
830 -1);
831
832 if (g_strcmp0cxx . . $ g_strcmp0(5ae29d726ae57f88). (custom_name, name) == 0)
833 {
834 g_freecxx . . $ g_free(5d22bdacc48458e8). (custom_name);
835 *set_me = iter;
836
837 return TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!;
838 }
839
840 g_freecxx . . $ g_free(5d22bdacc48458e8). (custom_name);
841 } while (gtk_tree_model_iter_nextcxx . . $ gtk_tree_model_iter_next(f5bae890eedecc7d). (GTK_TREE_MODELcxx . . $ `gtk/deprecated/gtktreemodel.h:30:9`! (self->store), &iter));
842
843 return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!;
844 }
845
846 static void
847 real_insert_custom_itemcxx . . $ real_insert_custom_item(46651e8c09da9f51). (GtkAppChooserButtoncxx . . $ GtkAppChooserButton# *self,
848 const char *name,
849 const char *label,
850 GIconcxx . . $ GIcon# *icon,
851 gbooleancxx . . $ gboolean# custom,
852 GtkTreeItercxx . . $ GtkTreeIter# *iter)
853 {
854 if (custom)
855 {
856 if (g_hash_table_lookupcxx . . $ g_hash_table_lookup(8183d62c39a6a245). (self->custom_item_namescxx . . $ _GtkAppChooserButton#custom_item_names., name) != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
857 {
858 g_warningcxx . . $ `<external>/5169755362661750954/gmessages.h:340:9`! ("Attempting to add custom item %s to GtkAppChooserButton, "
859 "when there's already an item with the same name", name);
860 return;
861 }
862
863 g_hash_table_insertcxx . . $ g_hash_table_insert(6a7c46015dd5ef26). (self->custom_item_namescxx . . $ _GtkAppChooserButton#custom_item_names.,
864 g_strdupcxx . . $ `<external>/7822753393113922331/gstrfuncs.h:324:9`! (name), GINT_TO_POINTERcxx . . $ `<external>/10505296616216143549/glibconfig.h:106:9`! (1));
865 }
866
867 gtk_list_store_setcxx . . $ gtk_list_store_set(92396b3ceb945e67). (self->storecxx . . $ _GtkAppChooserButton#store., iter,
868 COLUMN_NAMEcxx . . $ COLUMN_NAME., name,
869 COLUMN_LABELcxx . . $ COLUMN_LABEL., label,
870 COLUMN_ICONcxx . . $ COLUMN_ICON., icon,
871 COLUMN_CUSTOMcxx . . $ COLUMN_CUSTOM., custom,
872 COLUMN_SEPARATORcxx . . $ COLUMN_SEPARATOR., FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!,
873 -1);
874 }
875
876 static void
877 real_insert_separatorcxx . . $ real_insert_separator(f723e87b7bd21dee). (GtkAppChooserButtoncxx . . $ GtkAppChooserButton# *self,
878 gbooleancxx . . $ gboolean# custom,
879 GtkTreeItercxx . . $ GtkTreeIter# *iter)
880 {
881 gtk_list_store_setcxx . . $ gtk_list_store_set(92396b3ceb945e67). (self->storecxx . . $ _GtkAppChooserButton#store., iter,
882 COLUMN_CUSTOMcxx . . $ COLUMN_CUSTOM., custom,
883 COLUMN_SEPARATORcxx . . $ COLUMN_SEPARATOR., TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!,
884 -1);
885 }
886
887 /**
888 * gtk_app_chooser_button_new:
889 * @content_type: the content type to show applications for
890 *
891 * Creates a new `GtkAppChooserButton` for applications
892 * that can handle content of the given type.
893 *
894 * Returns: a newly created `GtkAppChooserButton`
895 *
896 * Deprecated: 4.10: This widget will be removed in GTK 5
897 */
898 GtkWidgetcxx . . $ GtkWidget# *
899 gtk_app_chooser_button_newcxx . . $ gtk_app_chooser_button_new(6d90f3ec8782e10d). (const char *content_type)
900 {
901 g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (content_type != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
902
903 return g_object_newcxx . . $ g_object_new(8485fe61b4be4c78). (GTK_TYPE_APP_CHOOSER_BUTTONcxx . . $ `gtk/deprecated/gtkappchooserbutton.h:33:9`!,
904 "content-type", content_type,
905 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
906 }
907
908 /**
909 * gtk_app_chooser_button_append_separator:
910 * @self: a `GtkAppChooserButton`
911 *
912 * Appends a separator to the list of applications that is shown
913 * in the popup.
914 *
915 * Deprecated: 4.10: This widget will be removed in GTK 5
916 */
917 void
918 gtk_app_chooser_button_append_separatorcxx . . $ gtk_app_chooser_button_append_separator(54f913b2544b6b70). (GtkAppChooserButtoncxx . . $ GtkAppChooserButton# *self)
919 {
920 GtkTreeItercxx . . $ GtkTreeIter# iter;
921
922 g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_APP_CHOOSER_BUTTONcxx . . $ `gtk/deprecated/gtkappchooserbutton.h:35:9`! (self));
923
924 gtk_list_store_appendcxx . . $ gtk_list_store_append(7985347529222355). (self->storecxx . . $ _GtkAppChooserButton#store., &iter);
925 real_insert_separatorcxx . . $ real_insert_separator(f723e87b7bd21dee). (self, TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!, &iter);
926 }
927
928 /**
929 * gtk_app_chooser_button_append_custom_item:
930 * @self: a `GtkAppChooserButton`
931 * @name: the name of the custom item
932 * @label: the label for the custom item
933 * @icon: the icon for the custom item
934 *
935 * Appends a custom item to the list of applications that is shown
936 * in the popup.
937 *
938 * The item name must be unique per-widget. Clients can use the
939 * provided name as a detail for the
940 * [[email protected]::custom-item-activated] signal, to add a
941 * callback for the activation of a particular custom item in the list.
942 *
943 * See also [[email protected]_separator].
944 *
945 * Deprecated: 4.10: This widget will be removed in GTK 5
946 */
947 void
948 gtk_app_chooser_button_append_custom_itemcxx . . $ gtk_app_chooser_button_append_custom_item(7bfca517e333fc1c). (GtkAppChooserButtoncxx . . $ GtkAppChooserButton# *self,
949 const char *name,
950 const char *label,
951 GIconcxx . . $ GIcon# *icon)
952 {
953 GtkTreeItercxx . . $ GtkTreeIter# iter;
954
955 g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_APP_CHOOSER_BUTTONcxx . . $ `gtk/deprecated/gtkappchooserbutton.h:35:9`! (self));
956 g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (name != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
957
958 gtk_list_store_appendcxx . . $ gtk_list_store_append(7985347529222355). (self->storecxx . . $ _GtkAppChooserButton#store., &iter);
959 real_insert_custom_itemcxx . . $ real_insert_custom_item(46651e8c09da9f51). (self, name, label, icon, TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!, &iter);
960 }
961
962 /**
963 * gtk_app_chooser_button_set_active_custom_item:
964 * @self: a `GtkAppChooserButton`
965 * @name: the name of the custom item
966 *
967 * Selects a custom item.
968 *
969 * See [[email protected]_custom_item].
970 *
971 * Use [[email protected]] to bring the selection
972 * to its initial state.
973 *
974 * Deprecated: 4.10: This widget will be removed in GTK 5
975 */
976 void
977 gtk_app_chooser_button_set_active_custom_itemcxx . . $ gtk_app_chooser_button_set_active_custom_item(85467b90c2e6ea3b). (GtkAppChooserButtoncxx . . $ GtkAppChooserButton# *self,
978 const char *name)
979 {
980 GtkTreeItercxx . . $ GtkTreeIter# iter;
981
982 g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_APP_CHOOSER_BUTTONcxx . . $ `gtk/deprecated/gtkappchooserbutton.h:35:9`! (self));
983 g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (name != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
984
985 if (!g_hash_table_containscxx . . $ g_hash_table_contains(453ebbf4abdbe50e). (self->custom_item_namescxx . . $ _GtkAppChooserButton#custom_item_names., name) ||
986 !app_chooser_button_iter_from_custom_namecxx . . $ app_chooser_button_iter_from_custom_name(4a5c0a3858a45a37). (self, name, &iter))
987 {
988 g_warningcxx . . $ `<external>/5169755362661750954/gmessages.h:340:9`! ("Can't find the item named %s in the app chooser.", name);
989 return;
990 }
991
992 gtk_combo_box_set_active_itercxx . . $ gtk_combo_box_set_active_iter(d315ff5d1c40d93a). (GTK_COMBO_BOXcxx . . $ `gtk/deprecated/gtkcombobox.h:31:9`! (self->combobox), &iter);
993 }
994
995 /**
996 * gtk_app_chooser_button_get_show_dialog_item:
997 * @self: a `GtkAppChooserButton`
998 *
999 * Returns whether the dropdown menu shows an item
1000 * for a `GtkAppChooserDialog`.
1001 *
1002 * Returns: the value of [[email protected]:show-dialog-item]
1003 *
1004 * Deprecated: 4.10: This widget will be removed in GTK 5
1005 */
1006 gbooleancxx . . $ gboolean#
1007 gtk_app_chooser_button_get_show_dialog_itemcxx . . $ gtk_app_chooser_button_get_show_dialog_item(a677cbae05773f1f). (GtkAppChooserButtoncxx . . $ GtkAppChooserButton# *self)
1008 {
1009 g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_APP_CHOOSER_BUTTONcxx . . $ `gtk/deprecated/gtkappchooserbutton.h:35:9`! (self), FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!);
1010
1011 return self->show_dialog_itemcxx . . $ _GtkAppChooserButton#show_dialog_item.;
1012 }
1013
1014 /**
1015 * gtk_app_chooser_button_set_show_dialog_item:
1016 * @self: a `GtkAppChooserButton`
1017 * @setting: the new value for [[email protected]:show-dialog-item]
1018 *
1019 * Sets whether the dropdown menu of this button should show an
1020 * entry to trigger a `GtkAppChooserDialog`.
1021 *
1022 * Deprecated: 4.10: This widget will be removed in GTK 5
1023 */
1024 void
1025 gtk_app_chooser_button_set_show_dialog_itemcxx . . $ gtk_app_chooser_button_set_show_dialog_item(ecc296e49ce82a4b). (GtkAppChooserButtoncxx . . $ GtkAppChooserButton# *self,
1026 gbooleancxx . . $ gboolean# setting)
1027 {
1028 if (self->show_dialog_itemcxx . . $ _GtkAppChooserButton#show_dialog_item. != setting)
1029 {
1030 self->show_dialog_itemcxx . . $ _GtkAppChooserButton#show_dialog_item. = setting;
1031
1032 g_object_notify_by_pspeccxx . . $ g_object_notify_by_pspec(89706f8943b9e738). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self), propertiescxx . . $ properties.[PROP_SHOW_DIALOG_ITEMcxx . . $ PROP_SHOW_DIALOG_ITEM.]);
1033
1034 gtk_app_chooser_refreshcxx . . $ gtk_app_chooser_refresh(eafac33094b01ac8). (GTK_APP_CHOOSERcxx . . $ `gtk/deprecated/gtkappchooser.h:35:9`! (self));
1035 }
1036 }
1037
1038 /**
1039 * gtk_app_chooser_button_get_show_default_item:
1040 * @self: a `GtkAppChooserButton`
1041 *
1042 * Returns whether the dropdown menu should show the default
1043 * application at the top.
1044 *
1045 * Returns: the value of [[email protected]:show-default-item]
1046 *
1047 * Deprecated: 4.10: This widget will be removed in GTK 5
1048 */
1049 gbooleancxx . . $ gboolean#
1050 gtk_app_chooser_button_get_show_default_itemcxx . . $ gtk_app_chooser_button_get_show_default_item(a677cbae05773f1f). (GtkAppChooserButtoncxx . . $ GtkAppChooserButton# *self)
1051 {
1052 g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_APP_CHOOSER_BUTTONcxx . . $ `gtk/deprecated/gtkappchooserbutton.h:35:9`! (self), FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!);
1053
1054 return self->show_default_itemcxx . . $ _GtkAppChooserButton#show_default_item.;
1055 }
1056
1057 /**
1058 * gtk_app_chooser_button_set_show_default_item:
1059 * @self: a `GtkAppChooserButton`
1060 * @setting: the new value for [[email protected]:show-default-item]
1061 *
1062 * Sets whether the dropdown menu of this button should show the
1063 * default application for the given content type at top.
1064 *
1065 * Deprecated: 4.10: This widget will be removed in GTK 5
1066 */
1067 void
1068 gtk_app_chooser_button_set_show_default_itemcxx . . $ gtk_app_chooser_button_set_show_default_item(ecc296e49ce82a4b). (GtkAppChooserButtoncxx . . $ GtkAppChooserButton# *self,
1069 gbooleancxx . . $ gboolean# setting)
1070 {
1071 g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_APP_CHOOSER_BUTTONcxx . . $ `gtk/deprecated/gtkappchooserbutton.h:35:9`! (self));
1072
1073 if (self->show_default_itemcxx . . $ _GtkAppChooserButton#show_default_item. != setting)
1074 {
1075 self->show_default_itemcxx . . $ _GtkAppChooserButton#show_default_item. = setting;
1076
1077 g_object_notify_by_pspeccxx . . $ g_object_notify_by_pspec(89706f8943b9e738). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self), propertiescxx . . $ properties.[PROP_SHOW_DEFAULT_ITEMcxx . . $ PROP_SHOW_DEFAULT_ITEM.]);
1078
1079 gtk_app_chooser_refreshcxx . . $ gtk_app_chooser_refresh(eafac33094b01ac8). (GTK_APP_CHOOSERcxx . . $ `gtk/deprecated/gtkappchooser.h:35:9`! (self));
1080 }
1081 }
1082
1083 /**
1084 * gtk_app_chooser_button_set_heading:
1085 * @self: a `GtkAppChooserButton`
1086 * @heading: a string containing Pango markup
1087 *
1088 * Sets the text to display at the top of the dialog.
1089 *
1090 * If the heading is not set, the dialog displays a default text.
1091 *
1092 * Deprecated: 4.10: This widget will be removed in GTK 5
1093 */
1094 void
1095 gtk_app_chooser_button_set_headingcxx . . $ gtk_app_chooser_button_set_heading(85467b90c2e6ea3b). (GtkAppChooserButtoncxx . . $ GtkAppChooserButton# *self,
1096 const char *heading)
1097 {
1098 g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_APP_CHOOSER_BUTTONcxx . . $ `gtk/deprecated/gtkappchooserbutton.h:35:9`! (self));
1099
1100 g_freecxx . . $ g_free(5d22bdacc48458e8). (self->headingcxx . . $ _GtkAppChooserButton#heading.);
1101 self->headingcxx . . $ _GtkAppChooserButton#heading. = g_strdupcxx . . $ `<external>/7822753393113922331/gstrfuncs.h:324:9`! (heading);
1102
1103 g_object_notify_by_pspeccxx . . $ g_object_notify_by_pspec(89706f8943b9e738). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self), propertiescxx . . $ properties.[PROP_HEADINGcxx . . $ PROP_HEADING.]);
1104 }
1105
1106 /**
1107 * gtk_app_chooser_button_get_heading:
1108 * @self: a `GtkAppChooserButton`
1109 *
1110 * Returns the text to display at the top of the dialog.
1111 *
1112 * Returns: (nullable): the text to display at the top of the dialog,
1113 * or %NULL, in which case a default text is displayed
1114 *
1115 * Deprecated: 4.10: This widget will be removed in GTK 5
1116 */
1117 const char *
1118 gtk_app_chooser_button_get_headingcxx . . $ gtk_app_chooser_button_get_heading(a2dcdd233d0331d1). (GtkAppChooserButtoncxx . . $ GtkAppChooserButton# *self)
1119 {
1120 g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_APP_CHOOSER_BUTTONcxx . . $ `gtk/deprecated/gtkappchooserbutton.h:35:9`! (self), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
1121
1122 return self->headingcxx . . $ _GtkAppChooserButton#heading.;
1123 }
1124
1125 /**
1126 * gtk_app_chooser_button_set_modal:
1127 * @self: a `GtkAppChooserButton`
1128 * @modal: %TRUE to make the dialog modal
1129 *
1130 * Sets whether the dialog should be modal.
1131 *
1132 * Deprecated: 4.10: This widget will be removed in GTK 5
1133 */
1134 void
1135 gtk_app_chooser_button_set_modalcxx . . $ gtk_app_chooser_button_set_modal(ecc296e49ce82a4b). (GtkAppChooserButtoncxx . . $ GtkAppChooserButton# *self,
1136 gbooleancxx . . $ gboolean# modal)
1137 {
1138 g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_APP_CHOOSER_BUTTONcxx . . $ `gtk/deprecated/gtkappchooserbutton.h:35:9`! (self));
1139
1140 if (self->modalcxx . . $ _GtkAppChooserButton#modal. == modal)
1141 return;
1142
1143 self->modalcxx . . $ _GtkAppChooserButton#modal. = modal;
1144
1145 g_object_notifycxx . . $ g_object_notify(174c9e6df5777c4e). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self), "modal");
1146 }
1147
1148 /**
1149 * gtk_app_chooser_button_get_modal:
1150 * @self: a `GtkAppChooserButton`
1151 *
1152 * Gets whether the dialog is modal.
1153 *
1154 * Returns: %TRUE if the dialog is modal
1155 *
1156 * Deprecated: 4.10: This widget will be removed in GTK 5
1157 */
1158 gbooleancxx . . $ gboolean#
1159 gtk_app_chooser_button_get_modalcxx . . $ gtk_app_chooser_button_get_modal(a677cbae05773f1f). (GtkAppChooserButtoncxx . . $ GtkAppChooserButton# *self)
1160 {
1161 g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_APP_CHOOSER_BUTTONcxx . . $ `gtk/deprecated/gtkappchooserbutton.h:35:9`! (self), FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!);
1162
1163 return self->modalcxx . . $ _GtkAppChooserButton#modal.;
1164 }
1165