mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-28 06:16:00 +01:00
Rename private to priv
Avoid to name variables after a C++ keyword.
This commit is contained in:
parent
36065d3bf3
commit
72f3ce1d62
1 changed files with 17 additions and 17 deletions
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
#include <girara/utils.h>
|
#include <girara/utils.h>
|
||||||
|
|
||||||
typedef struct private_s {
|
typedef struct {
|
||||||
char* file_path;
|
char* file_path;
|
||||||
} ZathuraFileMonitorPrivate;
|
} ZathuraFileMonitorPrivate;
|
||||||
|
|
||||||
|
@ -24,11 +24,11 @@ enum {
|
||||||
static void
|
static void
|
||||||
finalize(GObject* object)
|
finalize(GObject* object)
|
||||||
{
|
{
|
||||||
ZathuraFileMonitor* file_monitor = ZATHURA_FILEMONITOR(object);
|
ZathuraFileMonitor* file_monitor = ZATHURA_FILEMONITOR(object);
|
||||||
ZathuraFileMonitorPrivate* private = zathura_filemonitor_get_instance_private(file_monitor);
|
ZathuraFileMonitorPrivate* priv = zathura_filemonitor_get_instance_private(file_monitor);
|
||||||
|
|
||||||
if (private->file_path != NULL) {
|
if (priv->file_path != NULL) {
|
||||||
g_free(private->file_path);
|
g_free(priv->file_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
G_OBJECT_CLASS(zathura_filemonitor_parent_class)->finalize(object);
|
G_OBJECT_CLASS(zathura_filemonitor_parent_class)->finalize(object);
|
||||||
|
@ -37,15 +37,15 @@ finalize(GObject* object)
|
||||||
static void
|
static void
|
||||||
set_property(GObject* object, guint prop_id, const GValue* value, GParamSpec* pspec)
|
set_property(GObject* object, guint prop_id, const GValue* value, GParamSpec* pspec)
|
||||||
{
|
{
|
||||||
ZathuraFileMonitor* file_monitor = ZATHURA_FILEMONITOR(object);
|
ZathuraFileMonitor* file_monitor = ZATHURA_FILEMONITOR(object);
|
||||||
ZathuraFileMonitorPrivate* private = zathura_filemonitor_get_instance_private(file_monitor);
|
ZathuraFileMonitorPrivate* priv = zathura_filemonitor_get_instance_private(file_monitor);
|
||||||
|
|
||||||
switch (prop_id) {
|
switch (prop_id) {
|
||||||
case PROP_FILE_PATH:
|
case PROP_FILE_PATH:
|
||||||
if (private->file_path != NULL) {
|
if (priv->file_path != NULL) {
|
||||||
g_free(private->file_path);
|
g_free(priv->file_path);
|
||||||
}
|
}
|
||||||
private->file_path = g_value_dup_string(value);
|
priv->file_path = g_value_dup_string(value);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
|
||||||
|
@ -55,12 +55,12 @@ set_property(GObject* object, guint prop_id, const GValue* value, GParamSpec* ps
|
||||||
static void
|
static void
|
||||||
get_property(GObject* object, guint prop_id, GValue* value, GParamSpec* pspec)
|
get_property(GObject* object, guint prop_id, GValue* value, GParamSpec* pspec)
|
||||||
{
|
{
|
||||||
ZathuraFileMonitor* file_monitor = ZATHURA_FILEMONITOR(object);
|
ZathuraFileMonitor* file_monitor = ZATHURA_FILEMONITOR(object);
|
||||||
ZathuraFileMonitorPrivate* private = zathura_filemonitor_get_instance_private(file_monitor);
|
ZathuraFileMonitorPrivate* priv = zathura_filemonitor_get_instance_private(file_monitor);
|
||||||
|
|
||||||
switch (prop_id) {
|
switch (prop_id) {
|
||||||
case PROP_FILE_PATH:
|
case PROP_FILE_PATH:
|
||||||
g_value_set_string(value, private->file_path);
|
g_value_set_string(value, priv->file_path);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
|
||||||
|
@ -94,14 +94,14 @@ zathura_filemonitor_class_init(ZathuraFileMonitorClass* class)
|
||||||
static void
|
static void
|
||||||
zathura_filemonitor_init(ZathuraFileMonitor* file_monitor)
|
zathura_filemonitor_init(ZathuraFileMonitor* file_monitor)
|
||||||
{
|
{
|
||||||
ZathuraFileMonitorPrivate* private = zathura_filemonitor_get_instance_private(file_monitor);
|
ZathuraFileMonitorPrivate* priv = zathura_filemonitor_get_instance_private(file_monitor);
|
||||||
private->file_path = NULL;
|
priv->file_path = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* zathura_filemonitor_get_filepath(ZathuraFileMonitor* file_monitor)
|
const char* zathura_filemonitor_get_filepath(ZathuraFileMonitor* file_monitor)
|
||||||
{
|
{
|
||||||
ZathuraFileMonitorPrivate* private = zathura_filemonitor_get_instance_private(file_monitor);
|
ZathuraFileMonitorPrivate* priv = zathura_filemonitor_get_instance_private(file_monitor);
|
||||||
return private->file_path;
|
return priv->file_path;
|
||||||
}
|
}
|
||||||
|
|
||||||
void zathura_filemonitor_start(ZathuraFileMonitor* file_monitor)
|
void zathura_filemonitor_start(ZathuraFileMonitor* file_monitor)
|
||||||
|
|
Loading…
Reference in a new issue