From 74c83737fd778257e9a7041aee838c163cc42797 Mon Sep 17 00:00:00 2001 From: Miguel de Icaza Date: Sat, 28 Nov 1998 03:12:13 +0000 Subject: [PATCH] 1998-11-27 Miguel de Icaza * Makefile.in (OOBJS): Add filegui.o back until the GTK-specific filegui is written. * gdesktop.c (check_window_in_one_panel): Provide better error messages here for debugging purposes. Disable stubs for filegui.c until they are actually implemented. I need to debug stuff. * gdnd.c (find_panel_owning_window): Use the new gtk_drag_get_source_widget function to find out reliably if the drag source happens to be in this application. * gscreen.c (x_create_panel): Set the usize for the ministatus label to be (0, -1), this means: do not request any horizontal space, use any vertical space given. Put the ministatus inside an hbox, and use gtk_container_set_resize_mode in this hbox to stop any queue events from being propagated up in the hierachy of widgets This kills all of the CList/GnomeIconList/Scrollbar/Toolbar flickering now. --- gnome/ChangeLog | 13 +++++++++++++ gnome/Makefile.in | 2 +- gnome/gdesktop.c | 26 +++++++++++++------------- gnome/gdnd.c | 24 +++++++++++++++++------- 4 files changed, 44 insertions(+), 21 deletions(-) diff --git a/gnome/ChangeLog b/gnome/ChangeLog index 7f5a158eb..cc14f612b 100644 --- a/gnome/ChangeLog +++ b/gnome/ChangeLog @@ -1,5 +1,18 @@ 1998-11-27 Miguel de Icaza + * Makefile.in (OOBJS): Add filegui.o back until the GTK-specific + filegui is written. + + * gdesktop.c (check_window_in_one_panel): Provide better error + messages here for debugging purposes. + + Disable stubs for filegui.c until they are actually implemented. + I need to debug stuff. + + * gdnd.c (find_panel_owning_window): Use the new + gtk_drag_get_source_widget function to find out reliably if the + drag source happens to be in this application. + * gscreen.c (x_create_panel): Set the usize for the ministatus label to be (0, -1), this means: do not request any horizontal space, use any vertical space given. diff --git a/gnome/Makefile.in b/gnome/Makefile.in index 5d87df2a6..f0ae74e3a 100644 --- a/gnome/Makefile.in +++ b/gnome/Makefile.in @@ -83,7 +83,7 @@ OOBJS = main.o dlg.o screen.o widget.o wtools.o info.o boxes.o \ win.o color.o profile.o user.o ext.o setup.o tree.o \ subshell.o terms.o achown.o fsusage.o mountlist.o \ @XCURSES@ @REGEX_O@ complete.o command.o \ - option.o cmd.o utilunix.o xslint.o + option.o cmd.o utilunix.o xslint.o filegui.o OBJS = $(LOBJS) $(OOBJS) \ gblist.o \ diff --git a/gnome/gdesktop.c b/gnome/gdesktop.c index 0202e5e63..49915c5e3 100644 --- a/gnome/gdesktop.c +++ b/gnome/gdesktop.c @@ -680,7 +680,7 @@ desktop_destroy (void) -#if 1 +#if 0 /* Stubs for filegui.h */ #include "file.h" @@ -689,82 +689,82 @@ desktop_destroy (void) FileProgressStatus file_progress_show_source (char *path) { - g_warning ("Implement this function!\n"); + g_warning ("file_progres_show_source: Implement this function!\n"); return FILE_CONT; } FileProgressStatus file_progress_show_target (char *path) { - g_warning ("Implement this function!\n"); + g_warning ("file_progres_show_target: Implement this function!\n"); return FILE_CONT; } FileProgressStatus file_progress_show_deleting (char *path) { - g_warning ("Implement this function!\n"); + g_warning ("file_progress_show_deleting: Implement this function!\n"); return FILE_CONT; } FileProgressStatus file_progress_show (long done, long total) { - g_warning ("Implement this function!\n"); + g_warning ("file-progress_show; Implement this function!\n"); return FILE_CONT; } FileProgressStatus file_progress_show_count (long done, long total) { - g_warning ("Implement this function!\n"); + g_warning ("file_progress_show_count: Implement this function!\n"); return FILE_CONT; } FileProgressStatus file_progress_show_bytes (long done, long total) { - g_warning ("Implement this function!\n"); + g_warning ("file_progress_show_bytes: Implement this function!\n"); return FILE_CONT; } FileProgressStatus file_progress_real_query_replace (enum OperationMode mode, char *destname, struct stat *_s_stat, struct stat *_d_stat) { - g_warning ("Implement this function!\n"); + g_warning ("file_progress_real_query_replace: Implement this function!\n"); return FILE_CONT; } void file_progress_set_stalled_label (char *stalled_msg) { - g_warning ("Implement this function!\n"); + g_warning ("file_progress_set_stalled_label: Implement this function!\n"); } char * panel_operate_generate_prompt (char* cmd_buf, WPanel* panel, int operation, int only_one, struct stat* src_stat) { - g_warning ("Implement this function!\n"); + g_warning ("panel_opreate_create_prompt: Implement this function!\n"); return NULL; } char * file_mask_dialog (FileOperation operation, char *text, char *def_text, int only_one, int *do_background) { - g_warning ("Implement this function!\n"); + g_warning ("file_mask_dialog: Implement this function!\n"); return NULL; } void create_op_win (FileOperation op, int with_eta) { - g_warning ("Implement this function!\n"); + g_warning ("create_op_win: Implement this function!\n"); } void destroy_op_win (void) { - g_warning ("Implement this function!\n"); + g_warning ("destory_op_win: Implement this function!\n"); } #endif diff --git a/gnome/gdnd.c b/gnome/gdnd.c index 3d831add2..4f074573b 100644 --- a/gnome/gdnd.c +++ b/gnome/gdnd.c @@ -65,23 +65,33 @@ get_action (void) * NULL. */ static WPanel * -find_panel_owning_window (GdkWindow *window) +find_panel_owning_window (GdkDragContext *context) { GList *list; WPanel *panel; GdkWindowPrivate *wp, *lwp; + GtkWidget *source_widget; - wp = (GdkWindowPrivate *) window; + source_widget = gtk_drag_get_source_widget (context); + if (!source_widget) + return NULL; + + /* + * We will scan the list of existing WPanels. We + * uniformize the thing by pulling the toplevel + * widget for each WPanel and compare this to the + * toplevel source_widget + */ + source_widget = gtk_widget_get_toplevel (source_widget); for (list = containers; list; list = list->next) { + GtkWidget *panel_toplevel_widget; + panel = ((PanelContainer *) list->data)->panel; - if (panel->list_type == list_icons) - lwp = (GdkWindowPrivate *) GTK_WIDGET (panel->icons)->window; - else - lwp = (GdkWindowPrivate *) GTK_CLIST (panel->list)->clist_window; + panel_toplevel_widget = panel->xwindow; - if (lwp->xwindow == wp->xwindow) + if (panel->xwindow == source_widget) return panel; }