38#define ABOUT_RESPONSE_ID_LICENCE 1
39#define ABOUT_RESPONSE_ID_CREDITS 2
80 switch (response_id) {
92 gtk_widget_destroy(GTK_WIDGET(
dialog));
97 GtkWidget *
dialog, *vbox, *label;
102 dialog = gtk_dialog_new_with_buttons(
"About NetSurf",
104 GTK_DIALOG_DESTROY_WITH_PARENT,
107 "Close", GTK_RESPONSE_CANCEL,
115 pixbufs = gtk_window_get_default_icon_list();
116 if (pixbufs != NULL) {
120 GTK_ICON_SIZE_DIALOG);
121 g_list_free(pixbufs);
123 gtk_box_pack_start(GTK_BOX(vbox), image, FALSE, FALSE, 0);
127 label = gtk_label_new (NULL);
128 name_string = g_markup_printf_escaped(
"<span size=\"xx-large\" weight=\"bold\">NetSurf %s</span>",
netsurf_version);
129 gtk_label_set_markup (GTK_LABEL (label), name_string);
131 gtk_label_set_selectable (GTK_LABEL (label), TRUE);
132 gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_CENTER);
133 gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
136 gtk_label_set_selectable(GTK_LABEL (label), TRUE);
137 gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_CENTER);
138 gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
139 gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
141 label = gtk_label_new(
messages_get(
"NetSurfCopyright"));
142 gtk_label_set_selectable(GTK_LABEL(label), TRUE);
143 gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_CENTER);
144 gtk_box_pack_start(GTK_BOX (vbox), label, FALSE, FALSE, 0);
150 g_signal_connect_swapped(
dialog,
156 gtk_widget_show_all(
dialog);
Browser window creation and manipulation interface.
nserror browser_window_create(enum browser_window_create_flags flags, struct nsurl *url, struct nsurl *referrer, struct browser_window *existing, struct browser_window **bw)
Create and open a new root browser window with the given page.
browser_window_create_flags
flags to browser_window_create
@ BW_CREATE_HISTORY
this will form a new history node (don't set for back/reload/etc)
@ BW_CREATE_TAB
New gui_window to be tab in same window as "existing" gui_window.
void nsgtk_dialog_set_has_separator(GtkDialog *dialog, gboolean setting)
GtkWidget * nsgtk_image_new_from_pixbuf_icon(GdkPixbuf *pixbuf, GtkIconSize size)
creates a new image widget of an appropriate icon size from a pixbuf.
GtkWidget * nsgtk_dialog_get_content_area(GtkDialog *dialog)
GtkWidget * nsgtk_vbox_new(gboolean homogeneous, gint spacing)
Compatibility functions for older GTK versions (interface)
nserror
Enumeration of error codes.
#define ABOUT_RESPONSE_ID_CREDITS
#define ABOUT_RESPONSE_ID_LICENCE
void nsgtk_about_dialog_init(GtkWindow *parent)
static void nsgtk_about_dialog_response(GtkDialog *dialog, gint response_id, gpointer user_data)
About dialog response handling.
static void about_open(const char *url_text)
Open a url and a browser window/tab.
nserror nsgtk_warning(const char *warning, const char *detail)
Warn the user of an event.
const char * messages_get_errorcode(nserror code)
lookup of a message by errorcode from the standard Messages hash.
const char * messages_get(const char *key)
Fast lookup of a message by key from the standard Messages hash.
Localised message support (interface).
NetSurf URL handling (interface).
nserror nsurl_create(const char *const url_s, nsurl **url)
Create a NetSurf URL object from a URL string.
void nsurl_unref(nsurl *url)
Drop a reference to a NetSurf URL object.
struct nsurl nsurl
NetSurf URL object.
Option reading and saving interface.
#define nsoption_bool(OPTION)
Get the value of a boolean option.
Version information interface.