From a956971b492c65c452dbab46bb81cafb9e0e85d0 Mon Sep 17 00:00:00 2001 From: rbuj Date: Sun, 26 Jan 2020 11:04:49 +0100 Subject: caja-sendto: rewrite caja-sendto.ui from scratch fixing deprecations --- sendto/caja-sendto-command.c | 21 +- sendto/caja-sendto.ui | 554 +++++++++++++++---------------------------- 2 files changed, 189 insertions(+), 386 deletions(-) diff --git a/sendto/caja-sendto-command.c b/sendto/caja-sendto-command.c index 6c16647..0d002cb 100644 --- a/sendto/caja-sendto-command.c +++ b/sendto/caja-sendto-command.c @@ -200,24 +200,9 @@ pack_files (NS_ui *ui) g_mkdir (tmp_work_dir, 0700); g_free (tmp_dir); - switch (gtk_combo_box_get_active (GTK_COMBO_BOX(ui->pack_combobox))) - { - case 0: - pack_type = g_strdup (".7z"); - break; - case 1: - pack_type = g_strdup (".tar.bz2"); - break; - case 2: - pack_type = g_strdup (".tar.gz"); - break; - case 3: - pack_type = g_strdup (".tar.xz"); - break; - case 4: - pack_type = g_strdup (".zip"); - break; - default: + if (gtk_combo_box_get_active (GTK_COMBO_BOX(ui->pack_combobox)) != 0) { + pack_type = gtk_combo_box_text_get_active_text (GTK_COMBO_BOX_TEXT(ui->pack_combobox)); + } else { pack_type = NULL; g_assert_not_reached (); } diff --git a/sendto/caja-sendto.ui b/sendto/caja-sendto.ui index b78c068..c5a86e6 100644 --- a/sendto/caja-sendto.ui +++ b/sendto/caja-sendto.ui @@ -1,504 +1,322 @@ - - + + - - - - - - - .7z - - - .tar.bz2 - - - .tar.gz - - - .tar.xz - - - .zip - - + + + True + False + document-send - - 5 - 370 + True + False + gtk-cancel + + + False Send To... - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_CENTER - False - True - False - True - False - False - GDK_WINDOW_TYPE_HINT_DIALOG - GDK_GRAVITY_NORTH_WEST - True - False document-send + dialog + + + - - True - False - 2 + + False + 12 + 12 + 12 + 12 + vertical + 12 - - True - GTK_BUTTONBOX_END + + False + end + _Cancel True - True True - gtk-cancel - True - GTK_RELIEF_NORMAL - True + True + image2 + True + True + + True + True + 0 + + Send True - True True - GTK_RELIEF_NORMAL - True - - - True - 0.5 - 0.5 - 0 - 0 - 0 - 0 - 0 - 0 - - - True - False - 2 - - - True - document-send - 4 - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - True - _Send - True - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - + True + image1 + True + + True + True + 1 + - 0 False - True - GTK_PACK_END + False + 8 + end + 0 - - 5 + True - False - 18 + False + vertical + 12 - + True - False - 6 - - - True - <b>Destination</b> - False - True - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - + False + 0 + none - + True - 0.5 - 0.5 - 1 - 1 - 0 - 0 + False 12 - 0 - + True - 2 - 2 - False - 6 - 12 + False + 8 + 8 + 8 - + True - Send _as: - True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - options_combobox - PANGO_ELLIPSIZE_NONE - -1 - False - 0 + False + True - 0 - 1 + 1 0 - 1 - fill - - + True - False - True + False + start + Send _as: + True + options_combobox - 1 - 2 + 0 0 - 1 - fill - + True + False + start Send t_o: True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 0 - 1 1 - 2 - fill - - + True - False - 12 + False + vertical 1 - 2 1 - 2 - fill - fill - - 0 - True - True - + + + + True + False + Destination + + + + - 6 False True + 0 - + True - False - 6 - - - True - <b>Compression</b> - False - True - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - + False + 0 + none - + True - 0.5 - 0.5 - 1 - 1 - 0 - 0 + False 12 - 0 - + True - False - 6 + False + 8 + vertical + 8 + Send _packed in: True True - Send _packed in: + False + start True - GTK_RELIEF_NORMAL - True - False - False True - 0 False - False + True + 0 - + True - 0.5 - 0.5 - 1 - 1 - 0 - 0 - 12 - 0 + False + 8 + + + True + True + True + + + False + True + 0 + + - + True - False - 6 - - - True - True - True - True - 0 - - True - * - False - - - 0 - True - True - - - - - True - False - True - model1 - 4 - - - - 0 - - - - - 0 - True - True - - + False + 4 + + .7z + .tar.bz2 + .tar.gz + .tar.xz + .zip + + + False + True + 1 + - 0 - True + False True + 1 - - 0 - True - True - + + + + True + False + Compression + + + + - 0 - True + False True + 1 + + + False + True + 1 + + + + + False + False - - False - 12 - - - gtk-dialog-error - 4 - 0.5 - 0.5 - 0 - 0 - - - 0 - False - True - - - - - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_MIDDLE - -1 - False - 0 - - - 0 - True - True - - + + True + False + start + dialog-error + + + False + True + 0 + + + + + True + False + start + label - 0 False True + 1 - 0 False True + 3 cancel_button - send_button + send_button -- cgit v1.2.1