Le 05/23/2012 01:43 AM, PCMan a écrit :
> Would you please tell me which patches are not merged?
> IIRC, I reviewed the patches you used last week and most of them are
> no longer needed.
> If I did not merge a patch, there should be a good reason or I just
> forgot to do it.
> Thanks
This is the remaining patches :
libfm :
- 02-libfm-0.1.14-API-changes.patch : Re-enable API which is still used
in pcmanfm (could be dropped when pcmanfm doesn't use this API anymore,
see patch in pcmanfm)
- 05_set_icon_name_for_main_window.patch : Set icon to preferred
application windows (re-done to apply to the .glade file).
pcmanfm :
- 01-libfm-0.1.14-API-changes.patch : Finish migration to the new API
- 02-integrate-lxshortcut.patch : Integrate the ability to add a
shortcut after a right click on the desktop
- 03_avoid_free.patch : Fix a possible crash
All others patches have been dropped or merged.
Regards,
Julien Lavergne
Index: libfm/src/base/fm-path.c
===================================================================
--- libfm.orig/src/base/fm-path.c 2010-11-29 15:41:23.000000000 +0100
+++ libfm/src/base/fm-path.c 2010-12-11 19:28:32.000000000 +0100
@@ -29,6 +29,10 @@
#include <limits.h>
#include <glib/gi18n-lib.h>
+static FmPath* root = NULL;
+static FmPath* home = NULL;
+static FmPath* trash_root = NULL;
+
static FmPath* root_path = NULL;
static char* home_dir = NULL;
@@ -230,6 +234,87 @@
#endif
/**
+ * fm_path_new
+ * DEPRECATED function
+ */
+
+FmPath* fm_path_new(const char* path)
+{
+ /* FIXME: need to canonicalize paths */
+
+ if( path[0] == '/' ) /* if this is a absolute native path */
+ {
+ if (path[1])
+ return fm_path_new_relative(root, path + 1);
+ else
+ /* special case: handle root dir */
+ return fm_path_ref( root );
+ }
+ else if ( path[0] == '~' && (path[1] == '\0' || path[1]=='/') ) /* home dir */
+ {
+ ++path;
+ return *path ? fm_path_new_relative(home, path) : fm_path_ref(home);
+ }
+ else /* then this should be a URL */
+ {
+ FmPath* parent, *ret;
+ char* colon = strchr(path, ':');
+ char* hier_part;
+ char* rest;
+ int root_len;
+
+ /* return root instead of NULL for invalid URIs. fix #2988010. */
+ if( !colon ) /* this shouldn't happen */
+ return fm_path_ref(root); /* invalid path FIXME: should we treat it as relative path? */
+
+ /* FIXME: convert file:/// to local native path */
+ hier_part = colon+1;
+ if( hier_part[0] == '/' )
+ {
+ if(hier_part[1] == '/') /* this is a scheme:// form URI */
+ rest = hier_part + 2;
+ else /* a malformed URI */
+ rest = hier_part + 1;
+
+ if(*rest == '/') /* :/// means there is no authoraty part */
+ ++rest;
+ else /* we are now at autority part, something like <username>@domain/ */
+ {
+ while( *rest && *rest != '/' )
+ ++rest;
+ if(*rest == '/')
+ ++rest;
+ }
+
+ if( strncmp(path, "trash:", 6) == 0 ) /* in trash:// */
+ {
+ if(*rest)
+ return fm_path_new_relative(trash_root, rest);
+ else
+ return fm_path_ref(trash_root);
+ }
+ /* other URIs which requires special handling, like computer:/// */
+ }
+ else /* this URI doesn't have //, like mailto: */
+ {
+ /* FIXME: is this useful to file managers? */
+ rest = colon + 1;
+ }
+ root_len = (rest - path);
+ parent = fm_path_new_child_len(NULL, path, root_len);
+ if(*rest)
+ {
+ ret = fm_path_new_relative(parent, rest);
+ fm_path_unref(parent);
+ }
+ else
+ ret = parent;
+ return ret;
+ }
+ return fm_path_new_relative(NULL, path);
+}
+
+/**
* fm_path_new_child_len
* @parent: a parent path
* @basename: basename of a direct child of @parent directory in glib
Index: libfm/src/base/fm-path.h
===================================================================
--- libfm.orig/src/base/fm-path.h 2010-11-29 15:41:23.000000000 +0100
+++ libfm/src/base/fm-path.h 2010-12-11 19:28:32.000000000 +0100
@@ -62,7 +62,7 @@
void _fm_path_init();
/* fm_path_new is deprecated. Use fm_path_new_for_str */
-#define fm_path_new(path) fm_path_new_for_str(path)
+FmPath* fm_path_new(const char* path);
FmPath* fm_path_new_for_path(const char* path_name);
FmPath* fm_path_new_for_uri(const char* uri);
Index: libfm/src/demo/libfm-demo.c
===================================================================
--- libfm.orig/src/demo/libfm-demo.c 2010-11-29 15:41:23.000000000 +0100
+++ libfm/src/demo/libfm-demo.c 2010-12-11 19:28:32.000000000 +0100
@@ -42,7 +42,7 @@
if(argc > 1)
{
- FmPath* path = fm_path_new(argv[1]);
+ FmPath* path = fm_path_new_for_str(argv[1]);
fm_main_win_chdir(FM_MAIN_WIN(w), path);
fm_path_unref(path);
}
Description: Set icon for main (dlg) window so it displays in panel. (LP: #737274)
Author: Jonathan Marsden <[email protected]>
Bug-Ubuntu: https://bugs.launchpad.net/bugs/737274
Last-Update: 2011-05-10
Index: libfm-0.1.99/data/ui/preferred-apps.glade
===================================================================
--- libfm-0.1.99.orig/data/ui/preferred-apps.glade 2012-05-19 09:53:01.000000000 +0200
+++ libfm-0.1.99/data/ui/preferred-apps.glade 2012-05-19 10:02:31.000000000 +0200
@@ -8,6 +8,7 @@
<property name="window_position">center</property>
<property name="type_hint">normal</property>
<property name="has_separator">False</property>
+ <property name="icon-name">preferences-desktop</property>
<child internal-child="vbox">
<object class="GtkVBox" id="dialog-vbox1">
<property name="visible">True</property>
Index: libfm-0.1.99/data/ui/preferred-apps.ui
===================================================================
--- libfm-0.1.99.orig/data/ui/preferred-apps.ui 2012-05-19 09:55:20.000000000 +0200
+++ libfm-0.1.99/data/ui/preferred-apps.ui 2012-05-19 10:03:23.000000000 +0200
@@ -1 +1 @@
-<?xml version="1.0"?><interface><requires lib="gtk+" version="2.16"/><object class="GtkDialog" id="dlg"><property name="border_width">5</property><property name="title" translatable="yes">Preferred Applications</property><property name="window_position">center</property><property name="type_hint">normal</property><property name="has_separator">False</property><child internal-child="vbox"><object class="GtkVBox" id="dialog-vbox1"><property name="visible">True</property><property name="orientation">vertical</property><property name="spacing">2</property><child><object class="GtkNotebook" id="notebook1"><property name="visible">True</property><property name="can_focus">True</property><child><object class="GtkVBox" id="vbox1"><property name="visible">True</property><property name="border_width">12</property><property name="orientation">vertical</property><property name="spacing">18</property><child><object class="GtkVBox" id="vbox2"><property name="visible">True</property><property name="orientation">vertical</property><property name="spacing">6</property><child><object class="GtkLabel" id="label3"><property name="visible">True</property><property name="xalign">0</property><property name="label" translatable="yes"><b>Web Browser</b></property><property name="use_markup">True</property></object><packing><property name="expand">False</property><property name="position">0</property></packing></child><child><object class="GtkAlignment" id="alignment1"><property name="visible">True</property><property name="left_padding">12</property><child><object class="GtkVBox" id="vbox5"><property name="visible">True</property><property name="orientation">vertical</property><property name="spacing">6</property><child><object class="GtkLabel" id="label4"><property name="width_request">360</property><property name="visible">True</property><property name="xalign">0</property><property name="label" translatable="yes">The preferred Web Browser will be used to open hyperlinks.</property><property name="wrap">True</property></object><packing><property name="position">0</property></packing></child><child><object class="GtkComboBox" id="browser"><property name="visible">True</property></object><packing><property name="position">1</property></packing></child></object></child></object><packing><property name="expand">False</property><property name="position">1</property></packing></child></object><packing><property name="expand">False</property><property name="position">0</property></packing></child><child><object class="GtkVBox" id="vbox3"><property name="visible">True</property><property name="orientation">vertical</property><property name="spacing">6</property><child><object class="GtkLabel" id="label5"><property name="visible">True</property><property name="xalign">0</property><property name="label" translatable="yes"><b>Mail client</b></property><property name="use_markup">True</property></object><packing><property name="expand">False</property><property name="position">0</property></packing></child><child><object class="GtkAlignment" id="alignment2"><property name="visible">True</property><property name="left_padding">12</property><child><object class="GtkVBox" id="vbox6"><property name="visible">True</property><property name="orientation">vertical</property><property name="spacing">6</property><child><object class="GtkLabel" id="label6"><property name="width_request">360</property><property name="visible">True</property><property name="xalign">0</property><property name="label" translatable="yes">The preferred Mail Client will be used to compose emails when you click on E-mail addresses.</property><property name="wrap">True</property><property name="width_chars">60</property></object><packing><property name="position">0</property></packing></child><child><object class="GtkComboBox" id="mail_client"><property name="visible">True</property></object><packing><property name="position">1</property></packing></child></object></child></object><packing><property name="expand">False</property><property name="position">1</property></packing></child></object><packing><property name="expand">False</property><property name="position">1</property></packing></child><child><object class="GtkVBox" id="vbox4"><property name="orientation">vertical</property><property name="spacing">6</property><child><object class="GtkLabel" id="label7"><property name="visible">True</property><property name="xalign">0</property><property name="label" translatable="yes"><b>Terminal Emulator</b></property><property name="use_markup">True</property></object><packing><property name="expand">False</property><property name="position">0</property></packing></child><child><object class="GtkAlignment" id="alignment3"><property name="visible">True</property><property name="left_padding">12</property><child><object class="GtkHBox" id="hbox4"><property name="visible">True</property><property name="spacing">6</property><child><object class="GtkLabel" id="label8"><property name="visible">True</property><property name="label" translatable="yes">Command line:</property></object><packing><property name="expand">False</property><property name="position">0</property></packing></child><child><object class="GtkEntry" id="terminal"><property name="visible">True</property><property name="can_focus">True</property><property name="invisible_char">•</property></object><packing><property name="position">1</property></packing></child></object></child></object><packing><property name="expand">False</property><property name="position">1</property></packing></child></object><packing><property name="expand">False</property><property name="position">2</property></packing></child></object></child><child type="tab"><object class="GtkLabel" id="label1"><property name="visible">True</property><property name="label" translatable="yes">System Applications</property></object><packing><property name="tab_fill">False</property></packing></child><child><object class="GtkVBox" id="vbox8"><property name="orientation">vertical</property><child><placeholder/></child></object><packing><property name="position">1</property></packing></child><child type="tab"><object class="GtkLabel" id="label2"><property name="visible">True</property><property name="label" translatable="yes">File Associations</property></object><packing><property name="position">1</property><property name="tab_fill">False</property></packing></child></object><packing><property name="position">1</property></packing></child><child internal-child="action_area"><object class="GtkHButtonBox" id="dialog-action_area1"><property name="visible">True</property><property name="layout_style">end</property><child><object class="GtkButton" id="cancel"><property name="label">gtk-cancel</property><property name="visible">True</property><property name="can_focus">True</property><property name="receives_default">True</property><property name="use_stock">True</property></object><packing><property name="expand">False</property><property name="fill">False</property><property name="position">0</property></packing></child><child><object class="GtkButton" id="ok"><property name="label">gtk-ok</property><property name="visible">True</property><property name="can_focus">True</property><property name="receives_default">True</property><property name="use_stock">True</property></object><packing><property name="expand">False</property><property name="fill">False</property><property name="position">1</property></packing></child></object><packing><property name="expand">False</property><property name="pack_type">end</property><property name="position">0</property></packing></child></object></child><action-widgets><action-widget response="-6">cancel</action-widget><action-widget response="-5">ok</action-widget></action-widgets></object></interface>
+<?xml version="1.0"?><interface><requires lib="gtk+" version="2.16"/><object class="GtkDialog" id="dlg"><property name="border_width">5</property><property name="title" translatable="yes">Preferred Applications</property><property name="window_position">center</property><property name="type_hint">normal</property><property name="has_separator">False</property><property name="icon-name">preferences-desktop</property><child internal-child="vbox"><object class="GtkVBox" id="dialog-vbox1"><property name="visible">True</property><property name="orientation">vertical</property><property name="spacing">2</property><child><object class="GtkNotebook" id="notebook1"><property name="visible">True</property><property name="can_focus">True</property><child><object class="GtkVBox" id="vbox1"><property name="visible">True</property><property name="border_width">12</property><property name="orientation">vertical</property><property name="spacing">18</property><child><object class="GtkVBox" id="vbox2"><property name="visible">True</property><property name="orientation">vertical</property><property name="spacing">6</property><child><object class="GtkLabel" id="label3"><property name="visible">True</property><property name="xalign">0</property><property name="label" translatable="yes"><b>Web Browser</b></property><property name="use_markup">True</property></object><packing><property name="expand">False</property><property name="position">0</property></packing></child><child><object class="GtkAlignment" id="alignment1"><property name="visible">True</property><property name="left_padding">12</property><child><object class="GtkVBox" id="vbox5"><property name="visible">True</property><property name="orientation">vertical</property><property name="spacing">6</property><child><object class="GtkLabel" id="label4"><property name="width_request">360</property><property name="visible">True</property><property name="xalign">0</property><property name="label" translatable="yes">The preferred Web Browser will be used to open hyperlinks.</property><property name="wrap">True</property></object><packing><property name="position">0</property></packing></child><child><object class="GtkComboBox" id="browser"><property name="visible">True</property></object><packing><property name="position">1</property></packing></child></object></child></object><packing><property name="expand">False</property><property name="position">1</property></packing></child></object><packing><property name="expand">False</property><property name="position">0</property></packing></child><child><object class="GtkVBox" id="vbox3"><property name="visible">True</property><property name="orientation">vertical</property><property name="spacing">6</property><child><object class="GtkLabel" id="label5"><property name="visible">True</property><property name="xalign">0</property><property name="label" translatable="yes"><b>Mail client</b></property><property name="use_markup">True</property></object><packing><property name="expand">False</property><property name="position">0</property></packing></child><child><object class="GtkAlignment" id="alignment2"><property name="visible">True</property><property name="left_padding">12</property><child><object class="GtkVBox" id="vbox6"><property name="visible">True</property><property name="orientation">vertical</property><property name="spacing">6</property><child><object class="GtkLabel" id="label6"><property name="width_request">360</property><property name="visible">True</property><property name="xalign">0</property><property name="label" translatable="yes">The preferred Mail Client will be used to compose emails when you click on E-mail addresses.</property><property name="wrap">True</property><property name="width_chars">60</property></object><packing><property name="position">0</property></packing></child><child><object class="GtkComboBox" id="mail_client"><property name="visible">True</property></object><packing><property name="position">1</property></packing></child></object></child></object><packing><property name="expand">False</property><property name="position">1</property></packing></child></object><packing><property name="expand">False</property><property name="position">1</property></packing></child><child><object class="GtkVBox" id="vbox4"><property name="orientation">vertical</property><property name="spacing">6</property><child><object class="GtkLabel" id="label7"><property name="visible">True</property><property name="xalign">0</property><property name="label" translatable="yes"><b>Terminal Emulator</b></property><property name="use_markup">True</property></object><packing><property name="expand">False</property><property name="position">0</property></packing></child><child><object class="GtkAlignment" id="alignment3"><property name="visible">True</property><property name="left_padding">12</property><child><object class="GtkHBox" id="hbox4"><property name="visible">True</property><property name="spacing">6</property><child><object class="GtkLabel" id="label8"><property name="visible">True</property><property name="label" translatable="yes">Command line:</property></object><packing><property name="expand">False</property><property name="position">0</property></packing></child><child><object class="GtkEntry" id="terminal"><property name="visible">True</property><property name="can_focus">True</property><property name="invisible_char">•</property></object><packing><property name="position">1</property></packing></child></object></child></object><packing><property name="expand">False</property><property name="position">1</property></packing></child></object><packing><property name="expand">False</property><property name="position">2</property></packing></child></object></child><child type="tab"><object class="GtkLabel" id="label1"><property name="visible">True</property><property name="label" translatable="yes">System Applications</property></object><packing><property name="tab_fill">False</property></packing></child><child><object class="GtkVBox" id="vbox8"><property name="orientation">vertical</property><child><placeholder/></child></object><packing><property name="position">1</property></packing></child><child type="tab"><object class="GtkLabel" id="label2"><property name="visible">True</property><property name="label" translatable="yes">File Associations</property></object><packing><property name="position">1</property><property name="tab_fill">False</property></packing></child></object><packing><property name="position">1</property></packing></child><child internal-child="action_area"><object class="GtkHButtonBox" id="dialog-action_area1"><property name="visible">True</property><property name="layout_style">end</property><child><object class="GtkButton" id="cancel"><property name="label">gtk-cancel</property><property name="visible">True</property><property name="can_focus">True</property><property name="receives_default">True</property><property name="use_stock">True</property></object><packing><property name="expand">False</property><property name="fill">False</property><property name="position">0</property></packing></child><child><object class="GtkButton" id="ok"><property name="label">gtk-ok</property><property name="visible">True</property><property name="can_focus">True</property><property name="receives_default">True</property><property name="use_stock">True</property></object><packing><property name="expand">False</property><property name="fill">False</property><property name="position">1</property></packing></child></object><packing><property name="expand">False</property><property name="pack_type">end</property><property name="position">0</property></packing></child></object></child><action-widgets><action-widget response="-6">cancel</action-widget><action-widget response="-5">ok</action-widget></action-widgets></object></interface>
Index: pcmanfm-0.9.9~git20110808/src/main-win.c
===================================================================
--- pcmanfm-0.9.9~git20110808.orig/src/main-win.c
+++ pcmanfm-0.9.9~git20110808/src/main-win.c
@@ -795,7 +795,7 @@ void on_go_apps(GtkAction* act, FmMainWi
void fm_main_win_chdir_by_name(FmMainWin* win, const char* path_str)
{
- FmPath* path = fm_path_new(path_str);
+ FmPath* path = fm_path_new_for_str(path_str);
fm_main_win_chdir(win, path);
fm_path_unref(path);
}
@@ -1044,7 +1044,7 @@ static void on_folder_view_clicked(FmFol
{
/* symlinks also has fi->target, but we only handle shortcuts here. */
FmFileInfo* target_fi;
- FmPath* real_path = fm_path_new(fm_file_info_get_target(fi));
+ FmPath* real_path = fm_path_new_for_str(fm_file_info_get_target(fi));
/* query the info of target */
FmJob* job = fm_file_info_job_new(NULL, 0);
fm_file_info_job_add(FM_FILE_INFO_JOB(job), real_path);
Index: pcmanfm-0.9.9~git20110808/src/pcmanfm.c
===================================================================
--- pcmanfm-0.9.9~git20110808.orig/src/pcmanfm.c
+++ pcmanfm-0.9.9~git20110808/src/pcmanfm.c
@@ -357,7 +357,7 @@ gboolean pcmanfm_run()
/* FIXME: This won't work if those filenames are passed via IPC since the receiving process has different cwd. */
/* FIXME: should we use ipc_cwd here? */
char* cwd_str = g_get_current_dir();
- cwd = fm_path_new(cwd_str);
+ cwd = fm_path_new_for_str(cwd_str);
g_free(cwd_str);
}
path = fm_path_new_relative(cwd, *filename);
@@ -578,7 +578,7 @@ _retry:
}
else /* templates in ~/Templates */
{
- FmPath* dir = fm_path_new(g_get_user_special_dir(G_USER_DIRECTORY_TEMPLATES));
+ FmPath* dir = fm_path_new_for_str(g_get_user_special_dir(G_USER_DIRECTORY_TEMPLATES));
FmPath* template = fm_path_new_child(dir, templ);
fm_copy_file(parent, template, cwd);
fm_path_unref(template);
Index: pcmanfm-0.9.10/src/desktop-ui.c
===================================================================
--- pcmanfm-0.9.10.orig/src/desktop-ui.c 2011-10-24 22:21:16.000000000 +0200
+++ pcmanfm-0.9.10/src/desktop-ui.c 2011-11-06 18:57:20.000000000 +0100
@@ -26,6 +26,7 @@
"<menu action='CreateNew'>"
"<menuitem action='NewFolder'/>"
"<menuitem action='NewBlank'/>"
+ "<menuitem action='NewShortcut'/>"
"</menu>"
"<separator/>"
"<menuitem action='Paste'/>"
@@ -55,6 +56,7 @@
{"CreateNew", NULL, N_("Create _New..."), "", NULL, NULL},
{"NewFolder", "folder", N_("Folder"), "<Ctrl><Shift>N", NULL, G_CALLBACK(on_create_new)},
{"NewBlank", "text-x-generic", N_("Blank File"), NULL, NULL, G_CALLBACK(on_create_new)},
+ {"NewShortcut", "system-run", N_("Shortcut"), NULL, NULL, G_CALLBACK(on_create_new)},
{"Prop", GTK_STOCK_PROPERTIES, N_("Desktop Preferences"), "<Alt>Return", NULL, G_CALLBACK(fm_desktop_preference)}
};
Index: pcmanfm-0.9.10/src/desktop.c
===================================================================
--- pcmanfm-0.9.10.orig/src/desktop.c 2011-10-24 22:21:16.000000000 +0200
+++ pcmanfm-0.9.10/src/desktop.c 2011-11-06 18:57:20.000000000 +0100
@@ -2024,6 +2024,8 @@
name = TEMPL_NAME_FOLDER;
else if( strcmp(name, "NewBlank") == 0 )
name = TEMPL_NAME_BLANK;
+ else if( strcmp(name, "NewShortcut") == 0)
+ name = TEMPL_NAME_SHORTCUT;
pcmanfm_create_new(NULL, fm_path_get_desktop(), name);
}
Index: pcmanfm-0.9.10/src/main-win-ui.c
===================================================================
--- pcmanfm-0.9.10.orig/src/main-win-ui.c 2011-10-24 22:21:16.000000000 +0200
+++ pcmanfm-0.9.10/src/main-win-ui.c 2011-11-06 18:57:20.000000000 +0100
@@ -114,6 +114,7 @@
"<menu action='CreateNew'>"
"<menuitem action='NewFolder'/>"
"<menuitem action='NewBlank'/>"
+ "<menuitem action='NewShortcut'/>"
"</menu>"
"<separator/>"
"<menuitem action='Paste'/>"
@@ -189,6 +190,7 @@
{"CreateNew", NULL, N_("Create _New..."), "", NULL, NULL},
{"NewFolder", "folder", N_("Folder"), "<Ctrl><Shift>N", NULL, G_CALLBACK(on_create_new)},
{"NewBlank", "text-x-generic", N_("Blank File"), NULL, NULL, G_CALLBACK(on_create_new)},
+ {"NewShortcut", "system-run", N_("Shortcut"), NULL, NULL, G_CALLBACK(on_create_new)},
{"Prop", GTK_STOCK_PROPERTIES, NULL, NULL, NULL, G_CALLBACK(on_prop)}
};
Index: pcmanfm-0.9.10/src/main-win.c
===================================================================
--- pcmanfm-0.9.10.orig/src/main-win.c 2011-11-06 18:56:30.000000000 +0100
+++ pcmanfm-0.9.10/src/main-win.c 2011-11-06 18:57:20.000000000 +0100
@@ -1227,6 +1227,8 @@
name = TEMPL_NAME_FOLDER;
else if( strcmp(name, "NewBlank") == 0 )
name = TEMPL_NAME_BLANK;
+ else if( strcmp(name, "NewShortcut") == 0 )
+ name = TEMPL_NAME_SHORTCUT;
pcmanfm_create_new(GTK_WINDOW(win), fm_folder_view_get_cwd(fv), name);
}
Index: pcmanfm-0.9.10/src/pcmanfm.h
===================================================================
--- pcmanfm-0.9.10.orig/src/pcmanfm.h 2011-10-24 22:21:16.000000000 +0200
+++ pcmanfm-0.9.10/src/pcmanfm.h 2011-11-06 18:57:20.000000000 +0100
@@ -44,6 +44,7 @@
#define TEMPL_NAME_FOLDER NULL
#define TEMPL_NAME_BLANK (const char*)-1
+#define TEMPL_NAME_SHORTCUT (const char*)-2
void pcmanfm_create_new(GtkWindow* parent, FmPath* cwd, const char* templ);
G_END_DECLS
Index: pcmanfm-0.9.10/src/pcmanfm.c
===================================================================
--- pcmanfm-0.9.10.orig/src/pcmanfm.c 2011-11-06 18:56:30.000000000 +0100
+++ pcmanfm-0.9.10/src/pcmanfm.c 2011-11-06 19:26:48.000000000 +0100
@@ -576,6 +576,31 @@
}
g_object_unref(gf);
}
+ else if ( templ == TEMPL_NAME_SHORTCUT )
+ {
+ char buf[256];
+ GFile* gf = fm_path_to_gfile(dest);
+ printf("Creating Shortcut..."); // Debug message
+
+ if (g_find_program_in_path("lxshortcut"))
+ {
+ sprintf(buf, "lxshortcut -i %s",g_file_get_path(gf));
+ }
+ else
+ {
+ GtkWidget* msg;
+
+ msg = gtk_message_dialog_new( NULL,
+ 0,
+ GTK_MESSAGE_ERROR,
+ GTK_BUTTONS_OK,
+ _("Error, lxshortcut not installed") );
+ gtk_dialog_run( GTK_DIALOG(msg) );
+ gtk_widget_destroy( msg );
+ }
+ system(buf);
+ g_object_unref(gf);
+ }
else /* templates in ~/Templates */
{
FmPath* dir = fm_path_new_for_str(g_get_user_special_dir(G_USER_DIRECTORY_TEMPLATES));
Index: pcmanfm-0.9.10/src/tab-page.c
===================================================================
--- pcmanfm-0.9.10.orig/src/tab-page.c 2012-05-17 20:10:03.000000000 +0200
+++ pcmanfm-0.9.10/src/tab-page.c 2012-05-17 23:02:48.000000000 +0200
@@ -152,7 +152,10 @@
static void on_folder_view_sel_changed(FmFolderView* fv, FmFileInfoList* files, FmTabPage* page)
{
char* msg = page->status_text[FM_STATUS_TEXT_SELECTED_FILES];
- g_free(msg);
+ if (msg)
+ {
+ g_free(msg);
+ }
if(files)
{
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Pcmanfm-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pcmanfm-develop