~ubuntu-branches/ubuntu/quantal/libfm/quantal

« back to all changes in this revision

Viewing changes to src/demo/main-win.c

  • Committer: Bazaar Package Importer
  • Author(s): Julien Lavergne
  • Date: 2011-02-21 21:55:43 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20110221215543-m7gn2snkhpk1kk9u
Tags: 0.1.15+git-3625952cea-0ubuntu1
* New upstream snapshot (2011-02-15)
 - Use x-schemas-handler (LP: #683922)
* debian/patches/
 - 90_add_gobject_link.patch: Remove, merged upstream.
 - 02-libfm-0.1.14-API-changes.patch: Refresh.
 - 03_disable_deprecated_gio_module.patch: Refresh.
 - 04_fix_docs_linker.patch: Fix DSO linking in docs/.
* debian/libfm0.install:
 - Remove usr/lib/libfm/gnome-terminal, dropped upstream.
 - Remove gio module, dropped upstream.
* debian/rules:
 - Add --enable-gtk-doc to configure.
* debian/libfm-gtk0.symbols:
 - Update with new symbols.
* debian/apport/source_libfm.py
 - Fix location of pcmanfm config files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
#include "fm-file-menu.h"
34
34
#include "fm-clipboard.h"
35
35
#include "fm-gtk-utils.h"
 
36
#include "fm-gtk-file-launcher.h"
36
37
#include "fm-file-properties.h"
37
38
 
38
39
static void fm_main_win_finalize              (GObject *object);
148
149
            FmFileMenu* menu;
149
150
            GtkMenu* popup;
150
151
            FmFileInfoList* files = fm_folder_view_get_selected_files(fv);
151
 
            menu = fm_file_menu_new_for_files(files, fm_folder_view_get_cwd(fv), TRUE);
 
152
            menu = fm_file_menu_new_for_files(GTK_WINDOW(win), files, fm_folder_view_get_cwd(fv), TRUE);
152
153
            fm_file_menu_set_folder_func(menu, open_folder_func, win);
153
154
            fm_list_unref(files);
154
155
 
387
388
    g_signal_connect(toolitem, "show-menu", G_CALLBACK(on_show_history_menu), self);
388
389
 
389
390
    self->popup = gtk_ui_manager_get_widget(ui, "/popup");
 
391
    gtk_menu_attach_to_widget(GTK_MENU(self->popup), GTK_WIDGET(self), NULL);
390
392
 
391
393
    gtk_box_pack_start( (GtkBox*)vbox, menubar, FALSE, TRUE, 0 );
392
394
    gtk_box_pack_start( (GtkBox*)vbox, self->toolbar, FALSE, TRUE, 0 );
660
662
    FmPathList* files = fm_folder_view_get_selected_file_paths(FM_FOLDER_VIEW(win->folder_view));
661
663
    if(files)
662
664
    {
663
 
        fm_copy_files_to(files);
 
665
        fm_copy_files_to(win, files);
664
666
        fm_list_unref(files);
665
667
    }
666
668
}
670
672
    FmPathList* files = fm_folder_view_get_selected_file_paths(FM_FOLDER_VIEW(win->folder_view));
671
673
    if(files)
672
674
    {
673
 
        fm_move_files_to(files);
 
675
        fm_move_files_to(win, files);
674
676
        fm_list_unref(files);
675
677
    }
676
678
}
692
694
void on_del(GtkAction* act, FmMainWin* win)
693
695
{
694
696
    FmPathList* files = fm_folder_view_get_selected_file_paths(FM_FOLDER_VIEW(win->folder_view));
695
 
    fm_trash_or_delete_files(files);
 
697
    fm_trash_or_delete_files(GTK_WINDOW(win), files);
696
698
    fm_list_unref(files);
697
699
}
698
700
 
701
703
    FmPathList* files = fm_folder_view_get_selected_file_paths(FM_FOLDER_VIEW(win->folder_view));
702
704
    if( !fm_list_is_empty(files) )
703
705
    {
704
 
        fm_rename_file(fm_list_peek_head(files));
 
706
        fm_rename_file(GTK_WINDOW(win), fm_list_peek_head(files));
705
707
        /* FIXME: is it ok to only rename the first selected file here. */
706
708
    }
707
709
    fm_list_unref(files);
729
731
    FmFileInfo* fi = FM_FOLDER_MODEL(fv->model)->dir->dir_fi;
730
732
    FmFileInfoList* files = fm_file_info_list_new();
731
733
    fm_list_push_tail(files, fi);
732
 
    fm_show_file_properties(files);
 
734
    fm_show_file_properties(GTK_WINDOW(win), files);
733
735
    fm_list_unref(files);
734
736
}
735
737