Commit 72fe1fe7 authored by Antenore Gatta's avatar Antenore Gatta

source code reformatted with astyle --indent=tab=4 -A1 *.[ch] (ANSI C style + TABS with 4 spaces)

parent 415e95e5
......@@ -220,7 +220,7 @@ static void remmina_on_startup(GApplication *app)
gtk_window_set_default_icon_name("remmina");
gtk_icon_theme_append_search_path (gtk_icon_theme_get_default (),
REMMINA_DATADIR G_DIR_SEPARATOR_S "icons");
REMMINA_DATADIR G_DIR_SEPARATOR_S "icons");
}
static gboolean remmina_on_local_cmdline (GApplication *app, gchar ***arguments, gint *exit_status)
......
......@@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*
* In addition, as a special exception, the copyright holders give
......
......@@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*
* In addition, as a special exception, the copyright holders give
......
......@@ -67,11 +67,11 @@ static void remmina_applet_menu_class_init(RemminaAppletMenuClass *klass)
{
TRACE_CALL("remmina_applet_menu_class_init");
remmina_applet_menu_signals[LAUNCH_ITEM_SIGNAL] = g_signal_new("launch-item", G_TYPE_FROM_CLASS(klass),
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET(RemminaAppletMenuClass, launch_item), NULL, NULL,
g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, G_TYPE_OBJECT);
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET(RemminaAppletMenuClass, launch_item), NULL, NULL,
g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, G_TYPE_OBJECT);
remmina_applet_menu_signals[EDIT_ITEM_SIGNAL] = g_signal_new("edit-item", G_TYPE_FROM_CLASS(klass),
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET(RemminaAppletMenuClass, edit_item), NULL, NULL,
g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, G_TYPE_OBJECT);
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET(RemminaAppletMenuClass, edit_item), NULL, NULL,
g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, G_TYPE_OBJECT);
}
static void remmina_applet_menu_init(RemminaAppletMenu *menu)
......@@ -90,7 +90,7 @@ static void remmina_applet_menu_on_item_activate(RemminaAppletMenuItem *menuitem
static GtkWidget*
remmina_applet_menu_add_group(GtkWidget *menu, const gchar *group, gint position, RemminaAppletMenuItem *menuitem,
GtkWidget **groupmenuitem)
GtkWidget **groupmenuitem)
{
TRACE_CALL("remmina_applet_menu_add_group");
GtkWidget *widget;
......@@ -101,9 +101,9 @@ remmina_applet_menu_add_group(GtkWidget *menu, const gchar *group, gint position
gtk_widget_show(widget);
image =
gtk_image_new_from_icon_name(
(menuitem->item_type == REMMINA_APPLET_MENU_ITEM_DISCOVERED ?
"folder-remote" : "folder"), GTK_ICON_SIZE_MENU);
gtk_image_new_from_icon_name(
(menuitem->item_type == REMMINA_APPLET_MENU_ITEM_DISCOVERED ?
"folder-remote" : "folder"), GTK_ICON_SIZE_MENU);
gtk_widget_show(image);
g_object_set_data_full(G_OBJECT(widget), "group", g_strdup(group), g_free);
......@@ -191,7 +191,7 @@ void remmina_applet_menu_add_item(RemminaAppletMenu *menu, RemminaAppletMenuItem
if (strcoll(p1, mstr) < 0)
{
submenu = remmina_applet_menu_add_group(submenu, p1, position, menuitem,
&groupmenuitem);
&groupmenuitem);
break;
}
}
......@@ -289,7 +289,8 @@ void remmina_applet_menu_populate(RemminaAppletMenu *menu)
g_snprintf(filename, sizeof(filename), "%s/%s", dirname, name);
menuitem = remmina_applet_menu_item_new(REMMINA_APPLET_MENU_ITEM_FILE, filename);
if (menuitem != NULL) {
if (menuitem != NULL)
{
remmina_applet_menu_add_item(menu, REMMINA_APPLET_MENU_ITEM(menuitem));
gtk_widget_show(menuitem);
}
......
/*
* Remmina - The GTK+ Remote Desktop Client
* Copyright (C) 2010 Vic Lee
* Copyright (C) 2010 Vic Lee
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -14,7 +14,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*
* In addition, as a special exception, the copyright holders give
......
......@@ -88,37 +88,37 @@ GtkWidget* remmina_applet_menu_item_new(RemminaAppletMenuItemType item_type, ...
switch (item_type)
{
case REMMINA_APPLET_MENU_ITEM_FILE:
item->filename = g_strdup(va_arg(ap, const gchar*));
case REMMINA_APPLET_MENU_ITEM_FILE:
item->filename = g_strdup(va_arg(ap, const gchar*));
/* Load the file */
gkeyfile = g_key_file_new();
/* Load the file */
gkeyfile = g_key_file_new();
if (!g_key_file_load_from_file(gkeyfile, item->filename, G_KEY_FILE_NONE, NULL))
{
g_key_file_free(gkeyfile);
va_end(ap);
return NULL;
}
if (!g_key_file_load_from_file(gkeyfile, item->filename, G_KEY_FILE_NONE, NULL))
{
g_key_file_free(gkeyfile);
va_end(ap);
return NULL;
}
item->name = g_key_file_get_string(gkeyfile, "remmina", "name", NULL);
item->group = g_key_file_get_string(gkeyfile, "remmina", "group", NULL);
item->protocol = g_key_file_get_string(gkeyfile, "remmina", "protocol", NULL);
item->server = g_key_file_get_string(gkeyfile, "remmina", "server", NULL);
item->ssh_enabled = g_key_file_get_boolean(gkeyfile, "remmina", "ssh_enabled", NULL);
item->name = g_key_file_get_string(gkeyfile, "remmina", "name", NULL);
item->group = g_key_file_get_string(gkeyfile, "remmina", "group", NULL);
item->protocol = g_key_file_get_string(gkeyfile, "remmina", "protocol", NULL);
item->server = g_key_file_get_string(gkeyfile, "remmina", "server", NULL);
item->ssh_enabled = g_key_file_get_boolean(gkeyfile, "remmina", "ssh_enabled", NULL);
g_key_file_free(gkeyfile);
break;
g_key_file_free(gkeyfile);
break;
case REMMINA_APPLET_MENU_ITEM_DISCOVERED:
item->name = g_strdup(va_arg(ap, const gchar *));
item->group = g_strdup(_("Discovered"));
item->protocol = g_strdup("VNC");
break;
case REMMINA_APPLET_MENU_ITEM_DISCOVERED:
item->name = g_strdup(va_arg(ap, const gchar *));
item->group = g_strdup(_("Discovered"));
item->protocol = g_strdup("VNC");
break;
case REMMINA_APPLET_MENU_ITEM_NEW:
item->name = g_strdup(_("New Connection"));
break;
case REMMINA_APPLET_MENU_ITEM_NEW:
item->name = g_strdup(_("New Connection"));
break;
}
va_end(ap);
......
/*
* Remmina - The GTK+ Remote Desktop Client
* Copyright (C) 2009-2010 Vic Lee
* Copyright (C) 2009-2010 Vic Lee
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -14,7 +14,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*
* In addition, as a special exception, the copyright holders give
......
/*
* Remmina - The GTK+ Remote Desktop Client
* Copyright (C) 2009-2010 Vic Lee
* Copyright (C) 2009-2010 Vic Lee
* Copyright (C) 2014-2015 Antenore Gatta, Fabio Castelli, Giovanni Panozzo
*
* This program is free software; you can redistribute it and/or modify
......@@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*
* In addition, as a special exception, the copyright holders give
......@@ -57,19 +57,19 @@ struct _RemminaAvahiPriv
static void
remmina_avahi_resolve_callback(
AvahiServiceResolver* r,
AVAHI_GCC_UNUSED AvahiIfIndex interface,
AVAHI_GCC_UNUSED AvahiProtocol protocol,
AvahiResolverEvent event,
const char* name,
const char* type,
const char* domain,
const char* host_name,
const AvahiAddress* address,
uint16_t port,
AvahiStringList* txt,
AvahiLookupResultFlags flags,
AVAHI_GCC_UNUSED void* userdata)
AvahiServiceResolver* r,
AVAHI_GCC_UNUSED AvahiIfIndex interface,
AVAHI_GCC_UNUSED AvahiProtocol protocol,
AvahiResolverEvent event,
const char* name,
const char* type,
const char* domain,
const char* host_name,
const AvahiAddress* address,
uint16_t port,
AvahiStringList* txt,
AvahiLookupResultFlags flags,
AVAHI_GCC_UNUSED void* userdata)
{
TRACE_CALL("remmina_avahi_resolve_callback");
gchar* key;
......@@ -82,25 +82,25 @@ remmina_avahi_resolve_callback(
switch (event)
{
case AVAHI_RESOLVER_FAILURE:
g_print("(remmina-applet avahi-resolver) Failed to resolve service '%s' of type '%s' in domain '%s': %s\n",
name, type, domain, avahi_strerror(avahi_client_errno(avahi_service_resolver_get_client(r))));
case AVAHI_RESOLVER_FAILURE:
g_print("(remmina-applet avahi-resolver) Failed to resolve service '%s' of type '%s' in domain '%s': %s\n",
name, type, domain, avahi_strerror(avahi_client_errno(avahi_service_resolver_get_client(r))));
break;
case AVAHI_RESOLVER_FOUND:
key = g_strdup_printf("%s,%s,%s", name, type, domain);
if (g_hash_table_lookup(ga->discovered_services, key))
{
g_free(key);
break;
}
value = g_strdup_printf("[%s]:%i", host_name, port);
g_hash_table_insert(ga->discovered_services, key, value);
/* key and value will be freed with g_free when the has table is freed */
case AVAHI_RESOLVER_FOUND:
key = g_strdup_printf("%s,%s,%s", name, type, domain);
if (g_hash_table_lookup(ga->discovered_services, key))
{
g_free(key);
break;
}
value = g_strdup_printf("[%s]:%i", host_name, port);
g_hash_table_insert(ga->discovered_services, key, value);
/* key and value will be freed with g_free when the has table is freed */
g_print("(remmina-applet avahi-resolver) Added service '%s'\n", value);
g_print("(remmina-applet avahi-resolver) Added service '%s'\n", value);
break;
break;
}
avahi_service_resolver_free(r);
......@@ -108,15 +108,15 @@ remmina_avahi_resolve_callback(
static void
remmina_avahi_browse_callback(
AvahiServiceBrowser* b,
AvahiIfIndex interface,
AvahiProtocol protocol,
AvahiBrowserEvent event,
const char* name,
const char* type,
const char* domain,
AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
void* userdata)
AvahiServiceBrowser* b,
AvahiIfIndex interface,
AvahiProtocol protocol,
AvahiBrowserEvent event,
const char* name,
const char* type,
const char* domain,
AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
void* userdata)
{
TRACE_CALL("remmina_avahi_browse_callback");
gchar* key;
......@@ -128,40 +128,40 @@ remmina_avahi_browse_callback(
switch (event)
{
case AVAHI_BROWSER_FAILURE:
g_print("(remmina-applet avahi-browser) %s\n",
avahi_strerror(avahi_client_errno (avahi_service_browser_get_client (b))));
return;
case AVAHI_BROWSER_NEW:
key = g_strdup_printf("%s,%s,%s", name, type, domain);
if (g_hash_table_lookup(ga->discovered_services, key))
{
g_free(key);
break;
}
g_free(key);
g_print("(remmina-applet avahi-browser) Found service '%s' of type '%s' in domain '%s'\n", name, type, domain);
if (!(avahi_service_resolver_new(ga->priv->client, interface, protocol, name, type, domain,
AVAHI_PROTO_UNSPEC, 0, remmina_avahi_resolve_callback, ga)))
{
g_print("(remmina-applet avahi-browser) Failed to resolve service '%s': %s\n",
name, avahi_strerror(avahi_client_errno (ga->priv->client)));
}
break;
case AVAHI_BROWSER_FAILURE:
g_print("(remmina-applet avahi-browser) %s\n",
avahi_strerror(avahi_client_errno (avahi_service_browser_get_client (b))));
return;
case AVAHI_BROWSER_REMOVE:
g_print("(remmina-applet avahi-browser) Removed service '%s' of type '%s' in domain '%s'\n", name, type, domain);
key = g_strdup_printf("%s,%s,%s", name, type, domain);
g_hash_table_remove(ga->discovered_services, key);
case AVAHI_BROWSER_NEW:
key = g_strdup_printf("%s,%s,%s", name, type, domain);
if (g_hash_table_lookup(ga->discovered_services, key))
{
g_free(key);
break;
case AVAHI_BROWSER_ALL_FOR_NOW:
case AVAHI_BROWSER_CACHE_EXHAUSTED:
break;
}
g_free(key);
g_print("(remmina-applet avahi-browser) Found service '%s' of type '%s' in domain '%s'\n", name, type, domain);
if (!(avahi_service_resolver_new(ga->priv->client, interface, protocol, name, type, domain,
AVAHI_PROTO_UNSPEC, 0, remmina_avahi_resolve_callback, ga)))
{
g_print("(remmina-applet avahi-browser) Failed to resolve service '%s': %s\n",
name, avahi_strerror(avahi_client_errno (ga->priv->client)));
}
break;
case AVAHI_BROWSER_REMOVE:
g_print("(remmina-applet avahi-browser) Removed service '%s' of type '%s' in domain '%s'\n", name, type, domain);
key = g_strdup_printf("%s,%s,%s", name, type, domain);
g_hash_table_remove(ga->discovered_services, key);
g_free(key);
break;
case AVAHI_BROWSER_ALL_FOR_NOW:
case AVAHI_BROWSER_CACHE_EXHAUSTED:
break;
}
}
......@@ -229,7 +229,7 @@ void remmina_avahi_start(RemminaAvahi* ga)
}
ga->priv->client = avahi_client_new(avahi_simple_poll_get(ga->priv->simple_poll), 0, remmina_avahi_client_callback, ga,
&error);
&error);
if (!ga->priv->client)
{
g_print("Failed to create client: %s\n", avahi_strerror(error));
......@@ -238,7 +238,7 @@ void remmina_avahi_start(RemminaAvahi* ga)
/* TODO: Customize the default domain here */
ga->priv->sb = avahi_service_browser_new(ga->priv->client, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, "_rfb._tcp", NULL, 0,
remmina_avahi_browse_callback, ga);
remmina_avahi_browse_callback, ga);
if (!ga->priv->sb)
{
g_print("Failed to create service browser: %s\n", avahi_strerror(avahi_client_errno(ga->priv->client)));
......
/*
* Remmina - The GTK+ Remote Desktop Client
* Copyright (C) 2009-2010 Vic Lee
* Copyright (C) 2009-2010 Vic Lee
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -14,7 +14,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*
* In addition, as a special exception, the copyright holders give
......
/*
* Remmina - The GTK+ Remote Desktop Client
* Copyright (C) 2009 - Vic Lee
* Copyright (C) 2009 - Vic Lee
* Copyright (C) 2014-2015 Antenore Gatta, Fabio Castelli, Giovanni Panozzo
*
* This program is free software; you can redistribute it and/or modify
......@@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*
* In addition, as a special exception, the copyright holders give
......@@ -53,8 +53,8 @@ static void remmina_chat_window_class_init(RemminaChatWindowClass* klass)
{
TRACE_CALL("remmina_chat_window_class_init");
remmina_chat_window_signals[SEND_SIGNAL] = g_signal_new("send", G_TYPE_FROM_CLASS(klass),
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET(RemminaChatWindowClass, send), NULL, NULL,
g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING);
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET(RemminaChatWindowClass, send), NULL, NULL,
g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING);
}
static void remmina_chat_window_init(RemminaChatWindow* window)
......@@ -88,7 +88,7 @@ static gboolean remmina_chat_window_scroll_proc(RemminaChatWindow* window)
}
static void remmina_chat_window_append_text(RemminaChatWindow* window, const gchar* name, const gchar* tagname,
const gchar* text)
const gchar* text)
{
TRACE_CALL("remmina_chat_window_append_text");
GtkTextBuffer* buffer;
......
/*
* Remmina - The GTK+ Remote Desktop Client
* Copyright (C) 2009 - Vic Lee
* Copyright (C) 2009 - Vic Lee
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -14,7 +14,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*
* In addition, as a special exception, the copyright holders give
......
This diff is collapsed.
......@@ -49,13 +49,15 @@ G_BEGIN_DECLS
typedef struct _RemminaConnectionWindowPriv RemminaConnectionWindowPriv;
typedef struct _RemminaConnectionWindow {
typedef struct _RemminaConnectionWindow
{
GtkWindow window;
RemminaConnectionWindowPriv* priv;
} RemminaConnectionWindow;
typedef struct _RemminaConnectionWindowClass {
typedef struct _RemminaConnectionWindowClass
{
GtkWindowClass parent_class;
} RemminaConnectionWindowClass;
......@@ -67,7 +69,7 @@ gboolean remmina_connection_window_open_from_filename(const gchar* filename);
/* Open a new connection window for a given RemminaFile struct. The struct will be freed after the call */
void remmina_connection_window_open_from_file(RemminaFile* remminafile);
GtkWidget* remmina_connection_window_open_from_file_full(RemminaFile* remminafile, GCallback disconnect_cb, gpointer data,
guint* handler);
guint* handler);
G_END_DECLS
......
/*
* Remmina - The GTK+ Remote Desktop Client
* Copyright (C) 2009 - Vic Lee
* Copyright (C) 2009 - Vic Lee
* Copyright (C) 2014-2015 Antenore Gatta, Fabio Castelli, Giovanni Panozzo
*
* This program is free software; you can redistribute it and/or modify
......@@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*
* In addition, as a special exception, the copyright holders give
......
/*
* Remmina - The GTK+ Remote Desktop Client
* Copyright (C) 2009 - Vic Lee
* Copyright (C) 2009 - Vic Lee
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -14,7 +14,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*
* In addition, as a special exception, the copyright holders give
......
......@@ -60,82 +60,84 @@ void remmina_exec_command(RemminaCommandType command, const gchar* data)
switch (command)
{
case REMMINA_COMMAND_MAIN:
mainwindow = remmina_main_get_window();
if (mainwindow)
{
gtk_window_present(mainwindow);
gtk_window_deiconify(GTK_WINDOW(mainwindow));
}
else
{
widget = remmina_main_new();
gtk_widget_show(widget);
}
break;
case REMMINA_COMMAND_PREF:
prefdialog = remmina_pref_dialog_get_dialog();
if (prefdialog)
{
gtk_window_present(GTK_WINDOW(prefdialog));
gtk_window_deiconify(GTK_WINDOW(prefdialog));
} else {
/* Create a new preference dialog */
widget = GTK_WIDGET(remmina_pref_dialog_new(atoi(data), NULL));
gtk_widget_show(widget);
}
break;
case REMMINA_COMMAND_MAIN:
mainwindow = remmina_main_get_window();
if (mainwindow)
{
gtk_window_present(mainwindow);
gtk_window_deiconify(GTK_WINDOW(mainwindow));
}
else
{
widget = remmina_main_new();
gtk_widget_show(widget);
}
break;
case REMMINA_COMMAND_NEW:
s1 = (data ? strchr(data, ',') : NULL);
if (s1)
{
s1 = g_strdup(data);
s2 = strchr(s1, ',');
*s2++ = '\0';
widget = remmina_file_editor_new_full(s2, s1);
g_free(s1);
}
else
{
widget = remmina_file_editor_new_full(NULL, data);
}
case REMMINA_COMMAND_PREF:
prefdialog = remmina_pref_dialog_get_dialog();
if (prefdialog)
{
gtk_window_present(GTK_WINDOW(prefdialog));
gtk_window_deiconify(GTK_WINDOW(prefdialog));
}
else
{
/* Create a new preference dialog */
widget = GTK_WIDGET(remmina_pref_dialog_new(atoi(data), NULL));
gtk_widget_show(widget);
break;
}
break;
case REMMINA_COMMAND_CONNECT:
remmina_connection_window_open_from_filename(data);
break;
case REMMINA_COMMAND_NEW:
s1 = (data ? strchr(data, ',') : NULL);
if (s1)
{
s1 = g_strdup(data);
s2 = strchr(s1, ',');
*s2++ = '\0';
widget = remmina_file_editor_new_full(s2, s1);
g_free(s1);
}
else
{
widget = remmina_file_editor_new_full(NULL, data);
}
gtk_widget_show(widget);
break;
case REMMINA_COMMAND_EDIT:
widget = remmina_file_editor_new_from_filename(data);
if (widget)
gtk_widget_show(widget);
break;
case REMMINA_COMMAND_CONNECT:
remmina_connection_window_open_from_filename(data);
break;
case REMMINA_COMMAND_ABOUT:
remmina_about_open(NULL);
break;
case REMMINA_COMMAND_EDIT:
widget = remmina_file_editor_new_from_filename(data);
if (widget)
gtk_widget_show(widget);
break;
case REMMINA_COMMAND_PLUGIN:
plugin = (RemminaEntryPlugin*) remmina_plugin_manager_get_plugin(REMMINA_PLUGIN_TYPE_ENTRY, data);
if (plugin)
{
plugin->entry_func();
}
else
{
widget = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,
_("Plugin %s is not registered."), data);
g_signal_connect(G_OBJECT(widget), "response", G_CALLBACK(gtk_widget_destroy), NULL);
gtk_widget_show(widget);
remmina_widget_pool_register(widget);
}
break;
case REMMINA_COMMAND_ABOUT:
remmina_about_open(NULL);
break;
case REMMINA_COMMAND_PLUGIN:
plugin = (RemminaEntryPlugin*) remmina_plugin_manager_get_plugin(REMMINA_PLUGIN_TYPE_ENTRY, data);
if (plugin)
{
plugin->entry_func();
}
else
{
widget = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,
_("Plugin %s is not registered."), data);
g_signal_connect(G_OBJECT(widget), "response", G_CALLBACK(gtk_widget_destroy), NULL);
gtk_widget_show(widget);
remmina_widget_pool_register(widget);
}
break;
default:
break;
default:
break;
}
}
/*
* Remmina - The GTK+ Remote Desktop Client
* Copyright (C) 2010 Vic Lee
* Copyright (C) 2010 Vic Lee
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -14,7 +14,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*
* In addition, as a special exception, the copyright holders give
......
......@@ -58,25 +58,26 @@ typedef struct _RemminaSetting
const RemminaSetting remmina_system_settings[] =
{
{ "resolution_width", REMMINA_SETTING_GROUP_NONE, FALSE },
{ "resolution_height", REMMINA_SETTING_GROUP_NONE, FALSE },
{ "resolution_width", REMMINA_SETTING_GROUP_NONE, FALSE },
{ "resolution_height", REMMINA_SETTING_GROUP_NONE, FALSE },
{ "username", REMMINA_SETTING_GROUP_CREDENTIAL, FALSE },
{ "password", REMMINA_SETTING_GROUP_CREDENTIAL, TRUE },
{ "cacert", REMMINA_SETTING_GROUP_CREDENTIAL, FALSE },
{ "cacrl", REMMINA_SETTING_GROUP_CREDENTIAL, FALSE },
{ "clientcert", REMMINA_SETTING_GROUP_CREDENTIAL, FALSE },
{ "clientkey", REMMINA_SETTING_GROUP_CREDENTIAL, FALSE },
{ "username", REMMINA_SETTING_GROUP_CREDENTIAL, FALSE },
{ "password", REMMINA_SETTING_GROUP_CREDENTIAL, TRUE },
{ "cacert", REMMINA_SETTING_GROUP_CREDENTIAL, FALSE },
{ "cacrl", REMMINA_SETTING_GROUP_CREDENTIAL, FALSE },
{ "clientcert", REMMINA_SETTING_GROUP_CREDENTIAL, FALSE },