~ubuntu-branches/ubuntu/dapper/file-roller/dapper-updates

« back to all changes in this revision

Viewing changes to src/gtk-utils.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2006-04-11 08:44:59 UTC
  • mto: This revision was merged to the branch mainline in revision 11.
  • Revision ID: james.westby@ubuntu.com-20060411084459-9r22188ftese2ev2
Tags: upstream-2.14.1
ImportĀ upstreamĀ versionĀ 2.14.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
#include <string.h>
25
25
#include <glib/gi18n.h>
26
26
#include <gtk/gtk.h>
 
27
#include <libgnome/gnome-help.h>
27
28
 
28
29
 
29
30
static void 
769
770
                                           &icon_width, &icon_height);
770
771
        return MAX (icon_width, icon_height);
771
772
}
 
773
 
 
774
 
 
775
void
 
776
show_help_dialog (GtkWindow  *parent, 
 
777
                  const char *section)
 
778
{
 
779
        GError *err;
 
780
 
 
781
        err = NULL;  
 
782
        gnome_help_display ("file-roller", section, &err);
 
783
        
 
784
        if (err != NULL) {
 
785
                GtkWidget *dialog;
 
786
                
 
787
                dialog = _gtk_message_dialog_new (parent,
 
788
                                                  GTK_DIALOG_DESTROY_WITH_PARENT, 
 
789
                                                  GTK_STOCK_DIALOG_ERROR,
 
790
                                                  _("Could not display help"),
 
791
                                                  err->message,
 
792
                                                  GTK_STOCK_OK, GTK_RESPONSE_OK,
 
793
                                                  NULL);
 
794
                gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
 
795
                
 
796
                g_signal_connect (G_OBJECT (dialog), "response",
 
797
                                  G_CALLBACK (gtk_widget_destroy),
 
798
                                  NULL);
 
799
                
 
800
                gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
 
801
                
 
802
                gtk_widget_show (dialog);
 
803
                
 
804
                g_error_free (err);
 
805
        }
 
806
}