gedit r6112 - in trunk: . gedit
- From: sfre svn gnome org
- To: svn-commits-list gnome org
- Subject: gedit r6112 - in trunk: . gedit
- Date: Wed, 23 Jan 2008 08:26:25 +0000 (GMT)
Author: sfre
Date: Wed Jan 23 08:26:24 2008
New Revision: 6112
URL: http://svn.gnome.org/viewvc/gedit?rev=6112&view=rev
Log:
Take profit of G_PARAM_STATIC_STRINGS
Modified:
trunk/ChangeLog
trunk/gedit/gedit-app.c
trunk/gedit/gedit-document-loader.c
trunk/gedit/gedit-document-saver.c
trunk/gedit/gedit-document.c
trunk/gedit/gedit-documents-panel.c
trunk/gedit/gedit-encodings-option-menu.c
trunk/gedit/gedit-history-entry.c
trunk/gedit/gedit-panel.c
trunk/gedit/gedit-print-job-preview.c
trunk/gedit/gedit-progress-message-area.c
trunk/gedit/gedit-python-module.c
trunk/gedit/gedit-tab.c
trunk/gedit/gedit-window.c
trunk/gedit/gtksourceprintjob.c
Modified: trunk/gedit/gedit-app.c
==============================================================================
--- trunk/gedit/gedit-app.c (original)
+++ trunk/gedit/gedit-app.c Wed Jan 23 08:26:24 2008
@@ -102,11 +102,12 @@
g_object_class_install_property (object_class,
PROP_LOCKDOWN,
g_param_spec_flags ("lockdown",
- "Lockdown",
- "The lockdown mask",
- GEDIT_TYPE_LOCKDOWN_MASK,
- 0,
- G_PARAM_READABLE));
+ "Lockdown",
+ "The lockdown mask",
+ GEDIT_TYPE_LOCKDOWN_MASK,
+ 0,
+ G_PARAM_READABLE |
+ G_PARAM_STATIC_STRINGS));
g_type_class_add_private (object_class, sizeof(GeditAppPrivate));
}
Modified: trunk/gedit/gedit-document-loader.c
==============================================================================
--- trunk/gedit/gedit-document-loader.c (original)
+++ trunk/gedit/gedit-document-loader.c Wed Jan 23 08:26:24 2008
@@ -146,7 +146,8 @@
"The GeditDocument this GeditDocumentLoader is associated with",
GEDIT_TYPE_DOCUMENT,
G_PARAM_READWRITE |
- G_PARAM_CONSTRUCT_ONLY));
+ G_PARAM_CONSTRUCT_ONLY |
+ G_PARAM_STATIC_STRINGS));
g_object_class_install_property (object_class,
PROP_URI,
@@ -164,7 +165,8 @@
"The encoding of the saved file",
GEDIT_TYPE_ENCODING,
G_PARAM_READWRITE |
- G_PARAM_CONSTRUCT_ONLY));
+ G_PARAM_CONSTRUCT_ONLY |
+ G_PARAM_STATIC_STRINGS));
signals[LOADING] =
g_signal_new ("loading",
Modified: trunk/gedit/gedit-document-saver.c
==============================================================================
--- trunk/gedit/gedit-document-saver.c (original)
+++ trunk/gedit/gedit-document-saver.c Wed Jan 23 08:26:24 2008
@@ -155,7 +155,8 @@
"The GeditDocument this GeditDocumentSaver is associated with",
GEDIT_TYPE_DOCUMENT,
G_PARAM_READWRITE |
- G_PARAM_CONSTRUCT_ONLY));
+ G_PARAM_CONSTRUCT_ONLY |
+ G_PARAM_STATIC_STRINGS));
g_object_class_install_property (object_class,
PROP_URI,
@@ -164,7 +165,8 @@
"The URI this GeditDocumentSaver saves the document to",
"",
G_PARAM_READWRITE |
- G_PARAM_CONSTRUCT_ONLY));
+ G_PARAM_CONSTRUCT_ONLY |
+ G_PARAM_STATIC_STRINGS));
g_object_class_install_property (object_class,
PROP_ENCODING,
@@ -173,7 +175,8 @@
"The encoding of the saved file",
GEDIT_TYPE_ENCODING,
G_PARAM_READWRITE |
- G_PARAM_CONSTRUCT_ONLY));
+ G_PARAM_CONSTRUCT_ONLY |
+ G_PARAM_STATIC_STRINGS));
g_object_class_install_property (object_class,
PROP_FLAGS,
Modified: trunk/gedit/gedit-document.c
==============================================================================
--- trunk/gedit/gedit-document.c (original)
+++ trunk/gedit/gedit-document.c Wed Jan 23 08:26:24 2008
@@ -404,47 +404,59 @@
g_object_class_install_property (object_class, PROP_URI,
g_param_spec_string ("uri",
- "URI",
- "The document's URI",
- NULL,
- G_PARAM_READABLE));
+ "URI",
+ "The document's URI",
+ NULL,
+ G_PARAM_READABLE |
+ G_PARAM_STATIC_STRINGS));
+
g_object_class_install_property (object_class, PROP_SHORTNAME,
g_param_spec_string ("shortname",
- "Short Name",
- "The document's short name",
- NULL,
- G_PARAM_READABLE));
+ "Short Name",
+ "The document's short name",
+ NULL,
+ G_PARAM_READABLE |
+ G_PARAM_STATIC_STRINGS));
+
g_object_class_install_property (object_class, PROP_MIME_TYPE,
g_param_spec_string ("mime-type",
- "MIME Type",
- "The document's MIME Type",
- "text/plain",
- G_PARAM_READABLE));
+ "MIME Type",
+ "The document's MIME Type",
+ "text/plain",
+ G_PARAM_READABLE |
+ G_PARAM_STATIC_STRINGS));
+
g_object_class_install_property (object_class, PROP_READ_ONLY,
g_param_spec_boolean ("read-only",
- "Read Only",
- "Whether the document is read only or not",
- FALSE,
- G_PARAM_READABLE));
+ "Read Only",
+ "Whether the document is read only or not",
+ FALSE,
+ G_PARAM_READABLE |
+ G_PARAM_STATIC_STRINGS));
+
g_object_class_install_property (object_class, PROP_ENCODING,
g_param_spec_boxed ("encoding",
- "Encoding",
- "The GeditEncoding used for the document",
- GEDIT_TYPE_ENCODING,
- G_PARAM_READABLE));
+ "Encoding",
+ "The GeditEncoding used for the document",
+ GEDIT_TYPE_ENCODING,
+ G_PARAM_READABLE |
+ G_PARAM_STATIC_STRINGS));
+
g_object_class_install_property (object_class, PROP_CAN_SEARCH_AGAIN,
g_param_spec_boolean ("can-search-again",
- "Can search again",
- "Wheter it's possible to search again in the document",
- FALSE,
- G_PARAM_READABLE));
+ "Can search again",
+ "Wheter it's possible to search again in the document",
+ FALSE,
+ G_PARAM_READABLE |
+ G_PARAM_STATIC_STRINGS));
g_object_class_install_property (object_class, PROP_ENABLE_SEARCH_HIGHLIGHTING,
g_param_spec_boolean ("enable-search-highlighting",
- "Enable Search Highlighting",
- "Whether all the occurences of the searched string must be highlighted",
- FALSE,
- G_PARAM_READWRITE));
+ "Enable Search Highlighting",
+ "Whether all the occurences of the searched string must be highlighted",
+ FALSE,
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS));
/* This signal is used to update the cursor position is the statusbar,
* it's emitted either when the insert mark is moved explicitely or
Modified: trunk/gedit/gedit-documents-panel.c
==============================================================================
--- trunk/gedit/gedit-documents-panel.c (original)
+++ trunk/gedit/gedit-documents-panel.c Wed Jan 23 08:26:24 2008
@@ -465,7 +465,8 @@
"The GeditWindow this GeditDocumentsPanel is associated with",
GEDIT_TYPE_WINDOW,
G_PARAM_READWRITE |
- G_PARAM_CONSTRUCT_ONLY));
+ G_PARAM_CONSTRUCT_ONLY |
+ G_PARAM_STATIC_STRINGS));
g_type_class_add_private (object_class, sizeof(GeditDocumentsPanelPrivate));
}
Modified: trunk/gedit/gedit-encodings-option-menu.c
==============================================================================
--- trunk/gedit/gedit-encodings-option-menu.c (original)
+++ trunk/gedit/gedit-encodings-option-menu.c Wed Jan 23 08:26:24 2008
@@ -122,12 +122,13 @@
g_object_class_install_property (object_class,
PROP_SAVE_MODE,
- g_param_spec_boolean ("save_mode",
+ g_param_spec_boolean ("save-mode",
("Save Mode"),
("Save Mode"),
FALSE,
- (G_PARAM_READWRITE |
- G_PARAM_CONSTRUCT)));
+ G_PARAM_READWRITE |
+ G_PARAM_CONSTRUCT |
+ G_PARAM_STATIC_STRINGS));
g_type_class_add_private (object_class, sizeof(GeditEncodingsOptionMenuPrivate));
}
Modified: trunk/gedit/gedit-history-entry.c
==============================================================================
--- trunk/gedit/gedit-history-entry.c (original)
+++ trunk/gedit/gedit-history-entry.c Wed Jan 23 08:26:24 2008
@@ -158,7 +158,8 @@
"History ID",
"History ID",
NULL,
- G_PARAM_READWRITE));
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS));
g_object_class_install_property (object_class,
PROP_HISTORY_LENGTH,
@@ -168,7 +169,8 @@
0,
G_MAXUINT,
GEDIT_HISTORY_ENTRY_HISTORY_LENGTH_DEFAULT,
- G_PARAM_READWRITE));
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS));
/* TODO: Add enable-completion property */
Modified: trunk/gedit/gedit-panel.c
==============================================================================
--- trunk/gedit/gedit-panel.c (original)
+++ trunk/gedit/gedit-panel.c Wed Jan 23 08:26:24 2008
@@ -199,7 +199,10 @@
"The panel's orientation",
GTK_TYPE_ORIENTATION,
GTK_ORIENTATION_VERTICAL,
- G_PARAM_WRITABLE | G_PARAM_READABLE | G_PARAM_CONSTRUCT_ONLY));
+ G_PARAM_WRITABLE |
+ G_PARAM_READABLE |
+ G_PARAM_CONSTRUCT_ONLY |
+ G_PARAM_STATIC_STRINGS));
widget_class->grab_focus = gedit_panel_grab_focus;
Modified: trunk/gedit/gedit-print-job-preview.c
==============================================================================
--- trunk/gedit/gedit-print-job-preview.c (original)
+++ trunk/gedit/gedit-print-job-preview.c Wed Jan 23 08:26:24 2008
@@ -1091,11 +1091,11 @@
g_object_class_install_property (gobject_class, PROP_NX,
g_param_spec_ulong ("nx", _("Number of pages horizontally"),
_("Number of pages horizontally"), 1, 0xffff, 1,
- G_PARAM_READWRITE));
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_NY,
g_param_spec_ulong ("ny", _("Number of pages vertically"),
_("Number of pages vertically"), 1, 0xffff, 1,
- G_PARAM_READWRITE));
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_type_class_add_private(klass, sizeof(GeditPrintJobPreviewPrivate));
}
Modified: trunk/gedit/gedit-progress-message-area.c
==============================================================================
--- trunk/gedit/gedit-progress-message-area.c (original)
+++ trunk/gedit/gedit-progress-message-area.c Wed Jan 23 08:26:24 2008
@@ -123,7 +123,9 @@
"Has Cancel Button",
"If the message area has a cancel button",
TRUE,
- G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
+ G_PARAM_WRITABLE |
+ G_PARAM_CONSTRUCT_ONLY |
+ G_PARAM_STATIC_STRINGS));
g_type_class_add_private (gobject_class, sizeof(GeditProgressMessageAreaPrivate));
}
Modified: trunk/gedit/gedit-python-module.c
==============================================================================
--- trunk/gedit/gedit-python-module.c (original)
+++ trunk/gedit/gedit-python-module.c Wed Jan 23 08:26:24 2008
@@ -222,8 +222,10 @@
"Module Name",
"The Python module to load for this plugin",
NULL,
- G_PARAM_WRITABLE | G_PARAM_READABLE | G_PARAM_CONSTRUCT_ONLY));
-
+ G_PARAM_READWRITE |
+ G_PARAM_CONSTRUCT_ONLY |
+ G_PARAM_STATIC_STRINGS));
+
g_object_class_install_property
(object_class,
PROP_PATH,
@@ -231,7 +233,9 @@
"Path",
"The Python path to use when loading this module",
NULL,
- G_PARAM_WRITABLE | G_PARAM_READABLE | G_PARAM_CONSTRUCT_ONLY));
+ G_PARAM_READWRITE |
+ G_PARAM_CONSTRUCT_ONLY |
+ G_PARAM_STATIC_STRINGS));
g_type_class_add_private (object_class, sizeof (GeditPythonModulePrivate));
Modified: trunk/gedit/gedit-tab.c
==============================================================================
--- trunk/gedit/gedit-tab.c (original)
+++ trunk/gedit/gedit-tab.c Wed Jan 23 08:26:24 2008
@@ -264,7 +264,9 @@
"Name",
"The tab's name",
NULL,
- G_PARAM_READABLE));
+ G_PARAM_READABLE |
+ G_PARAM_STATIC_STRINGS));
+
g_object_class_install_property (object_class,
PROP_STATE,
g_param_spec_enum ("state",
@@ -272,26 +274,29 @@
"The tab's state",
GEDIT_TYPE_TAB_STATE,
GEDIT_TAB_STATE_NORMAL,
- G_PARAM_READABLE));
-
+ G_PARAM_READABLE |
+ G_PARAM_STATIC_STRINGS));
+
g_object_class_install_property (object_class,
PROP_AUTO_SAVE,
g_param_spec_boolean ("autosave",
"Autosave",
"Autosave feature",
TRUE,
- G_PARAM_READWRITE));
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS));
g_object_class_install_property (object_class,
PROP_AUTO_SAVE_INTERVAL,
- g_param_spec_int ("autosave_interval",
+ g_param_spec_int ("autosave-interval",
"AutosaveInterval",
"Time between two autosaves",
0,
G_MAXINT,
0,
- G_PARAM_READWRITE));
-
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS));
+
g_type_class_add_private (object_class, sizeof (GeditTabPrivate));
}
Modified: trunk/gedit/gedit-window.c
==============================================================================
--- trunk/gedit/gedit-window.c (original)
+++ trunk/gedit/gedit-window.c Wed Jan 23 08:26:24 2008
@@ -364,8 +364,9 @@
"The window's state",
GEDIT_TYPE_WINDOW_STATE,
GEDIT_WINDOW_STATE_NORMAL,
- G_PARAM_READABLE));
-
+ G_PARAM_READABLE |
+ G_PARAM_STATIC_STRINGS));
+
g_type_class_add_private (object_class, sizeof(GeditWindowPrivate));
}
Modified: trunk/gedit/gtksourceprintjob.c
==============================================================================
--- trunk/gedit/gtksourceprintjob.c (original)
+++ trunk/gedit/gtksourceprintjob.c Wed Jan 23 08:26:24 2008
@@ -265,14 +265,18 @@
_("Configuration options for "
"the print job"),
GNOME_TYPE_PRINT_CONFIG,
- G_PARAM_READWRITE));
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS));
+
g_object_class_install_property (object_class,
PROP_BUFFER,
g_param_spec_object ("buffer",
_("Source Buffer"),
_("GtkSourceBuffer object to print"),
GTK_TYPE_SOURCE_BUFFER,
- G_PARAM_READWRITE));
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS));
+
g_object_class_install_property (object_class,
PROP_TABS_WIDTH,
g_param_spec_uint ("tabs_width",
@@ -280,7 +284,9 @@
_("Width in equivalent space "
"characters of tabs"),
0, 100, 8,
- G_PARAM_READWRITE));
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS));
+
g_object_class_install_property (object_class,
PROP_WRAP_MODE,
g_param_spec_enum ("wrap_mode",
@@ -288,7 +294,9 @@
_("Word wrapping mode"),
GTK_TYPE_WRAP_MODE,
GTK_WRAP_NONE,
- G_PARAM_READWRITE));
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS));
+
g_object_class_install_property (object_class,
PROP_HIGHLIGHT,
g_param_spec_boolean ("highlight",
@@ -297,7 +305,9 @@
"document with highlighted "
"syntax"),
TRUE,
- G_PARAM_READWRITE));
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS));
+
g_object_class_install_property (object_class,
PROP_FONT,
g_param_spec_string ("font",
@@ -305,7 +315,9 @@
_("GnomeFont name to use for the "
"document text (deprecated)"),
NULL,
- G_PARAM_READWRITE));
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS));
+
g_object_class_install_property (object_class,
PROP_FONT_DESC,
g_param_spec_boxed ("font_desc",
@@ -313,7 +325,9 @@
_("Font to use for the document text "
"(e.g. \"Monospace 10\")"),
PANGO_TYPE_FONT_DESCRIPTION,
- G_PARAM_READWRITE));
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS));
+
g_object_class_install_property (object_class,
PROP_NUMBERS_FONT,
g_param_spec_string ("numbers_font",
@@ -321,7 +335,9 @@
_("GnomeFont name to use for the "
"line numbers (deprecated)"),
NULL,
- G_PARAM_READWRITE));
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS));
+
g_object_class_install_property (object_class,
PROP_NUMBERS_FONT_DESC,
g_param_spec_boxed ("numbers_font_desc",
@@ -329,7 +345,9 @@
_("Font description to use for the "
"line numbers"),
PANGO_TYPE_FONT_DESCRIPTION,
- G_PARAM_READWRITE));
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS));
+
g_object_class_install_property (object_class,
PROP_PRINT_NUMBERS,
g_param_spec_uint ("print_numbers",
@@ -337,7 +355,9 @@
_("Interval of printed line numbers "
"(0 means no numbers)"),
0, 100, 1,
- G_PARAM_READWRITE));
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS));
+
g_object_class_install_property (object_class,
PROP_PRINT_HEADER,
g_param_spec_boolean ("print_header",
@@ -345,7 +365,9 @@
_("Whether to print a header "
"in each page"),
FALSE,
- G_PARAM_READWRITE));
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS));
+
g_object_class_install_property (object_class,
PROP_PRINT_FOOTER,
g_param_spec_boolean ("print_footer",
@@ -353,7 +375,9 @@
_("Whether to print a footer "
"in each page"),
FALSE,
- G_PARAM_READWRITE));
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS));
+
g_object_class_install_property (object_class,
PROP_HEADER_FOOTER_FONT,
g_param_spec_string ("header_footer_font",
@@ -361,7 +385,9 @@
_("GnomeFont name to use for the header "
"and footer (deprecated)"),
NULL,
- G_PARAM_READWRITE));
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS));
+
g_object_class_install_property (object_class,
PROP_HEADER_FOOTER_FONT_DESC,
g_param_spec_boxed ("header_footer_font_desc",
@@ -369,8 +395,9 @@
_("Font to use for headers and footers "
"(e.g. \"Monospace 10\")"),
PANGO_TYPE_FONT_DESCRIPTION,
- G_PARAM_READWRITE));
-
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS));
+
print_job_signals [BEGIN_PAGE] =
g_signal_new ("begin_page",
G_OBJECT_CLASS_TYPE (object_class),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]