[Xfce4-commits] r30287 - in libexo/trunk: exo exo-desktop-item-edit exo-mount exo-mount-notify python
Nick Schermer
nick at xfce.org
Sat Jul 11 22:42:55 CEST 2009
Author: nick
Date: 2009-07-11 20:42:55 +0000 (Sat, 11 Jul 2009)
New Revision: 30287
Modified:
libexo/trunk/exo-desktop-item-edit/main.c
libexo/trunk/exo-mount-notify/main.c
libexo/trunk/exo-mount/main.c
libexo/trunk/exo/exo-execute.c
libexo/trunk/exo/exo-icon-bar.c
libexo/trunk/exo/exo-icon-view.c
libexo/trunk/exo/exo-toolbars-editor.c
libexo/trunk/exo/exo-toolbars-view.c
libexo/trunk/python/exo.defs
Log:
Revert some unneeded (gchar *) casts when -Wwrite-strings is not used.
Modified: libexo/trunk/exo/exo-execute.c
===================================================================
--- libexo/trunk/exo/exo-execute.c 2009-07-11 20:41:36 UTC (rev 30286)
+++ libexo/trunk/exo/exo-execute.c 2009-07-11 20:42:55 UTC (rev 30287)
@@ -106,15 +106,15 @@
GError **error)
{
gchar *argv[5];
- gint argc = 0;
+ gint argc = 0;
g_return_val_if_fail (category != NULL, FALSE);
g_return_val_if_fail (GDK_IS_SCREEN (screen), FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
/* generate the argument vector */
- argv[argc++] = (gchar *) LIBEXECDIR "/exo-helper-" LIBEXO_VERSION_API;
- argv[argc++] = (gchar *) "--launch";
+ argv[argc++] = LIBEXECDIR "/exo-helper-" LIBEXO_VERSION_API;
+ argv[argc++] = "--launch";
argv[argc++] = (gchar *) category;
/* append parameter if given */
Modified: libexo/trunk/exo/exo-icon-bar.c
===================================================================
--- libexo/trunk/exo/exo-icon-bar.c 2009-07-11 20:41:36 UTC (rev 30286)
+++ libexo/trunk/exo/exo-icon-bar.c 2009-07-11 20:42:55 UTC (rev 30287)
@@ -1759,10 +1759,10 @@
/**
* exo_icon_bar_set_active:
* @icon_bar : An #ExoIconBar.
- * @index : An index in the model passed during construction,
+ * @idx : An index in the model passed during construction,
* or -1 to have no active item.
*
- * Sets the active item of @icon_bar to be the item at @index.
+ * Sets the active item of @icon_bar to be the item at @idx.
**/
void
exo_icon_bar_set_active (ExoIconBar *icon_bar,
Modified: libexo/trunk/exo/exo-icon-view.c
===================================================================
--- libexo/trunk/exo/exo-icon-view.c 2009-07-11 20:41:36 UTC (rev 30286)
+++ libexo/trunk/exo/exo-icon-view.c 2009-07-11 20:42:55 UTC (rev 30287)
@@ -7616,7 +7616,7 @@
{
static const GtkTargetEntry item_targets[] =
{
- { (gchar *) "GTK_TREE_MODEL_ROW", GTK_TARGET_SAME_WIDGET, 0, },
+ { "GTK_TREE_MODEL_ROW", GTK_TARGET_SAME_WIDGET, 0, },
};
g_return_if_fail (EXO_IS_ICON_VIEW (icon_view));
Modified: libexo/trunk/exo/exo-toolbars-editor.c
===================================================================
--- libexo/trunk/exo/exo-toolbars-editor.c 2009-07-11 20:41:36 UTC (rev 30286)
+++ libexo/trunk/exo/exo-toolbars-editor.c 2009-07-11 20:42:55 UTC (rev 30287)
@@ -97,7 +97,7 @@
static const GtkTargetEntry targets[] =
{
- { (gchar *) EXO_TOOLBARS_ITEM_TYPE, GTK_TARGET_SAME_APP, 0 },
+ { EXO_TOOLBARS_ITEM_TYPE, GTK_TARGET_SAME_APP, 0 },
};
Modified: libexo/trunk/exo/exo-toolbars-view.c
===================================================================
--- libexo/trunk/exo/exo-toolbars-view.c 2009-07-11 20:41:36 UTC (rev 30286)
+++ libexo/trunk/exo/exo-toolbars-view.c 2009-07-11 20:42:55 UTC (rev 30287)
@@ -174,7 +174,7 @@
static const GtkTargetEntry dst_targets[] =
{
- { (gchar *) EXO_TOOLBARS_ITEM_TYPE, GTK_TARGET_SAME_APP, 0 },
+ { EXO_TOOLBARS_ITEM_TYPE, GTK_TARGET_SAME_APP, 0 },
};
static GObjectClass *exo_toolbars_view_parent_class;
Modified: libexo/trunk/exo-desktop-item-edit/main.c
===================================================================
--- libexo/trunk/exo-desktop-item-edit/main.c 2009-07-11 20:41:36 UTC (rev 30286)
+++ libexo/trunk/exo-desktop-item-edit/main.c 2009-07-11 20:42:55 UTC (rev 30287)
@@ -125,7 +125,7 @@
g_thread_init (NULL);
/* initialize Gtk+ */
- if (!gtk_init_with_args (&argc, &argv, _("[FILE|FOLDER]"), option_entries, (gchar *)GETTEXT_PACKAGE, &error))
+ if (!gtk_init_with_args (&argc, &argv, _("[FILE|FOLDER]"), option_entries, GETTEXT_PACKAGE, &error))
{
/* determine the error message */
if (G_UNLIKELY (error != NULL))
Modified: libexo/trunk/exo-mount/main.c
===================================================================
--- libexo/trunk/exo-mount/main.c 2009-07-11 20:41:36 UTC (rev 30286)
+++ libexo/trunk/exo-mount/main.c 2009-07-11 20:42:55 UTC (rev 30287)
@@ -98,7 +98,7 @@
xfce_textdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR, "UTF-8");
/* initialize GTK+ */
- if (!gtk_init_with_args (&argc, &argv, (gchar *) "Xfce mount", entries, (gchar *) GETTEXT_PACKAGE, &err))
+ if (!gtk_init_with_args (&argc, &argv, "Xfce mount", entries, GETTEXT_PACKAGE, &err))
{
/* check if we have an error message */
if (G_LIKELY (err == NULL))
Modified: libexo/trunk/exo-mount-notify/main.c
===================================================================
--- libexo/trunk/exo-mount-notify/main.c 2009-07-11 20:41:36 UTC (rev 30286)
+++ libexo/trunk/exo-mount-notify/main.c 2009-07-11 20:42:55 UTC (rev 30287)
@@ -140,18 +140,19 @@
GIOChannel *channel;
GError *err = NULL;
gchar *message;
+ const gchar *display_name;
/* initialize the i18n support */
xfce_textdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR, "UTF-8");
/* initialize GTK+ */
- if (!gtk_init_with_args (&argc, &argv, (gchar *) "Xfce Mount Notify", entries, (gchar *) GETTEXT_PACKAGE, &err))
+ if (!gtk_init_with_args (&argc, &argv, "Xfce Mount Notify", entries, GETTEXT_PACKAGE, &err))
{
/* check if we have an error message */
if (G_LIKELY (err == NULL))
{
/* no error message, the GUI initialization failed */
- const gchar *display_name = gdk_get_display_arg_name ();
+ display_name = gdk_get_display_arg_name ();
g_fprintf (stderr, "exo-mount-notify: %s: %s\n", _("Failed to open display"), (display_name != NULL) ? display_name : " ");
}
else
@@ -180,7 +181,7 @@
/* icon defaults to "gnome-dev-harddisk" */
if (G_UNLIKELY (opt_icon == NULL || *opt_icon == '\0'))
- opt_icon = (gchar *) "gnome-dev-harddisk";
+ opt_icon = "gnome-dev-harddisk";
/* make sure that a device name was specified */
if (G_UNLIKELY (opt_name == NULL || *opt_name == '\0'))
Modified: libexo/trunk/python/exo.defs
===================================================================
--- libexo/trunk/python/exo.defs 2009-07-11 20:41:36 UTC (rev 30286)
+++ libexo/trunk/python/exo.defs 2009-07-11 20:42:55 UTC (rev 30287)
@@ -390,7 +390,7 @@
(c-name "exo_icon_bar_set_active")
(return-type "none")
(parameters
- '("gint" "index")
+ '("gint" "idx")
)
)
More information about the Xfce4-commits
mailing list