Commit fe110808 authored by Victor Ananjevsky's avatar Victor Ananjevsky

remove fore and back options from text dialog

parent 75739709
......@@ -595,10 +595,6 @@ static GOptionEntry scale_options[] = {
static GOptionEntry text_options[] = {
{ "text-info", 0, G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &text_mode,
N_("Display text information dialog"), NULL },
{ "fore", 0, 0, G_OPTION_ARG_STRING, &options.text_data.fore,
N_("Use specified color for text"), N_("COLOR") },
{ "back", 0, 0, G_OPTION_ARG_STRING, &options.text_data.back,
N_("Use specified color for background"), N_("COLOR") },
{ "wrap", 0, 0, G_OPTION_ARG_NONE, &options.text_data.wrap,
N_("Enable text wrapping"), NULL },
{ "justify", 0, 0, G_OPTION_ARG_CALLBACK, set_justify,
......@@ -1673,8 +1669,6 @@ yad_options_init (void)
options.scale_data.marks = NULL;
/* Initialize text data */
options.text_data.fore = NULL;
options.text_data.back = NULL;
options.text_data.wrap = FALSE;
options.text_data.justify = GTK_JUSTIFY_LEFT;
options.text_data.margins = 0;
......
......@@ -430,7 +430,6 @@ GtkWidget *
text_create_widget (GtkWidget * dlg)
{
GtkWidget *w;
PangoFontDescription *fd;
w = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (w), GTK_SHADOW_ETCHED_IN);
......@@ -447,6 +446,7 @@ text_create_widget (GtkWidget * dlg)
gtk_text_view_set_justification (GTK_TEXT_VIEW (text_view), options.text_data.justify);
gtk_text_view_set_left_margin (GTK_TEXT_VIEW (text_view), options.text_data.margins);
gtk_text_view_set_right_margin (GTK_TEXT_VIEW (text_view), options.text_data.margins);
gtk_text_view_set_monospace (GTK_TEXT_VIEW (text_view), TRUE);
gtk_text_view_set_editable (GTK_TEXT_VIEW (text_view), options.common_data.editable);
if (!options.common_data.editable && options.text_data.hide_cursor)
gtk_text_view_set_cursor_visible (GTK_TEXT_VIEW (text_view), FALSE);
......@@ -454,20 +454,6 @@ text_create_widget (GtkWidget * dlg)
if (options.text_data.wrap)
gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (text_view), GTK_WRAP_WORD_CHAR);
if (options.text_data.fore)
{
GdkRGBA clr;
if (gdk_rgba_parse (&clr, options.text_data.fore))
gtk_widget_override_color (text_view, GTK_STATE_FLAG_NORMAL, &clr);
}
if (options.text_data.back)
{
GdkRGBA clr;
if (gdk_rgba_parse (&clr, options.text_data.back))
gtk_widget_override_background_color (text_view, GTK_STATE_FLAG_NORMAL, &clr);
}
#ifdef HAVE_SOURCEVIEW
if (options.source_data.theme)
{
......@@ -506,15 +492,6 @@ text_create_widget (GtkWidget * dlg)
}
#endif
/* set font */
if (options.common_data.font)
fd = pango_font_description_from_string (options.common_data.font);
else
fd = pango_font_description_from_string ("Monospace");
gtk_widget_override_font (text_view, fd);
pango_font_description_free (fd);
#ifdef HAVE_SPELL
if (options.common_data.enable_spell)
{
......
......@@ -417,8 +417,6 @@ typedef struct {
} YadScaleData;
typedef struct {
gchar *fore;
gchar *back;
gboolean wrap;
GtkJustification justify;
gint margins;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment