[gnome-control-center/wip/garnacho/wayland-tablet: 1/31] shell: Add cc_panel_get_title_widget() vmethod
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/wip/garnacho/wayland-tablet: 1/31] shell: Add cc_panel_get_title_widget() vmethod
- Date: Fri, 24 Jun 2016 18:01:53 +0000 (UTC)
commit c7e185b957b62cea1c6116b8e48f11f494f40cf5
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Jun 6 12:59:01 2016 +0200
shell: Add cc_panel_get_title_widget() vmethod
So the panel implementations will be able to set a custom widget
in the shell headerbar. It defaults to NULL, so by default headerbars
set the plain label with the panel title.
shell/cc-panel.c | 11 +++++++++++
shell/cc-panel.h | 4 ++++
2 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/shell/cc-panel.c b/shell/cc-panel.c
index 7765a4c..1042397 100644
--- a/shell/cc-panel.c
+++ b/shell/cc-panel.c
@@ -280,3 +280,14 @@ cc_panel_get_help_uri (CcPanel *panel)
return NULL;
}
+
+GtkWidget *
+cc_panel_get_title_widget (CcPanel *panel)
+{
+ CcPanelClass *class = CC_PANEL_GET_CLASS (panel);
+
+ if (class->get_title_widget)
+ return class->get_title_widget (panel);
+
+ return NULL;
+}
diff --git a/shell/cc-panel.h b/shell/cc-panel.h
index ef77e91..6879460 100644
--- a/shell/cc-panel.h
+++ b/shell/cc-panel.h
@@ -76,6 +76,8 @@ struct _CcPanelClass
GPermission * (* get_permission) (CcPanel *panel);
const char * (* get_help_uri) (CcPanel *panel);
+
+ GtkWidget * (* get_title_widget) (CcPanel *panel);
};
GType cc_panel_get_type (void);
@@ -86,6 +88,8 @@ GPermission *cc_panel_get_permission (CcPanel *panel);
const char *cc_panel_get_help_uri (CcPanel *panel);
+GtkWidget *cc_panel_get_title_widget (CcPanel *panel);
+
G_END_DECLS
#endif /* __CC_PANEL_H */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]