]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkappchooseronlinepk.c
stylecontext: Do invalidation on first resize container
[~andy/gtk] / gtk / gtkappchooseronlinepk.c
index 4b6df0ec22501e83a08442cec9efc02b3a651768..5b70a5d75cd74efb62bab555b1eb742beca44322 100644 (file)
@@ -14,9 +14,7 @@
  * Library General Public License for more details.
  *
  * You should have received a copy of the GNU Library General Public
- * License along with the Gnome Library; see the file COPYING.LIB.  If not,
- * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  *
  * Authors: Cosimo Cecchi <ccecchi@redhat.com>
  */
@@ -118,12 +116,14 @@ install_mime_types_ready_cb (GObject      *source,
     }
 
   g_simple_async_result_complete (self->priv->result);
+  g_clear_object (&self->priv->result);
 }
 
 static void
 pk_search_mime_async (GtkAppChooserOnline *obj,
                       const gchar         *content_type,
                       GtkWindow           *parent,
+                      GCancellable        *cancellable,
                       GAsyncReadyCallback  callback,
                       gpointer             user_data)
 {
@@ -138,7 +138,8 @@ pk_search_mime_async (GtkAppChooserOnline *obj,
 
 #ifdef GDK_WINDOWING_X11
   window = gtk_widget_get_window (GTK_WIDGET (parent));
-  xid = GDK_WINDOW_XID (window);
+  if (GDK_IS_X11_WINDOW (window))
+    xid = GDK_WINDOW_XID (window);
 #endif
 
   mime_types[0] = content_type;
@@ -152,7 +153,7 @@ pk_search_mime_async (GtkAppChooserOnline *obj,
                                     "hide-confirm-search"),
                      G_DBUS_CALL_FLAGS_NONE,
                      G_MAXINT, /* no timeout */
-                     NULL,
+                     cancellable,
                      install_mime_types_ready_cb,
                      self);
 }