utils: Add macro for getting default application
This will be needed as a replacement for the removal of the "context" property on every object. Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/702>
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
#ifndef __GCAL_UTILS_H__
|
||||
#define __GCAL_UTILS_H__
|
||||
|
||||
#include "gcal-application.h"
|
||||
#include "gcal-date-time-utils.h"
|
||||
#include "gcal-manager.h"
|
||||
|
||||
@@ -31,6 +32,8 @@
|
||||
#define MINUTES_PER_DAY 1440
|
||||
#define MAX_MINUTES (N_WEEKDAYS * MINUTES_PER_DAY)
|
||||
|
||||
#define GCAL_DEFAULT_APPLICATION GCAL_APPLICATION (g_application_get_default ())
|
||||
|
||||
#define gcal_clear_timeout(pp) { if (pp && *pp) { g_source_remove (*pp); *pp = 0; } }
|
||||
#define gcal_clear_signal_handler(pp,instance) { if (pp && *pp > 0) { g_signal_handler_disconnect (instance, *pp); *pp = 0; } }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user