mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-24 20:22:11 +03:00
1999-02-26 Miguel de Icaza <miguel@nuclecu.unam.mx>
* glayout.c (my_app_create_menus): New function, used to create our menus and set the realy properly, to make cpanel (ie, current_panel) always consistent with what the user users. So, no need to kill the tearoff menus in gmc now.
This commit is contained in:
parent
50d9d2c006
commit
cf5ce5b680
@ -1,5 +1,11 @@
|
|||||||
1999-02-26 Miguel de Icaza <miguel@nuclecu.unam.mx>
|
1999-02-26 Miguel de Icaza <miguel@nuclecu.unam.mx>
|
||||||
|
|
||||||
|
* glayout.c (my_app_create_menus): New function, used to create
|
||||||
|
our menus and set the realy properly, to make cpanel (ie,
|
||||||
|
current_panel) always consistent with what the user users.
|
||||||
|
|
||||||
|
So, no need to kill the tearoff menus in gmc now.
|
||||||
|
|
||||||
* gmount.c (is_block_device_mountable): compare the device name
|
* gmount.c (is_block_device_mountable): compare the device name
|
||||||
here.
|
here.
|
||||||
|
|
||||||
|
@ -175,14 +175,9 @@ CORBA_GENERATED = \
|
|||||||
FileManager-skels.c \
|
FileManager-skels.c \
|
||||||
FileManager-common.c
|
FileManager-common.c
|
||||||
|
|
||||||
CORBA_SOURCES = \
|
|
||||||
gcorba.c
|
|
||||||
|
|
||||||
$(CORBA_GENERATED): $(rootdir)/idl/FileManager.idl
|
$(CORBA_GENERATED): $(rootdir)/idl/FileManager.idl
|
||||||
orbit-idl `gnome-config --cflags idl` $(rootdir)/idl/FileManager.idl
|
orbit-idl `gnome-config --cflags idl` $(rootdir)/idl/FileManager.idl
|
||||||
|
|
||||||
$(CORBA_SOURCES): $(CORBA_GENERATED)
|
|
||||||
|
|
||||||
FileManager-impl.c: FileManager.h
|
FileManager-impl.c: FileManager.h
|
||||||
|
|
||||||
EXTRA_DIST = gnome.TODO layout gmc.gnorba mc.keys.in.in gimp.image.desktop
|
EXTRA_DIST = gnome.TODO layout gmc.gnorba mc.keys.in.in gimp.image.desktop
|
||||||
@ -200,6 +195,8 @@ DISTGNOME = \
|
|||||||
main-corba.o: main.c
|
main-corba.o: main.c
|
||||||
$(CC) -c -DHAVE_CORBA $(CPPFLAGS) $(DEFS) $(CFLAGS) $< -o main-corba.o
|
$(CC) -c -DHAVE_CORBA $(CPPFLAGS) $(DEFS) $(CFLAGS) $< -o main-corba.o
|
||||||
|
|
||||||
|
gcorba.o: gcorba.c $(CORBA_GENERATED)
|
||||||
|
|
||||||
all: @mx@ Makefile mc.keys
|
all: @mx@ Makefile mc.keys
|
||||||
|
|
||||||
Makefile: Makefile.in ../config.status
|
Makefile: Makefile.in ../config.status
|
||||||
|
@ -554,6 +554,55 @@ create_new_menu (GnomeApp *app, WPanel *panel)
|
|||||||
g_free (file2);
|
g_free (file2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This routine is a menu relay.
|
||||||
|
*
|
||||||
|
* This is called before the actual command specified in the GnomeUIInfo
|
||||||
|
* structure. This allows me to select the panel (ie, set the global cpanel
|
||||||
|
* variable to which this menu is bound).
|
||||||
|
*
|
||||||
|
* This is important, as we can have a menu tearoffed. And the current hack
|
||||||
|
* of setting cpanel on the focus-in event wont work.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
panel_menu_relay (GtkObject *object, WPanel *panel)
|
||||||
|
{
|
||||||
|
void (*real_func)(GtkObject *object, WPanel *panel);
|
||||||
|
|
||||||
|
real_func = gtk_object_get_user_data (object);
|
||||||
|
set_current_panel (panel);
|
||||||
|
(*real_func)(object, panel);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
my_menu_signal_connect (GnomeUIInfo *uiinfo, gchar *signal_name,
|
||||||
|
GnomeUIBuilderData *uibdata)
|
||||||
|
{
|
||||||
|
gtk_object_set_user_data (GTK_OBJECT (uiinfo->widget), uiinfo->moreinfo);
|
||||||
|
gtk_signal_connect (GTK_OBJECT (uiinfo->widget),
|
||||||
|
signal_name, panel_menu_relay, uibdata->data ?
|
||||||
|
uibdata->data : uiinfo->user_data);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
my_app_create_menus (GnomeApp *app, GnomeUIInfo *uiinfo, void *data)
|
||||||
|
{
|
||||||
|
GnomeUIBuilderData uibdata;
|
||||||
|
|
||||||
|
g_return_if_fail (app != NULL);
|
||||||
|
g_return_if_fail (GNOME_IS_APP (app));
|
||||||
|
g_return_if_fail (uiinfo != NULL);
|
||||||
|
|
||||||
|
uibdata.connect_func = my_menu_signal_connect;
|
||||||
|
uibdata.data = data;
|
||||||
|
uibdata.is_interp = FALSE;
|
||||||
|
uibdata.relay_func = NULL;
|
||||||
|
uibdata.destroy_func = NULL;
|
||||||
|
|
||||||
|
gnome_app_create_menus_custom (app, uiinfo, &uibdata);
|
||||||
|
}
|
||||||
|
|
||||||
WPanel *
|
WPanel *
|
||||||
create_container (Dlg_head *h, char *name, char *geometry)
|
create_container (Dlg_head *h, char *name, char *geometry)
|
||||||
{
|
{
|
||||||
@ -561,6 +610,7 @@ create_container (Dlg_head *h, char *name, char *geometry)
|
|||||||
WPanel *panel;
|
WPanel *panel;
|
||||||
GtkWidget *app, *vbox;
|
GtkWidget *app, *vbox;
|
||||||
int xpos, ypos, width, height;
|
int xpos, ypos, width, height;
|
||||||
|
GnomeUIInfo *uiinfo;
|
||||||
|
|
||||||
gnome_parse_geometry (geometry, &xpos, &ypos, &width, &height);
|
gnome_parse_geometry (geometry, &xpos, &ypos, &width, &height);
|
||||||
|
|
||||||
@ -584,9 +634,12 @@ create_container (Dlg_head *h, char *name, char *geometry)
|
|||||||
gnome_app_set_contents (GNOME_APP (app), vbox);
|
gnome_app_set_contents (GNOME_APP (app), vbox);
|
||||||
|
|
||||||
if (desktop_wm_is_gnome_compliant == 1)
|
if (desktop_wm_is_gnome_compliant == 1)
|
||||||
gnome_app_create_menus_with_data (GNOME_APP (app), gnome_panel_menu_without_desktop, panel);
|
uiinfo = gnome_panel_menu_without_desktop;
|
||||||
else
|
else
|
||||||
gnome_app_create_menus_with_data (GNOME_APP (app), gnome_panel_menu_with_desktop, panel);
|
uiinfo = gnome_panel_menu_with_desktop;
|
||||||
|
|
||||||
|
|
||||||
|
my_app_create_menus (GNOME_APP (app), uiinfo, panel);
|
||||||
|
|
||||||
create_new_menu (GNOME_APP (app), panel);
|
create_new_menu (GNOME_APP (app), panel);
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
#ifdef STDC_HEADERS
|
#ifdef STDC_HEADERS
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@ -64,7 +65,6 @@ void free (void *ptr);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef MOUNTED_VMOUNT /* AIX. */
|
#ifdef MOUNTED_VMOUNT /* AIX. */
|
||||||
#include <stdio.h>
|
|
||||||
#include <fshelp.h>
|
#include <fshelp.h>
|
||||||
#include <sys/vfs.h>
|
#include <sys/vfs.h>
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user