summaryrefslogtreecommitdiff
path: root/sendto/caja-sendto-command.c
diff options
context:
space:
mode:
authorrbuj <[email protected]>2020-01-26 11:04:49 +0100
committerraveit65 <[email protected]>2020-02-06 12:59:42 +0100
commita956971b492c65c452dbab46bb81cafb9e0e85d0 (patch)
treea86f7168a6e0175d1b0255634c26d883ca52f414 /sendto/caja-sendto-command.c
parentd555de986b694c23ef7ced8d3204933c69ae4b41 (diff)
downloadcaja-extensions-a956971b492c65c452dbab46bb81cafb9e0e85d0.tar.bz2
caja-extensions-a956971b492c65c452dbab46bb81cafb9e0e85d0.tar.xz
caja-sendto: rewrite caja-sendto.ui from scratch fixing deprecations
Diffstat (limited to 'sendto/caja-sendto-command.c')
-rw-r--r--sendto/caja-sendto-command.c21
1 files changed, 3 insertions, 18 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 ();
}