Commit 782e26ae authored by Jean-Louis Dupond's avatar Jean-Louis Dupond

Fix deprecated functions

parent ed895f5e
...@@ -350,7 +350,7 @@ gboolean remmina_plugin_vnc_setcursor(RemminaProtocolWidget *gp) ...@@ -350,7 +350,7 @@ gboolean remmina_plugin_vnc_setcursor(RemminaProtocolWidget *gp)
cur = gdk_cursor_new_from_pixbuf(gdk_display_get_default(), gpdata->queuecursor_pixbuf, gpdata->queuecursor_x, cur = gdk_cursor_new_from_pixbuf(gdk_display_get_default(), gpdata->queuecursor_pixbuf, gpdata->queuecursor_x,
gpdata->queuecursor_y); gpdata->queuecursor_y);
gdk_window_set_cursor(gtk_widget_get_window(gpdata->drawing_area), cur); gdk_window_set_cursor(gtk_widget_get_window(gpdata->drawing_area), cur);
gdk_cursor_unref(cur); g_object_unref(cur);
g_object_unref(gpdata->queuecursor_pixbuf); g_object_unref(gpdata->queuecursor_pixbuf);
gpdata->queuecursor_pixbuf = NULL; gpdata->queuecursor_pixbuf = NULL;
} }
...@@ -1580,9 +1580,9 @@ static void remmina_plugin_vnc_on_realize(RemminaProtocolWidget *gp, gpointer da ...@@ -1580,9 +1580,9 @@ static void remmina_plugin_vnc_on_realize(RemminaProtocolWidget *gp, gpointer da
/* Hide local cursor (show a small dot instead) */ /* Hide local cursor (show a small dot instead) */
pixbuf = gdk_pixbuf_new_from_xpm_data(dot_cursor_xpm); pixbuf = gdk_pixbuf_new_from_xpm_data(dot_cursor_xpm);
cursor = gdk_cursor_new_from_pixbuf(gdk_display_get_default(), pixbuf, dot_cursor_x_hot, dot_cursor_y_hot); cursor = gdk_cursor_new_from_pixbuf(gdk_display_get_default(), pixbuf, dot_cursor_x_hot, dot_cursor_y_hot);
gdk_pixbuf_unref(pixbuf); g_object_unref(pixbuf);
gdk_window_set_cursor(gtk_widget_get_window(GTK_WIDGET(gp)), cursor); gdk_window_set_cursor(gtk_widget_get_window(GTK_WIDGET(gp)), cursor);
gdk_cursor_unref(cursor); g_object_unref(cursor);
} }
} }
......
...@@ -55,7 +55,7 @@ static gchar *remmina_option_plugin; ...@@ -55,7 +55,7 @@ static gchar *remmina_option_plugin;
static gboolean remmina_option_quit; static gboolean remmina_option_quit;
static gchar *remmina_option_server; static gchar *remmina_option_server;
static gchar *remmina_option_protocol; static gchar *remmina_option_protocol;
static gboolean remmina_option_icon; static gchar *remmina_option_icon;
static GOptionEntry remmina_options[] = static GOptionEntry remmina_options[] =
{ {
......
...@@ -128,14 +128,22 @@ static void remmina_connection_holder_create_fullscreen(RemminaConnectionHolder* ...@@ -128,14 +128,22 @@ static void remmina_connection_holder_create_fullscreen(RemminaConnectionHolder*
static void remmina_connection_window_class_init(RemminaConnectionWindowClass* klass) static void remmina_connection_window_class_init(RemminaConnectionWindowClass* klass)
{ {
gtk_rc_parse_string("style \"remmina-small-button-style\"\n" GtkCssProvider *provider;
provider = gtk_css_provider_new();
gtk_css_provider_load_from_data (provider,
"*.remmina-small-button\n"
"{\n" "{\n"
" GtkWidget::focus-padding = 0\n" " -GtkWidget::focus-padding = 0\n"
" GtkWidget::focus-line-width = 0\n" " -GtkWidget::focus-line-width = 0\n"
" xthickness = 0\n" " xthickness = 0\n"
" ythickness = 0\n" " ythickness = 0\n"
"}\n" "}\n",
"widget \"*.remmina-small-button\" style \"remmina-small-button-style\""); -1, NULL);
gtk_style_context_add_provider_for_screen (gdk_screen_get_default(),
GTK_STYLE_PROVIDER (provider),
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
g_object_unref(provider);
} }
static void remmina_connection_holder_disconnect(RemminaConnectionHolder* cnnhld) static void remmina_connection_holder_disconnect(RemminaConnectionHolder* cnnhld)
...@@ -150,14 +158,24 @@ static void remmina_connection_holder_disconnect(RemminaConnectionHolder* cnnhld ...@@ -150,14 +158,24 @@ static void remmina_connection_holder_disconnect(RemminaConnectionHolder* cnnhld
static void remmina_connection_holder_keyboard_grab(RemminaConnectionHolder* cnnhld) static void remmina_connection_holder_keyboard_grab(RemminaConnectionHolder* cnnhld)
{ {
DECLARE_CNNOBJ DECLARE_CNNOBJ
GdkDisplay *display;
GdkDeviceManager *manager;
GdkDevice *keyboard = NULL;
if (remmina_file_get_int(cnnobj->remmina_file, "keyboard_grab", FALSE)) display = gtk_widget_get_display(GTK_WIDGET(cnnhld->cnnwin));
{ manager = gdk_display_get_device_manager(display);
gdk_keyboard_grab(gtk_widget_get_window(GTK_WIDGET(cnnhld->cnnwin)), TRUE, GDK_CURRENT_TIME); keyboard = gdk_device_manager_get_client_pointer(manager);
}
else if (keyboard != NULL)
{ {
gdk_keyboard_ungrab(GDK_CURRENT_TIME); if (remmina_file_get_int(cnnobj->remmina_file, "keyboard_grab", FALSE))
{
gdk_device_grab(keyboard, gtk_widget_get_window(GTK_WIDGET(cnnhld->cnnwin)), GDK_OWNERSHIP_WINDOW, TRUE, GDK_KEY_PRESS | GDK_KEY_RELEASE, NULL, GDK_CURRENT_TIME);
}
else
{
gdk_device_ungrab(keyboard, GDK_CURRENT_TIME);
}
} }
} }
...@@ -245,7 +263,7 @@ static gboolean remmina_connection_holder_floating_toolbar_motion(RemminaConnect ...@@ -245,7 +263,7 @@ static gboolean remmina_connection_holder_floating_toolbar_motion(RemminaConnect
return FALSE; return FALSE;
} }
gtk_widget_size_request(priv->floating_toolbar, &req); gtk_widget_get_preferred_size(priv->floating_toolbar, &req, NULL);
gtk_window_get_position(GTK_WINDOW(priv->floating_toolbar), &x, &y); gtk_window_get_position(GTK_WINDOW(priv->floating_toolbar), &x, &y);
if (priv->floating_toolbar_motion_show || priv->floating_toolbar_motion_visible) if (priv->floating_toolbar_motion_show || priv->floating_toolbar_motion_visible)
...@@ -427,9 +445,9 @@ static void remmina_connection_object_init_adjustment(RemminaConnectionObject* c ...@@ -427,9 +445,9 @@ static void remmina_connection_object_init_adjustment(RemminaConnectionObject* c
screen_width = gdk_screen_get_width(screen); screen_width = gdk_screen_get_width(screen);
screen_height = gdk_screen_get_height(screen); screen_height = gdk_screen_get_height(screen);
adj = gtk_viewport_get_hadjustment(GTK_VIEWPORT(cnnobj->viewport)); adj = gtk_scrollable_get_hadjustment(GTK_SCROLLABLE(cnnobj->viewport));
gtk_adjustment_set_page_size(adj, screen_width); gtk_adjustment_set_page_size(adj, screen_width);
adj = gtk_viewport_get_vadjustment(GTK_VIEWPORT(cnnobj->viewport)); adj = gtk_scrollable_get_vadjustment(GTK_SCROLLABLE(cnnobj->viewport));
gtk_adjustment_set_page_size(adj, screen_height); gtk_adjustment_set_page_size(adj, screen_height);
} }
...@@ -763,14 +781,23 @@ static void remmina_connection_holder_scale_option_on_scaled(GtkWidget* widget, ...@@ -763,14 +781,23 @@ static void remmina_connection_holder_scale_option_on_scaled(GtkWidget* widget,
static void remmina_connection_holder_scale_option_popdown(RemminaConnectionHolder* cnnhld) static void remmina_connection_holder_scale_option_popdown(RemminaConnectionHolder* cnnhld)
{ {
GdkDisplay *display;
GdkDeviceManager *manager;
GdkDevice *device = NULL;
RemminaConnectionWindowPriv* priv = cnnhld->cnnwin->priv; RemminaConnectionWindowPriv* priv = cnnhld->cnnwin->priv;
priv->sticky = FALSE; priv->sticky = FALSE;
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(priv->scale_option_button), FALSE); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(priv->scale_option_button), FALSE);
gdk_keyboard_ungrab(GDK_CURRENT_TIME); display = gtk_widget_get_display(GTK_WIDGET(cnnhld));
gdk_pointer_ungrab(GDK_CURRENT_TIME); manager = gdk_display_get_device_manager(display);
device = gdk_device_manager_get_client_pointer(manager);
if (device != NULL)
{
gdk_device_ungrab(device, GDK_CURRENT_TIME);
}
if (scale_option_window) if (scale_option_window)
{ {
gtk_grab_remove(scale_option_window); gtk_grab_remove(scale_option_window);
...@@ -813,6 +840,9 @@ static void remmina_connection_holder_toolbar_scale_option(GtkWidget* widget, Re ...@@ -813,6 +840,9 @@ static void remmina_connection_holder_toolbar_scale_option(GtkWidget* widget, Re
GtkWidget* eventbox; GtkWidget* eventbox;
GtkWidget* frame; GtkWidget* frame;
GtkWidget* scaler; GtkWidget* scaler;
GdkDisplay* display;
GdkDevice* pointer;
GdkDeviceManager* device_manager;
gint x, y; gint x, y;
gboolean pushin; gboolean pushin;
...@@ -863,10 +893,12 @@ static void remmina_connection_holder_toolbar_scale_option(GtkWidget* widget, Re ...@@ -863,10 +893,12 @@ static void remmina_connection_holder_toolbar_scale_option(GtkWidget* widget, Re
gtk_widget_show(window); gtk_widget_show(window);
gtk_grab_add(window); gtk_grab_add(window);
gdk_pointer_grab(gtk_widget_get_window(window), TRUE, display = gdk_window_get_display(gtk_widget_get_window(window));
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK, NULL, NULL, device_manager = gdk_display_get_device_manager(display);
pointer = gdk_device_manager_get_client_pointer(device_manager);
gdk_device_grab(pointer, gtk_widget_get_window(window), GDK_OWNERSHIP_NONE, TRUE,
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK, NULL,
GDK_CURRENT_TIME); GDK_CURRENT_TIME);
gdk_keyboard_grab(gtk_widget_get_window(window), TRUE, GDK_CURRENT_TIME);
scale_option_window = window; scale_option_window = window;
priv->sticky = TRUE; priv->sticky = TRUE;
...@@ -1356,7 +1388,7 @@ static void remmina_connection_holder_showhide_toolbar(RemminaConnectionHolder* ...@@ -1356,7 +1388,7 @@ static void remmina_connection_holder_showhide_toolbar(RemminaConnectionHolder*
& GDK_WINDOW_STATE_MAXIMIZED) == 0) & GDK_WINDOW_STATE_MAXIMIZED) == 0)
{ {
gtk_window_get_size(GTK_WINDOW(cnnhld->cnnwin), &width, &height); gtk_window_get_size(GTK_WINDOW(cnnhld->cnnwin), &width, &height);
gtk_widget_size_request(priv->toolbar, &req); gtk_widget_get_preferred_size(priv->toolbar, &req, NULL);
if (remmina_pref.hide_connection_toolbar) if (remmina_pref.hide_connection_toolbar)
{ {
gtk_widget_hide(priv->toolbar); gtk_widget_hide(priv->toolbar);
...@@ -1444,10 +1476,20 @@ static gboolean remmina_connection_window_on_enter(GtkWidget* widget, GdkEventCr ...@@ -1444,10 +1476,20 @@ static gboolean remmina_connection_window_on_enter(GtkWidget* widget, GdkEventCr
static gboolean remmina_connection_window_on_leave(GtkWidget* widget, GdkEventCrossing* event, RemminaConnectionHolder* cnnhld) static gboolean remmina_connection_window_on_leave(GtkWidget* widget, GdkEventCrossing* event, RemminaConnectionHolder* cnnhld)
{ {
GdkDisplay *display;
GdkDeviceManager *manager;
GdkDevice *device = NULL;
if (event->detail == GDK_NOTIFY_VIRTUAL || event->detail == GDK_NOTIFY_NONLINEAR if (event->detail == GDK_NOTIFY_VIRTUAL || event->detail == GDK_NOTIFY_NONLINEAR
|| event->detail == GDK_NOTIFY_NONLINEAR_VIRTUAL) || event->detail == GDK_NOTIFY_NONLINEAR_VIRTUAL)
{ {
gdk_keyboard_ungrab(GDK_CURRENT_TIME); display = gtk_widget_get_display(widget);
manager = gdk_display_get_device_manager(display);
device = gdk_device_manager_get_client_pointer(manager);
if (device != NULL)
{
gdk_device_ungrab(device, GDK_CURRENT_TIME);
}
} }
return FALSE; return FALSE;
} }
...@@ -1531,7 +1573,7 @@ static gboolean remmina_connection_window_on_configure(GtkWidget* widget, GdkEve ...@@ -1531,7 +1573,7 @@ static gboolean remmina_connection_window_on_configure(GtkWidget* widget, GdkEve
if (priv->floating_toolbar) if (priv->floating_toolbar)
{ {
gtk_widget_size_request(priv->floating_toolbar, &req); gtk_widget_get_preferred_size(priv->floating_toolbar, &req, NULL);
gtk_window_get_position(GTK_WINDOW(priv->floating_toolbar), NULL, &y); gtk_window_get_position(GTK_WINDOW(priv->floating_toolbar), NULL, &y);
gtk_window_move(GTK_WINDOW(priv->floating_toolbar), event->x + MAX(0, (event->width - req.width) / 2), y); gtk_window_move(GTK_WINDOW(priv->floating_toolbar), event->x + MAX(0, (event->width - req.width) / 2), y);
...@@ -1579,14 +1621,14 @@ static void remmina_connection_holder_create_floating_toolbar(RemminaConnectionH ...@@ -1579,14 +1621,14 @@ static void remmina_connection_holder_create_floating_toolbar(RemminaConnectionH
/* This has to be a popup window to become visible in fullscreen mode */ /* This has to be a popup window to become visible in fullscreen mode */
window = gtk_window_new(GTK_WINDOW_POPUP); window = gtk_window_new(GTK_WINDOW_POPUP);
vbox = gtk_vbox_new(FALSE, 0); vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
gtk_widget_show(vbox); gtk_widget_show(vbox);
gtk_container_add(GTK_CONTAINER(window), vbox); gtk_container_add(GTK_CONTAINER(window), vbox);
widget = remmina_connection_holder_create_toolbar(cnnhld, mode); widget = remmina_connection_holder_create_toolbar(cnnhld, mode);
gtk_box_pack_start(GTK_BOX(vbox), widget, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(vbox), widget, FALSE, FALSE, 0);
hbox = gtk_hbox_new(FALSE, 0); hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
gtk_widget_show(hbox); gtk_widget_show(hbox);
gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
...@@ -1763,7 +1805,7 @@ static GtkWidget* remmina_connection_object_create_tab(RemminaConnectionObject* ...@@ -1763,7 +1805,7 @@ static GtkWidget* remmina_connection_object_create_tab(RemminaConnectionObject*
GtkWidget* widget; GtkWidget* widget;
GtkWidget* button; GtkWidget* button;
hbox = gtk_hbox_new(FALSE, 4); hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4);
gtk_widget_show(hbox); gtk_widget_show(hbox);
widget = gtk_image_new_from_icon_name(remmina_file_get_icon_name(cnnobj->remmina_file), GTK_ICON_SIZE_MENU); widget = gtk_image_new_from_icon_name(remmina_file_get_icon_name(cnnobj->remmina_file), GTK_ICON_SIZE_MENU);
...@@ -1920,10 +1962,14 @@ remmina_connection_holder_on_notebook_create_window(GtkNotebook* notebook, GtkWi ...@@ -1920,10 +1962,14 @@ remmina_connection_holder_on_notebook_create_window(GtkNotebook* notebook, GtkWi
RemminaConnectionWindow* dstcnnwin; RemminaConnectionWindow* dstcnnwin;
RemminaConnectionObject* cnnobj; RemminaConnectionObject* cnnobj;
gint srcpagenum; gint srcpagenum;
GdkDeviceManager* manager;
GdkDevice* device = NULL;
GdkWindow* window; GdkWindow* window;
srccnnwin = REMMINA_CONNECTION_WINDOW(gtk_widget_get_toplevel(GTK_WIDGET(notebook))); srccnnwin = REMMINA_CONNECTION_WINDOW(gtk_widget_get_toplevel(GTK_WIDGET(notebook)));
window = gdk_display_get_window_at_pointer(gdk_display_get_default(), &x, &y); manager = gdk_display_get_device_manager(gdk_display_get_default());
device = gdk_device_manager_get_client_pointer(manager);
window = gdk_device_get_window_at_position(device, &x, &y);
dstcnnwin = REMMINA_CONNECTION_WINDOW(remmina_widget_pool_find_by_window(REMMINA_TYPE_CONNECTION_WINDOW, window)); dstcnnwin = REMMINA_CONNECTION_WINDOW(remmina_widget_pool_find_by_window(REMMINA_TYPE_CONNECTION_WINDOW, window));
if (srccnnwin == dstcnnwin) if (srccnnwin == dstcnnwin)
...@@ -1985,7 +2031,7 @@ static void remmina_connection_holder_create_scrolled(RemminaConnectionHolder* c ...@@ -1985,7 +2031,7 @@ static void remmina_connection_holder_create_scrolled(RemminaConnectionHolder* c
cnnhld->cnnwin = REMMINA_CONNECTION_WINDOW(window); cnnhld->cnnwin = REMMINA_CONNECTION_WINDOW(window);
/* Create the vbox container */ /* Create the vbox container */
vbox = gtk_vbox_new(FALSE, 0); vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
gtk_widget_show(vbox); gtk_widget_show(vbox);
gtk_container_add(GTK_CONTAINER(window), vbox); gtk_container_add(GTK_CONTAINER(window), vbox);
......
...@@ -405,6 +405,9 @@ remmina_file_dup(RemminaFile *remminafile) ...@@ -405,6 +405,9 @@ remmina_file_dup(RemminaFile *remminafile)
void remmina_file_update_screen_resolution(RemminaFile *remminafile) void remmina_file_update_screen_resolution(RemminaFile *remminafile)
{ {
GdkDisplay *display;
GdkDeviceManager *device_manager;
GdkDevice *device;
GdkScreen *screen; GdkScreen *screen;
gchar *pos; gchar *pos;
gchar *resolution; gchar *resolution;
...@@ -415,7 +418,10 @@ void remmina_file_update_screen_resolution(RemminaFile *remminafile) ...@@ -415,7 +418,10 @@ void remmina_file_update_screen_resolution(RemminaFile *remminafile)
resolution = g_strdup(remmina_file_get_string(remminafile, "resolution")); resolution = g_strdup(remmina_file_get_string(remminafile, "resolution"));
if (resolution == NULL || strchr(resolution, 'x') == NULL) if (resolution == NULL || strchr(resolution, 'x') == NULL)
{ {
gdk_display_get_pointer(gdk_display_get_default(), &screen, &x, &y, NULL); display = gdk_display_get_default();
device_manager = gdk_display_get_device_manager(display);
device = gdk_device_manager_get_client_pointer(device_manager);
gdk_device_get_position(device, &screen, &x, &y);
monitor = gdk_screen_get_monitor_at_point(screen, x, y); monitor = gdk_screen_get_monitor_at_point(screen, x, y);
gdk_screen_get_monitor_geometry(screen, monitor, &rect); gdk_screen_get_monitor_geometry(screen, monitor, &rect);
remmina_file_set_int(remminafile, "resolution_width", rect.width); remmina_file_set_int(remminafile, "resolution_width", rect.width);
......
...@@ -195,7 +195,7 @@ static GtkWidget* remmina_file_editor_create_notebook_tab(RemminaFileEditor* gfe ...@@ -195,7 +195,7 @@ static GtkWidget* remmina_file_editor_create_notebook_tab(RemminaFileEditor* gfe
GtkWidget* table; GtkWidget* table;
GtkWidget* widget; GtkWidget* widget;
tablabel = gtk_hbox_new(FALSE, 0); tablabel = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
gtk_widget_show(tablabel); gtk_widget_show(tablabel);
widget = gtk_image_new_from_stock(stock_id, GTK_ICON_SIZE_MENU); widget = gtk_image_new_from_stock(stock_id, GTK_ICON_SIZE_MENU);
...@@ -206,7 +206,7 @@ static GtkWidget* remmina_file_editor_create_notebook_tab(RemminaFileEditor* gfe ...@@ -206,7 +206,7 @@ static GtkWidget* remmina_file_editor_create_notebook_tab(RemminaFileEditor* gfe
gtk_box_pack_start(GTK_BOX(tablabel), widget, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(tablabel), widget, FALSE, FALSE, 0);
gtk_widget_show(widget); gtk_widget_show(widget);
tabbody = gtk_vbox_new(FALSE, 0); tabbody = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
gtk_widget_show(tabbody); gtk_widget_show(tabbody);
gtk_notebook_append_page(GTK_NOTEBOOK(gfe->priv->config_container), tabbody, tablabel); gtk_notebook_append_page(GTK_NOTEBOOK(gfe->priv->config_container), tabbody, tablabel);
...@@ -354,7 +354,7 @@ static void remmina_file_editor_create_server(RemminaFileEditor* gfe, const Remm ...@@ -354,7 +354,7 @@ static void remmina_file_editor_create_server(RemminaFileEditor* gfe, const Remm
{ {
gfe->priv->avahi_service_type = (const gchar*) setting->opt1; gfe->priv->avahi_service_type = (const gchar*) setting->opt1;
hbox = gtk_hbox_new (FALSE, 0); hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_widget_show(hbox); gtk_widget_show(hbox);
gtk_box_pack_start (GTK_BOX (hbox), widget, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (hbox), widget, TRUE, TRUE, 0);
...@@ -433,7 +433,7 @@ static void remmina_file_editor_create_resolution(RemminaFileEditor* gfe, const ...@@ -433,7 +433,7 @@ static void remmina_file_editor_create_resolution(RemminaFileEditor* gfe, const
gtk_table_attach_defaults(GTK_TABLE(table), widget, 1, 2, row, row + 1); gtk_table_attach_defaults(GTK_TABLE(table), widget, 1, 2, row, row + 1);
gfe->priv->resolution_auto_radio = widget; gfe->priv->resolution_auto_radio = widget;
hbox = gtk_hbox_new(FALSE, 0); hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
gtk_widget_show(hbox); gtk_widget_show(hbox);
gtk_table_attach_defaults(GTK_TABLE(table), hbox, 1, 2, row + 1, row + 2); gtk_table_attach_defaults(GTK_TABLE(table), hbox, 1, 2, row + 1, row + 2);
...@@ -556,7 +556,7 @@ remmina_file_editor_create_chooser(RemminaFileEditor* gfe, GtkWidget* table, gin ...@@ -556,7 +556,7 @@ remmina_file_editor_create_chooser(RemminaFileEditor* gfe, GtkWidget* table, gin
gtk_misc_set_alignment(GTK_MISC(widget), 0.0, 0.5); gtk_misc_set_alignment(GTK_MISC(widget), 0.0, 0.5);
gtk_table_attach(GTK_TABLE(table), widget, col, col + 1, row, row + 1, GTK_FILL, 0, 0, 0); gtk_table_attach(GTK_TABLE(table), widget, col, col + 1, row, row + 1, GTK_FILL, 0, 0, 0);
hbox = gtk_hbox_new(FALSE, 0); hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
gtk_widget_show(hbox); gtk_widget_show(hbox);
gtk_table_attach_defaults(GTK_TABLE(table), hbox, col + 1, col + 2, row, row + 1); gtk_table_attach_defaults(GTK_TABLE(table), hbox, col + 1, col + 2, row, row + 1);
...@@ -594,7 +594,7 @@ static void remmina_file_editor_create_settings(RemminaFileEditor* gfe, GtkWidge ...@@ -594,7 +594,7 @@ static void remmina_file_editor_create_settings(RemminaFileEditor* gfe, GtkWidge
{ {
if (hbox == NULL) if (hbox == NULL)
{ {
hbox = gtk_hbox_new(TRUE, 0); hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
gtk_widget_show(hbox); gtk_widget_show(hbox);
gtk_table_attach_defaults(GTK_TABLE(table), hbox, 0, 2, row, row + 1); gtk_table_attach_defaults(GTK_TABLE(table), hbox, 0, 2, row, row + 1);
} }
...@@ -734,7 +734,7 @@ static void remmina_file_editor_create_ssh_tab(RemminaFileEditor* gfe, RemminaPr ...@@ -734,7 +734,7 @@ static void remmina_file_editor_create_ssh_tab(RemminaFileEditor* gfe, RemminaPr
table = remmina_file_editor_create_notebook_tab (gfe, GTK_STOCK_DIALOG_AUTHENTICATION, table = remmina_file_editor_create_notebook_tab (gfe, GTK_STOCK_DIALOG_AUTHENTICATION,
"SSH", 9, 3); "SSH", 9, 3);
hbox = gtk_hbox_new (TRUE, 0); hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_widget_show(hbox); gtk_widget_show(hbox);
gtk_table_attach_defaults (GTK_TABLE(table), hbox, 0, 3, 0, 1); gtk_table_attach_defaults (GTK_TABLE(table), hbox, 0, 3, 0, 1);
row++; row++;
......
...@@ -749,7 +749,7 @@ static void remmina_ftp_client_create_toolbar(RemminaFTPClient *client) ...@@ -749,7 +749,7 @@ static void remmina_ftp_client_create_toolbar(RemminaFTPClient *client)
GtkWidget *image; GtkWidget *image;
gint i = 0; gint i = 0;
box = gtk_hbutton_box_new(); box = gtk_button_box_new(GTK_ORIENTATION_HORIZONTAL);
gtk_widget_show(box); gtk_widget_show(box);
gtk_button_box_set_layout(GTK_BUTTON_BOX(box), GTK_BUTTONBOX_START); gtk_button_box_set_layout(GTK_BUTTON_BOX(box), GTK_BUTTONBOX_START);
gtk_box_pack_start(GTK_BOX(client), box, FALSE, TRUE, 0); gtk_box_pack_start(GTK_BOX(client), box, FALSE, TRUE, 0);
...@@ -849,14 +849,14 @@ static void remmina_ftp_client_init(RemminaFTPClient *client) ...@@ -849,14 +849,14 @@ static void remmina_ftp_client_init(RemminaFTPClient *client)
remmina_ftp_client_create_toolbar(client); remmina_ftp_client_create_toolbar(client);
/* The Paned to separate File List and Task List */ /* The Paned to separate File List and Task List */
vpaned = gtk_vpaned_new(); vpaned = gtk_paned_new(GTK_ORIENTATION_VERTICAL);
gtk_widget_show(vpaned); gtk_widget_show(vpaned);
gtk_box_pack_start(GTK_BOX(client), vpaned, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(client), vpaned, TRUE, TRUE, 0);
priv->vpaned = vpaned; priv->vpaned = vpaned;
/* Remote */ /* Remote */
vbox = gtk_vbox_new(FALSE, 0); vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
gtk_widget_show(vbox); gtk_widget_show(vbox);
gtk_paned_pack1(GTK_PANED(vpaned), vbox, TRUE, FALSE); gtk_paned_pack1(GTK_PANED(vpaned), vbox, TRUE, FALSE);
......
...@@ -73,7 +73,7 @@ static void remmina_init_dialog_init(RemminaInitDialog *dialog) ...@@ -73,7 +73,7 @@ static void remmina_init_dialog_init(RemminaInitDialog *dialog)
/**** Create the dialog content from here ****/ /**** Create the dialog content from here ****/
/* Create top-level hbox */ /* Create top-level hbox */
hbox = gtk_hbox_new(FALSE, 4); hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4);
gtk_widget_show(hbox); gtk_widget_show(hbox);
gtk_container_set_border_width(GTK_CONTAINER(hbox), 15); gtk_container_set_border_width(GTK_CONTAINER(hbox), 15);
gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), hbox, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), hbox, TRUE, TRUE, 0);
...@@ -85,7 +85,7 @@ static void remmina_init_dialog_init(RemminaInitDialog *dialog) ...@@ -85,7 +85,7 @@ static void remmina_init_dialog_init(RemminaInitDialog *dialog)
dialog->image = widget; dialog->image = widget;
/* Create vbox for other dialog content */ /* Create vbox for other dialog content */
widget = gtk_vbox_new(FALSE, 4); widget = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4);
gtk_widget_show(widget); gtk_widget_show(widget);
gtk_box_pack_start(GTK_BOX(hbox), widget, TRUE, TRUE, 4); gtk_box_pack_start(GTK_BOX(hbox), widget, TRUE, TRUE, 4);
dialog->content_vbox = widget; dialog->content_vbox = widget;
...@@ -512,7 +512,7 @@ static gint remmina_init_dialog_serverkey_confirm(RemminaInitDialog *dialog, con ...@@ -512,7 +512,7 @@ static gint remmina_init_dialog_serverkey_confirm(RemminaInitDialog *dialog, con
gtk_label_set_text(GTK_LABEL(dialog->status_label), (dialog->status ? dialog->status : dialog->title)); gtk_label_set_text(GTK_LABEL(dialog->status_label), (dialog->status ? dialog->status : dialog->title));
/* Create vbox */ /* Create vbox */
vbox = gtk_vbox_new(FALSE, 4); vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4);
gtk_widget_show(vbox); gtk_widget_show(vbox);
/* Icon */ /* Icon */
......
...@@ -1076,7 +1076,7 @@ static void remmina_main_init(RemminaMain *remminamain) ...@@ -1076,7 +1076,7 @@ static void remmina_main_init(RemminaMain *remminamain)
} }
/* Create the main container */ /* Create the main container */
vbox = gtk_vbox_new(FALSE, 0); vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
gtk_container_add(GTK_CONTAINER(remminamain), vbox); gtk_container_add(GTK_CONTAINER(remminamain), vbox);
gtk_widget_show(vbox); gtk_widget_show(vbox);
......
...@@ -265,7 +265,7 @@ static gboolean remmina_pref_dialog_add_pref_plugin(gchar *name, RemminaPlugin * ...@@ -265,7 +265,7 @@ static gboolean remmina_pref_dialog_add_pref_plugin(gchar *name, RemminaPlugin *
widget = gtk_label_new(pref_plugin->pref_label); widget = gtk_label_new(pref_plugin->pref_label);
gtk_widget_show(widget); gtk_widget_show(widget);
vbox = gtk_vbox_new(FALSE, 0); vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
gtk_widget_show(vbox); gtk_widget_show(vbox);
gtk_notebook_append_page(GTK_NOTEBOOK(priv->notebook), vbox, widget); gtk_notebook_append_page(GTK_NOTEBOOK(priv->notebook), vbox, widget);
...@@ -324,7 +324,7 @@ static void remmina_pref_dialog_init(RemminaPrefDialog *dialog) ...@@ -324,7 +324,7 @@ static void remmina_pref_dialog_init(RemminaPrefDialog *dialog)
gtk_widget_show(tablabel); gtk_widget_show(tablabel);
/* Options body */ /* Options body */
vbox = gtk_vbox_new(FALSE, 0); vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
gtk_widget_show(vbox); gtk_widget_show(vbox);
gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox, tablabel); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox, tablabel);
...@@ -443,7 +443,7 @@ static void remmina_pref_dialog_init(RemminaPrefDialog *dialog) ...@@ -443,7 +443,7 @@ static void remmina_pref_dialog_init(RemminaPrefDialog *dialog)
gtk_misc_set_alignment(GTK_MISC(widget), 0.0, 0.5); gtk_misc_set_alignment(GTK_MISC(widget), 0.0, 0.5);
gtk_table_attach_defaults(GTK_TABLE(table), widget, 0, 1, 11, 12); gtk_table_attach_defaults(GTK_TABLE(table), widget, 0, 1, 11, 12);
hbox = gtk_hbox_new(FALSE, 2); hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 2);
gtk_widget_show(hbox); gtk_widget_show(hbox);
gtk_table_attach_defaults(GTK_TABLE(table), hbox, 1, 2, 11, 12); gtk_table_attach_defaults(GTK_TABLE(table), hbox, 1, 2, 11, 12);
...@@ -465,7 +465,7 @@ static void remmina_pref_dialog_init(RemminaPrefDialog *dialog) ...@@ -465,7 +465,7 @@ static void remmina_pref_dialog_init(RemminaPrefDialog *dialog)
gtk_widget_show(tablabel); gtk_widget_show(tablabel);
/* Resolutions body */ /* Resolutions body */
vbox = gtk_vbox_new(FALSE, 2); vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 2);
gtk_widget_show(vbox); gtk_widget_show(vbox);
gtk_container_set_border_width(GTK_CONTAINER(vbox), 8); gtk_container_set_border_width(GTK_CONTAINER(vbox), 8);
gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox, tablabel); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox, tablabel);
...@@ -484,7 +484,7 @@ static void remmina_pref_dialog_init(RemminaPrefDialog *dialog) ...@@ -484,7 +484,7 @@ static void remmina_pref_dialog_init(RemminaPrefDialog *dialog)
gtk_widget_show(tablabel); gtk_widget_show(tablabel);
/* Applet body */ /* Applet body */
vbox = gtk_vbox_new(FALSE, 0); vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
gtk_widget_show(vbox); gtk_widget_show(vbox);
gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox, tablabel); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox, tablabel);
...@@ -535,7 +535,7 @@ static void remmina_pref_dialog_init(RemminaPrefDialog *dialog) ...@@ -535,7 +535,7 @@ static void remmina_pref_dialog_init(RemminaPrefDialog *dialog)
gtk_widget_show(tablabel); gtk_widget_show(tablabel);
/* Keyboard body */ /* Keyboard body */
vbox = gtk_vbox_new(FALSE, 0); vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
gtk_widget_show(vbox); gtk_widget_show(vbox);
gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox, tablabel); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox, tablabel);
...@@ -581,7 +581,7 @@ static void remmina_pref_dialog_init(RemminaPrefDialog *dialog) ...@@ -581,7 +581,7 @@ static void remmina_pref_dialog_init(RemminaPrefDialog *dialog)
gtk_misc_set_alignment(GTK_MISC(widget), 0.0, 0.5); gtk_misc_set_alignment(GTK_MISC(widget), 0.0, 0.5);
gtk_table_attach(GTK_TABLE(table), widget, 0, 1, 3, 4, GTK_FILL, 0, 0, 0); gtk_table_attach(GTK_TABLE(table), widget, 0, 1, 3, 4, GTK_FILL, 0, 0, 0);
hbox = gtk_hbox_new(TRUE, 2); hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 2);
gtk_widget_show(hbox); gtk_widget_show(hbox);
gtk_table_attach_defaults(GTK_TABLE(table), hbox, 1, 2, 3, 4); gtk_table_attach_defaults(GTK_TABLE(table), hbox, 1, 2, 3, 4);
...@@ -650,7 +650,7 @@ static void remmina_pref_dialog_init(RemminaPrefDialog *dialog) ...@@ -650,7 +650,7 @@ static void remmina_pref_dialog_init(RemminaPrefDialog *dialog)
gtk_widget_show(tablabel); gtk_widget_show(tablabel);
/* Terminal body */ /* Terminal body */
vbox = gtk_vbox_new(FALSE, 0); vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
gtk_widget_show(vbox); gtk_widget_show(vbox);
gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox, tablabel); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox, tablabel);
...@@ -715,7 +715,7 @@ static void remmina_pref_dialog_init(RemminaPrefDialog *dialog) ...@@ -715,7 +715,7 @@ static void remmina_pref_dialog_init(RemminaPrefDialog *dialog)
gtk_misc_set_alignment(GTK_MISC(widget), 0.0, 0.5); gtk_misc_set_alignment(GTK_MISC(widget), 0.0, 0.5);
gtk_table_attach(GTK_TABLE(table), widget, 0, 1, 4, 5, GTK_FILL, 0, 0, 0); gtk_table_attach(GTK_TABLE(table), widget, 0, 1, 4, 5, GTK_FILL, 0, 0, 0);
hbox = gtk_hbox_new(FALSE, 2); hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 2);
gtk_widget_show(hbox); gtk_widget_show(hbox);
gtk_table_attach_defaults(GTK_TABLE(table), hbox, 1, 2, 4, 5); gtk_table_attach_defaults(GTK_TABLE(table), hbox, 1, 2, 4, 5);
...@@ -736,7 +736,7 @@ static void remmina_pref_dialog_init(RemminaPrefDialog *dialog) ...@@ -736,7 +736,7 @@ static void remmina_pref_dialog_init(RemminaPrefDialog *dialog)
gtk_box_pack_start(GTK_BOX(hbox), widget, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(hbox), widget, TRUE, TRUE, 0);
priv->vte_shortcutkey_copy_chooser = widget; priv->vte_shortcutkey_copy_chooser = widget;
hbox = gtk_hbox_new(FALSE, 2); hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 2);
gtk_widget_show(hbox); gtk_widget_show(hbox);
gtk_table_attach_defaults(GTK_TABLE(table), hbox, 1, 2, 5, 6); gtk_table_attach_defaults(GTK_TABLE(table), hbox, 1, 2, 5, 6);
......
...@@ -255,11 +255,21 @@ void remmina_protocol_widget_open_connection(RemminaProtocolWidget* gp, RemminaF ...@@ -255,11 +255,21 @@ void remmina_protocol_widget_open_connection(RemminaProtocolWidget* gp, RemminaF