Require gtk+ 2.1.1

2002-10-31  Anders Carlsson  <andersca@gnu.org>

	* configure.in: Require gtk+ 2.1.1

	* libnautilus-private/nautilus-directory-background.c:
	(screen_size_changed), (remove_connection),
	(desktop_background_realized):
	* src/nautilus-desktop-window.c:
	(nautilus_desktop_window_screen_size_changed), (unrealize),
	(realize):
	Add support for the size_changed signal so that the desktop
	window will resize correctly.
This commit is contained in:
Anders Carlsson 2002-10-31 08:37:30 +00:00 committed by Anders Carlsson
parent c64ec3e55b
commit a5bcb0f013
4 changed files with 61 additions and 1 deletions

View file

@ -1,3 +1,16 @@
2002-10-31 Anders Carlsson <andersca@gnu.org>
* configure.in: Require gtk+ 2.1.1
* libnautilus-private/nautilus-directory-background.c:
(screen_size_changed), (remove_connection),
(desktop_background_realized):
* src/nautilus-desktop-window.c:
(nautilus_desktop_window_screen_size_changed), (unrealize),
(realize):
Add support for the size_changed signal so that the desktop
window will resize correctly.
2002-10-26 Thomas Vander Stichele <thomas@apestaart.org>
* components/sample/Nautilus_View_sample.server.in.in:

View file

@ -15,7 +15,7 @@ GNOME_REQUIRED=2.0.1
GNOME_UI_REQUIRED=2.1.1
GNOME_VFS_REQUIRED=1.9
PANGO_REQUIRED=1.1.2
GTK_REQUIRED=2.1.0
GTK_REQUIRED=2.1.1
MEDUSA_REQUIRED=0.5.1
RSVG_REQUIRED=2.0.1
XML_REQUIRED=2.4.7

View file

@ -28,6 +28,7 @@
#include "nautilus-directory-background.h"
#include <eel/eel-gdk-extensions.h>
#include <eel/eel-gtk-extensions.h>
#include <eel/eel-background.h>
#include "nautilus-global-preferences.h"
#include "nautilus-metadata.h"
@ -63,6 +64,25 @@ static gboolean nautilus_file_background_matches_default_settings (
const char* image, const char* default_image,
EelBackgroundImagePlacement placement, EelBackgroundImagePlacement default_placement);
static void
screen_size_changed (GdkScreen *screen, NautilusIconContainer *icon_container)
{
EelBackground *background;
background = eel_get_widget_background (GTK_WIDGET (icon_container));
nautilus_file_update_desktop_pixmaps (background);
}
static void
remove_connection (NautilusIconContainer *icon_container, GdkScreen *screen)
{
g_signal_handlers_disconnect_by_func
(screen,
G_CALLBACK (screen_size_changed),
icon_container);
}
static void
desktop_background_realized (NautilusIconContainer *icon_container, void *disconnect_signal)
{
@ -84,6 +104,11 @@ desktop_background_realized (NautilusIconContainer *icon_container, void *discon
gtk_widget_get_screen (GTK_WIDGET (icon_container)));
nautilus_file_update_desktop_pixmaps (background);
g_signal_connect (gtk_widget_get_screen (GTK_WIDGET (icon_container)), "size_changed",
G_CALLBACK (screen_size_changed), icon_container);
g_signal_connect (icon_container, "unrealize", G_CALLBACK (remove_connection),
gtk_widget_get_screen (GTK_WIDGET (icon_container)));
}
void

View file

@ -79,6 +79,21 @@ nautilus_desktop_window_update_directory (NautilusDesktopWindow *window)
g_free (desktop_directory_uri);
}
static void
nautilus_desktop_window_screen_size_changed (GdkScreen *screen,
NautilusDesktopWindow *window)
{
int width_request, height_request;
width_request = gdk_screen_get_width (screen);
height_request = gdk_screen_get_height (screen);
g_object_set (window,
"width_request", width_request,
"height_request", height_request,
NULL);
}
NautilusDesktopWindow *
nautilus_desktop_window_new (NautilusApplication *application,
GdkScreen *screen)
@ -265,6 +280,10 @@ unrealize (GtkWidget *widget)
gdk_property_delete (root_window,
gdk_atom_intern ("NAUTILUS_DESKTOP_WINDOW_ID", TRUE));
g_signal_handlers_disconnect_by_func (gtk_window_get_screen (GTK_WINDOW (window)),
G_CALLBACK (nautilus_desktop_window_screen_size_changed),
window);
GTK_WIDGET_CLASS (parent_class)->unrealize (widget);
}
@ -319,6 +338,9 @@ realize (GtkWidget *widget)
set_wmspec_desktop_hint (widget->window);
set_desktop_window_id (window, widget->window);
g_signal_connect (gtk_window_get_screen (GTK_WINDOW (window)), "size_changed",
G_CALLBACK (nautilus_desktop_window_screen_size_changed), window);
}
static void