~ubuntu-branches/ubuntu/natty/file-roller/natty

« back to all changes in this revision

Viewing changes to src/fr-window.c

Tags: 2.30.1.1-0ubuntu1
* New upstream release: (LP: #571589)
  - Extract multi-byte filename from URI in case of DND. (Takao
    Fujiwara) (#613298)
  - Fixed build error when dbus is not available.
  - Updated translations
* debian/patches/70_autotools.patch:
  - refreshed

Show diffs side-by-side

added added

removed removed

Lines of Context:
4059
4059
                        if (r == GTK_RESPONSE_YES) {
4060
4060
                                char       *first_item;
4061
4061
                                char       *folder;
 
4062
                                char       *local_path = NULL;
 
4063
                                char       *utf8_path = NULL;
4062
4064
                                const char *archive_name;
4063
4065
 
4064
4066
                                fr_window_free_batch_data (window);
4072
4074
                                if (folder != NULL)
4073
4075
                                        fr_window_set_open_default_dir (window, folder);
4074
4076
 
4075
 
                                if ((list->next != NULL) && (folder != NULL))
 
4077
                                if ((list->next != NULL) && (folder != NULL)) {
4076
4078
                                        archive_name = file_name_from_path (folder);
4077
 
                                else
4078
 
                                        archive_name = file_name_from_path (first_item);
 
4079
                                }
 
4080
                                else {
 
4081
                                        if (uri_is_local (first_item)) {
 
4082
                                                local_path = g_filename_from_uri (first_item, NULL, NULL);
 
4083
                                                if (local_path)
 
4084
                                                        utf8_path = g_filename_to_utf8 (local_path, -1, NULL, NULL, NULL);
 
4085
                                                if (!utf8_path)
 
4086
                                                        utf8_path= g_strdup (first_item);
 
4087
                                                g_free (local_path);
 
4088
                                        }
 
4089
                                        else {
 
4090
                                                utf8_path = g_strdup (first_item);
 
4091
                                        }
 
4092
                                        archive_name = file_name_from_path (utf8_path);
 
4093
                                }
4079
4094
 
4080
4095
                                show_new_archive_dialog (window, archive_name);
 
4096
                                g_free (utf8_path);
4081
4097
 
4082
4098
                                g_free (folder);
4083
4099
                        }
5884
5900
        window->priv->progress_cid = gtk_statusbar_get_context_id (GTK_STATUSBAR (window->priv->statusbar), "progress");
5885
5901
 
5886
5902
        statusbar = GTK_STATUSBAR (window->priv->statusbar);
 
5903
#if GTK_CHECK_VERSION (2, 19, 1)
 
5904
        statusbar_box = gtk_statusbar_get_message_area (statusbar);
 
5905
        gtk_box_set_homogeneous (GTK_BOX (statusbar_box), FALSE);
 
5906
        gtk_box_set_spacing (GTK_BOX (statusbar_box), 4);
 
5907
        gtk_box_set_child_packing (GTK_BOX (statusbar_box), statusbar->label, TRUE, TRUE, 0, GTK_PACK_START );
 
5908
#else
5887
5909
        statusbar_box = gtk_hbox_new (FALSE, 4);
5888
5910
        g_object_ref (statusbar->label);
5889
5911
        gtk_container_remove (GTK_CONTAINER (statusbar->frame), statusbar->label);
5890
5912
        gtk_box_pack_start (GTK_BOX (statusbar_box), statusbar->label, TRUE, TRUE, 0);
5891
5913
        g_object_unref (statusbar->label);
5892
5914
        gtk_container_add (GTK_CONTAINER (statusbar->frame), statusbar_box);
 
5915
#endif
5893
5916
 
5894
5917
        window->priv->progress_bar = gtk_progress_bar_new ();
5895
5918
        gtk_progress_bar_set_pulse_step (GTK_PROGRESS_BAR (window->priv->progress_bar), ACTIVITY_PULSE_STEP);