summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@gnu.org>2002-10-31 08:37:30 +0000
committerAnders Carlsson <andersca@src.gnome.org>2002-10-31 08:37:30 +0000
commita5bcb0f0132f65564db75b931283ba86bb33c6e1 (patch)
tree88b45e52ae8d4b433f1cf8f5e42b804620995934
parentc64ec3e55b8048e80c7f612368fe3d76ae1a7c3d (diff)
downloadnautilus-a5bcb0f0132f65564db75b931283ba86bb33c6e1.tar.gz
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.
-rw-r--r--ChangeLog13
-rw-r--r--configure.in2
-rw-r--r--libnautilus-private/nautilus-directory-background.c25
-rw-r--r--src/nautilus-desktop-window.c22
4 files changed, 61 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index d0bca63cf..47d4f559e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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:
diff --git a/configure.in b/configure.in
index c7d50a744..baa307d1e 100644
--- a/configure.in
+++ b/configure.in
@@ -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
diff --git a/libnautilus-private/nautilus-directory-background.c b/libnautilus-private/nautilus-directory-background.c
index ac0a8166b..22b55f4eb 100644
--- a/libnautilus-private/nautilus-directory-background.c
+++ b/libnautilus-private/nautilus-directory-background.c
@@ -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"
@@ -64,6 +65,25 @@ static gboolean nautilus_file_background_matches_default_settings (
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)
{
EelBackground *background;
@@ -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
diff --git a/src/nautilus-desktop-window.c b/src/nautilus-desktop-window.c
index 77d6488d3..24fde2190 100644
--- a/src/nautilus-desktop-window.c
+++ b/src/nautilus-desktop-window.c
@@ -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