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
0e2ca094
Commit
0e2ca094
authored
Jul 02, 2019
by
Victor Ananjevsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make notification dialog optional
parent
d601f4ce
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
1 deletion
+36
-1
configure.ac
configure.ac
+12
-0
Makefile.am
src/Makefile.am
+4
-1
main.c
src/main.c
+2
-0
option.c
src/option.c
+10
-0
yad.h
src/yad.h
+8
-0
No files found.
configure.ac
View file @
0e2ca094
...
...
@@ -44,6 +44,17 @@ if test x$have_html = xyes; then
AC_DEFINE([HAVE_HTML], [1], [Define this if you have webkit2gt library])
fi
dnl status icon widget
AC_ARG_ENABLE([tray],
[AS_HELP_STRING([--enable-tray],
[Build YAD with status icon])],
[build_tray=$enableval], [build_tray=yes])
AM_CONDITIONAL([TRAY], [test x$build_tray = xyes])
if test x$build_tray = xyes; then
AC_DEFINE([HAVE_TRAY], [1], [Define this if you need status icon])
fi
dnl spell check
AC_ARG_ENABLE([spell],
[AS_HELP_STRING([--enable-spell],
...
...
@@ -135,6 +146,7 @@ AC_OUTPUT
echo
echo "Build configuratioh:"
echo " Status icon - $build_tray"
echo " HTML widget - $have_html"
echo " GtkSourceView - $have_sourceview"
echo " Spell checking - $have_spell"
...
...
src/Makefile.am
View file @
0e2ca094
...
...
@@ -16,7 +16,6 @@ yad_SOURCES = \
list.c
\
multi-progress.c
\
notebook.c
\
notification.c
\
option.c
\
paned.c
\
picture.c
\
...
...
@@ -30,6 +29,10 @@ yad_SOURCES = \
stock.h
\
calendar.xpm
if
TRAY
yad_SOURCES
+=
notification.c
endif
if
HTML
yad_SOURCES
+=
html.c
endif
...
...
src/main.c
View file @
0e2ca094
...
...
@@ -810,9 +810,11 @@ main (gint argc, gchar ** argv)
break
;
#endif
#ifdef HAVE_TRAY
case
YAD_MODE_NOTIFICATION
:
ret
=
yad_notification_run
();
break
;
#endif
case
YAD_MODE_PRINT
:
ret
=
yad_print_run
();
...
...
src/option.c
View file @
0e2ca094
...
...
@@ -80,7 +80,9 @@ static gboolean icons_mode = FALSE;
static
gboolean
list_mode
=
FALSE
;
static
gboolean
multi_progress_mode
=
FALSE
;
static
gboolean
notebook_mode
=
FALSE
;
#ifdef HAVE_TRAY
static
gboolean
notification_mode
=
FALSE
;
#endif
static
gboolean
paned_mode
=
FALSE
;
static
gboolean
picture_mode
=
FALSE
;
static
gboolean
print_mode
=
FALSE
;
...
...
@@ -491,6 +493,7 @@ static GOptionEntry notebook_options[] = {
{
NULL
}
};
#ifdef HAVE_TRAY
static
GOptionEntry
notification_options
[]
=
{
{
"notification"
,
0
,
G_OPTION_FLAG_IN_MAIN
,
G_OPTION_ARG_NONE
,
&
notification_mode
,
N_
(
"Display notification"
),
NULL
},
...
...
@@ -504,6 +507,7 @@ static GOptionEntry notification_options[] = {
N_
(
"Set icon size for fully specified icons (default - 16)"
),
N_
(
"SIZE"
)
},
{
NULL
}
};
#endif
static
GOptionEntry
paned_options
[]
=
{
{
"paned"
,
0
,
G_OPTION_FLAG_IN_MAIN
,
G_OPTION_ARG_NONE
,
&
paned_mode
,
...
...
@@ -1385,8 +1389,10 @@ yad_set_mode (void)
options
.
mode
=
YAD_MODE_MULTI_PROGRESS
;
else
if
(
notebook_mode
)
options
.
mode
=
YAD_MODE_NOTEBOOK
;
#ifdef HAVE_TRAY
else
if
(
notification_mode
)
options
.
mode
=
YAD_MODE_NOTIFICATION
;
#endif
else
if
(
paned_mode
)
options
.
mode
=
YAD_MODE_PANED
;
else
if
(
picture_mode
)
...
...
@@ -1623,10 +1629,12 @@ yad_options_init (void)
options
.
notebook_data
.
expand
=
FALSE
;
options
.
notebook_data
.
active
=
1
;
#ifdef HAVE_TRAY
/* Initialize notification data */
options
.
notification_data
.
middle
=
TRUE
;
options
.
notification_data
.
hidden
=
FALSE
;
options
.
notification_data
.
menu
=
NULL
;
#endif
/* Initialize paned data */
options
.
paned_data
.
orient
=
GTK_ORIENTATION_VERTICAL
;
...
...
@@ -1778,12 +1786,14 @@ yad_create_context (void)
g_option_group_set_translation_domain
(
a_group
,
GETTEXT_PACKAGE
);
g_option_context_add_group
(
tmp_ctx
,
a_group
);
#ifdef HAVE_TRAY
/* Adds notification option entries */
a_group
=
g_option_group_new
(
"notification"
,
_
(
"Notification icon options"
),
_
(
"Show notification icon options"
),
NULL
,
NULL
);
g_option_group_add_entries
(
a_group
,
notification_options
);
g_option_group_set_translation_domain
(
a_group
,
GETTEXT_PACKAGE
);
g_option_context_add_group
(
tmp_ctx
,
a_group
);
#endif
/* Adds paned option entries */
a_group
=
g_option_group_new
(
"paned"
,
_
(
"Paned dialog options"
),
_
(
"Show paned dialog options"
),
NULL
,
NULL
);
...
...
src/yad.h
View file @
0e2ca094
...
...
@@ -68,7 +68,9 @@ typedef enum {
YAD_MODE_LIST
,
YAD_MODE_MULTI_PROGRESS
,
YAD_MODE_NOTEBOOK
,
#ifdef HAVE_TRAY
YAD_MODE_NOTIFICATION
,
#endif
YAD_MODE_PANED
,
YAD_MODE_PICTURE
,
YAD_MODE_PRINT
,
...
...
@@ -365,11 +367,13 @@ typedef struct {
gboolean
expand
;
}
YadNotebookData
;
#ifdef HAVE_TRAY
typedef
struct
{
gboolean
middle
;
gboolean
hidden
;
gchar
*
menu
;
}
YadNotificationData
;
#endif
typedef
struct
{
GtkOrientation
orient
;
...
...
@@ -484,7 +488,9 @@ typedef struct {
YadListData
list_data
;
YadMultiProgressData
multi_progress_data
;
YadNotebookData
notebook_data
;
#ifdef HAVE_TRAY
YadNotificationData
notification_data
;
#endif
YadPanedData
paned_data
;
YadPictureData
picture_data
;
YadPrintData
print_data
;
...
...
@@ -592,7 +598,9 @@ void text_print_result (void);
void
dnd_init
(
GtkWidget
*
w
);
#ifdef HAVE_TRAY
gint
yad_notification_run
(
void
);
#endif
gint
yad_print_run
(
void
);
gint
yad_about
(
void
);
...
...
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