Step 1:
void FileMenu::onOpenTriggered() { if(fileLauncher_) { fileLauncher_->launchFiles(NULL, files_); } else { // use the default launcher Fm::FileLauncher launcher; launcher.launchFiles(NULL, files_); }}
Step 2:
bool launchFiles(QWidget* parent, FmFileInfoList* file_infos) { GList* fileList = fm_file_info_list_peek_head_link(file_infos); return launchFiles(parent, fileList); }
Step 3:
static inline GList* fm_file_info_list_peek_head_link(FmFileInfoList* list){ return fm_list_peek_head_link((FmList*)list);}
Step 4:
bool FileLauncher::launchFiles(QWidget* parent, GList* file_infos) { FmAppLaunchContext* context = fm_app_launch_context_new_for_widget(parent); bool ret = fm_launch_files(G_APP_LAUNCH_CONTEXT(context), file_infos, &funcs, this); g_object_unref(context); return ret;}
Step 5:
gboolean fm_launch_files(GAppLaunchContext* ctx, GList* file_infos, FmFileLauncher* launcher, gpointer user_data);