Author: nick Date: 2007-03-10 19:33:56 +0000 (Sat, 10 Mar 2007) New Revision: 25146
Modified: xfce4-panel/trunk/ChangeLog xfce4-panel/trunk/plugins/launcher/launcher-dialog.c Log: * plugins/launcher/launcher-dialog.c: Don't append the %f. Too much side effects as suggested by Jannis. Modified: xfce4-panel/trunk/ChangeLog =================================================================== --- xfce4-panel/trunk/ChangeLog 2007-03-10 15:56:04 UTC (rev 25145) +++ xfce4-panel/trunk/ChangeLog 2007-03-10 19:33:56 UTC (rev 25146) @@ -1,3 +1,8 @@ +2007-03-10 16:07 nick + + * plugins/launcher/launcher-dialog.c: Don't append the %f. Too much side effects as + suggested by Jannis. + 2007-03-10 8:27 nick * plugins/launcher/launcher-exec.c: ifdef the startup data structure. Modified: xfce4-panel/trunk/plugins/launcher/launcher-dialog.c =================================================================== --- xfce4-panel/trunk/plugins/launcher/launcher-dialog.c 2007-03-10 15:56:04 UTC (rev 25145) +++ xfce4-panel/trunk/plugins/launcher/launcher-dialog.c 2007-03-10 19:33:56 UTC (rev 25146) @@ -131,28 +131,15 @@ static gchar * launcher_dialog_parse_exec (const gchar *exec) { - gchar *expanded, *command = NULL; + gchar *command; /* quit if nothing is set */ if (exec == NULL) return NULL; /* expand enviorement variables like ~/ and ~user/ */ - expanded = xfce_expand_variables (exec, NULL); + command = xfce_expand_variables (exec, NULL); - /* use %f if an application hasn't set anything else */ - if (expanded != NULL && - strstr (exec, "%f") == NULL && strstr (exec, "%F") == NULL && - strstr (exec, "%u") == NULL && strstr (exec, "%U") == NULL) - { - command = g_strconcat (expanded, " %f", NULL); - g_free (expanded); - } - else - { - command = expanded; - } - return command; } @@ -746,14 +733,12 @@ if (gtk_dialog_run (GTK_DIALOG (chooser)) == GTK_RESPONSE_ACCEPT) { filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (chooser)); - s = g_strconcat (filename, " %f", NULL); /* set the new entry text */ - gtk_entry_set_text (GTK_ENTRY (ld->entry_exec), s); + gtk_entry_set_text (GTK_ENTRY (ld->entry_exec), filename); /* cleanup */ g_free (filename); - g_free (s); } /* destroy dialog */ _______________________________________________ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits