Use GTK_IS_WINDOW instead of GTK_WIDGET_TOPLEVEL

master
Yevgen Muntyan 2006-06-30 00:51:39 -05:00
parent b327fe7319
commit 0fa8bf2d3d
4 changed files with 9 additions and 9 deletions

View File

@ -292,16 +292,16 @@
</kdevdoctreeview>
<kdevfilecreate>
<filetypes>
<type icon="source" ext="g" name="GAP source" create="template" >
<type icon="source" ext="g" create="template" name="GAP source" >
<descr>A new empty GAP source file</descr>
</type>
<type icon="source_cpp" ext="cpp" name="C++ Source" create="template" >
<type icon="source_cpp" ext="cpp" create="template" name="C++ Source" >
<descr>A new empty C++ file.</descr>
</type>
<type icon="source_h" ext="h" name="C/C++ Header" create="template" >
<type icon="source_h" ext="h" create="template" name="C/C++ Header" >
<descr>A new empty header file for C/C++.</descr>
</type>
<type icon="source_c" ext="c" name="C Source" create="template" >
<type icon="source_c" ext="c" create="template" name="C Source" >
<descr>A new empty C file.</descr>
</type>
</filetypes>

View File

@ -344,7 +344,7 @@ moo_app_about_dialog (GtkWidget *parent)
if (parent)
parent = gtk_widget_get_toplevel (parent);
if (parent && GTK_WIDGET_TOPLEVEL (parent))
if (parent && GTK_IS_WINDOW (parent))
gtk_window_set_transient_for (GTK_WINDOW (about_dialog), GTK_WINDOW (parent));
gtk_window_present (GTK_WINDOW (about_dialog));

View File

@ -155,7 +155,7 @@ moo_position_window_real (GtkWidget *window,
if (parent)
toplevel = gtk_widget_get_toplevel (parent);
if (toplevel && !GTK_WIDGET_TOPLEVEL (toplevel))
if (toplevel && !GTK_IS_WINDOW (toplevel))
toplevel = NULL;
if (toplevel)
@ -171,7 +171,7 @@ moo_position_window_real (GtkWidget *window,
if (!at_mouse && !at_coords && parent && GTK_WIDGET_REALIZED (parent))
{
if (GTK_WIDGET_TOPLEVEL (parent))
if (GTK_IS_WINDOW (parent))
{
gtk_window_set_position (GTK_WINDOW (window), GTK_WIN_POS_CENTER_ON_PARENT);
}
@ -245,7 +245,7 @@ moo_message_dialog (GtkWidget *parent,
if (parent)
toplevel = gtk_widget_get_toplevel (parent);
if (!toplevel || !GTK_WIDGET_TOPLEVEL (toplevel))
if (!toplevel || !GTK_IS_WINDOW (toplevel))
toplevel = NULL;
dialog = create_message_dialog (toplevel ? GTK_WINDOW (toplevel) : NULL,

View File

@ -3226,7 +3226,7 @@ drag_scroll_timeout (MooIconView *view)
toplevel = gtk_widget_get_toplevel (widget);
if (!GTK_WIDGET_TOPLEVEL (toplevel))
if (!GTK_IS_WINDOW (toplevel))
{
g_critical ("%s: oops", G_STRLOC);
goto out;