]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/toplevel.cpp
gtk_signal_connect -> g_signal_connect in unix/mediactrl.cpp
[wxWidgets.git] / src / gtk / toplevel.cpp
index 1d90caaacc6c5c8394911006f370e6a6af4c0de5..cf2801e1e9c638701cbe69dcc2f8da3aea4aafea 100644 (file)
@@ -101,7 +101,7 @@ static void wxgtk_window_set_urgency_hint (GtkWindow *win,
     XFree(wm_hints);
 }
 
-static gint gtk_frame_urgency_timer_callback( wxTopLevelWindowGTK *win )
+static gboolean gtk_frame_urgency_timer_callback( wxTopLevelWindowGTK *win )
 {
 #if defined(__WXGTK20__) && GTK_CHECK_VERSION(2,7,0)
     if(!gtk_check_version(2,7,0))
@@ -150,7 +150,7 @@ static gint gtk_frame_focus_in_callback( GtkWidget *widget,
     switch( win->m_urgency_hint )
     {
         default:
-            gtk_timeout_remove( win->m_urgency_hint );
+            g_source_remove( win->m_urgency_hint );
             // no break, fallthrough to remove hint too
         case -1:
 #if defined(__WXGTK20__) && GTK_CHECK_VERSION(2,7,0)
@@ -223,7 +223,7 @@ static gint gtk_frame_focus_callback( GtkWidget *widget, GtkDirectionType WXUNUS
         wxapp_install_idle_handler();
 
     // This disables GTK's tab traversal
-    gtk_signal_emit_stop_by_name( GTK_OBJECT(widget), "focus" );
+    g_signal_stop_emission_by_name (widget, "focus");
     return TRUE;
 }
 }
@@ -333,9 +333,9 @@ gtk_frame_realized_callback( GtkWidget * WXUNUSED(widget),
 
     // GTK's shrinking/growing policy
     if ((win->m_gdkFunc & GDK_FUNC_RESIZE) == 0)
-        gtk_window_set_policy(GTK_WINDOW(win->m_widget), 0, 0, 1);
+        gtk_window_set_resizable(GTK_WINDOW(win->m_widget), FALSE);
     else
-        gtk_window_set_policy(GTK_WINDOW(win->m_widget), 1, 1, 1);
+        gtk_window_set_resizable(GTK_WINDOW(win->m_widget), TRUE);
 
     // reset the icon
     wxIconBundle iconsOld = win->GetIcons();
@@ -561,8 +561,8 @@ bool wxTopLevelWindowGTK::Create( wxWindow *parent,
     gtk_window_set_title( GTK_WINDOW(m_widget), wxGTK_CONV( title ) );
     GTK_WIDGET_UNSET_FLAGS( m_widget, GTK_CAN_FOCUS );
 
-    gtk_signal_connect( GTK_OBJECT(m_widget), "delete_event",
-        GTK_SIGNAL_FUNC(gtk_frame_delete_callback), (gpointer)this );
+    g_signal_connect (m_widget, "delete_event",
+                      G_CALLBACK (gtk_frame_delete_callback), this);
 
     // m_mainWidget holds the toolbar, the menubar and the client area
     m_mainWidget = gtk_pizza_new();
@@ -573,8 +573,8 @@ bool wxTopLevelWindowGTK::Create( wxWindow *parent,
     if (m_miniEdge == 0) // wxMiniFrame has its own version.
     {
        // For m_mainWidget themes
-       gtk_signal_connect( GTK_OBJECT(m_mainWidget), "expose_event",
-                GTK_SIGNAL_FUNC(gtk_window_expose_callback), (gpointer)this );
+       g_signal_connect (m_mainWidget, "expose_event",
+                         G_CALLBACK (gtk_window_expose_callback), this);
     }
 
     // m_wxwindow only represents the client area without toolbar and menubar
@@ -589,8 +589,8 @@ bool wxTopLevelWindowGTK::Create( wxWindow *parent,
     if (m_parent) m_parent->AddChild( this );
 
     // the user resized the frame by dragging etc.
-    gtk_signal_connect( GTK_OBJECT(m_widget), "size_allocate",
-        GTK_SIGNAL_FUNC(gtk_frame_size_callback), (gpointer)this );
+    g_signal_connect (m_widget, "size_allocate",
+                      G_CALLBACK (gtk_frame_size_callback), this);
 
     PostCreation();
 
@@ -601,28 +601,28 @@ bool wxTopLevelWindowGTK::Create( wxWindow *parent,
 
     //  we cannot set MWM hints and icons before the widget has
     //  been realized, so we do this directly after realization
-    gtk_signal_connect( GTK_OBJECT(m_widget), "realize",
-                        GTK_SIGNAL_FUNC(gtk_frame_realized_callback), (gpointer) this );
+    g_signal_connect (m_widget, "realize",
+                      G_CALLBACK (gtk_frame_realized_callback), this);
 
     // map and unmap for iconized state
-    gtk_signal_connect( GTK_OBJECT(m_widget), "map_event",
-        GTK_SIGNAL_FUNC(gtk_frame_map_callback), (gpointer)this );
-    gtk_signal_connect( GTK_OBJECT(m_widget), "unmap_event",
-        GTK_SIGNAL_FUNC(gtk_frame_unmap_callback), (gpointer)this );
+    g_signal_connect (m_widget, "map_event",
+                      G_CALLBACK (gtk_frame_map_callback), this);
+    g_signal_connect (m_widget, "unmap_event",
+                      G_CALLBACK (gtk_frame_unmap_callback), this);
 
     // the only way to get the window size is to connect to this event
-    gtk_signal_connect( GTK_OBJECT(m_widget), "configure_event",
-        GTK_SIGNAL_FUNC(gtk_frame_configure_callback), (gpointer)this );
+    g_signal_connect (m_widget, "configure_event",
+                      G_CALLBACK (gtk_frame_configure_callback), this);
 
     // disable native tab traversal
-    gtk_signal_connect( GTK_OBJECT(m_widget), "focus",
-        GTK_SIGNAL_FUNC(gtk_frame_focus_callback), (gpointer)this );
+    g_signal_connect (m_widget, "focus",
+                      G_CALLBACK (gtk_frame_focus_callback), this);
 
     // activation
-    gtk_signal_connect( GTK_OBJECT(m_widget), "focus_in_event",
-        GTK_SIGNAL_FUNC(gtk_frame_focus_in_callback), (gpointer)this );
-    gtk_signal_connect( GTK_OBJECT(m_widget), "focus_out_event",
-        GTK_SIGNAL_FUNC(gtk_frame_focus_out_callback), (gpointer)this );
+    g_signal_connect (m_widget, "focus_in_event",
+                      G_CALLBACK (gtk_frame_focus_in_callback), this);
+    g_signal_connect (m_widget, "focus_out_event",
+                      G_CALLBACK (gtk_frame_focus_out_callback), this);
 
     // decorations
     if ((m_miniEdge > 0) || (style & wxSIMPLE_BORDER) || (style & wxNO_BORDER))
@@ -1247,7 +1247,7 @@ void wxTopLevelWindowGTK::RequestUserAttention(int flags)
     ::wxYieldIfNeeded();
 
     if(m_urgency_hint >= 0)
-        gtk_timeout_remove(m_urgency_hint);
+        g_source_remove(m_urgency_hint);
 
     m_urgency_hint = -2;
 
@@ -1257,7 +1257,7 @@ void wxTopLevelWindowGTK::RequestUserAttention(int flags)
 
         if (flags & wxUSER_ATTENTION_INFO)
         {
-            m_urgency_hint = gtk_timeout_add(5000, (GtkFunction)gtk_frame_urgency_timer_callback, this);
+            m_urgency_hint = g_timeout_add(5000, (GSourceFunc)gtk_frame_urgency_timer_callback, this);
         } else {
             m_urgency_hint = -1;
         }