Skip to content

Commit

Permalink
RDP: fix color depth settings (32bpp separate from RemoteFX)
Browse files Browse the repository at this point in the history
  • Loading branch information
awakecoding committed Jan 24, 2012
1 parent 15bde38 commit aaeaebe
Show file tree
Hide file tree
Showing 38 changed files with 159 additions and 159 deletions.
2 changes: 1 addition & 1 deletion remmina-plugins/nx/nx_session_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ static gboolean remmina_nx_session_manager_main(RemminaProtocolWidget *gp)
GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, "%s",
remmina_nx_session_get_error (gpdata->nx));
remmina_nx_session_clear_error (gpdata->nx);
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_dialog_run (GTK_DIALOG(dialog));
gtk_widget_destroy (dialog);
remmina_nx_session_manager_send_signal (gpdata, 0);
}
Expand Down
2 changes: 1 addition & 1 deletion remmina-plugins/po/bg.po
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ msgid "Refresh"
msgstr "Презареждане"

#: ../rdp/remminapluginrdp.c:529
msgid "RDP - Windows Terminal Service"
msgid "RDP - Remote Desktop Protocol"
msgstr "RDP - Терминална услуга на Windows"

#: ../rdp/remminapluginrdp.c:551
Expand Down
4 changes: 2 additions & 2 deletions remmina-plugins/po/cs.po
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ msgid "Refresh"
msgstr "Obnovit"

#: ../rdp/remminapluginrdp.c:529
msgid "RDP - Windows Terminal Service"
msgstr "RDP - Windows Terminal Service"
msgid "RDP - Remote Desktop Protocol"
msgstr "RDP - Remote Desktop Protocol"

#: ../rdp/remminapluginrdp.c:551
msgid "RDP - RDP File Handler"
Expand Down
4 changes: 2 additions & 2 deletions remmina-plugins/po/da.po
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ msgid "Refresh"
msgstr "Opdatér"

#: ../rdp/remminapluginrdp.c:529
msgid "RDP - Windows Terminal Service"
msgstr "RDP - Windows Terminal Service"
msgid "RDP - Remote Desktop Protocol"
msgstr "RDP - Remote Desktop Protocol"

#: ../rdp/remminapluginrdp.c:551
msgid "RDP - RDP File Handler"
Expand Down
2 changes: 1 addition & 1 deletion remmina-plugins/po/de.po
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ msgid "Refresh"
msgstr ""

#: ../rdp/remminapluginrdp.c:529
msgid "RDP - Windows Terminal Service"
msgid "RDP - Remote Desktop Protocol"
msgstr "RDP - Windows Terminal Dienst"

#: ../rdp/remminapluginrdp.c:551
Expand Down
4 changes: 2 additions & 2 deletions remmina-plugins/po/el.po
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ msgid "Refresh"
msgstr ""

#: ../rdp/remminapluginrdp.c:529
msgid "RDP - Windows Terminal Service"
msgstr "RDP - Windows Terminal Service"
msgid "RDP - Remote Desktop Protocol"
msgstr "RDP - Remote Desktop Protocol"

#: ../rdp/remminapluginrdp.c:551
msgid "RDP - RDP File Handler"
Expand Down
2 changes: 1 addition & 1 deletion remmina-plugins/po/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ msgid "Refresh"
msgstr "Actualizar"

#: ../rdp/remminapluginrdp.c:529
msgid "RDP - Windows Terminal Service"
msgid "RDP - Remote Desktop Protocol"
msgstr "RDP - Protocolo de Escritorio Remoto de Windows"

#: ../rdp/remminapluginrdp.c:551
Expand Down
2 changes: 1 addition & 1 deletion remmina-plugins/po/eu.po
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ msgid "Refresh"
msgstr ""

#: ../rdp/remminapluginrdp.c:529
msgid "RDP - Windows Terminal Service"
msgid "RDP - Remote Desktop Protocol"
msgstr "RDP - Windows-eko terminal zerbitzua"

#: ../rdp/remminapluginrdp.c:551
Expand Down
4 changes: 2 additions & 2 deletions remmina-plugins/po/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ msgid "Refresh"
msgstr "Actualiser"

#: ../rdp/remminapluginrdp.c:529
msgid "RDP - Windows Terminal Service"
msgstr "RDP - Windows Terminal Service"
msgid "RDP - Remote Desktop Protocol"
msgstr "RDP - Remote Desktop Protocol"

#: ../rdp/remminapluginrdp.c:551
msgid "RDP - RDP File Handler"
Expand Down
2 changes: 1 addition & 1 deletion remmina-plugins/po/hu.po
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ msgid "Refresh"
msgstr "Frissít"

#: ../rdp/remminapluginrdp.c:529
msgid "RDP - Windows Terminal Service"
msgid "RDP - Remote Desktop Protocol"
msgstr "RDP - Windows Terminál Szolgáltatás"

#: ../rdp/remminapluginrdp.c:551
Expand Down
4 changes: 2 additions & 2 deletions remmina-plugins/po/id.po
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ msgid "Refresh"
msgstr ""

#: ../rdp/remminapluginrdp.c:529
msgid "RDP - Windows Terminal Service"
msgstr "RDP - Windows Terminal Service"
msgid "RDP - Remote Desktop Protocol"
msgstr "RDP - Remote Desktop Protocol"

#: ../rdp/remminapluginrdp.c:551
msgid "RDP - RDP File Handler"
Expand Down
4 changes: 2 additions & 2 deletions remmina-plugins/po/it.po
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ msgid "Refresh"
msgstr "Aggiorna"

#: ../rdp/remminapluginrdp.c:529
msgid "RDP - Windows Terminal Service"
msgstr "RDP - Windows Terminal Service"
msgid "RDP - Remote Desktop Protocol"
msgstr "RDP - Remote Desktop Protocol"

#: ../rdp/remminapluginrdp.c:551
msgid "RDP - RDP File Handler"
Expand Down
2 changes: 1 addition & 1 deletion remmina-plugins/po/kk.po
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ msgid "Refresh"
msgstr "Жаңарту"

#: ../rdp/remminapluginrdp.c:529
msgid "RDP - Windows Terminal Service"
msgid "RDP - Remote Desktop Protocol"
msgstr "RDP - Windows терминалдар қызметі"

#: ../rdp/remminapluginrdp.c:551
Expand Down
2 changes: 1 addition & 1 deletion remmina-plugins/po/lt.po
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ msgid "Refresh"
msgstr "Atnaujinti"

#: ../rdp/remminapluginrdp.c:529
msgid "RDP - Windows Terminal Service"
msgid "RDP - Remote Desktop Protocol"
msgstr "RDP - Windows terminalų paslauga"

#: ../rdp/remminapluginrdp.c:551
Expand Down
4 changes: 2 additions & 2 deletions remmina-plugins/po/nl.po
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ msgid "Refresh"
msgstr "Vernieuwen"

#: ../rdp/remminapluginrdp.c:529
msgid "RDP - Windows Terminal Service"
msgstr "RDP - Windows Terminal Service"
msgid "RDP - Remote Desktop Protocol"
msgstr "RDP - Remote Desktop Protocol"

#: ../rdp/remminapluginrdp.c:551
msgid "RDP - RDP File Handler"
Expand Down
2 changes: 1 addition & 1 deletion remmina-plugins/po/pl.po
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ msgid "Refresh"
msgstr "Odśwież"

#: ../rdp/remminapluginrdp.c:529
msgid "RDP - Windows Terminal Service"
msgid "RDP - Remote Desktop Protocol"
msgstr "RDP - Terminal graficzny sytemu Windows"

#: ../rdp/remminapluginrdp.c:551
Expand Down
2 changes: 1 addition & 1 deletion remmina-plugins/po/pt_BR.po
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ msgid "Refresh"
msgstr "Recarregar"

#: ../rdp/remminapluginrdp.c:529
msgid "RDP - Windows Terminal Service"
msgid "RDP - Remote Desktop Protocol"
msgstr "RDP - Terminal Service de Windows"

#: ../rdp/remminapluginrdp.c:551
Expand Down
2 changes: 1 addition & 1 deletion remmina-plugins/po/pt_PT.po
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ msgid "Refresh"
msgstr ""

#: ../rdp/remminapluginrdp.c:529
msgid "RDP - Windows Terminal Service"
msgid "RDP - Remote Desktop Protocol"
msgstr "RDP - Serviço de Terminal Windows"

#: ../rdp/remminapluginrdp.c:551
Expand Down
2 changes: 1 addition & 1 deletion remmina-plugins/po/ru.po
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ msgid "Refresh"
msgstr "Обновить"

#: ../rdp/remminapluginrdp.c:529
msgid "RDP - Windows Terminal Service"
msgid "RDP - Remote Desktop Protocol"
msgstr "RDP - служба терминалов Windows"

#: ../rdp/remminapluginrdp.c:551
Expand Down
2 changes: 1 addition & 1 deletion remmina-plugins/po/sk.po
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ msgid "Refresh"
msgstr "Znovunačítanie"

#: ../rdp/remminapluginrdp.c:529
msgid "RDP - Windows Terminal Service"
msgid "RDP - Remote Desktop Protocol"
msgstr "RDP - Terminálová služba Windows"

#: ../rdp/remminapluginrdp.c:551
Expand Down
4 changes: 2 additions & 2 deletions remmina-plugins/po/sv.po
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ msgid "Refresh"
msgstr ""

#: ../rdp/remminapluginrdp.c:529
msgid "RDP - Windows Terminal Service"
msgstr "RDP - Windows Terminal Service"
msgid "RDP - Remote Desktop Protocol"
msgstr "RDP - Remote Desktop Protocol"

#: ../rdp/remminapluginrdp.c:551
msgid "RDP - RDP File Handler"
Expand Down
2 changes: 1 addition & 1 deletion remmina-plugins/po/th.po
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ msgid "Refresh"
msgstr "เรียกใหม่"

#: ../rdp/remminapluginrdp.c:529
msgid "RDP - Windows Terminal Service"
msgid "RDP - Remote Desktop Protocol"
msgstr "RDP - บริการเทอร์มินัลของวินโดวส์"

#: ../rdp/remminapluginrdp.c:551
Expand Down
2 changes: 1 addition & 1 deletion remmina-plugins/po/tr.po
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ msgid "Refresh"
msgstr "Yenile"

#: ../rdp/remminapluginrdp.c:529
msgid "RDP - Windows Terminal Service"
msgid "RDP - Remote Desktop Protocol"
msgstr "RDP - Windows Uzak Masaüstü"

#: ../rdp/remminapluginrdp.c:551
Expand Down
2 changes: 1 addition & 1 deletion remmina-plugins/po/uk.po
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ msgid "Refresh"
msgstr "Оновити"

#: ../rdp/remminapluginrdp.c:529
msgid "RDP - Windows Terminal Service"
msgid "RDP - Remote Desktop Protocol"
msgstr "RDP - Служба терміналів Windows"

#: ../rdp/remminapluginrdp.c:551
Expand Down
2 changes: 1 addition & 1 deletion remmina-plugins/po/zh_CN.po
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ msgid "Refresh"
msgstr "刷新"

#: ../rdp/remminapluginrdp.c:529
msgid "RDP - Windows Terminal Service"
msgid "RDP - Remote Desktop Protocol"
msgstr "RDP - Windows终端服务"

#: ../rdp/remminapluginrdp.c:551
Expand Down
59 changes: 31 additions & 28 deletions remmina-plugins/rdp/rdp_plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ void rf_uninit(RemminaProtocolWidget* gp)

if (rfi->rfx_context)
{
rfx_context_free (rfi->rfx_context);
rfx_context_free(rfi->rfx_context);
rfi->rfx_context = NULL;
}
}
Expand Down Expand Up @@ -321,9 +321,8 @@ static boolean remmina_rdp_pre_connect(freerdp* instance)
settings->order_support[NEG_ELLIPSE_SC_INDEX] = False;
settings->order_support[NEG_ELLIPSE_CB_INDEX] = False;

if (settings->color_depth == 32)
if (settings->rfx_codec == True)
{
settings->rfx_codec = True;
settings->frame_acknowledge = False;
settings->large_pointer = True;
settings->performance_flags = PERF_FLAG_NONE;
Expand Down Expand Up @@ -447,10 +446,10 @@ static boolean remmina_rdp_post_connect(freerdp* instance)

static boolean remmina_rdp_authenticate(freerdp* instance, char** username, char** password, char** domain)
{
gchar *s;
gchar* s;
gint ret;
RemminaProtocolWidget* gp;
rfContext* rfi;
RemminaProtocolWidget* gp;

rfi = (rfContext*) instance->context;
gp = rfi->protocol_widget;
Expand Down Expand Up @@ -632,9 +631,16 @@ static gboolean remmina_rdp_main(RemminaProtocolWidget* gp)
g_free(s);
rfi->settings->port = port;

rfi->settings->color_depth = remmina_plugin_service->file_get_int(remminafile, "colordepth", 8);
rfi->settings->width = remmina_plugin_service->file_get_int(remminafile, "resolution_width", 640);
rfi->settings->height = remmina_plugin_service->file_get_int(remminafile, "resolution_height", 480);
rfi->settings->color_depth = remmina_plugin_service->file_get_int(remminafile, "colordepth", 0);

if (rfi->settings->color_depth == 0)
{
rfi->settings->rfx_codec = True;
rfi->settings->color_depth = 32;
}

rfi->settings->width = remmina_plugin_service->file_get_int(remminafile, "resolution_width", 1024);
rfi->settings->height = remmina_plugin_service->file_get_int(remminafile, "resolution_height", 768);
remmina_plugin_service->protocol_plugin_set_width(gp, rfi->settings->width);
remmina_plugin_service->protocol_plugin_set_height(gp, rfi->settings->height);

Expand Down Expand Up @@ -662,7 +668,7 @@ static gboolean remmina_rdp_main(RemminaProtocolWidget* gp)
}
else
{
strncpy(rfi->settings->client_hostname, g_get_host_name(), sizeof (rfi->settings->client_hostname) - 1);
strncpy(rfi->settings->client_hostname, g_get_host_name(), sizeof(rfi->settings->client_hostname) - 1);
}

if (remmina_plugin_service->file_get_string(remminafile, "exec"))
Expand Down Expand Up @@ -861,7 +867,7 @@ static void remmina_rdp_init(RemminaProtocolWidget* gp)
instance->ReceiveChannelData = remmina_rdp_receive_channel_data;

instance->context_size = sizeof(rfContext);
freerdp_context_new (instance);
freerdp_context_new(instance);
rfi = (rfContext*) instance->context;

g_object_set_data_full(G_OBJECT(gp), "plugin-data", rfi, xfree);
Expand Down Expand Up @@ -911,24 +917,20 @@ static gboolean remmina_rdp_close_connection(RemminaProtocolWidget* gp)
pthread_join(rfi->thread, NULL);
}

if (rfi->channels && rfi->instance)
{
freerdp_channels_close(rfi->channels, rfi->instance);
}

if (rfi->instance)
{
if (rfi->channels)
{
//freerdp_channels_close(rfi->channels, rfi->instance);
freerdp_channels_free(rfi->channels);
rfi->channels = NULL;
}

freerdp_disconnect(rfi->instance);
freerdp_free(rfi->instance);
rfi->instance = NULL;
}

if (rfi->channels)
{
freerdp_channels_free(rfi->channels);
rfi->channels = NULL;
}

pthread_mutex_destroy(&rfi->mutex);

remmina_rdp_event_uninit(gp);
Expand Down Expand Up @@ -964,7 +966,7 @@ static void remmina_rdp_call_feature(RemminaProtocolWidget* gp, const RemminaPro
break;

case REMMINA_RDP_FEATURE_TOOL_REFRESH:
gtk_widget_queue_draw_area (rfi->drawing_area, 0, 0,
gtk_widget_queue_draw_area(rfi->drawing_area, 0, 0,
remmina_plugin_service->protocol_plugin_get_width(gp),
remmina_plugin_service->protocol_plugin_get_height(gp));
break;
Expand All @@ -976,11 +978,12 @@ static void remmina_rdp_call_feature(RemminaProtocolWidget* gp, const RemminaPro

static gpointer colordepth_list[] =
{
"8", N_("256 colors"),
"15", N_("High color (15 bit)"),
"16", N_("High color (16 bit)"),
"24", N_("True color (24 bit)"),
"32", N_("RemoteFX (32 bit)"),
"8", N_("256 colors (8 bpp)"),
"15", N_("High color (15 bpp)"),
"16", N_("High color (16 bpp)"),
"24", N_("True color (24 bpp)"),
"32", N_("True color (32 bpp)"),
"0", N_("RemoteFX (32 bpp)"),
NULL
};

Expand Down Expand Up @@ -1051,7 +1054,7 @@ static RemminaProtocolPlugin remmina_rdp =
{
REMMINA_PLUGIN_TYPE_PROTOCOL,
"RDP",
N_("RDP - Windows Terminal Service"),
N_("RDP - Remote Desktop Protocol"),
GETTEXT_PACKAGE,
VERSION,

Expand Down
Loading

0 comments on commit aaeaebe

Please sign in to comment.