summaryrefslogtreecommitdiff
path: root/sendto/caja-sendto-command.c
diff options
context:
space:
mode:
Diffstat (limited to 'sendto/caja-sendto-command.c')
-rw-r--r--sendto/caja-sendto-command.c33
1 files changed, 20 insertions, 13 deletions
diff --git a/sendto/caja-sendto-command.c b/sendto/caja-sendto-command.c
index f1f7397..8181db6 100644
--- a/sendto/caja-sendto-command.c
+++ b/sendto/caja-sendto-command.c
@@ -21,9 +21,13 @@
* Author: Roberto Majadas <[email protected]>
*/
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <string.h>
#include <stdlib.h>
+#include <glib.h>
#include <glib/gi18n.h>
#include <glib/gstdio.h>
#include <gtk/gtk.h>
@@ -34,10 +38,8 @@
#define CAJA_SENDTO_STATUS_LABEL_TIMEOUT_SECONDS 10
#define UNINSTALLED_PLUGINDIR "plugins/removable-devices"
-#define UNINSTALLED_SOURCE "caja-sendto-command.c"
#define SOEXT ("." G_MODULE_SUFFIX)
-#define SOEXT_LEN (strlen (SOEXT))
enum {
COLUMN_ICON,
@@ -78,7 +80,7 @@ struct _NS_ui {
static const GOptionEntry entries[] = {
{ G_OPTION_REMAINING, '\0', 0, G_OPTION_ARG_FILENAME_ARRAY, &filenames, "Files to send", "[FILES...]" },
- { NULL }
+ { NULL, 0, 0, G_OPTION_ARG_NONE, NULL, NULL, NULL }
};
static void
@@ -315,8 +317,7 @@ send_button_cb (GtkWidget *widget, NS_ui *ui)
g_free (f);
} else {
if (!p->info->send_files (p, w, file_list)) {
- g_list_foreach (file_list, (GFunc) g_free, NULL);
- g_list_free (file_list);
+ g_list_free_full (file_list, g_free);
file_list = NULL;
return;
}
@@ -444,9 +445,13 @@ set_model_for_options_combobox (NS_ui *ui)
GTK_ICON_LOOKUP_USE_BUILTIN, NULL);
gtk_list_store_append (model, &iter);
gtk_list_store_set (model, &iter,
- COLUMN_ICON, pixbuf,
- COLUMN_DESCRIPTION, dgettext(p->info->gettext_package, p->info->description),
- -1);
+ COLUMN_ICON, pixbuf,
+#ifdef ENABLE_NLS
+ COLUMN_DESCRIPTION, g_dgettext (p->info->gettext_package, p->info->description),
+#else
+ COLUMN_DESCRIPTION, p->info->description,
+#endif /* ENABLE_NLS */
+ -1);
if (last_used != NULL && !strcmp(last_used, p->info->id)) {
option = i;
last_used_support_dirs = (p->info->capabilities & CAJA_CAPS_SEND_DIRECTORIES);
@@ -506,13 +511,13 @@ pack_entry_changed_cb (GObject *object, GParamSpec *spec, NS_ui *ui)
}
static void
-update_button_image (GtkSettings *settings,
- GParamSpec *spec,
- GtkWidget *widget)
+update_button_image (GtkSettings *gtk_settings,
+ GParamSpec *spec,
+ GtkWidget *widget)
{
gboolean show_images;
- g_object_get (settings, "gtk-button-images", &show_images, NULL);
+ g_object_get (gtk_settings, "gtk-button-images", &show_images, NULL);
if (show_images == FALSE)
gtk_widget_hide (widget);
else
@@ -798,9 +803,11 @@ int main (int argc, char **argv)
GOptionContext *context;
GError *error = NULL;
+#ifdef ENABLE_NLS
bindtextdomain (GETTEXT_PACKAGE, MATELOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
+#endif /* ENABLE_NLS */
context = g_option_context_new ("");
g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE);