root window accepts drops (does not do anything yet)
setups a simple ~/desktop directory with a link to the home dir various random bits documented in the changelog
Этот коммит содержится в:
родитель
982d4137a8
Коммит
2837e8f447
@ -1,3 +1,11 @@
|
||||
Tue Mar 17 02:38:37 1998 Miguel de Icaza <miguel@nuclecu.unam.mx>
|
||||
|
||||
* gdesktop.c (desktop_setup_default): Create a default desktop
|
||||
entry on the root window for the Home directory if not mc.desktop
|
||||
exists -yet-
|
||||
|
||||
Get drops on the root window to work. Joy and hapiness!
|
||||
|
||||
Tue Mar 17 00:43:50 1998 Tom Tromey <tromey@cygnus.com>
|
||||
|
||||
* glayout.c (gnome_panel_about_menu): "About" item now a stock
|
||||
|
@ -56,6 +56,9 @@ enum {
|
||||
/* The list of icons on the desktop */
|
||||
static GList *desktop_icons;
|
||||
|
||||
/* The X11 root window */
|
||||
static GnomeRootWin *root_window;
|
||||
|
||||
/*
|
||||
* If the dentry is zero, then no information from the on-disk .desktop file is used
|
||||
* In this case, we probably will have to store the geometry for a file somewhere
|
||||
@ -575,10 +578,52 @@ desktop_setup_default (char *desktop_dir)
|
||||
file_mask_defaults ();
|
||||
copy_dir_dir (mc_desktop_dir, desktop_dir);
|
||||
destroy_op_win ();
|
||||
} else {
|
||||
char *desktop_dir_home_link;
|
||||
|
||||
desktop_dir_home_link = concat_dir_and_file (desktop_dir, "Home directory.desktop");
|
||||
mkdir (desktop_dir, 0777);
|
||||
desktop_create_directory_entry (desktop_dir_home_link, "~", "Home directory");
|
||||
|
||||
g_free (desktop_dir_home_link);
|
||||
}
|
||||
free (mc_desktop_dir);
|
||||
}
|
||||
|
||||
void
|
||||
root_drop_cb (GtkWidget *rw, GdkEventDropDataAvailable *event)
|
||||
{
|
||||
printf ("Weeee! Getting a drop on the root window!\n");
|
||||
}
|
||||
|
||||
static GdkFilterReturn
|
||||
root_event_filter (GdkXEvent *xevent, GdkEvent *event, gpointer data)
|
||||
{
|
||||
XEvent *x_event = (XEvent *) xevent;
|
||||
|
||||
printf ("root filter: tipo de evento: %d\n", x_event->type);
|
||||
if (x_event->type == ClientMessage) {
|
||||
printf ("El mundo me ama\n");
|
||||
return GDK_FILTER_CONTINUE;
|
||||
}
|
||||
return GDK_FILTER_CONTINUE;
|
||||
}
|
||||
|
||||
void
|
||||
desktop_root (void)
|
||||
{
|
||||
GtkWidget *rw;
|
||||
|
||||
rw = gnome_rootwin_new ();
|
||||
gtk_signal_connect (GTK_OBJECT (rw), "drop_data_available_event",
|
||||
GTK_SIGNAL_FUNC (root_drop_cb), NULL);
|
||||
|
||||
gtk_widget_realize (rw);
|
||||
gtk_widget_dnd_drop_set (rw, TRUE, drop_types, ELEMENTS (drop_types), FALSE);
|
||||
gtk_widget_show (rw);
|
||||
root_window = GNOME_ROOTWIN (rw);
|
||||
}
|
||||
|
||||
void
|
||||
start_desktop (void)
|
||||
{
|
||||
@ -586,7 +631,8 @@ start_desktop (void)
|
||||
|
||||
if (!exist_file (f))
|
||||
desktop_setup_default (f);
|
||||
|
||||
|
||||
desktop_root ();
|
||||
desktop_load (f);
|
||||
free (f);
|
||||
}
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include <gnome.h>
|
||||
#include <string.h>
|
||||
#include "gdesktop.h"
|
||||
#include <gdk/gdkx.h>
|
||||
/* The spacing between the cute little icon and the text */
|
||||
#define SPACING 2
|
||||
|
||||
@ -280,6 +281,7 @@ make_transparent_window (char *file)
|
||||
{
|
||||
GdkImlibImage *im;
|
||||
GtkWidget *window;
|
||||
XSetWindowAttributes xwa;
|
||||
|
||||
if (!g_file_exists (file))
|
||||
return NULL;
|
||||
@ -288,7 +290,6 @@ make_transparent_window (char *file)
|
||||
if (!im)
|
||||
return NULL;
|
||||
|
||||
printf ("Lo cargo\n");
|
||||
gtk_widget_push_visual (gdk_imlib_get_visual ());
|
||||
gtk_widget_push_colormap (gdk_imlib_get_colormap ());
|
||||
|
||||
@ -297,6 +298,11 @@ make_transparent_window (char *file)
|
||||
gtk_widget_pop_visual ();
|
||||
|
||||
gtk_widget_realize (window);
|
||||
xwa.save_under = True;
|
||||
XChangeWindowAttributes (GDK_WINDOW_XDISPLAY (window->window),
|
||||
GDK_WINDOW_XWINDOW (window->window),
|
||||
CWSaveUnder, &xwa);
|
||||
|
||||
gtk_widget_set_usize (window, im->rgb_width, im->rgb_height);
|
||||
|
||||
/* All of the following 3 lines should not be required, only
|
||||
|
@ -102,7 +102,11 @@ x_create_button (Dlg_head *h, widget_data parent, WButton *b)
|
||||
button = gnome_stock_button (stock);
|
||||
} else
|
||||
button = gtk_button_new_with_label (b->text);
|
||||
|
||||
|
||||
if (b->flags == DEFPUSH_BUTTON){
|
||||
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
|
||||
gtk_widget_grab_default (button);
|
||||
}
|
||||
gtk_widget_show (button);
|
||||
tag = gtk_signal_connect (GTK_OBJECT(button), "clicked", (GtkSignalFunc) gbutton_callback, b);
|
||||
gtk_object_set_data (GTK_OBJECT (button), "click-signal-tag", (void *) tag);
|
||||
@ -432,11 +436,11 @@ x_create_buttonbar (Dlg_head *h, widget_data parent, WButtonBar *bb)
|
||||
GtkButton *b;
|
||||
|
||||
sprintf (buffer, "F%d %s", bb->labels [i].text ? bb->labels [i].text : " ");
|
||||
b = gtk_button_new_with_label (buffer);
|
||||
b = (GtkButton *) gtk_button_new_with_label (buffer);
|
||||
gtk_signal_connect (GTK_OBJECT (b), "clicked",
|
||||
GTK_SIGNAL_FUNC (buttonbar_clicked), bb);
|
||||
gtk_widget_show (b);
|
||||
gtk_box_pack_start_defaults (GTK_BOX (hbox), b);
|
||||
gtk_widget_show (GTK_WIDGET (b));
|
||||
gtk_box_pack_start_defaults (GTK_BOX (hbox), (GtkWidget *)b);
|
||||
}
|
||||
gtk_widget_show (hbox);
|
||||
bb->widget.wdata = (widget_data) hbox;
|
||||
|
@ -1,3 +1,23 @@
|
||||
Tue Mar 16 18:35:53 1998 Stas Maximov <stmax@u213.srcc.msu.su>
|
||||
|
||||
* src/hotlist.c default values for dialogs which add entries to hotlist
|
||||
are now set to the current directory.
|
||||
|
||||
Tue Mar 10 14:42:01 1998 Stas Maximov <stmax@u213.srcc.msu.su>
|
||||
|
||||
* vfs/extfs.c, lib/mc.ext, vfs/extfs/extfs.ini, vfs/extfs/cpio.in
|
||||
Added support for cpio extfs including compressed and gziped
|
||||
cpio archives. compress and gzip handled separately because I saw
|
||||
a lot of systems which have compress, but don't have gzip.
|
||||
|
||||
Sat Feb 21 16:46:49 1998 Stas Maximov <stmax@u213.srcc.msu.su>
|
||||
|
||||
* src/subshell.c: failed to grantpt on SVR4 due to zero-initialized
|
||||
subshell_pid. sigaction handler for SIGCHLD does waitpid(subshell_pid,
|
||||
...) and when subshell_pid == 0 it steals the zombie from grantpt(3)
|
||||
which does fork/exec/waitpid for suid program to set the permissions on
|
||||
pty. It's enough to initialize it to 1 or -2.
|
||||
|
||||
1998-03-16 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
||||
|
||||
* util.c (convert_pattern): Now the internal buffer is malloc()ed
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user