Kaydet (Commit) d2d5a00e authored tarafından Pranav Kant's avatar Pranav Kant Kaydeden (comit) Miklos Vajna

lokdocview: Use G_PARAM_STATIC_STRINGS

... as `name`, `nick`, and `blurb` are guaranteed to remain valid
and unmodified for the lifetime of the parameters.

Change-Id: Ic6463b470546669d5a815842daedb170df85d161
Reviewed-on: https://gerrit.libreoffice.org/19472Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
Tested-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
üst 07f75f6e
...@@ -1638,8 +1638,9 @@ static void lok_doc_view_class_init (LOKDocViewClass* pClass) ...@@ -1638,8 +1638,9 @@ static void lok_doc_view_class_init (LOKDocViewClass* pClass)
"LO Path", "LO Path",
"LibreOffice Install Path", "LibreOffice Install Path",
0, 0,
static_cast<GParamFlags>(G_PARAM_READWRITE static_cast<GParamFlags>(G_PARAM_READWRITE |
| G_PARAM_CONSTRUCT_ONLY))); G_PARAM_CONSTRUCT_ONLY |
G_PARAM_STATIC_STRINGS)));
/** /**
* LOKDocView:lopointer: * LOKDocView:lopointer:
...@@ -1650,10 +1651,11 @@ static void lok_doc_view_class_init (LOKDocViewClass* pClass) ...@@ -1650,10 +1651,11 @@ static void lok_doc_view_class_init (LOKDocViewClass* pClass)
g_object_class_install_property (pGObjectClass, g_object_class_install_property (pGObjectClass,
PROP_LO_POINTER, PROP_LO_POINTER,
g_param_spec_pointer("lopointer", g_param_spec_pointer("lopointer",
"LO Pointer", "LO Pointer",
"A LibreOfficeKit* from lok_init()", "A LibreOfficeKit* from lok_init()",
static_cast<GParamFlags>(G_PARAM_READWRITE static_cast<GParamFlags>(G_PARAM_READWRITE |
| G_PARAM_CONSTRUCT_ONLY))); G_PARAM_CONSTRUCT_ONLY |
G_PARAM_STATIC_STRINGS)));
/** /**
* LOKDocView:docpath: * LOKDocView:docpath:
...@@ -1666,7 +1668,8 @@ static void lok_doc_view_class_init (LOKDocViewClass* pClass) ...@@ -1666,7 +1668,8 @@ static void lok_doc_view_class_init (LOKDocViewClass* pClass)
"Document Path", "Document Path",
"The URI of the document to open", "The URI of the document to open",
0, 0,
static_cast<GParamFlags>(G_PARAM_READWRITE))); static_cast<GParamFlags>(G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS)));
/** /**
* LOKDocView:docpointer: * LOKDocView:docpointer:
...@@ -1677,9 +1680,10 @@ static void lok_doc_view_class_init (LOKDocViewClass* pClass) ...@@ -1677,9 +1680,10 @@ static void lok_doc_view_class_init (LOKDocViewClass* pClass)
g_object_class_install_property (pGObjectClass, g_object_class_install_property (pGObjectClass,
PROP_DOC_POINTER, PROP_DOC_POINTER,
g_param_spec_pointer("docpointer", g_param_spec_pointer("docpointer",
"Document Pointer", "Document Pointer",
"A LibreOfficeKitDocument* from documentLoad()", "A LibreOfficeKitDocument* from documentLoad()",
static_cast<GParamFlags>(G_PARAM_READWRITE))); static_cast<GParamFlags>(G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS)));
/** /**
* LOKDocView:editable: * LOKDocView:editable:
...@@ -1692,7 +1696,8 @@ static void lok_doc_view_class_init (LOKDocViewClass* pClass) ...@@ -1692,7 +1696,8 @@ static void lok_doc_view_class_init (LOKDocViewClass* pClass)
"Editable", "Editable",
"Whether the content is in edit mode or not", "Whether the content is in edit mode or not",
FALSE, FALSE,
static_cast<GParamFlags>(G_PARAM_READWRITE))); static_cast<GParamFlags>(G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS)));
/** /**
* LOKDocView:load-progress: * LOKDocView:load-progress:
...@@ -1708,7 +1713,8 @@ static void lok_doc_view_class_init (LOKDocViewClass* pClass) ...@@ -1708,7 +1713,8 @@ static void lok_doc_view_class_init (LOKDocViewClass* pClass)
"Estimated Load Progress", "Estimated Load Progress",
"Shows the progress of the document load operation", "Shows the progress of the document load operation",
0.0, 1.0, 0.0, 0.0, 1.0, 0.0,
G_PARAM_READABLE)); static_cast<GParamFlags>(G_PARAM_READABLE |
G_PARAM_STATIC_STRINGS)));
/** /**
* LOKDocView:zoom-level: * LOKDocView:zoom-level:
...@@ -1723,7 +1729,8 @@ static void lok_doc_view_class_init (LOKDocViewClass* pClass) ...@@ -1723,7 +1729,8 @@ static void lok_doc_view_class_init (LOKDocViewClass* pClass)
"The current zoom level of the content", "The current zoom level of the content",
0, 5.0, 1.0, 0, 5.0, 1.0,
static_cast<GParamFlags>(G_PARAM_READWRITE | static_cast<GParamFlags>(G_PARAM_READWRITE |
G_PARAM_CONSTRUCT))); G_PARAM_CONSTRUCT |
G_PARAM_STATIC_STRINGS)));
/** /**
* LOKDocView:is-loading: * LOKDocView:is-loading:
...@@ -1737,7 +1744,8 @@ static void lok_doc_view_class_init (LOKDocViewClass* pClass) ...@@ -1737,7 +1744,8 @@ static void lok_doc_view_class_init (LOKDocViewClass* pClass)
"Is Loading", "Is Loading",
"Whether the view is loading a document", "Whether the view is loading a document",
FALSE, FALSE,
static_cast<GParamFlags>(G_PARAM_READABLE))); static_cast<GParamFlags>(G_PARAM_READABLE |
G_PARAM_STATIC_STRINGS)));
/** /**
* LOKDocView:doc-width: * LOKDocView:doc-width:
...@@ -1750,7 +1758,8 @@ static void lok_doc_view_class_init (LOKDocViewClass* pClass) ...@@ -1750,7 +1758,8 @@ static void lok_doc_view_class_init (LOKDocViewClass* pClass)
"Document Width", "Document Width",
"Width of the document in twips", "Width of the document in twips",
0, G_MAXLONG, 0, 0, G_MAXLONG, 0,
static_cast<GParamFlags>(G_PARAM_READWRITE))); static_cast<GParamFlags>(G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS)));
/** /**
* LOKDocView:doc-height: * LOKDocView:doc-height:
...@@ -1763,7 +1772,8 @@ static void lok_doc_view_class_init (LOKDocViewClass* pClass) ...@@ -1763,7 +1772,8 @@ static void lok_doc_view_class_init (LOKDocViewClass* pClass)
"Document Height", "Document Height",
"Height of the document in twips", "Height of the document in twips",
0, G_MAXLONG, 0, 0, G_MAXLONG, 0,
static_cast<GParamFlags>(G_PARAM_READWRITE))); static_cast<GParamFlags>(G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS)));
/** /**
* LOKDocView:can-zoom-in: * LOKDocView:can-zoom-in:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment