Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yad
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vladislav
yad
Commits
fe110808
Commit
fe110808
authored
Jun 30, 2019
by
Victor Ananjevsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove fore and back options from text dialog
parent
75739709
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
32 deletions
+1
-32
option.c
src/option.c
+0
-6
text.c
src/text.c
+1
-24
yad.h
src/yad.h
+0
-2
No files found.
src/option.c
View file @
fe110808
...
...
@@ -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
;
...
...
src/text.c
View file @
fe110808
...
...
@@ -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
)
{
...
...
src/yad.h
View file @
fe110808
...
...
@@ -417,8 +417,6 @@ typedef struct {
}
YadScaleData
;
typedef
struct
{
gchar
*
fore
;
gchar
*
back
;
gboolean
wrap
;
GtkJustification
justify
;
gint
margins
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment