utils: Add utility function for creating activate signal and shortcuts
The current way of adding activation shortcuts is cumbersome, as it is a for-loop pasted in the middle of class initializers. The utility function addresses this problem by simply allowing us to declaratively add these shortcuts with minimal effort. Furthermore, the implementation is also simpler, thanks to the `gtk_widget_class_add_binding_signal()` wrapper function. Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/747>
This commit is contained in:
@@ -141,4 +141,7 @@ SoupSession * gcal_create_soup_session (void);
|
||||
GListModel * gcal_create_writable_calendars_model (GcalManager *manager);
|
||||
|
||||
const gchar * gcal_get_email_from_mailto_uri (const gchar *mailto_uri);
|
||||
|
||||
guint gcal_create_activate_signal_and_shortcuts (GtkWidgetClass *widget_class,
|
||||
GType widget_type);
|
||||
#endif /* __GCAL_UTILS_H__ */
|
||||
|
||||
Reference in New Issue
Block a user