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
66a0ce37
Commit
66a0ce37
authored
Mar 14, 2021
by
Victor Ananjevsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add --focused option to paned dialog
parent
6e319ffb
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
4 deletions
+22
-4
yad.1
data/yad.1
+4
-1
ru.po
po/ru.po
+0
-0
uk.po
po/uk.po
+0
-0
option.c
src/option.c
+3
-0
paned.c
src/paned.c
+14
-3
yad.h
src/yad.h
+1
-0
No files found.
data/yad.1
View file @
66a0ce37
...
...
@@ -788,7 +788,7 @@ Set active tab.
Expand all tabs to full width of a dialog window.
.TP
.B \-\-stack
Use stack mode (GtkStack instead of GtkNotebook).
Use stack mode (GtkStack instead of GtkNotebook).
.PP
See \fBNOTEBOOK and PANED\fP section for more about notebook dialog.
...
...
@@ -830,6 +830,9 @@ Set orientation of panes inside dialog. \fITYPE\fP may be in \fIhor[izontal]\fP
.TP
.B \-\-splitter=\fIPOS\fP
Set the initial splitter position.
.TP
.B \-\-focused=\fIPANE\fP
Set pane for initial focus. \fIPANE\fP must be 1 or 2. Default is 1.
.PP
See \fBNOTEBOOK and PANED\fP section for more about paned dialog.
...
...
po/ru.po
View file @
66a0ce37
This diff is collapsed.
Click to expand it.
po/uk.po
View file @
66a0ce37
This diff is collapsed.
Click to expand it.
src/option.c
View file @
66a0ce37
...
...
@@ -541,6 +541,8 @@ static GOptionEntry paned_options[] = {
N_
(
"Set orientation (hor[izontal] or vert[ical])"
),
N_
(
"TYPE"
)
},
{
"splitter"
,
0
,
0
,
G_OPTION_ARG_INT
,
&
options
.
paned_data
.
splitter
,
N_
(
"Set initial splitter position"
),
N_
(
"POS"
)
},
{
"focused"
,
0
,
0
,
G_OPTION_ARG_INT
,
&
options
.
paned_data
.
focused
,
N_
(
"Set focused pane (1 or 2)"
),
N_
(
"PANE"
)
},
{
NULL
}
};
...
...
@@ -1746,6 +1748,7 @@ yad_options_init (void)
/* Initialize paned data */
options
.
paned_data
.
orient
=
GTK_ORIENTATION_VERTICAL
;
options
.
paned_data
.
splitter
=
-
1
;
options
.
paned_data
.
focused
=
1
;
/* Initialize picture data */
options
.
picture_data
.
size
=
YAD_PICTURE_ORIG
;
...
...
src/paned.c
View file @
66a0ce37
...
...
@@ -50,7 +50,7 @@ paned_create_widget (GtkWidget * dlg)
gtk_widget_set_name
(
w
,
"yad-paned-widget"
);
s
=
gtk_socket_new
();
gtk_widget_set_can_focus
(
s
,
TRUE
);
gtk_widget_set_can_focus
(
s
,
TRUE
);
gtk_paned_add1
(
GTK_PANED
(
w
),
s
);
g_object_set_data
(
G_OBJECT
(
w
),
"s1"
,
s
);
...
...
@@ -82,8 +82,19 @@ paned_swallow_childs (void)
/* must be after embedding children */
if
(
options
.
paned_data
.
splitter
>
0
)
gtk_paned_set_position
(
GTK_PANED
(
paned
),
options
.
paned_data
.
splitter
);
gtk_widget_child_focus
(
s1
,
GTK_DIR_TAB_FORWARD
);
switch
(
options
.
paned_data
.
focused
)
{
case
1
:
gtk_widget_child_focus
(
s1
,
GTK_DIR_TAB_FORWARD
);
break
;
case
2
:
gtk_widget_child_focus
(
s2
,
GTK_DIR_TAB_FORWARD
);
break
;
default:
if
(
options
.
debug
)
g_printerr
(
_
(
"WARNING: wrong focused pane number %d. Must be 1 or 2
\n
"
),
options
.
paned_data
.
focused
);
}
}
void
...
...
src/yad.h
View file @
66a0ce37
...
...
@@ -409,6 +409,7 @@ typedef struct {
typedef
struct
{
GtkOrientation
orient
;
gint
splitter
;
gint
focused
;
}
YadPanedData
;
typedef
struct
{
...
...
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