Ticket #305: 0001-Compile-with-DGSEAL_ENABLE.-Fixes-http-avahi.org-tic.patch

File 0001-Compile-with-DGSEAL_ENABLE.-Fixes-http-avahi.org-tic.patch, 4.2 KB (added by andre, 3 years ago)

Patch. Bumps gtk+ requirement from 2.12 to 2.14

  • avahi-ui/avahi-ui.c

    From 55c5770a9e9c6a210a4a88821335075f3d9233a7 Mon Sep 17 00:00:00 2001
    From: Andre Klapper <a9016009@gmx.de>
    Date: Sun, 11 Apr 2010 13:51:11 +0200
    Subject: [PATCH] Compile with -DGSEAL_ENABLE. Fixes http://avahi.org/ticket/305
    
    ---
     avahi-ui/avahi-ui.c |   16 ++++++++--------
     configure.ac        |    2 +-
     2 files changed, 9 insertions(+), 9 deletions(-)
    
    diff --git a/avahi-ui/avahi-ui.c b/avahi-ui/avahi-ui.c
    index bd2b3cc..2e8f327 100644
    a b  
    131131static int get_default_response(GtkDialog *dlg) { 
    132132    gint ret = GTK_RESPONSE_NONE; 
    133133 
    134     if (GTK_WINDOW(dlg)->default_widget) 
     134    if (gtk_window_get_default_widget(GTK_WINDOW(dlg))) 
    135135        /* Use the response of the default widget, if possible */ 
    136         ret = gtk_dialog_get_response_for_widget(dlg, GTK_WINDOW(dlg)->default_widget); 
     136        ret = gtk_dialog_get_response_for_widget(dlg, gtk_window_get_default_widget(GTK_WINDOW(dlg))); 
    137137 
    138138    if (ret == GTK_RESPONSE_NONE) { 
    139139        /* Fall back to finding the first positive response */ 
    140140        GList *children, *t; 
    141141        gint bad = GTK_RESPONSE_NONE; 
    142142 
    143         t = children = gtk_container_get_children(GTK_CONTAINER(dlg->action_area)); 
     143        t = children = gtk_container_get_children(GTK_CONTAINER(gtk_dialog_get_action_area(dlg))); 
    144144 
    145145        while (t) { 
    146146            GtkWidget *child = t->data; 
     
    890890 
    891891        gtk_widget_set_sensitive(GTK_WIDGET(dialog), FALSE); 
    892892        cursor = gdk_cursor_new(GDK_WATCH); 
    893         gdk_window_set_cursor(GTK_WIDGET(dialog)->window, cursor); 
     893        gdk_window_set_cursor(gtk_widget_get_window(GTK_WIDGET(dialog)), cursor); 
    894894        gdk_cursor_unref(cursor); 
    895895 
    896896        if (!(d->priv->resolver = avahi_service_resolver_new( 
     
    992992 
    993993    vbox = gtk_vbox_new(FALSE, 8); 
    994994    gtk_container_set_border_width(GTK_CONTAINER(vbox), 8); 
    995     gtk_box_pack_start(GTK_BOX(GTK_DIALOG(p->domain_dialog)->vbox), vbox, TRUE, TRUE, 0); 
     995    gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(p->domain_dialog))), vbox, TRUE, TRUE, 0); 
    996996 
    997997    p->domain_entry = gtk_entry_new(); 
    998998    gtk_entry_set_max_length(GTK_ENTRY(p->domain_entry), AVAHI_DOMAIN_NAME_MAX); 
     
    11141114 
    11151115    vbox = gtk_vbox_new(FALSE, 8); 
    11161116    gtk_container_set_border_width(GTK_CONTAINER(vbox), 8); 
    1117     gtk_box_pack_start(GTK_BOX(GTK_DIALOG(d)->vbox), vbox, TRUE, TRUE, 0); 
     1117    gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(d))), vbox, TRUE, TRUE, 0); 
    11181118 
    11191119    p->domain_label = gtk_label_new(_("Initializing...")); 
    11201120    gtk_label_set_ellipsize(GTK_LABEL(p->domain_label), TRUE); 
     
    11651165    p->domain_button = gtk_button_new_with_mnemonic(_("_Domain...")); 
    11661166    gtk_button_set_image(GTK_BUTTON(p->domain_button), gtk_image_new_from_stock(GTK_STOCK_NETWORK, GTK_ICON_SIZE_BUTTON)); 
    11671167    g_signal_connect(p->domain_button, "clicked", G_CALLBACK(domain_button_clicked), d); 
    1168     gtk_box_pack_start(GTK_BOX(GTK_DIALOG(d)->action_area), p->domain_button, FALSE, TRUE, 0); 
    1169     gtk_button_box_set_child_secondary(GTK_BUTTON_BOX(GTK_DIALOG(d)->action_area), p->domain_button, TRUE); 
     1168    gtk_box_pack_start(GTK_BOX(gtk_dialog_get_action_area(GTK_DIALOG(d))), p->domain_button, FALSE, TRUE, 0); 
     1169    gtk_button_box_set_child_secondary(GTK_BUTTON_BOX(gtk_dialog_get_action_area(GTK_DIALOG(d))), p->domain_button, TRUE); 
    11701170    gtk_widget_show(p->domain_button); 
    11711171 
    11721172    gtk_dialog_set_default_response(GTK_DIALOG(d), GTK_RESPONSE_ACCEPT); 
  • configure.ac

    diff --git a/configure.ac b/configure.ac
    index 1947b8e..4e527bc 100644
    a b  
    531531 
    532532if test "x$HAVE_GTK" = "xyes" ; then 
    533533        # Check for GTK 2.0 
    534         PKG_CHECK_MODULES(GTK20, [ gtk+-2.0 >= 2.12.0 ]) 
     534        PKG_CHECK_MODULES(GTK20, [ gtk+-2.0 >= 2.14.0 ]) 
    535535        AC_SUBST(GTK20_CFLAGS) 
    536536        AC_SUBST(GTK20_LIBS) 
    537537fi