示例#1
0
static void create_pixbufs(void)
{
	GtkTextDirection dir =
	    gtk_widget_get_direction(GTK_WIDGET(widgets.app));

	bm_pixbufs = g_new0(BookMarksPixbufs, 1);

	if (dir == GTK_TEXT_DIR_LTR) {
		/* leave this for if we make custom reversable icons
		   if (!bm_pixbufs->pixbuf_closed)
		   bm_pixbufs->pixbuf_closed =
		   pixbuf_finder("book_closed.png", 16, NULL);
		 */

		bm_pixbufs->pixbuf_opened =
		    pixbuf_finder("book_open.png", 16, NULL);
	} else {
		/* leave this for if we make custom reversable icons
		   if (!bm_pixbufs->pixbuf_closed)
		   bm_pixbufs->pixbuf_closed =
		   pixbuf_finder("book_closed_rtol.png", 16, NULL);
		 */

		bm_pixbufs->pixbuf_opened =
		    pixbuf_finder("book_open_rtol.png", 16, NULL);
	}

	bm_pixbufs->pixbuf_closed =
	    pixbuf_finder("epiphany-bookmarks.png", 0, NULL);

	bm_pixbufs->pixbuf_helpdoc =
	    pixbuf_finder("epiphany-bookmark-page.png", 0, NULL);

	if (!bm_pixbufs->pixbuf_helpdoc)
#ifdef USE_GTK_3
		bm_pixbufs->pixbuf_helpdoc =
#ifdef HAVE_GTK_310
		    GDK_PIXBUF(gtk_image_new_from_icon_name("gtk-dnd",
							    GTK_ICON_SIZE_BUTTON));
#else
		    gtk_widget_render_icon_pixbuf(widgets.app,
						  GTK_STOCK_DND,
						  GTK_ICON_SIZE_MENU);
#endif

#else
		bm_pixbufs->pixbuf_helpdoc = gtk_widget_render_icon(widgets.app,
								    GTK_STOCK_DND,
								    GTK_ICON_SIZE_MENU, NULL);
#endif
}
示例#2
0
文件: about_sword.c 项目: acli/xiphos
GtkWidget *gui_create_about_sword(void)
{
	GdkPixbuf *about1_logo_pixbuf;
	GtkWidget *about1;
	gchar *about =
	    _("The SWORD Project is an effort to create an ever-expanding \
software package for research and study of God and His Word. \
The SWORD Project framework allows easy use and study of Bible \
texts, commentaries, lexicons, dictionaries, and other books. \
Many frontends are built using this framework. An installed \
set of books may be shared among all frontends using the \
framework.\n\n \
Books can be downloaded from the SWORD Project.");

	about1_logo_pixbuf = pixbuf_finder("sword-big.png", 0, NULL);

	about1 = gtk_about_dialog_new();
	g_signal_connect(about1, "response",
			 G_CALLBACK(on_dialog_response), NULL);
	gtk_about_dialog_set_program_name(GTK_ABOUT_DIALOG(about1), "The SWORD Project");
	gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(about1), (gchar *)main_get_sword_version());
	gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(about1), about);

	gtk_about_dialog_set_website(GTK_ABOUT_DIALOG(about1), "http://www.crosswire.org/");
	gtk_about_dialog_set_website_label(GTK_ABOUT_DIALOG(about1), _("The SWORD Project"));

	gtk_about_dialog_set_logo(GTK_ABOUT_DIALOG(about1), about1_logo_pixbuf);

	set_window_icon(GTK_WINDOW(about1));

	return about1;
}
示例#3
0
GtkWidget *gui_create_about_xiphos(void)
{
	GdkPixbuf *about1_logo_pixbuf;
	GtkWidget *about1;
	gchar versionbuild[128];

	snprintf(versionbuild, 120, "%s (%s)", VERSION, BUILD_TYPE);

	about1_logo_pixbuf = pixbuf_finder("about.png", 0, NULL);

	about1 = gtk_about_dialog_new();
	g_signal_connect(about1, "response",
			 G_CALLBACK(on_dialog_response), NULL);

	gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(about1), versionbuild);
	gtk_about_dialog_set_copyright(GTK_ABOUT_DIALOG(about1),
				       _("Copyright © 2000-2016 Xiphos Development Team"));
	gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(about1),
				      _("\nPowered by The SWORD Project.\nWe would like to thank Troy Griffitts and all the other folks who have given us The SWORD Project."));
	gtk_about_dialog_set_website(GTK_ABOUT_DIALOG(about1),
				     "http://xiphos.org/");
	gtk_about_dialog_set_authors(GTK_ABOUT_DIALOG(about1), authors);
	gtk_about_dialog_set_documenters(GTK_ABOUT_DIALOG(about1), documenters);
	gtk_about_dialog_set_translator_credits(GTK_ABOUT_DIALOG(about1), translators);
	gtk_about_dialog_set_logo(GTK_ABOUT_DIALOG(about1), about1_logo_pixbuf);

	set_window_icon(GTK_WINDOW(about1));

	return about1;
}
示例#4
0
G_MODULE_EXPORT void
action_about_activate_cb(GtkWidget *widget, EDITOR *e)
{
	GtkWidget *about;
	GdkPixbuf *about_logo;

	about_logo = pixbuf_finder("xiphos-button-125.png", 0, NULL);
	about = gtk_about_dialog_new();

	g_signal_connect(about, "response",
			 G_CALLBACK(on_about_dialog_response), NULL);
	gtk_about_dialog_set_program_name(GTK_ABOUT_DIALOG(about), "WebKit editor, Xiphos");
	gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(about), (gchar *)VERSION);
	gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(about), "Replacement for gtkhtml editor");
	gtk_about_dialog_set_logo(GTK_ABOUT_DIALOG(about), about_logo);
	set_window_icon(GTK_WINDOW(about));
	gtk_widget_show(about);
}