gtk+ r21164 - trunk/gtk
- From: federico svn gnome org
- To: svn-commits-list gnome org
- Subject: gtk+ r21164 - trunk/gtk
- Date: Wed, 20 Aug 2008 01:11:45 +0000 (UTC)
Author: federico
Date: Wed Aug 20 01:11:45 2008
New Revision: 21164
URL: http://svn.gnome.org/viewvc/gtk+?rev=21164&view=rev
Log:
[PATCH 3/7] bgo543308 - Factor out the code to emit default-size-changed.
Only emit default-size-changed if the file chooser widget is mapped.
It only makes sense to do this once we know our final configuration,
which is actually when we are mapped.
Signed-off-by: Federico Mena Quintero <federico novell com>
Modified:
trunk/gtk/gtkfilechooserdefault.c
Modified: trunk/gtk/gtkfilechooserdefault.c
==============================================================================
--- trunk/gtk/gtkfilechooserdefault.c (original)
+++ trunk/gtk/gtkfilechooserdefault.c Wed Aug 20 01:11:45 2008
@@ -1151,6 +1151,17 @@
}
static void
+emit_default_size_changed (GtkFileChooserDefault *impl)
+{
+ if (!GTK_WIDGET_MAPPED (impl))
+ return;
+
+ profile_msg (" emit default-size-changed start", NULL);
+ g_signal_emit_by_name (impl, "default-size-changed");
+ profile_msg (" emit default-size-changed end", NULL);
+}
+
+static void
update_preview_widget_visibility (GtkFileChooserDefault *impl)
{
if (impl->use_preview_label)
@@ -1178,7 +1189,7 @@
else
gtk_widget_hide (impl->preview_box);
- g_signal_emit_by_name (impl, "default-size-changed");
+ emit_default_size_changed (impl);
}
static void
@@ -5422,7 +5433,7 @@
*/
gtk_widget_queue_draw (impl->browse_files_tree_view);
- g_signal_emit_by_name (impl, "default-size-changed");
+ emit_default_size_changed (impl);
}
static void
@@ -5841,9 +5852,7 @@
if (gtk_widget_has_screen (GTK_WIDGET (impl)))
change_icon_theme (impl);
- profile_msg (" emit default-size-changed start", NULL);
- g_signal_emit_by_name (widget, "default-size-changed");
- profile_msg (" emit default-size-changed end", NULL);
+ emit_default_size_changed (impl);
profile_end ("end", NULL);
}
@@ -5864,7 +5873,7 @@
remove_settings_signal (impl, previous_screen);
check_icon_theme (impl);
- g_signal_emit_by_name (widget, "default-size-changed");
+ emit_default_size_changed (impl);
profile_end ("end", NULL);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]