Revert last commit, this should have gone into a branch
Этот коммит содержится в:
родитель
cb83d83796
Коммит
9d3578f803
@ -8,7 +8,7 @@ GNOMEDEFS = -DHAVE_X -DHAVE_GNOME @GNOME_INCLUDEDIR@
|
|||||||
CFLAGS = -g $(XCFLAGS) @X_CFLAGS@
|
CFLAGS = -g $(XCFLAGS) @X_CFLAGS@
|
||||||
CPPFLAGS = $(XCPPFLAGS) -I$(vfsdir) -I$(slangdir) $(GNOMEDEFS)
|
CPPFLAGS = $(XCPPFLAGS) -I$(vfsdir) -I$(slangdir) $(GNOMEDEFS)
|
||||||
LDFLAGS = $(XLDFLAGS) @GNOME_LIBDIR@ @GNOMEUI_LIBS@
|
LDFLAGS = $(XLDFLAGS) @GNOME_LIBDIR@ @GNOMEUI_LIBS@
|
||||||
pCORBA_LDFLAGS = $(XLDFLAGS) @GNOME_LIBDIR@ @GNOMEGNORBA_LIBS@
|
CORBA_LDFLAGS = $(XLDFLAGS) @GNOME_LIBDIR@ @GNOMEGNORBA_LIBS@
|
||||||
DEFS = $(XDEFS)
|
DEFS = $(XDEFS)
|
||||||
LIBS = $(XLIBS) @TERMNET@
|
LIBS = $(XLIBS) @TERMNET@
|
||||||
EXTRALIBS = @LVFS@ -lgtkedit @LINTL@
|
EXTRALIBS = @LVFS@ -lgtkedit @LINTL@
|
||||||
@ -117,7 +117,6 @@ CORBAOBJS = \
|
|||||||
OBJS = \
|
OBJS = \
|
||||||
$(LOBJS) \
|
$(LOBJS) \
|
||||||
$(OOBJS) \
|
$(OOBJS) \
|
||||||
gaction.o \
|
|
||||||
gblist.o \
|
gblist.o \
|
||||||
gcache.o \
|
gcache.o \
|
||||||
gcliplabel.o \
|
gcliplabel.o \
|
||||||
|
@ -247,8 +247,6 @@ gicon_get_icon_for_file (file_entry *fe)
|
|||||||
*/
|
*/
|
||||||
if (gnome_metadata_get (fe->fname, "icon-filename", &size, &buf) == 0){
|
if (gnome_metadata_get (fe->fname, "icon-filename", &size, &buf) == 0){
|
||||||
image = gicon_get_by_filename (buf);
|
image = gicon_get_by_filename (buf);
|
||||||
|
|
||||||
free (buf);
|
|
||||||
|
|
||||||
if (image)
|
if (image)
|
||||||
return image;
|
return image;
|
||||||
|
@ -332,35 +332,28 @@ get_label_text (GtkMenuItem *item)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
mime_command_from_panel (GtkMenuItem *item, WPanel *panel)
|
regex_command_from_panel (GtkMenuItem *item, WPanel *panel)
|
||||||
{
|
{
|
||||||
char *filename;
|
char *filename;
|
||||||
char *action;
|
char *action;
|
||||||
int movedir;
|
int movedir;
|
||||||
|
|
||||||
/*
|
/* This is broken */
|
||||||
* This is broken, but we dont mind. Federico
|
filename = panel->dir.list[panel->selected].fname;
|
||||||
* needs to explain me what was he intending here.
|
action = get_label_text (item);
|
||||||
* panel->selected does not mean, it was the icon
|
|
||||||
* that got clicked.
|
regex_command (filename, action, NULL, &movedir);
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
mime_command_from_desktop_icon (GtkMenuItem *item, char *filename)
|
regex_command_from_desktop_icon (GtkMenuItem *item, char *filename)
|
||||||
{
|
{
|
||||||
char *action;
|
char *action;
|
||||||
int movedir;
|
int movedir;
|
||||||
char *key, *mime_type, *val;
|
|
||||||
action = get_label_text (item);
|
action = get_label_text (item);
|
||||||
|
|
||||||
key = gtk_object_get_user_data (GTK_OBJECT (item));
|
regex_command (filename, action, NULL, &movedir);
|
||||||
mime_type = gnome_mime_type_or_default (filename, NULL);
|
|
||||||
if (!mime_type)
|
|
||||||
return;
|
|
||||||
|
|
||||||
val = gnome_mime_get_value (mime_type, key);
|
|
||||||
exec_extension (filename, val, NULL, NULL, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Create the menu items common to files from panel window and desktop icons, and also the items for
|
/* Create the menu items common to files from panel window and desktop icons, and also the items for
|
||||||
@ -373,8 +366,8 @@ create_regexp_actions (GtkWidget *menu, WPanel *panel, int panel_row, char *file
|
|||||||
GnomeUIInfo *a_uiinfo;
|
GnomeUIInfo *a_uiinfo;
|
||||||
int i;
|
int i;
|
||||||
GtkSignalFunc regex_callback;
|
GtkSignalFunc regex_callback;
|
||||||
char *mime_type;
|
char *p, *q;
|
||||||
GList *keys, *l;
|
int c;
|
||||||
GnomeUIInfo uiinfo[] = {
|
GnomeUIInfo uiinfo[] = {
|
||||||
{ 0 },
|
{ 0 },
|
||||||
GNOMEUIINFO_END
|
GNOMEUIINFO_END
|
||||||
@ -383,12 +376,12 @@ create_regexp_actions (GtkWidget *menu, WPanel *panel, int panel_row, char *file
|
|||||||
if (panel) {
|
if (panel) {
|
||||||
a_uiinfo = panel_actions;
|
a_uiinfo = panel_actions;
|
||||||
closure = panel;
|
closure = panel;
|
||||||
regex_callback = mime_command_from_desktop_icon;
|
regex_callback = regex_command_from_desktop_icon;
|
||||||
regex_closure = filename;
|
regex_closure = filename;
|
||||||
} else {
|
} else {
|
||||||
a_uiinfo = desktop_icon_actions;
|
a_uiinfo = desktop_icon_actions;
|
||||||
closure = filename;
|
closure = filename;
|
||||||
regex_callback = mime_command_from_desktop_icon;
|
regex_callback = regex_command_from_desktop_icon;
|
||||||
regex_closure = filename;
|
regex_closure = filename;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -402,34 +395,30 @@ create_regexp_actions (GtkWidget *menu, WPanel *panel, int panel_row, char *file
|
|||||||
|
|
||||||
/* Fill in the regex command part */
|
/* Fill in the regex command part */
|
||||||
|
|
||||||
mime_type = gnome_mime_type_or_default (filename, NULL);
|
p = regex_command (filename, NULL, NULL, NULL);
|
||||||
if (!mime_type)
|
if (!p)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
keys = gnome_mime_get_keys (mime_type);
|
|
||||||
|
|
||||||
for (l = keys; l; l = l->next) {
|
for (;;) {
|
||||||
char *key = l->data;
|
/* Strip off an entry */
|
||||||
char *str;
|
|
||||||
|
|
||||||
str = key;
|
|
||||||
if (strncmp (key, "open.", 5) != 0)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
str += 5;
|
while (*p == ' ' || *p == '\t')
|
||||||
while (*str && *str != '.')
|
p++;
|
||||||
str++;
|
|
||||||
|
|
||||||
if (*str)
|
if (!*p)
|
||||||
str++;
|
break;
|
||||||
|
|
||||||
if (!*str)
|
q = p;
|
||||||
continue;
|
while (*q && *q != '=' && *q != '\t')
|
||||||
|
q++;
|
||||||
|
|
||||||
|
c = *q;
|
||||||
|
*q = 0;
|
||||||
|
|
||||||
/* Create the item for that entry */
|
/* Create the item for that entry */
|
||||||
|
|
||||||
uiinfo[0].type = GNOME_APP_UI_ITEM;
|
uiinfo[0].type = GNOME_APP_UI_ITEM;
|
||||||
uiinfo[0].label = str;
|
uiinfo[0].label = p;
|
||||||
uiinfo[0].hint = NULL;
|
uiinfo[0].hint = NULL;
|
||||||
uiinfo[0].moreinfo = regex_callback;
|
uiinfo[0].moreinfo = regex_callback;
|
||||||
uiinfo[0].user_data = regex_closure;
|
uiinfo[0].user_data = regex_closure;
|
||||||
@ -441,9 +430,14 @@ create_regexp_actions (GtkWidget *menu, WPanel *panel, int panel_row, char *file
|
|||||||
uiinfo[0].widget = NULL;
|
uiinfo[0].widget = NULL;
|
||||||
|
|
||||||
fill_menu (GTK_MENU_SHELL (menu), uiinfo, insert_pos++);
|
fill_menu (GTK_MENU_SHELL (menu), uiinfo, insert_pos++);
|
||||||
gtk_object_set_user_data (GTK_OBJECT (uiinfo [0].widget), key);
|
|
||||||
|
/* Next! */
|
||||||
|
|
||||||
|
if (!c)
|
||||||
|
break;
|
||||||
|
|
||||||
|
p = q + 1;
|
||||||
}
|
}
|
||||||
g_list_free (keys);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Convenience callback to exit the main loop of a modal popup menu when it is deactivated*/
|
/* Convenience callback to exit the main loop of a modal popup menu when it is deactivated*/
|
||||||
|
@ -1108,8 +1108,6 @@ panel_icon_list_select_icon (GtkWidget *widget, int index, GdkEvent *event, WPan
|
|||||||
display_mini_info (panel);
|
display_mini_info (panel);
|
||||||
execute_hooks (select_file_hook);
|
execute_hooks (select_file_hook);
|
||||||
|
|
||||||
if (event)
|
|
||||||
printf ("Icon list select icon, event->type= %d %d %d\n", event->type, GDK_BUTTON_PRESS, GDK_2BUTTON_PRESS);
|
|
||||||
if (!event)
|
if (!event)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -2097,9 +2095,8 @@ x_create_panel (Dlg_head *h, widget_data parent, WPanel *panel)
|
|||||||
button_switch_to_listing (panel),
|
button_switch_to_listing (panel),
|
||||||
"Switch view to detailed view.", NULL);
|
"Switch view to detailed view.", NULL);
|
||||||
dock = gnome_dock_item_new ("gmc-toolbar", GNOME_DOCK_ITEM_BEH_EXCLUSIVE | GNOME_DOCK_ITEM_BEH_NEVER_VERTICAL);
|
dock = gnome_dock_item_new ("gmc-toolbar", GNOME_DOCK_ITEM_BEH_EXCLUSIVE | GNOME_DOCK_ITEM_BEH_NEVER_VERTICAL);
|
||||||
gtk_container_add (GTK_CONTAINER(dock),status_line);
|
gtk_container_add(GTK_CONTAINER(dock),status_line);
|
||||||
gnome_dock_add_item (GNOME_DOCK(GNOME_APP (panel->xwindow)->dock),
|
gnome_dock_add_item (GNOME_DOCK(GNOME_APP (panel->xwindow)->dock), dock, GNOME_DOCK_TOP, 1, 0, 0, FALSE);
|
||||||
GNOME_DOCK_ITEM (dock), GNOME_DOCK_TOP, 1, 0, 0, FALSE);
|
|
||||||
gtk_widget_show_all (dock);
|
gtk_widget_show_all (dock);
|
||||||
|
|
||||||
|
|
||||||
|
@ -174,11 +174,6 @@ int view_file_at_line (char *filename, int plain_view, int internal, int start_l
|
|||||||
if (internal){
|
if (internal){
|
||||||
char view_entry [32];
|
char view_entry [32];
|
||||||
|
|
||||||
#ifdef HAVE_GNOME
|
|
||||||
if (!gmc_view (filename, start_line)){
|
|
||||||
view (0, filename, &move_dir, start_line);
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
if (start_line != 0)
|
if (start_line != 0)
|
||||||
sprintf (view_entry, "View:%d", start_line);
|
sprintf (view_entry, "View:%d", start_line);
|
||||||
else
|
else
|
||||||
@ -188,7 +183,6 @@ int view_file_at_line (char *filename, int plain_view, int internal, int start_l
|
|||||||
view (0, filename, &move_dir, start_line);
|
view (0, filename, &move_dir, start_line);
|
||||||
repaint_screen ();
|
repaint_screen ();
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
} else {
|
} else {
|
||||||
char *localcopy;
|
char *localcopy;
|
||||||
|
|
||||||
|
@ -53,7 +53,6 @@
|
|||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
#endif /* SCO_FLAVOR */
|
#endif /* SCO_FLAVOR */
|
||||||
|
|
||||||
#include <glib.h>
|
|
||||||
/* "$Id$" */
|
/* "$Id$" */
|
||||||
|
|
||||||
/* If set, we execute the file command to check the file type */
|
/* If set, we execute the file command to check the file type */
|
||||||
@ -103,7 +102,7 @@ quote_block (quote_func_t quote_func, char **quoting_block)
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
exec_extension (char *filename, char *data, char **drops, int *move_dir, int start_line)
|
exec_extension (char *filename, char *data, char **drops, int *move_dir, int start_line)
|
||||||
{
|
{
|
||||||
char *file_name;
|
char *file_name;
|
||||||
@ -125,9 +124,6 @@ exec_extension (char *filename, char *data, char **drops, int *move_dir, int sta
|
|||||||
struct stat mystat;
|
struct stat mystat;
|
||||||
quote_func_t quote_func = name_quote;
|
quote_func_t quote_func = name_quote;
|
||||||
|
|
||||||
g_return_if_fail (filename != NULL);
|
|
||||||
g_return_if_fail (data != NULL);
|
|
||||||
|
|
||||||
/* Avoid making a local copy if we are doing a cd */
|
/* Avoid making a local copy if we are doing a cd */
|
||||||
if (!vfs_file_is_local(filename))
|
if (!vfs_file_is_local(filename))
|
||||||
do_local_copy = 1;
|
do_local_copy = 1;
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
#define __EXT_H
|
#define __EXT_H
|
||||||
|
|
||||||
char *regex_command (char *filename, char *action, char **drops, int *move_dir);
|
char *regex_command (char *filename, char *action, char **drops, int *move_dir);
|
||||||
void exec_extension (char *filename, char *data, char **drops, int *move_dir, int start_line);
|
|
||||||
|
|
||||||
/* Call it after the user has edited the mc.ext file,
|
/* Call it after the user has edited the mc.ext file,
|
||||||
* to flush the cached mc.ext file
|
* to flush the cached mc.ext file
|
||||||
|
@ -2056,15 +2056,8 @@ do_enter_on_file_entry (file_entry *fe)
|
|||||||
return 1;
|
return 1;
|
||||||
} else {
|
} else {
|
||||||
char *p;
|
char *p;
|
||||||
|
|
||||||
#ifdef HAVE_GNOME
|
|
||||||
if (gmc_open (fe))
|
|
||||||
return 1;
|
|
||||||
else
|
|
||||||
return 0;
|
|
||||||
#else
|
|
||||||
p = regex_command (fe->fname, "Open", NULL, 0);
|
p = regex_command (fe->fname, "Open", NULL, 0);
|
||||||
#endif
|
|
||||||
if (p && (strcmp (p, "Success") == 0))
|
if (p && (strcmp (p, "Success") == 0))
|
||||||
return 1;
|
return 1;
|
||||||
else
|
else
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user