sync to my home copy

This commit is contained in:
Miguel de Icaza 1998-02-28 02:23:00 +00:00
parent b58d39008d
commit 40f47113e0
3 changed files with 29 additions and 10 deletions

View File

@ -123,7 +123,25 @@ desktop_icon_set_position (desktop_icon_t *di, GtkWidget *widget)
static void static void
drop_cb (GtkWidget *widget, GdkEventDropDataAvailable *event, desktop_icon_t *di) drop_cb (GtkWidget *widget, GdkEventDropDataAvailable *event, desktop_icon_t *di)
{ {
char *p;
int count;
int len;
if (strcmp (event->data_type, "url:ALL") == 0){
count = event->data_numbytes;
p = event->data;
do {
len = 1 + strlen (event->data);
count -= len;
printf ("Receiving: %s\n", p);
p += len;
} while (count);
printf ("Receiving: %s %d\n", event->data, event->data_numbytes);
return;
}
if (strcmp (event->data_type, "urls:ALL") == 0){
}
} }
static void static void
@ -175,17 +193,21 @@ desktop_load_dentry (char *filename)
GtkWidget *window; GtkWidget *window;
char *drop_types [] = { char *drop_types [] = {
"url:ALL",
"text/plain" "text/plain"
"url:ALL",
}; };
dentry = gnome_desktop_entry_load (filename); dentry = gnome_desktop_entry_load (filename);
if (!dentry) if (!dentry)
return; return;
window = shaped_icon_new_from_file (dentry->icon, GDK_BUTTON_PRESS_MASK);
if (dentry->icon)
window = shaped_icon_new_from_file (dentry->icon, GDK_BUTTON_PRESS_MASK);
else {
window = gtk_window_new (GTK_WINDOW_POPUP);
gtk_widget_set_usize (window, 20, 20);
}
di = xmalloc (sizeof (desktop_icon_t), "desktop_load_entry"); di = xmalloc (sizeof (desktop_icon_t), "desktop_load_entry");
di->dentry = dentry; di->dentry = dentry;
di->widget = window; di->widget = window;
@ -214,8 +236,9 @@ desktop_create_directory_entry (char *dentry_path, char *pathname, char *short_n
dentry = xmalloc (sizeof (GnomeDesktopEntry), "dcde"); dentry = xmalloc (sizeof (GnomeDesktopEntry), "dcde");
dentry->name = g_strdup (short_name); dentry->name = g_strdup (short_name);
dentry->comment = NULL; dentry->comment = NULL;
dentry->tryexec = NULL;
dentry->exec = g_strdup (pathname); dentry->exec = g_strdup (pathname);
dentry->icon = gnome_unconditional_pixmap_file ("folder.xpm"); dentry->icon = gnome_unconditional_pixmap_file ("gnome-folder.png");
dentry->docpath = NULL; dentry->docpath = NULL;
dentry->type = g_strdup ("Directory"); dentry->type = g_strdup ("Directory");
dentry->location = g_strdup (dentry_path); dentry->location = g_strdup (dentry_path);
@ -241,7 +264,7 @@ get_desktop_icon (char *pathname)
if (full_fname) if (full_fname)
return full_fname; return full_fname;
return gnome_unconditional_pixmap_file ("app.xpm"); return gnome_unconditional_pixmap_file ("launcher-program.xpm");
} }
static void static void

View File

@ -85,13 +85,10 @@ dialog_key_pressed (GtkWidget *win, GdkEventKey *event, Dlg_head *h)
static int on_escape; static int on_escape;
int key; int key;
printf ("evento: 0x%02x (%c)\n", key, key);
key = translate_gdk_keysym_to_curses (event); key = translate_gdk_keysym_to_curses (event);
printf ("evento: 0x%02x (%c)\n", key, key);
if (key == -1) if (key == -1)
return FALSE; return FALSE;
printf ("tecla buenera (%s)\n", on_escape ? "escapada" : "normal");
if (!on_escape){ if (!on_escape){
if (key == 27){ if (key == 27){
on_escape = 1; on_escape = 1;
@ -114,7 +111,6 @@ dialog_key_pressed (GtkWidget *win, GdkEventKey *event, Dlg_head *h)
} }
gtk_signal_emit_stop_by_name (GTK_OBJECT (win), "key_press_event"); gtk_signal_emit_stop_by_name (GTK_OBJECT (win), "key_press_event");
printf ("Mandando: %04x\n", key);
dlg_key_event (h, key); dlg_key_event (h, key);
return TRUE; return TRUE;
} }

View File

@ -163,7 +163,7 @@ x_select_item (WPanel *panel)
gtk_clist_select_row (clist, panel->selected, 0); gtk_clist_select_row (clist, panel->selected, 0);
if (!gtk_clist_row_isvisable (clist, panel->selected)){ if (!gtk_clist_row_is_visible (clist, panel->selected)){
gtk_clist_moveto (clist, panel->selected, 0, 0.5, 0.0); gtk_clist_moveto (clist, panel->selected, 0, 0.5, 0.0);
} }
} }