[gnome-control-center] applications: Use GTK widget types
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] applications: Use GTK widget types
- Date: Mon, 30 Mar 2020 02:00:53 +0000 (UTC)
commit 0beed338af0be5d1982f849d0915917983ef6398
Author: Robert Ancell <robert ancell canonical com>
Date: Wed Nov 20 14:33:37 2019 +1300
applications: Use GTK widget types
panels/applications/cc-applications-panel.c | 275 ++++++++++++++--------------
1 file changed, 137 insertions(+), 138 deletions(-)
---
diff --git a/panels/applications/cc-applications-panel.c b/panels/applications/cc-applications-panel.c
index 450c2c9d9..21a825b34 100644
--- a/panels/applications/cc-applications-panel.c
+++ b/panels/applications/cc-applications-panel.c
@@ -54,11 +54,11 @@ struct _CcApplicationsPanel
{
CcPanel parent;
- GtkWidget *sidebar_box;
+ GtkBox *sidebar_box;
GtkListBox *sidebar_listbox;
GtkEntry *sidebar_search_entry;
- GtkWidget *header_button;
- GtkWidget *title_label;
+ GtkButton *header_button;
+ GtkLabel *title_label;
GAppInfoMonitor *monitor;
gulong monitor_id;
@@ -74,55 +74,55 @@ struct _CcApplicationsPanel
GSettings *privacy_settings;
GSettings *search_settings;
- GtkListBox *stack;
-
- GtkWidget *permission_section;
- GtkWidget *permission_list;
- GtkWidget *camera;
- GtkWidget *no_camera;
- GtkWidget *location;
- GtkWidget *no_location;
- GtkWidget *microphone;
- GtkWidget *no_microphone;
- GtkWidget *builtin;
- GtkWidget *builtin_dialog;
- GtkWidget *builtin_label;
- GtkWidget *builtin_list;
-
- GtkWidget *integration_section;
- GtkWidget *integration_list;
- GtkWidget *notification;
- GtkWidget *background;
- GtkWidget *wallpaper;
- GtkWidget *sound;
- GtkWidget *no_sound;
- GtkWidget *search;
- GtkWidget *no_search;
-
- GtkWidget *handler_section;
- GtkWidget *handler_reset;
- GtkWidget *handler_list;
- GtkWidget *hypertext;
- GtkWidget *text;
- GtkWidget *images;
- GtkWidget *fonts;
- GtkWidget *archives;
- GtkWidget *packages;
- GtkWidget *audio;
- GtkWidget *video;
- GtkWidget *other;
- GtkWidget *link;
-
- GtkWidget *usage_section;
- GtkWidget *usage_list;
- GtkWidget *storage;
- GtkWidget *storage_dialog;
- GtkWidget *storage_list;
- GtkWidget *app;
- GtkWidget *data;
- GtkWidget *cache;
- GtkWidget *total;
- GtkWidget *clear_cache_button;
+ GtkStack *stack;
+
+ GtkBox *permission_section;
+ GtkListBox *permission_list;
+ CcToggleRow *camera;
+ CcInfoRow *no_camera;
+ CcToggleRow *location;
+ CcInfoRow *no_location;
+ CcToggleRow *microphone;
+ CcInfoRow *no_microphone;
+ CcInfoRow *builtin;
+ GtkDialog *builtin_dialog;
+ GtkLabel *builtin_label;
+ GtkListBox *builtin_list;
+
+ GtkBox *integration_section;
+ GtkListBox *integration_list;
+ CcToggleRow *notification;
+ CcToggleRow *background;
+ GtkToggleRow *wallpaper;
+ CcToggleRow *sound;
+ CcInfoRow *no_sound;
+ CcToggleRow *search;
+ CcInfoRow *no_search;
+
+ GtkBox *handler_section;
+ GtkButton *handler_reset;
+ GtkListBox *handler_list;
+ CcInfoRow *hypertext;
+ CcInfoRow *text;
+ CcInfoRow *images;
+ CcInfoRow *fonts;
+ CcInfoRow *archives;
+ CcInfoRow *packages;
+ CcInfoRow *audio;
+ CcInfoRow *video;
+ CcInfoRow *other;
+ CcInfoRow *link;
+
+ GtkBox *usage_section;
+ GtkListBox *usage_list;
+ CcInfoRow *storage;
+ GtkDialog *storage_dialog;
+ GtkListBox *storage_list;
+ CcInfoRow *app;
+ CcInfoRow *data;
+ CcInfoRow *cache;
+ CcInfoRow *total;
+ GtkButton *clear_cache_button;
guint64 app_size;
guint64 cache_size;
@@ -361,7 +361,7 @@ search_cb (CcApplicationsPanel *self)
if (self->current_app_id)
set_search_enabled (self,
self->current_app_id,
- cc_toggle_row_get_allowed (CC_TOGGLE_ROW (self->search)));
+ cc_toggle_row_get_allowed (self->search));
}
/* --- notification permissions (flatpaks and non-flatpak) --- */
@@ -409,7 +409,7 @@ static void
notification_cb (CcApplicationsPanel *self)
{
if (self->current_app_id)
- set_notification_allowed (self, cc_toggle_row_get_allowed (CC_TOGGLE_ROW (self->notification)));
+ set_notification_allowed (self, cc_toggle_row_get_allowed (self->notification));
}
static gchar *
@@ -466,7 +466,7 @@ static void
background_cb (CcApplicationsPanel *self)
{
if (self->current_app_id)
- set_background_allowed (self, cc_toggle_row_get_allowed (CC_TOGGLE_ROW (self->background)));
+ set_background_allowed (self, cc_toggle_row_get_allowed (self->background));
}
/* --- wallpaper --- */
@@ -497,7 +497,7 @@ static void
wallpaper_cb (CcApplicationsPanel *self)
{
if (self->current_app_id)
- set_wallpaper_allowed (self, cc_toggle_row_get_allowed (CC_TOGGLE_ROW (self->wallpaper)));
+ set_wallpaper_allowed (self, cc_toggle_row_get_allowed (self->wallpaper));
}
/* --- device (microphone, camera, speaker) permissions (flatpak) --- */
@@ -534,21 +534,21 @@ static void
microphone_cb (CcApplicationsPanel *self)
{
if (self->current_portal_app_id)
- set_device_allowed (self, "microphone", cc_toggle_row_get_allowed (CC_TOGGLE_ROW (self->microphone)));
+ set_device_allowed (self, "microphone", cc_toggle_row_get_allowed (self->microphone));
}
static void
sound_cb (CcApplicationsPanel *self)
{
if (self->current_portal_app_id)
- set_device_allowed (self, "speakers", cc_toggle_row_get_allowed (CC_TOGGLE_ROW (self->sound)));
+ set_device_allowed (self, "speakers", cc_toggle_row_get_allowed (self->sound));
}
static void
camera_cb (CcApplicationsPanel *self)
{
if (self->current_portal_app_id)
- set_device_allowed (self, "camera", cc_toggle_row_get_allowed (CC_TOGGLE_ROW (self->camera)));
+ set_device_allowed (self, "camera", cc_toggle_row_get_allowed (self->camera));
}
/* --- location permissions (flatpak) --- */
@@ -585,7 +585,7 @@ static void
location_cb (CcApplicationsPanel *self)
{
if (self->current_portal_app_id)
- set_location_allowed (self, cc_toggle_row_get_allowed (CC_TOGGLE_ROW (self->location)));
+ set_location_allowed (self, cc_toggle_row_get_allowed (self->location));
}
/* --- permissions section --- */
@@ -602,7 +602,7 @@ remove_snap_permissions (CcApplicationsPanel *self)
{
GtkWidget *row = link->data;
- if (row == self->builtin)
+ if (row == GTK_WIDGET (self->builtin))
break;
if (CC_IS_SNAP_ROW (row))
@@ -703,9 +703,7 @@ permission_row_activated_cb (GtkListBox *list,
GtkListBoxRow *list_row,
CcApplicationsPanel *self)
{
- GtkWidget *row = GTK_WIDGET (list_row);
-
- if (row == self->builtin)
+ if (list_row == GTK_LIST_BOX_ROW (self->builtin))
{
gtk_window_set_transient_for (GTK_WINDOW (self->builtin_dialog),
GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (self))));
@@ -763,7 +761,7 @@ add_static_permissions (CcApplicationsPanel *self,
added += add_static_permission_row (self, _("Settings"), _("Can change settings"));
text = g_strdup_printf (_("%s has the following permissions built-in. These cannot be altered. If you are
concerned about these permissions, consider removing this application."), g_app_info_get_display_name (info));
- gtk_label_set_label (GTK_LABEL (self->builtin_label), text);
+ gtk_label_set_label (self->builtin_label, text);
return added > 0;
}
@@ -784,29 +782,29 @@ update_permission_section (CcApplicationsPanel *self,
if (portal_app_id == NULL)
{
- gtk_widget_hide (self->permission_section);
+ gtk_widget_hide (GTK_WIDGET (self->permission_section));
return;
}
disabled = g_settings_get_boolean (self->privacy_settings, "disable-camera");
get_device_allowed (self, "camera", portal_app_id, &set, &allowed);
- cc_toggle_row_set_allowed (CC_TOGGLE_ROW (self->camera), allowed);
- gtk_widget_set_visible (self->camera, set && !disabled);
- gtk_widget_set_visible (self->no_camera, set && disabled);
+ cc_toggle_row_set_allowed (self->camera, allowed);
+ gtk_widget_set_visible (GTK_WIDGET (self->camera), set && !disabled);
+ gtk_widget_set_visible (GTK_WIDGET (self->no_camera), set && disabled);
has_any |= set;
disabled = g_settings_get_boolean (self->privacy_settings, "disable-microphone");
get_device_allowed (self, "microphone", portal_app_id, &set, &allowed);
- cc_toggle_row_set_allowed (CC_TOGGLE_ROW (self->microphone), allowed);
- gtk_widget_set_visible (self->microphone, set && !disabled);
- gtk_widget_set_visible (self->no_microphone, set && disabled);
+ cc_toggle_row_set_allowed (self->microphone, allowed);
+ gtk_widget_set_visible (GTK_WIDGET (self->microphone), set && !disabled);
+ gtk_widget_set_visible (GTK_WIDGET (self->no_microphone), set && disabled);
has_any |= set;
disabled = !g_settings_get_boolean (self->location_settings, "enabled");
get_location_allowed (self, portal_app_id, &set, &allowed);
- cc_toggle_row_set_allowed (CC_TOGGLE_ROW (self->location), allowed);
- gtk_widget_set_visible (self->location, set && !disabled);
- gtk_widget_set_visible (self->no_location, set && disabled);
+ cc_toggle_row_set_allowed (self->location, allowed);
+ gtk_widget_set_visible (GTK_WIDGET (self->location), set && !disabled);
+ gtk_widget_set_visible (GTK_WIDGET (self->no_location), set && disabled);
has_any |= set;
#ifdef HAVE_SNAP
@@ -816,10 +814,10 @@ update_permission_section (CcApplicationsPanel *self,
remove_static_permissions (self);
has_builtin = add_static_permissions (self, info, portal_app_id);
- gtk_widget_set_visible (self->builtin, has_builtin);
+ gtk_widget_set_visible (GTK_WIDGET (self->builtin), has_builtin);
has_any |= has_builtin;
- gtk_widget_set_visible (self->permission_section, has_any);
+ gtk_widget_set_visible (GTK_WIDGET (self->permission_section), has_any);
}
/* --- gintegration section --- */
@@ -835,49 +833,49 @@ update_integration_section (CcApplicationsPanel *self,
disabled = g_settings_get_boolean (self->search_settings, "disable-external");
get_search_enabled (self, app_id, &set, &allowed);
- cc_toggle_row_set_allowed (CC_TOGGLE_ROW (self->search), allowed);
- gtk_widget_set_visible (self->search, set && !disabled);
- gtk_widget_set_visible (self->no_search, set && disabled);
+ cc_toggle_row_set_allowed (self->search, allowed);
+ gtk_widget_set_visible (GTK_WIDGET (self->search), set && !disabled);
+ gtk_widget_set_visible (GTK_WIDGET (self->no_search), set && disabled);
if (portal_app_id != NULL)
{
g_clear_object (&self->notification_settings);
get_notification_allowed (self, portal_app_id, &set, &allowed);
- cc_toggle_row_set_allowed (CC_TOGGLE_ROW (self->notification), allowed);
- gtk_widget_set_visible (self->notification, set);
+ cc_toggle_row_set_allowed (self->notification, allowed);
+ gtk_widget_set_visible (GTK_WIDGET (self->notification), set);
has_any |= set;
get_background_allowed (self, portal_app_id, &set, &allowed);
- cc_toggle_row_set_allowed (CC_TOGGLE_ROW (self->background), allowed);
- gtk_widget_set_visible (self->background, set);
+ cc_toggle_row_set_allowed (self->background, allowed);
+ gtk_widget_set_visible (GTK_WIDGET (self->background), set);
has_any |= set;
get_wallpaper_allowed (self, portal_app_id, &set, &allowed);
- cc_toggle_row_set_allowed (CC_TOGGLE_ROW (self->wallpaper), allowed);
- gtk_widget_set_visible (self->wallpaper, set);
+ cc_toggle_row_set_allowed (self->wallpaper, allowed);
+ gtk_widget_set_visible (GTK_WIDGET (self->wallpaper), set);
has_any |= set;
disabled = g_settings_get_boolean (self->privacy_settings, "disable-sound-output");
get_device_allowed (self, "speakers", portal_app_id, &set, &allowed);
- cc_toggle_row_set_allowed (CC_TOGGLE_ROW (self->sound), allowed);
- gtk_widget_set_visible (self->sound, set && !disabled);
- gtk_widget_set_visible (self->no_sound, set && disabled);
+ cc_toggle_row_set_allowed (self->sound, allowed);
+ gtk_widget_set_visible (GTK_WIDGET (self->sound), set && !disabled);
+ gtk_widget_set_visible (GTK_WIDGET (self->no_sound), set && disabled);
}
else
{
g_set_object (&self->notification_settings, get_notification_settings (app_id));
get_notification_allowed (self, app_id, &set, &allowed);
- cc_toggle_row_set_allowed (CC_TOGGLE_ROW (self->notification), allowed);
- gtk_widget_set_visible (self->notification, set);
+ cc_toggle_row_set_allowed (self->notification, allowed);
+ gtk_widget_set_visible (GTK_WIDGET (self->notification), set);
has_any |= set;
- gtk_widget_hide (self->background);
- gtk_widget_hide (self->wallpaper);
- gtk_widget_hide (self->sound);
- gtk_widget_hide (self->no_sound);
+ gtk_widget_hide (GTK_WIDGET (self->background));
+ gtk_widget_hide (GTK_WIDGET (self->wallpaper));
+ gtk_widget_hide (GTK_WIDGET (self->sound));
+ gtk_widget_hide (GTK_WIDGET (self->no_sound));
}
- gtk_widget_set_visible (self->integration_section, has_any);
+ gtk_widget_set_visible (GTK_WIDGET (self->integration_section), has_any);
}
/* --- handler section --- */
@@ -890,7 +888,7 @@ unset_cb (CcActionRow *row,
GtkListBoxRow *selected;
GAppInfo *info;
- selected = gtk_list_box_get_selected_row (GTK_LIST_BOX (self->sidebar_listbox));
+ selected = gtk_list_box_get_selected_row (self->sidebar_listbox);
info = cc_applications_row_get_info (CC_APPLICATIONS_ROW (selected));
type = (const gchar *)g_object_get_data (G_OBJECT (row), "type");
@@ -899,8 +897,8 @@ unset_cb (CcActionRow *row,
}
static void
-update_group_row_count (GtkWidget *row,
- gint delta)
+update_group_row_count (CcInfoRow *row,
+ gint delta)
{
gint count;
g_autofree gchar *text = NULL;
@@ -914,7 +912,7 @@ update_group_row_count (GtkWidget *row,
static void
add_scheme (CcApplicationsPanel *self,
- GtkWidget *after,
+ CcInfoRow *after,
const gchar *type)
{
CcActionRow *row = NULL;
@@ -963,13 +961,13 @@ add_scheme (CcApplicationsPanel *self,
}
else
pos = -1;
- gtk_list_box_insert (GTK_LIST_BOX (self->handler_list), GTK_WIDGET (row), pos);
+ gtk_list_box_insert (self->handler_list, GTK_WIDGET (row), pos);
update_group_row_count (after, 1);
}
static void
add_file_type (CcApplicationsPanel *self,
- GtkWidget *after,
+ CcInfoRow *after,
const gchar *type)
{
CcActionRow *row;
@@ -999,7 +997,7 @@ add_file_type (CcApplicationsPanel *self,
pos = -1;
}
- gtk_list_box_insert (GTK_LIST_BOX (self->handler_list), GTK_WIDGET (row), pos);
+ gtk_list_box_insert (self->handler_list, GTK_WIDGET (row), pos);
update_group_row_count (after, 1);
}
@@ -1020,7 +1018,7 @@ is_hypertext_type (const gchar *type)
static void
ensure_group_row (CcApplicationsPanel *self,
- GtkWidget **row,
+ CcInfoRow **row,
const gchar *title)
{
if (*row == NULL)
@@ -1029,8 +1027,8 @@ ensure_group_row (CcApplicationsPanel *self,
"title", title,
"has-expander", TRUE,
NULL));
- gtk_list_box_insert (GTK_LIST_BOX (self->handler_list), GTK_WIDGET (r), -1);
- *row = GTK_WIDGET (r);
+ gtk_list_box_insert (self->handler_list, GTK_WIDGET (r), -1);
+ *row = r;
}
}
@@ -1227,7 +1225,7 @@ static void
add_handler_row (CcApplicationsPanel *self,
const gchar *type)
{
- gtk_widget_show (self->handler_section);
+ gtk_widget_show (GTK_WIDGET (self->handler_section));
if (g_content_type_is_a (type, "x-scheme-handler/*"))
add_link_type (self, type);
@@ -1256,8 +1254,12 @@ handler_row_activated_cb (GtkListBox *list,
GtkListBoxRow *list_row,
CcApplicationsPanel *self)
{
- GtkWidget *row = GTK_WIDGET (list_row);
+ CcInfoRow *row;
+
+ if (!CC_IS_INFO_ROW (list_row))
+ return;
+ row = CC_INFO_ROW (list_row);
if (row == self->hypertext ||
row == self->text ||
row == self->images ||
@@ -1269,8 +1271,7 @@ handler_row_activated_cb (GtkListBox *list,
row == self->other ||
row == self->link)
{
- cc_info_row_set_expanded (CC_INFO_ROW (row),
- !cc_info_row_get_expanded (CC_INFO_ROW (row)));
+ cc_info_row_set_expanded (row, !cc_info_row_get_expanded (row));
}
}
@@ -1307,7 +1308,7 @@ handler_reset_cb (GtkButton *button,
const gchar **types;
gint i;
- selected = gtk_list_box_get_selected_row (GTK_LIST_BOX (self->sidebar_listbox));
+ selected = gtk_list_box_get_selected_row (self->sidebar_listbox);
info = cc_applications_row_get_info (CC_APPLICATIONS_ROW (selected));
types = g_app_info_get_supported_types (info);
@@ -1345,7 +1346,7 @@ update_handler_sections (CcApplicationsPanel *self,
self->other = NULL;
self->link = NULL;
- gtk_widget_hide (self->handler_section);
+ gtk_widget_hide (GTK_WIDGET (self->handler_section));
types = g_app_info_get_supported_types (info);
if (types == NULL || types[0] == NULL)
@@ -1353,7 +1354,7 @@ update_handler_sections (CcApplicationsPanel *self,
hash = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, g_free);
- gtk_widget_set_sensitive (self->handler_reset, FALSE);
+ gtk_widget_set_sensitive (GTK_WIDGET (self->handler_reset), FALSE);
for (i = 0; types[i]; i++)
{
g_autofree gchar *ctype = g_content_type_from_mime_type (types[i]);
@@ -1363,7 +1364,7 @@ update_handler_sections (CcApplicationsPanel *self,
if (!app_info_recommended_for (info, ctype))
{
- gtk_widget_set_sensitive (self->handler_reset, TRUE);
+ gtk_widget_set_sensitive (GTK_WIDGET (self->handler_reset), TRUE);
continue;
}
@@ -1379,9 +1380,7 @@ storage_row_activated_cb (GtkListBox *list,
GtkListBoxRow *list_row,
CcApplicationsPanel *self)
{
- GtkWidget *row = GTK_WIDGET (list_row);
-
- if (row == self->storage)
+ if (list_row == GTK_LIST_BOX_ROW (self->storage))
{
gtk_window_set_transient_for (GTK_WINDOW (self->storage_dialog),
GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (self))));
@@ -1422,7 +1421,7 @@ set_cache_size (GObject *source,
formatted_size = g_format_size (self->cache_size);
g_object_set (self->cache, "info", formatted_size, NULL);
- gtk_widget_set_sensitive (self->clear_cache_button, self->cache_size > 0);
+ gtk_widget_set_sensitive (GTK_WIDGET (self->clear_cache_button), self->cache_size > 0);
update_total_size (self);
}
@@ -1519,7 +1518,7 @@ static void
update_app_sizes (CcApplicationsPanel *self,
const gchar *app_id)
{
- gtk_widget_set_sensitive (self->clear_cache_button, FALSE);
+ gtk_widget_set_sensitive (GTK_WIDGET (self->clear_cache_button), FALSE);
self->app_size = self->data_size = self->cache_size = 0;
@@ -1536,12 +1535,12 @@ update_usage_section (CcApplicationsPanel *self,
if (portal_app_id != NULL)
{
- gtk_widget_show (self->usage_section);
+ gtk_widget_show (GTK_WIDGET (self->usage_section));
update_app_sizes (self, portal_app_id);
}
else
{
- gtk_widget_hide (self->usage_section);
+ gtk_widget_hide (GTK_WIDGET (self->usage_section));
}
}
@@ -1561,17 +1560,17 @@ update_panel (CcApplicationsPanel *self,
if (row == NULL)
{
- gtk_label_set_label (GTK_LABEL (self->title_label), _("Applications"));
- gtk_stack_set_visible_child_name (GTK_STACK (self->stack), "empty");
- gtk_widget_hide (self->header_button);
+ gtk_label_set_label (self->title_label, _("Applications"));
+ gtk_stack_set_visible_child_name (self->stack, "empty");
+ gtk_widget_hide (GTK_WIDGET (GTK_WIDGET (self->header_button)));
return;
}
info = cc_applications_row_get_info (CC_APPLICATIONS_ROW (row));
- gtk_label_set_label (GTK_LABEL (self->title_label), g_app_info_get_display_name (info));
- gtk_stack_set_visible_child_name (GTK_STACK (self->stack), "settings");
- gtk_widget_show (self->header_button);
+ gtk_label_set_label (self->title_label, g_app_info_get_display_name (info));
+ gtk_stack_set_visible_child_name (self->stack, "settings");
+ gtk_widget_show (GTK_WIDGET (self->header_button));
g_clear_pointer (&self->current_app_id, g_free);
g_clear_pointer (&self->current_portal_app_id, g_free);
@@ -1605,11 +1604,11 @@ populate_applications (CcApplicationsPanel *self)
continue;
row = GTK_WIDGET (cc_applications_row_new (info));
- gtk_list_box_insert (GTK_LIST_BOX (self->sidebar_listbox), row, -1);
+ gtk_list_box_insert (self->sidebar_listbox, row, -1);
id = get_app_id (info);
if (g_strcmp0 (id, self->current_app_id) == 0)
- gtk_list_box_select_row (GTK_LIST_BOX (self->sidebar_listbox), GTK_LIST_BOX_ROW (row));
+ gtk_list_box_select_row (self->sidebar_listbox, GTK_LIST_BOX_ROW (row));
}
}
@@ -1812,21 +1811,21 @@ cc_applications_panel_constructed (GObject *object)
G_OBJECT_CLASS (cc_applications_panel_parent_class)->constructed (object);
shell = cc_panel_get_shell (CC_PANEL (self));
- cc_shell_embed_widget_in_header (shell, self->header_button, GTK_POS_RIGHT);
+ cc_shell_embed_widget_in_header (shell, GTK_WIDGET (self->header_button), GTK_POS_RIGHT);
}
static GtkWidget*
cc_applications_panel_get_sidebar_widget (CcPanel *panel)
{
CcApplicationsPanel *self = CC_APPLICATIONS_PANEL (panel);
- return self->sidebar_box;
+ return GTK_WIDGET (self->sidebar_box);
}
static GtkWidget *
cc_applications_panel_get_title_widget (CcPanel *panel)
{
CcApplicationsPanel *self = CC_APPLICATIONS_PANEL (panel);
- return self->title_label;
+ return GTK_WIDGET (self->title_label);
}
static void
@@ -1932,27 +1931,27 @@ cc_applications_panel_init (CcApplicationsPanel *self)
g_signal_connect (self->header_button, "clicked", G_CALLBACK (open_software_cb), self);
- gtk_list_box_set_header_func (GTK_LIST_BOX (self->permission_list),
+ gtk_list_box_set_header_func (self->permission_list,
cc_list_box_update_header_func,
NULL, NULL);
- gtk_list_box_set_header_func (GTK_LIST_BOX (self->integration_list),
+ gtk_list_box_set_header_func (self->integration_list,
cc_list_box_update_header_func,
NULL, NULL);
- gtk_list_box_set_header_func (GTK_LIST_BOX (self->handler_list),
+ gtk_list_box_set_header_func (self->handler_list,
cc_list_box_update_header_func,
NULL, NULL);
- gtk_list_box_set_header_func (GTK_LIST_BOX (self->usage_list),
+ gtk_list_box_set_header_func (self->usage_list,
cc_list_box_update_header_func,
NULL, NULL);
- gtk_list_box_set_header_func (GTK_LIST_BOX (self->builtin_list),
+ gtk_list_box_set_header_func (self->builtin_list,
cc_list_box_update_header_func,
NULL, NULL);
- gtk_list_box_set_header_func (GTK_LIST_BOX (self->storage_list),
+ gtk_list_box_set_header_func (self->storage_list,
cc_list_box_update_header_func,
NULL, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]