Browse Source

1998-11-27 Miguel de Icaza <miguel@nuclecu.unam.mx>

	* 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.
Miguel de Icaza 26 years ago
parent
commit
74c83737fd
4 changed files with 44 additions and 21 deletions
  1. 13 0
      gnome/ChangeLog
  2. 1 1
      gnome/Makefile.in
  3. 13 13
      gnome/gdesktop.c
  4. 17 7
      gnome/gdnd.c

+ 13 - 0
gnome/ChangeLog

@@ -1,5 +1,18 @@
 1998-11-27  Miguel de Icaza  <miguel@nuclecu.unam.mx>
 
+	* 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.

+ 1 - 1
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	\

+ 13 - 13
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

+ 17 - 7
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;
 	}