summaryrefslogtreecommitdiff
path: root/sendto
diff options
context:
space:
mode:
Diffstat (limited to 'sendto')
-rw-r--r--sendto/caja-nste.c7
-rw-r--r--sendto/caja-sendto-command.c2
-rw-r--r--sendto/caja-sendto-module.c4
-rw-r--r--sendto/plugins/caja-burn/caja-burn.c5
-rw-r--r--sendto/plugins/emailclient/emailclient.c7
-rw-r--r--sendto/plugins/gajim/gajim.c7
-rw-r--r--sendto/plugins/pidgin/pidgin.c6
-rw-r--r--sendto/plugins/removable-devices/removable-devices.c5
-rw-r--r--sendto/plugins/upnp/upnp.c53
9 files changed, 65 insertions, 31 deletions
diff --git a/sendto/caja-nste.c b/sendto/caja-nste.c
index f730242..429b368 100644
--- a/sendto/caja-nste.c
+++ b/sendto/caja-nste.c
@@ -99,37 +99,31 @@ caja_nste_get_file_items (CajaMenuProvider *provider,
return items;
}
-
static void
caja_nste_menu_provider_iface_init (CajaMenuProviderIface *iface)
{
iface->get_file_items = caja_nste_get_file_items;
}
-
static void
caja_nste_instance_init (CajaNste *nste)
{
}
-
static void
caja_nste_class_init (CajaNsteClass *class)
{
parent_class = g_type_class_peek_parent (class);
}
-
static GType nste_type = 0;
-
GType
caja_nste_get_type (void)
{
return nste_type;
}
-
void
caja_nste_register_type (GTypeModule *module)
{
@@ -143,6 +137,7 @@ caja_nste_register_type (GTypeModule *module)
sizeof (CajaNste),
0,
(GInstanceInitFunc) caja_nste_instance_init,
+ NULL
};
static const GInterfaceInfo menu_provider_iface_info = {
diff --git a/sendto/caja-sendto-command.c b/sendto/caja-sendto-command.c
index e7d3698..8181db6 100644
--- a/sendto/caja-sendto-command.c
+++ b/sendto/caja-sendto-command.c
@@ -80,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
diff --git a/sendto/caja-sendto-module.c b/sendto/caja-sendto-module.c
index ed580ba..dc453ae 100644
--- a/sendto/caja-sendto-module.c
+++ b/sendto/caja-sendto-module.c
@@ -37,6 +37,10 @@ caja_module_initialize (GTypeModule*module)
{
g_print ("Initializing caja-sendto extension\n");
caja_nste_register_type (module);
+#ifdef ENABLE_NLS
+ bindtextdomain (GETTEXT_PACKAGE, MATELOCALEDIR);
+ bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+#endif /* ENABLE_NLS */
}
void
diff --git a/sendto/plugins/caja-burn/caja-burn.c b/sendto/plugins/caja-burn/caja-burn.c
index b9cbb53..80aa7d5 100644
--- a/sendto/plugins/caja-burn/caja-burn.c
+++ b/sendto/plugins/caja-burn/caja-burn.c
@@ -50,6 +50,11 @@ gboolean init (NstPlugin *plugin)
g_print ("Init caja burn plugin\n");
+#ifdef ENABLE_NLS
+ bindtextdomain (GETTEXT_PACKAGE, MATELOCALEDIR);
+ bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+#endif /* ENABLE_NLS */
+
it = gtk_icon_theme_get_default ();
gtk_icon_theme_append_search_path (it, DATADIR "/brasero/icons");
diff --git a/sendto/plugins/emailclient/emailclient.c b/sendto/plugins/emailclient/emailclient.c
index 4669df4..cfcf8a9 100644
--- a/sendto/plugins/emailclient/emailclient.c
+++ b/sendto/plugins/emailclient/emailclient.c
@@ -3,6 +3,7 @@
/*
* Copyright (C) 2004 Roberto Majadas <[email protected]>
* Copyright (C) 2012 Stefano Karapetsas <[email protected]>
+ * Copyright (C) 2012-2021 MATE developers.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -59,7 +60,6 @@ get_evo_cmd (void)
NULL};
guint i;
-
for (i = 0; cmds[i] != NULL; i++) {
tmp = g_find_program_in_path (cmds[i]);
if (tmp != NULL)
@@ -81,6 +81,11 @@ init (NstPlugin *plugin)
g_print ("Init email client plugin\n");
+#ifdef ENABLE_NLS
+ bindtextdomain (GETTEXT_PACKAGE, MATELOCALEDIR);
+ bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+#endif /* ENABLE_NLS */
+
app_info = g_app_info_get_default_for_uri_scheme ("mailto");
if (app_info) {
mail_cmd = g_strdup(g_app_info_get_executable (app_info));
diff --git a/sendto/plugins/gajim/gajim.c b/sendto/plugins/gajim/gajim.c
index 303f4ab..ffa5f91 100644
--- a/sendto/plugins/gajim/gajim.c
+++ b/sendto/plugins/gajim/gajim.c
@@ -262,6 +262,11 @@ init (NstPlugin *plugin)
{
g_print ("Init gajim plugin\n");
+#ifdef ENABLE_NLS
+ bindtextdomain (GETTEXT_PACKAGE, MATELOCALEDIR);
+ bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+#endif /* ENABLE_NLS */
+
/* connect to gajim dbus service */
jid_table = g_hash_table_new (g_str_hash, g_str_equal);
if (!init_dbus()) {
@@ -270,7 +275,6 @@ init (NstPlugin *plugin)
return TRUE;
}
-
static void
_set_pixbuf_from_status (const gchar *show, GdkPixbuf **pixbuf)
{
@@ -368,7 +372,6 @@ get_contacts_widget (NstPlugin *plugin)
gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (completion), renderer,
"pixbuf", 0, NULL);
-
store = gtk_list_store_new (2, GDK_TYPE_PIXBUF, G_TYPE_STRING);
if(!add_gajim_contacts_to_model (store)) {
gtk_widget_set_sensitive(entry, FALSE);
diff --git a/sendto/plugins/pidgin/pidgin.c b/sendto/plugins/pidgin/pidgin.c
index 14cd6a7..d06fd41 100644
--- a/sendto/plugins/pidgin/pidgin.c
+++ b/sendto/plugins/pidgin/pidgin.c
@@ -83,6 +83,11 @@ init (NstPlugin *plugin)
g_print ("Init pidgin plugin\n");
+#ifdef ENABLE_NLS
+ bindtextdomain (GETTEXT_PACKAGE, MATELOCALEDIR);
+ bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+#endif /* ENABLE_NLS */
+
error = NULL;
connection = dbus_g_bus_get (DBUS_BUS_SESSION, &error);
if(error != NULL) {
@@ -385,7 +390,6 @@ gboolean send_files (NstPlugin *plugin, GtkWidget *contact_widget,
ContactData *dat;
GValue val = {0,};
-
if (proxy == NULL)
return FALSE;
diff --git a/sendto/plugins/removable-devices/removable-devices.c b/sendto/plugins/removable-devices/removable-devices.c
index 1b09b19..0144be7 100644
--- a/sendto/plugins/removable-devices/removable-devices.c
+++ b/sendto/plugins/removable-devices/removable-devices.c
@@ -151,6 +151,11 @@ init (NstPlugin *plugin)
{
g_print ("Init removable-devices plugin\n");
+#ifdef ENABLE_NLS
+ bindtextdomain (GETTEXT_PACKAGE, MATELOCALEDIR);
+ bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+#endif /* ENABLE_NLS */
+
vol_monitor = g_volume_monitor_get ();
cb = gtk_combo_box_new ();
diff --git a/sendto/plugins/upnp/upnp.c b/sendto/plugins/upnp/upnp.c
index b7000c9..b770e37 100644
--- a/sendto/plugins/upnp/upnp.c
+++ b/sendto/plugins/upnp/upnp.c
@@ -87,25 +87,37 @@ check_required_actions (GUPnPServiceIntrospection *introspection)
}
static void
-get_introspection_cb (GUPnPServiceInfo *service_info,
- GUPnPServiceIntrospection *introspection, const GError *error,
- gpointer user_data)
+get_introspection_cb (GObject *source_object,
+ GAsyncResult *res,
+ gpointer user_data)
{
GUPnPDeviceInfo *device_info;
gchar *name;
const gchar *udn, *interface;
GtkTreeIter iter;
GUPnPContext *context;
+ GError *error = NULL;
device_info = GUPNP_DEVICE_INFO (user_data);
- if (introspection != NULL) {
- /* If introspection is available, make sure required actions
- * are implemented.
- */
- if (!check_required_actions (introspection))
- goto error;
- }
+ GUPnPServiceIntrospection *introspection =
+ gupnp_service_info_introspect_finish (GUPNP_SERVICE_INFO (GUPNP_SERVICE_INFO (source_object)),
+ res,
+ &error);
+ if (error) {
+ g_warning ("Failed to create introspection for '%s': %s",
+ gupnp_service_info_get_udn (GUPNP_SERVICE_INFO (source_object)),
+ error->message);
+ g_clear_error (&error);
+ goto error;
+ }
+
+ /* If introspection is available, make sure required actions
+ * are implemented.
+ */
+ if (!check_required_actions (introspection)) {
+ goto error;
+ }
udn = gupnp_device_info_get_udn (device_info);
if (G_UNLIKELY (udn == NULL))
@@ -129,10 +141,8 @@ get_introspection_cb (GUPnPServiceInfo *service_info,
-1);
g_free (name);
-
+ g_object_unref (introspection);
error:
- /* We don't need the proxy objects anymore */
- g_object_unref (service_info);
g_object_ref (device_info);
}
@@ -148,9 +158,10 @@ device_proxy_available_cb (GUPnPControlPoint *cp,
return;
}
- gupnp_service_info_get_introspection_async (info,
- get_introspection_cb,
- g_object_ref (proxy));
+ gupnp_service_info_introspect_async (info,
+ NULL,
+ get_introspection_cb,
+ g_object_ref (proxy));
}
static void
@@ -201,16 +212,17 @@ init (NstPlugin *plugin)
GtkCellRenderer *renderer;
char *upload_cmd;
+#ifdef ENABLE_NLS
+ bindtextdomain (GETTEXT_PACKAGE, MATELOCALEDIR);
+ bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+#endif /* ENABLE_NLS */
+
upload_cmd = g_find_program_in_path ("gupnp-upload");
if (upload_cmd == NULL)
return FALSE;
g_free (upload_cmd);
-#ifdef HAS_GUPNP_VERSION_1_2
context_manager = gupnp_context_manager_create (0);
-#else
- context_manager = gupnp_context_manager_new (NULL, 0);
-#endif
g_assert (context_manager != NULL);
g_signal_connect (context_manager, "context-available",
G_CALLBACK (on_context_available), NULL);
@@ -270,6 +282,7 @@ send_files (NstPlugin *plugin,
g_ptr_array_add (argv, "15"); /* discovery timeout (seconds) */
g_ptr_array_add (argv, "-e");
g_ptr_array_add (argv, interface);
+ g_ptr_array_add (argv, "-u");
g_ptr_array_add (argv, udn);
for (l = file_list ; l; l=l->next) {
gchar *file_path;