Commit 6686e709 authored by Pat Brands's avatar Pat Brands

Merge branch 'master' into constrain-scale-to-steps

parents 87bc1e94 a5b1a7a3
Version 6.0
- add --use-interp option. this feature can reduce quoting in command arguments
- add link field to --form dialog
- returning customizable options for --text-info dialog
- fix yad behavior outside X11 (spetial thanks to Michael Weiser)
- improve dialog window placement
- update translations
Version 5.0
- add debug mode. this feature can be turned on through gsettings.
in this mode yad will warn about obsolete or nonexistent options
- add configure option --enable-standalone for build yad without gsettings support
- fix expanding tree nodes for stdin data
- some fixes in print dialog
- fix --uri-handler option in html dialog
- fix wrong autoclose behavior in progress dialog
Version 4.1
- fix handling tree data from stdin in list dialog
Version 4.0
- font can be selected with double-click in font dialog
- add application chooser dialog and application chooser field in form dialog
- add tree mode in list dialog
- multi-progress dialog features merged with progress dialog. separate multi-progres dialog no longer exists
- enable markup in progress log window
- fix output of color values in hex notation
- removed *-selection aliases for --file, --color and --font dialogs
Version 3.0
- add user defined handlers for all editing actions in list dialog. --add-action parameter renamed to --row-action
- fix loading text from file in text-info dialog
......
......@@ -6,13 +6,15 @@ shell scripts. YAD depends on GTK+ only. Minimal GTK+ version is 3.22.0
This software is licensed under the GPL v.3
Project homepage: https://sourceforge.net/projects/yad-dialog/
Example usage: https://sourceforge.net/p/yad-dialog/wiki/browse_pages/
Mailing list: http://groups.google.com/group/yad-common
Project homepage: https://github.com/v1cont/yad
Complex examples: https://sanana.kiev.ua/index.php/yad
Mailing list: http://groups.google.com/group/yad-common
Some miscellaneous stuff can be found in data directory including notify-send script
and simple zenity-compatible wrapper
A fresh gtk2 branch of YAD can be obtained from this repository - https://github.com/step-/yad
Building git version
----------------------
......@@ -37,3 +39,16 @@ Additionally, you can build yad with the following libraries:
* Webkit - for supporting HTML dialog (http://webkitgtk.org)
* GtkSourceView - for enabling syntax highlighting in text-info dialog (https://wiki.gnome.org/Projects/GtkSourceView)
* GSpell - for support spell checking in text fields (https://wiki.gnome.org/Projects/gspell)
In standalone build (configure option --enable-standalone) some defaults can be redefined with the following defines
BORDERS - set the default border width around dialog. Default is 5
REMAIN - if defined, timeout indicator will show the remaining time
COMBO_EDIT - if defined, combo-box in entry dialog will be always editable
TERM_CMD - string with terminal command. Default is "xterm -e '%s'"
OPEN_CMD - string with open command. Default is "xdg-open '%s'"
DATE_FMT - string with date output format. Default is "%x". See strftime(3) for details
URI_COLOR - color for URIs in text-info dialog. Default is blue
MAX_TABS - set the number of tabs for tabbed dialog. Default is 100
Defines can be added througs CFLAGS environment variable
AC_INIT([YAD], [3.0], [https://github.com/v1cont/yad/issues/], yad, [https://github.com/v1cont/yad/])
AC_INIT([YAD], [6.0], [https://github.com/v1cont/yad/issues/], yad, [https://github.com/v1cont/yad/])
AC_CONFIG_AUX_DIR([build])
AM_INIT_AUTOMAKE([1.11 foreign dist-xz no-dist-gzip])
......@@ -89,6 +89,16 @@ if test x$have_sourceview = xyes; then
AC_DEFINE([HAVE_SOURCEVIEW], [1], [Define this if you need GtkSourceView support])
fi
dnl icon browser
AC_ARG_ENABLE([standalone],
[AS_HELP_STRING([--enable-standalone],
[Build standalone YAD binary (wihtout gsettings)])],
[build_sa=$enableval], [build_sa=no])
AM_CONDITIONAL([STANDALONE], [test x$build_sa = xyes])
if test x$build_sa = xyes; then
AC_DEFINE([STANDALONE], [1], [Define this if you need standalone YAD binary])
fi
dnl pfd
AC_ARG_ENABLE([pfd],
[AS_HELP_STRING([--enable-pfd],
......@@ -156,6 +166,7 @@ echo " HTML widget - $have_html"
echo " GtkSourceView - $have_sourceview"
echo " Spell checking - $have_spell"
echo " Path to rgb.txt - $with_rgb"
echo " Standalone build - $build_sa"
echo " pfd - $build_pfd"
echo " Icon browser - $build_ib"
echo
......@@ -164,7 +164,11 @@ Don't close dialog if \fIEscape\fP was pressed.
\fIEscape\fP acts like pressing \fIOK\fP button.
.TP
.B \-\-always-print-result
Print result for any of the return codes. This options doesn't work if timeout was reached or \fIEscape\fP was pressed.
Print result for any of the return codes. This option doesn't work if timeout was reached or \fIEscape\fP was pressed.
.TP
.B \-\-use-interp=\fI[INTERP]\fP
All commands runs unter specified interpreter. Default is \fIbash -c '%s'\fP. This option can reduse quoting in commands. If \fI%s\fP is specified, it will be replaced by the command.
Otherwise command will be appended to the end of command line.
.TP
.B \-\-borders=\fINUM\fP
Set dialog window borders.
......@@ -494,6 +498,8 @@ A quoting style for value when \fIsh -c\fP is used \- a single quotes around com
.br
\fBFBTN\fP - same as button field, but with full relief of a button.
.br
\fBLINK\fP - link button field.
.br
\fBLBL\fP - text label. If field name is empty, horizontal separator line will be shown.
.br
\fBTXT\fP - multiline text entry. This field is always occupy all of form width.
......@@ -585,6 +591,9 @@ Size of icons may be set in gtk config file at GTK_ICON_SIZE_MENU position of gt
Special column names \fI@fore@\fP, \fI@back@\fP and \fI@font@\fP sets corresponding rows attributes.
Values of those columns don't show in results.
.TP
.B \-\-tree
Enbale tree mode. In this mode extra data in form \fIROW_ID[:PARENT_ID]\fP must be passed to yad before each row. See \fBEXAMPLES\fP for details.
.TP
.B \-\-checklist
Use check boxes for the first column. Output checked rows instead of selected rows. Disable multiple selection.
.TP
......@@ -674,6 +683,9 @@ This option doesn't work with \fI--multiple\fP.
Set the \fICMD\fP as a action when the row is added, modified or removed. First argument for the command is the name of action (\fIadd\fP, \fIedit\fP or \fIdel\fP).
The rest of command line is data from selected row. Output of this command sets the new row values.
.TP
.B \-\-tree-expanded
Expand all tree nodes at startup.
.TP
.B \-\-regex-search
Use regular expressions in search for text fields.
.TP
......@@ -875,7 +887,13 @@ Show cursor in read-only mode.
.B \-\-show-uri
Make links in text clickable. Links opens with \fIxdg-open\fP command.
.TP
.B \-\-uri-color
.B \-\-fore=\fICOLOR\fP
Set default color for text.
.TP
.B \-\-back=\fICOLOR\fP
Set default color for background.
.TP
.B \-\-uri-color=\fICOLOR\fP
Set color for links. Default is \fIblue\fP.
.TP
.B \-\-lang=LANGUAGE
......@@ -887,6 +905,7 @@ Set used theme to \fITHEME\fP. This option works only if yad builds with gtksour
.B \-\-listen
Listen data from stdin even if filename was specified.
If \fIfontname\fP option is specified for text dialog, the description of font must be in CSS style (not in a Pango style).
Sending FormFeed character to text dialog clears it. This symbol may be sent as \fIecho \-e '\\f'\fP.
Pressing \fICtrl+S\fP popups the search entry in text dialog.
......@@ -1111,6 +1130,7 @@ yad-form-spin@GtkSpinButton@Numeric entry field in form
yad-form-check@GtkCheckButton@Checkbox field in form
yad-form-combo@GtkComboBox@Combo field in form
yad-form-edit-combo@GtkComboBoxEntry@Editable combo field in form
yad-form-link@GtkLinkButton@Link field in form
yad-form-file@GtkFileChooserButton@File or directory field in form
yad-form-font@GtkFontChooserButton@Font field in form
yad-form-app@GtkAppChooserButton@Application field in form
......@@ -1175,6 +1195,10 @@ find $HOME \-name '*.ps' | yad \-\-progress \-\-pulsate
Display a box with all of the installed desktop applications
.IP
yad \-\-icons \-\-read-dir=/usr/share/applications
.PP
Display list in tree mode
.IP
yad --list --tree --column "Items" f Fruits 1:f Apple 2:f Lemon v Vegetables 3:v Popato 4:v Onion
.SH DEVELOPMENT
There are some developers features providing with YAD.
......
......@@ -36,13 +36,17 @@
<default>'blue'</default>
<_summary>Default color for URI in text-info dialog</_summary>
</key>
<key name="max-tab" type="i">
<default>100</default>
<_summary>Maximum number of tabs in notebook dialog</_summary>
</key>
<key name="ignore-unknown-options" type="b">
<default>true</default>
<_summary>Ignore unknown command-line options</_summary>
</key>
<key name="max-tab" type="i">
<default>100</default>
<_summary>Maximum number of tabs in notebook dialog</_summary>
<key name="debug" type="b">
<default>false</default>
<_summary>Enable debug mode with information about deprecated features</_summary>
</key>
</schema>
</schemalist>
......
......@@ -1347,4 +1347,4 @@ msgstr "Explorador de Iconos"
#: ../data/yad-icon-browser.desktop.in.h:2
msgid "Inspect GTK Icon Theme"
msgstr "Incpeccionar tema de íconos GTK"
msgstr "Inspeccionar tema de íconos GTK"
......@@ -21,7 +21,8 @@ msgstr ""
msgid "translator-credits"
msgstr ""
"Gustavo Soares de Lima <gustavo@logicus.com.br>\n"
"Angela Fernanda Ferreira <angela@logicus.com.br"
"Angela Fernanda Ferreira <angela@logicus.com.br\n"
"Tulio Calil <tuliocll@gmail.com>"
#: ../src/about.c:32
msgid ""
......@@ -1656,11 +1657,11 @@ msgstr "embutido"
#. initialize GTK+ and parse the command line arguments
#: ../src/browser.c:200
msgid "- Icon browser"
msgstr "Ícone do navegador"
msgstr "Navegador de ícones"
#: ../src/browser.c:213
msgid "Icon browser"
msgstr "Ícone do navegador"
msgstr "Navegador de ícones"
#: ../src/browser.c:247
msgid "<b>Name:</b>"
......@@ -1684,7 +1685,7 @@ msgstr "Ícones"
#: ../data/yad-icon-browser.desktop.in.h:1
msgid "Icon Browser"
msgstr "Ícone do navegador"
msgstr "Navegador de ícones"
#: ../data/yad-icon-browser.desktop.in.h:2
msgid "Inspect GTK Icon Theme"
......
......@@ -35,6 +35,10 @@ if HTML
yad_SOURCES += html.c
endif
if STANDALONE
yad_SOURCES += defaults.h
endif
yad_CFLAGS = $(GTK_CFLAGS) $(HTML_CFLAGS) $(SPELL_CFLAGS) $(SOURCEVIEW_CFLAGS)
yad_LDADD = $(GTK_LIBS) $(HTML_LIBS) $(SPELL_LIBS) $(SOURCEVIEW_LIBS)
......
#ifndef __YAD_DEFS_H__
#define __YAD_DEFS_H__
#ifndef BORDERS
#define BORDERS 5
#endif
#ifndef REMAIN
#define SHOW_REMAIN FALSE
#else
#define SHOW_REMAIN TRUE
#endif
#ifndef COMBO_EDIT
#define COMBO_ALWAYS_EDIT FALSE
#else
#define COMBO_ALWAYS_EDIT TRUE
#endif
#ifndef TERM_CMD
#define TERM_CMD "xterm -e '%s'"
#endif
#ifndef OPEN_CMD
#define OPEN_CMD "xdg-open '%s'"
#endif
#ifndef DATE_FMT
#define DATE_FMT "%x"
#endif
#ifndef URI_COLOR
#define URI_COLOR "blue"
#endif
#ifndef MAX_TABS
#define MAX_TABS 100
#endif
#endif /* __YAD_DEFS_H__ */
......@@ -48,7 +48,7 @@ drop_data_cb (GtkWidget * w, GdkDragContext * dc, gint x, gint y,
action = g_strdup_printf (options.common_data.command, dstr);
else
action = g_strdup_printf ("%s '%s'", options.common_data.command, dstr);
g_spawn_command_line_async (action, NULL);
run_command_async (action);
g_free (action);
}
else
......@@ -77,7 +77,8 @@ drop_data_cb (GtkWidget * w, GdkDragContext * dc, gint x, gint y,
else
action = g_strdup_printf ("%s %s", options.common_data.command, arg);
g_free (arg);
g_spawn_command_line_async (action, NULL);
run_command_async (action);
g_free (action);
}
else
......
......@@ -188,7 +188,13 @@ entry_create_widget (GtkWidget * dlg)
{
gint active, i;
if (options.common_data.editable || g_settings_get_boolean (settings, "combo-always-editable"))
if (options.common_data.editable ||
#ifndef STANDALONE
g_settings_get_boolean (settings, "combo-always-editable")
#else
COMBO_ALWAYS_EDIT
#endif
)
{
c = gtk_combo_box_text_new_with_entry ();
gtk_widget_set_name (c, "yad-entry-edit-combo");
......
......@@ -14,7 +14,7 @@
* You should have received a copy of the GNU General Public License
* along with YAD. If not, see <http://www.gnu.org/licenses/>.
*
* Copyright (C) 2008-2019, Victor Ananjevsky <ananasik@gmail.com>
* Copyright (C) 2008-2020, Victor Ananjevsky <ananasik@gmail.com>
*/
#include <ctype.h>
......@@ -100,6 +100,9 @@ expand_action (gchar * cmd)
case YAD_FIELD_FONT:
arg = g_shell_quote (gtk_font_chooser_get_font (GTK_FONT_CHOOSER (g_slist_nth_data (fields, num))));
break;
case YAD_FIELD_LINK:
arg = g_shell_quote (gtk_link_button_get_uri (GTK_LINK_BUTTON (g_slist_nth_data (fields, num))));
break;
case YAD_FIELD_APP:
{
GList *wl = gtk_container_get_children (GTK_CONTAINER (g_slist_nth_data (fields, num)));
......@@ -325,8 +328,6 @@ set_field_value (guint num, gchar * value)
gtk_widget_destroy (cw);
}
printf ("set value %s for app field\n");
if (value && value[0])
b = gtk_app_chooser_button_new (value);
else
......@@ -350,6 +351,10 @@ set_field_value (guint num, gchar * value)
g_object_set_data_full (G_OBJECT (w), "cmd", g_strdup (value), g_free);
break;
case YAD_FIELD_LINK:
gtk_link_button_set_uri (GTK_LINK_BUTTON (w), value);
break;
case YAD_FIELD_TEXT:
{
GtkTextBuffer *tb = gtk_text_view_get_buffer (GTK_TEXT_VIEW (w));
......@@ -375,7 +380,7 @@ button_clicked_cb (GtkButton * b, gpointer data)
gchar *data;
gint exit = 1;
GString *cmd = expand_action (action + 1);
g_spawn_command_line_sync (cmd->str, &data, NULL, &exit, NULL);
exit = run_command_sync (cmd->str, &data);
if (exit == 0)
{
guint i = 0;
......@@ -404,7 +409,7 @@ button_clicked_cb (GtkButton * b, gpointer data)
else
{
GString *cmd = expand_action (action);
g_spawn_command_line_async (cmd->str, NULL);
run_command_async (cmd->str);
g_string_free (cmd, TRUE);
}
}
......@@ -747,7 +752,8 @@ form_create_widget (GtkWidget * dlg)
/* add field label */
l = NULL;
if (fld->type != YAD_FIELD_CHECK && fld->type != YAD_FIELD_BUTTON &&
fld->type != YAD_FIELD_FULL_BUTTON && fld->type != YAD_FIELD_LABEL && fld->type != YAD_FIELD_TEXT)
fld->type != YAD_FIELD_FULL_BUTTON && fld->type != YAD_FIELD_LINK &&
fld->type != YAD_FIELD_LABEL && fld->type != YAD_FIELD_TEXT)
{
gchar *buf = g_strcompress (fld->name);
l = gtk_label_new (NULL);
......@@ -960,6 +966,17 @@ form_create_widget (GtkWidget * dlg)
fields = g_slist_append (fields, e);
break;
case YAD_FIELD_LINK:
{
gchar *buf = g_strcompress (fld->name[0] ? fld->name : _("Link"));
e = gtk_link_button_new_with_label ("", buf);
gtk_widget_set_name (e, "yad-form-link");
gtk_grid_attach (GTK_GRID (tbl), e, col * 2, row, 2, 1);
gtk_widget_set_hexpand (e, TRUE);
fields = g_slist_append (fields, e);
break;
}
case YAD_FIELD_LABEL:
if (fld->name[0])
{
......@@ -1207,6 +1224,17 @@ form_print_field (guint fn)
g_printf ("%d%s", (gint) gtk_range_get_value (GTK_RANGE (g_slist_nth_data (fields, fn))),
options.common_data.separator);
break;
case YAD_FIELD_LINK:
if (options.common_data.quoted_output)
{
buf = g_shell_quote (gtk_link_button_get_uri (GTK_LINK_BUTTON (g_slist_nth_data (fields, fn))));
g_printf ("%s%s", buf, options.common_data.separator);
g_free (buf);
}
else
g_printf ("%s%s", gtk_link_button_get_uri (GTK_LINK_BUTTON (g_slist_nth_data (fields, fn))),
options.common_data.separator);
break;
case YAD_FIELD_BUTTON:
case YAD_FIELD_FULL_BUTTON:
case YAD_FIELD_LABEL:
......
......@@ -48,8 +48,7 @@ load_uri (const gchar * uri)
addr = g_filename_to_uri (uri, NULL, NULL);
else
{
gchar *afn = g_new0 (gchar, PATH_MAX);
realpath (uri, afn);
gchar *afn = realpath (uri, NULL);
addr = g_filename_to_uri (afn, NULL, NULL);
g_free (afn);
}
......@@ -77,21 +76,80 @@ loaded_cb (WebKitWebView *v, WebKitLoadEvent ev, gpointer d)
static gboolean
policy_cb (WebKitWebView *v, WebKitPolicyDecision *pd, WebKitPolicyDecisionType pt, gpointer d)
{
if (is_loaded && !options.html_data.browser)
const gchar *uri;
if (!is_loaded)
return FALSE;
if (!options.html_data.browser)
{
WebKitNavigationAction *act = webkit_navigation_policy_decision_get_navigation_action (WEBKIT_NAVIGATION_POLICY_DECISION (pd));
webkit_policy_decision_ignore (pd);
if (webkit_navigation_action_get_navigation_type (act) == WEBKIT_NAVIGATION_TYPE_LINK_CLICKED)
{
WebKitURIRequest *r = webkit_navigation_action_get_request (act);
gchar *uri = (gchar *) webkit_uri_request_get_uri (r);
uri = webkit_uri_request_get_uri (r);
if (options.html_data.print_uri)
g_printf ("%s\n", uri);
else
g_app_info_launch_default_for_uri (uri, NULL, NULL);
}
}
else if (options.html_data.uri_cmd)
{
gchar *v1, *v2, *cmd;
gint status;
if (pt == WEBKIT_POLICY_DECISION_TYPE_RESPONSE)
{
WebKitURIRequest *r = webkit_response_policy_decision_get_request (WEBKIT_RESPONSE_POLICY_DECISION (pd));
uri = webkit_uri_request_get_uri (r);
v1 = g_strdup ("");
v2 = g_strdup ("");
}
else
{
WebKitNavigationAction *act = webkit_navigation_policy_decision_get_navigation_action (WEBKIT_NAVIGATION_POLICY_DECISION (pd));
WebKitURIRequest *r = webkit_navigation_action_get_request (act);
uri = webkit_uri_request_get_uri (r);
v1 = g_strdup_printf ("%d", webkit_navigation_action_get_mouse_button (act));
v2 = g_strdup_printf ("%d", webkit_navigation_action_get_modifiers (act));
}
g_setenv ("YAD_HTML_BUTTON", v1, TRUE);
g_setenv ("YAD_HTML_STATE", v2, TRUE);
cmd = g_strdup_printf ("%s '%s'", options.html_data.uri_cmd, uri);
status = run_command_sync (cmd, NULL);
g_free (cmd);
g_unsetenv ("YAD_HTML_BUTTON");
g_unsetenv ("YAD_HTML_STATE");
g_free (v1);
g_free (v2);
/* actial exit code in a highest byte */
switch (status >> 8)
{
case 0:
webkit_policy_decision_use (pd);
break;
case 1:
webkit_policy_decision_ignore (pd);
break;
case 2:
if (pt == WEBKIT_POLICY_DECISION_TYPE_RESPONSE)
webkit_policy_decision_download (pd);
else
webkit_policy_decision_use (pd);
break;
default:
g_printerr ("yad: wrong return code (%d) from uri handler\n", status >> 8);
return FALSE;
}
}
else
return FALSE;
......@@ -280,6 +338,7 @@ html_create_widget (GtkWidget * dlg)
webkit_settings_set_default_charset (settings, g_get_codeset ());
g_signal_connect (view, "decide-policy", G_CALLBACK (policy_cb), NULL);
g_signal_connect (view, "load-changed", G_CALLBACK (loaded_cb), NULL);
if (options.html_data.browser)
{
......@@ -299,7 +358,6 @@ html_create_widget (GtkWidget * dlg)
g_object_set (G_OBJECT(settings), "enable-page-cache", FALSE, NULL);
g_object_set (G_OBJECT(settings), "enable-plugins", FALSE, NULL);
g_object_set (G_OBJECT (settings), "enable-private-browsing", TRUE, NULL);
g_signal_connect (view, "load-changed", G_CALLBACK (loaded_cb), NULL);
}
gtk_widget_show_all (sw);
......
......@@ -134,14 +134,12 @@ activate_cb (GtkWidget * view, GtkTreePath * path, gpointer data)
{
if (in_term)
{
gchar *tcmd;
tcmd = g_strdup_printf (options.icons_data.term, cmd);
g_spawn_command_line_async (tcmd, NULL);
gchar *tcmd = g_strdup_printf (options.icons_data.term, cmd);
run_command_async (tcmd);
g_free (tcmd);
}
else
g_spawn_command_line_async (cmd, NULL);
run_command_async (cmd);
}
}
......@@ -346,7 +344,11 @@ parse_desktop_file (gchar * filename)
gchar *url = g_key_file_get_string (kf, "Desktop Entry", "URL", NULL);
if (url)
{
#ifndef STANDALONE
ent->command = g_strdup_printf (g_settings_get_string (settings, "open-command"), url);
#else
ent->command = g_strdup_printf (OPEN_CMD, url);
#endif
g_free (url);
}
}
......
......@@ -34,9 +34,12 @@
#include "yad.h"
YadOptions options;
GSettings *settings;
GtkIconTheme *yad_icon_theme;
#ifndef STANDALONE
GSettings *settings;
#endif
GdkPixbuf *big_fallback_image = NULL;
GdkPixbuf *small_fallback_image = NULL;
......@@ -45,6 +48,8 @@ static GtkWidget *text = NULL;
static gint ret = YAD_RESPONSE_ESC;
static gboolean is_x11 = FALSE;
YadNTabs *tabs;
#ifndef G_OS_WIN32
......@@ -96,7 +101,7 @@ static void
btn_cb (GtkWidget *b, gchar *cmd)
{
if (cmd)
g_spawn_command_line_async (cmd, NULL);
run_command_async (cmd);
else
{
gint resp = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (b), "resp"));
......@@ -120,7 +125,11 @@ timeout_cb (gpointer data)
{
gdouble percent = ((gdouble) options.data.timeout - count) / (gdouble) options.data.timeout;
gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (w), percent);
#ifndef STANDALONE
if (g_settings_get_boolean (settings, "show-remain"))
#else
if (SHOW_REMAIN)
#endif
{
gchar *lbl = g_strdup_printf (_("%d sec"), options.data.timeout - count);
gtk_progress_bar_set_text (GTK_PROGRESS_BAR (w), lbl);
......@@ -294,6 +303,38 @@ create_layout (GtkWidget *dlg)
return layout;
}
static void
realize_cb (GtkWidget *dlg, gpointer d)
{
gint cw, ch;
/* get current window size for gtk_window_resize */
gtk_window_get_size (GTK_WINDOW (dlg), &cw, &ch);
if (options.data.width == -1)
options.data.width = cw;
if (options.data.height == -1)
options.data.height = ch;
gtk_window_resize (GTK_WINDOW (dlg), options.data.width, options.data.height);
gtk_window_set_resizable (GTK_WINDOW (dlg), !options.data.fixed);
if (options.data.use_posx || options.data.use_posy)
{
gint ww, wh, sw, sh;
gtk_window_get_size (GTK_WINDOW (dlg), &ww, &wh);
gdk_window_get_geometry (gdk_get_default_root_window (), NULL, NULL, &sw, &sh);
/* place window to specified coordinates */
if (!options.data.use_posx)
gtk_window_get_position (GTK_WINDOW (dlg), &options.data.posx, NULL);
if (!options.data.use_posy)
gtk_window_get_position (GTK_WINDOW (dlg), NULL, &options.data.posy);
if (options.data.posx < 0)
options.data.posx = sw - ww + options.data.posx;
if (options.data.posy < 0)
options.data.posy = sh - wh + options.data.posy;
gtk_window_move (GTK_WINDOW (dlg), options.data.posx, options.data.posy);
}
}
static GtkWidget *
create_dialog (void)
{
......@@ -394,7 +435,11 @@ create_dialog (void)
gtk_box_pack_end (GTK_BOX (cbox), topb, FALSE, FALSE, 2);
}
#ifndef STANDALONE
if (g_settings_get_boolean (settings, "show-remain"))
#else
if (SHOW_REMAIN)
#endif
{
gchar *lbl = g_strdup_printf (_("%d sec"), options.data.timeout);
gtk_progress_bar_set_show_text (GTK_PROGRESS_BAR (topb), TRUE);
......@@ -499,39 +544,9 @@ create_dialog (void)
/* parse geometry or move window, if given. must be after showing widget */
if (!options.data.maximized && !options.data.fullscreen)
{
gint cw, ch;
gtk_widget_show_all (dlg);
parse_geometry ();
/* get current window size for gtk_window_resize */
gtk_window_get_size (GTK_WINDOW (dlg), &cw, &ch);
if (options.data.width == -1)
options.data.width = cw;
if (options.data.height == -1)
options.data.height = ch;
gtk_window_resize (GTK_WINDOW (dlg), options.data.width, options.data.height);
gtk_window_set_resizable (GTK_WINDOW (dlg), !options.data.fixed);
if (options.data.use_posx || options.data.use_posy)
{
gint ww, wh, sw, sh;
gtk_window_get_size (GTK_WINDOW (dlg), &ww, &wh);
gdk_window_get_geometry (gdk_get_default_root_window (), NULL, NULL, &sw, &sh);
/* place window to specified coordinates */
if (!options.data.use_posx)
gtk_window_get_position (GTK_WINDOW (dlg), &options.data.posx, NULL);
if (!options.data.use_posy)
gtk_window_get_position (GTK_WINDOW (dlg), NULL, &options.data.posy);
if (options.data.posx < 0)
options.data.posx = sw - ww + options.data.posx;
if (options.data.posy < 0)
options.data.posy = sh - wh + options.data.posy;
gtk_window_move (GTK_WINDOW (dlg), options.data.posx, options.data.posy);
}
g_signal_connect (G_OBJECT (dlg), "realize", G_CALLBACK (realize_cb), NULL);
gtk_widget_show_all (dlg);
}
else
{
......@@ -543,9 +558,8 @@ create_dialog (void)
gtk_window_fullscreen (GTK_WINDOW (dlg));
}
#ifndef G_OS_WIN32
/* print xid */
if (options.print_xid)
if (is_x11 && options.print_xid)
{
FILE *xf;
......@@ -564,7 +578,6 @@ create_dialog (void)
fflush (xf);
}
}
#endif
return dlg;
}
......@@ -667,7 +680,9 @@ main (gint argc, gchar ** argv)
gtk_init (&argc, &argv);
g_set_application_name ("YAD");
#ifndef STANDALONE
settings = g_settings_new ("yad.settings");
#endif
yad_icon_theme = gtk_icon_theme_get_default ();
......@@ -710,6 +725,12 @@ main (gint argc, gchar ** argv)
}
yad_set_mode ();
/* check for current GDK backend */
#ifdef GDK_WINDOWING_X11
if (GDK_IS_X11_DISPLAY (gdk_display_get_default ()))
is_x11 = TRUE;
#endif
/* parse custom gtkrc */
if (options.gtkrc_file)
{
......@@ -777,6 +798,13 @@ main (gint argc, gchar ** argv)
signal (SIGUSR2, sa_usr2);
#endif
if (!is_x11 && options.plug != -1)
{
options.plug = -1;
if (options.debug)
g_printerr (_("WARNING: --plug mode not supported outside X11\n"));
}
/* plug mode */
if (options.plug != -1)
{
......@@ -786,6 +814,19 @@ main (gint argc, gchar ** argv)
return ret;
}
if (!is_x11)
{
if (options.mode == YAD_MODE_NOTEBOOK || options.mode == YAD_MODE_PANED
#ifdef HAVE_TRAY
|| options.mode == YAD_MODE_NOTIFICATION
#endif
)
{
g_printerr (_("WARNING: This mode not supported outside X11\n"));
return 1;
}
}
switch (options.mode)
{
case YAD_MODE_ABOUT:
......@@ -821,11 +862,12 @@ main (gint argc, gchar ** argv)
default:
dialog = create_dialog ();
#ifndef G_OS_WIN32
/* add YAD_XID variable */
str = g_strdup_printf ("0x%X", (guint) GDK_WINDOW_XID (gtk_widget_get_window (dialog)));
g_setenv ("YAD_XID", str, TRUE);
#endif
if (is_x11)
{
/* add YAD_XID variable */
str = g_strdup_printf ("0x%X", (guint) GDK_WINDOW_XID (gtk_widget_get_window (dialog)));
g_setenv ("YAD_XID", str, TRUE);
}
/* make some specific init actions */
if (options.mode == YAD_MODE_NOTEBOOK)
......
......@@ -165,7 +165,7 @@ activate_cb (GtkWidget * widget, YadData * data)
if (g_ascii_strcasecmp (action, "menu") == 0)
popup_menu_cb (GTK_STATUS_ICON (widget), 1, GDK_CURRENT_TIME, data);
else
g_spawn_command_line_async (action, NULL);
run_command_async (action);
}
return TRUE;
......@@ -199,12 +199,12 @@ popup_menu_item_activate_cb (GtkWidget * w, gpointer data)
gtk_main_quit ();
}
else
g_spawn_command_line_async (cmd, NULL);
run_command_async (cmd);
}
}
static void
popup_menu_cb (GtkStatusIcon * icon, guint button, guint activate_time, gpointer data)
popup_menu_cb (GtkStatusIcon *icon, guint button, guint activate_time, gpointer data)
{
GtkWidget *menu;
GtkWidget *item;
......@@ -254,7 +254,7 @@ popup_menu_cb (GtkStatusIcon * icon, guint button, guint activate_time, gpointer
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
}
gtk_menu_popup_at_widget (GTK_MENU (menu), GTK_WIDGET (icon), GDK_GRAVITY_SOUTH_WEST, GDK_GRAVITY_NORTH_WEST, NULL);
gtk_menu_popup_at_pointer (GTK_MENU (menu), NULL);
}
static gboolean
......
......@@ -57,6 +57,7 @@ static gboolean set_scroll_policy (const gchar *, const gchar *, gpointer, GErro
#if GLIB_CHECK_VERSION(2,30,0)
static gboolean set_size_format (const gchar *, const gchar *, gpointer, GError **);
#endif
static gboolean set_interp (const gchar *, const gchar *, gpointer, GError **);
static gboolean about_mode = FALSE;
static gboolean version_mode = FALSE;
......@@ -141,6 +142,8 @@ static GOptionEntry general_options[] = {
N_("Dialog text can be selected"), NULL },
{ "keep-icon-size", 0, 0, G_OPTION_ARG_NONE, &options.data.keep_icon_size,
N_("Don't scale icons"), NULL },
{ "use-interp", 0, G_OPTION_FLAG_OPTIONAL_ARG, G_OPTION_ARG_CALLBACK, set_interp,
N_("Run commands under specified interpreter (default: bash -c '%s')"), N_("CMD") },
/* window settings */
{ "sticky", 0, 0, G_OPTION_ARG_NONE, &options.data.sticky,
N_("Set window sticky"), NULL },
......@@ -410,6 +413,8 @@ static GOptionEntry list_options[] = {
N_("Display list dialog"), NULL },
{ "column", 0, 0, G_OPTION_ARG_CALLBACK, add_column,
N_("Set the column header (see man page for list of possible types)"), N_("COLUMN[:TYPE]") },
{ "tree", 0, 0, G_OPTION_ARG_NONE, &options.list_data.tree_mode,
N_("Enbale tree mode"), NULL },
{ "checklist", 0, 0, G_OPTION_ARG_NONE, &options.list_data.checkbox,
N_("Use checkboxes for first column"), NULL },
{ "radiolist", 0, 0, G_OPTION_ARG_NONE, &options.list_data.radiobox,
......@@ -418,8 +423,6 @@ static GOptionEntry list_options[] = {
N_("Don't show column headers"), NULL },
{ "no-click", 0, G_OPTION_FLAG_REVERSE, G_OPTION_ARG_NONE, &options.list_data.clickable,
N_("Disable clickable column headers"), NULL },
{ "no-rules-hint", 0, G_OPTION_FLAG_REVERSE, G_OPTION_ARG_NONE, &options.list_data.rules_hint,
N_("Disable rules hints"), NULL },
{ "grid-lines", 0, 0, G_OPTION_ARG_CALLBACK, set_grid_lines,
N_("Set grid lines (hor[izontal], vert[ical] or both)"), N_("TYPE") },
{ "print-all", 0, 0, G_OPTION_ARG_NONE, &options.list_data.print_all,
......@@ -456,6 +459,8 @@ static GOptionEntry list_options[] = {
N_("Set select action"), N_("CMD") },
{ "row-action", 0, 0, G_OPTION_ARG_STRING, &options.list_data.row_action,
N_("Set row action"), N_("CMD") },
{ "tree-expanded", 0, 0, G_OPTION_ARG_NONE, &options.list_data.tree_expanded,
N_("Expand all tree nodes"), NULL },
{ "regex-search", 0, 0, G_OPTION_ARG_NONE, &options.list_data.regex_search,
N_("Use regex in search"), NULL },
{ "no-selection", 0, 0, G_OPTION_ARG_NONE, &options.list_data.no_selection,
......@@ -599,6 +604,10 @@ static GOptionEntry text_options[] = {
N_("Set justification (left, right, center or fill)"), N_("TYPE") },
{ "margins", 0, 0, G_OPTION_ARG_INT, &options.text_data.margins,
N_("Set text margins"), N_("SIZE") },
{ "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") },
{ "show-cursor", 0, G_OPTION_FLAG_REVERSE, G_OPTION_ARG_NONE, &options.text_data.hide_cursor,
N_("Show cursor in read-only mode"), NULL },
{ "show-uri", 0, 0, G_OPTION_ARG_NONE, &options.text_data.uri,
......@@ -798,6 +807,8 @@ add_field (const gchar * option_name, const gchar * value, gpointer data, GError
fld->type = YAD_FIELD_BUTTON;
else if (strcasecmp (fstr[1], "FBTN") == 0)
fld->type = YAD_FIELD_FULL_BUTTON;
else if (strcasecmp (fstr[1], "LINK") == 0)
fld->type = YAD_FIELD_LINK;
else if (strcasecmp (fstr[1], "LBL") == 0)
fld->type = YAD_FIELD_LABEL;
else if (strcasecmp (fstr[1], "TXT") == 0)
......@@ -1248,6 +1259,17 @@ set_size_format (const gchar * option_name, const gchar * value, gpointer data,
}
#endif
static gboolean
set_interp (const gchar * option_name, const gchar * value, gpointer data, GError ** err)
{
options.data.use_interp = TRUE;
if (value)
options.data.interp = g_strdup (value);
return TRUE;
}
#ifndef G_OS_WIN32
static gboolean
set_xid_file (const gchar * option_name, const gchar * value, gpointer data, GError ** err)
......@@ -1431,6 +1453,12 @@ yad_options_init (void)
options.xid_file = NULL;
#endif
#ifndef STANDALONE
options.debug = g_settings_get_boolean (settings, "debug");
#else
options.debug = FALSE;
#endif
options.hscroll_policy = GTK_POLICY_AUTOMATIC;
options.vscroll_policy = GTK_POLICY_AUTOMATIC;
......@@ -1441,8 +1469,12 @@ yad_options_init (void)
/* Initialize general data */
options.data.dialog_title = NULL;
options.data.window_icon = "yad";
#ifndef STANDALONE
options.data.width = g_settings_get_int (settings, "width");
options.data.height = g_settings_get_int (settings, "height");
#else
options.data.width = options.data.height = -1;
#endif
options.data.use_posx = FALSE;
options.data.posx = 0;
options.data.use_posy = FALSE;
......@@ -1458,7 +1490,11 @@ yad_options_init (void)
options.data.buttons = NULL;
options.data.no_buttons = FALSE;
options.data.buttons_layout = GTK_BUTTONBOX_END;
options.data.borders = g_settings_get_int (settings, "border");;
#ifndef STANDALONE
options.data.borders = g_settings_get_int (settings, "border");
#else
options.data.borders = BORDERS;
#endif
options.data.no_markup = FALSE;
options.data.no_escape = FALSE;
options.data.escape_ok = FALSE;
......@@ -1466,6 +1502,8 @@ yad_options_init (void)
options.data.selectable_labels = FALSE;
options.data.keep_icon_size = FALSE;
options.data.def_resp = YAD_RESPONSE_OK;
options.data.use_interp = FALSE;
options.data.interp = "bash -c '%s'";
/* Initialize window options */
options.data.sticky = FALSE;
......@@ -1490,7 +1528,11 @@ yad_options_init (void)
options.common_data.editable = FALSE;
options.common_data.tail = FALSE;
options.common_data.command = NULL;
#ifndef STANDALONE
options.common_data.date_format = g_settings_get_string (settings, "date-format");
#else
options.common_data.date_format = DATE_FMT;
#endif
options.common_data.float_precision = 3;
options.common_data.vertical = FALSE;
options.common_data.align = 0.0;
......@@ -1587,7 +1629,11 @@ yad_options_init (void)
options.icons_data.compact = FALSE;
options.icons_data.generic = FALSE;
options.icons_data.width = -1;
#ifndef STANDALONE
options.icons_data.term = g_settings_get_string (settings, "terminal");
#else
options.icons_data.term = TERM_CMD;
#endif
options.icons_data.sort_by_name = FALSE;
options.icons_data.descend = FALSE;
options.icons_data.single_click = FALSE;
......@@ -1595,11 +1641,11 @@ yad_options_init (void)
/* Initialize list data */
options.list_data.columns = NULL;
options.list_data.no_headers = FALSE;
options.list_data.tree_mode = FALSE;
options.list_data.checkbox = FALSE;
options.list_data.radiobox = FALSE;
options.list_data.no_headers = FALSE;
options.list_data.print_all = FALSE;
options.list_data.rules_hint = TRUE;
options.list_data.grid_lines = GTK_TREE_VIEW_GRID_LINES_NONE;
options.list_data.print_column = 0;
options.list_data.hide_column = 0;
......@@ -1617,6 +1663,7 @@ yad_options_init (void)
options.list_data.dclick_action = NULL;
options.list_data.select_action = NULL;
options.list_data.row_action = NULL;
options.list_data.tree_expanded = FALSE;
options.list_data.regex_search = FALSE;
options.list_data.clickable = TRUE;
options.list_data.no_selection = FALSE;
......@@ -1682,7 +1729,13 @@ yad_options_init (void)
options.text_data.justify = GTK_JUSTIFY_LEFT;
options.text_data.margins = 0;
options.text_data.hide_cursor = TRUE;
options.text_data.fore = NULL;
options.text_data.back = NULL;
#ifndef STANDALONE
options.text_data.uri_color = g_settings_get_string (settings, "uri-color");
#else
options.text_data.uri_color = URI_COLOR;
#endif
options.text_data.formatted = FALSE;
#ifdef HAVE_SOURCEVIEW
......@@ -1857,7 +1910,14 @@ yad_create_context (void)
g_option_context_add_group (tmp_ctx, a_group);
g_option_context_set_help_enabled (tmp_ctx, TRUE);
g_option_context_set_ignore_unknown_options (tmp_ctx, g_settings_get_boolean (settings, "ignore-unknown-options"));
#ifndef STANDALONE
if (!options.debug)
g_option_context_set_ignore_unknown_options (tmp_ctx, g_settings_get_boolean (settings, "ignore-unknown-options"));
else
g_option_context_set_ignore_unknown_options (tmp_ctx, FALSE);
#else
g_option_context_set_ignore_unknown_options (tmp_ctx, TRUE);
#endif
return tmp_ctx;
}
......@@ -245,6 +245,11 @@ yad_print_run (void)
}
g_free (fn);
if (!print_settings)
print_settings = gtk_print_settings_new ();
if (!page_setup)
page_setup = gtk_page_setup_new ();
/* create print dialog */
dlg = gtk_print_unix_dialog_new (options.data.dialog_title, NULL);
gtk_window_set_type_hint (GTK_WINDOW (dlg), GDK_WINDOW_TYPE_HINT_NORMAL);
......@@ -260,11 +265,8 @@ yad_print_run (void)
gtk_print_settings_set (print_settings, "output-uri", g_filename_to_uri (uri, NULL, NULL));
g_free (uri);
if (print_settings)
gtk_print_unix_dialog_set_settings (GTK_PRINT_UNIX_DIALOG (dlg), print_settings);
if (page_setup)
gtk_print_unix_dialog_set_page_setup (GTK_PRINT_UNIX_DIALOG (dlg), page_setup);
gtk_print_unix_dialog_set_settings (GTK_PRINT_UNIX_DIALOG (dlg), print_settings);
gtk_print_unix_dialog_set_page_setup (GTK_PRINT_UNIX_DIALOG (dlg), page_setup);
/* set window behavior */
gtk_widget_set_name (dlg, "yad-dialog-window");
......
......@@ -222,6 +222,10 @@ handle_stdin (GIOChannel *channel, GIOCondition condition, gpointer data)
if ((condition != G_IO_IN) && (condition != G_IO_IN + G_IO_HUP))
{
g_io_channel_shutdown (channel, TRUE, NULL);
if (options.progress_data.autoclose && options.plug == -1)
yad_exit (options.data.def_resp);
return FALSE;
}
return TRUE;
......@@ -240,6 +244,9 @@ progress_create_widget (GtkWidget *dlg)
{
YadProgressBar *bar = g_new0 (YadProgressBar, 1);
if (options.debug)
g_printerr (_("WARNING: You are usinge old-style progress dialog. This features is obsolete now, please use --bar style instead\n"));
if (options.progress_data.pulsate)
bar->type = YAD_PROGRESS_PULSE;
else if (options.progress_data.rtl)
......
......@@ -171,10 +171,14 @@ tag_event_cb (GtkTextTag * tag, GObject * obj, GdkEvent * ev, GtkTextIter * iter
gtk_text_iter_forward_to_tag_toggle (&end, tag);
url = gtk_text_iter_get_text (&start, &end);
#ifndef STANDALONE
cmdline = g_strdup_printf (g_settings_get_string (settings, "open-command"), url);
#else
cmdline = g_strdup_printf (OPEN_CMD, url);
#endif
g_free (url);
g_spawn_command_line_async (cmdline, NULL);
run_command_async (cmdline);
g_free (cmdline);
return TRUE;
......@@ -445,6 +449,30 @@ 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.common_data.font || options.text_data.fore || options.text_data.back)
{
GtkCssProvider *provider;
GtkStyleContext *context;
GString *css;
css = g_string_new ("textview, textview text {\n");
if (options.common_data.font)
g_string_append_printf (css, " font: %s;\n", options.common_data.font);
if (options.text_data.fore)
g_string_append_printf (css, " color: %s;\n", options.text_data.fore);
if (options.text_data.back)
g_string_append_printf (css, " background-color: %s;\n", options.text_data.back);
g_string_append (css, "}\n");
provider = gtk_css_provider_new ();
gtk_css_provider_load_from_data (provider, css->str, -1, NULL);
context = gtk_widget_get_style_context (text_view);
gtk_style_context_add_provider (context, GTK_STYLE_PROVIDER (provider),
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
g_string_free (css, TRUE);
}
#ifdef HAVE_SOURCEVIEW
if (options.source_data.theme)
{
......
......@@ -240,7 +240,11 @@ get_tabs (key_t key, gboolean create)
int shmid, i, max_tab;
/* get shared memory */
#ifndef STANDALONE
max_tab = g_settings_get_int (settings, "max-tab") + 1;
#else
max_tab = MAX_TABS + 1;
#endif
if (create)
{
if ((shmid = shmget (key, max_tab * sizeof (YadNTabs), IPC_CREAT | IPC_EXCL | 0644)) == -1)
......@@ -608,6 +612,60 @@ print_bool_val (gboolean val)
return ret;
}
gint
run_command_sync (gchar *cmd, gchar **out)
{
gint ret = 0;
gchar *full_cmd = NULL;
GError *err = NULL;
if (options.data.use_interp)
{
if (g_strstr_len (options.data.interp, -1, "%s") != NULL)
full_cmd = g_strdup_printf (options.data.interp, cmd);
else
full_cmd = g_strdup_printf ("%s %s", options.data.interp, cmd);
}
else
full_cmd = g_strdup (cmd);
if (!g_spawn_command_line_sync (full_cmd, out, NULL, &ret, &err))
{
if (options.debug)
g_printerr (_("WARNING: Run command failed: %s\n"), err->message);
g_error_free (err);
}
g_free (full_cmd);
return ret;
}
void
run_command_async (gchar *cmd)
{
gchar *full_cmd = NULL;
GError *err = NULL;
if (options.data.use_interp)
{
if (g_strstr_len (options.data.interp, -1, "%s") != NULL)
full_cmd = g_strdup_printf (options.data.interp, cmd);
else
full_cmd = g_strdup_printf ("%s %s", options.data.interp, cmd);
}
else
full_cmd = g_strdup (cmd);
if (!g_spawn_command_line_async (full_cmd, &err))
{
if (options.debug)
g_printerr (_("WARNING: Run command failed: %s\n"), err->message);
g_error_free (err);
}
g_free (full_cmd);
}
#ifdef HAVE_SPELL
void
show_langs ()
......
......@@ -46,6 +46,10 @@
#include <gtksourceview/gtksource.h>
#endif
#ifdef STANDALONE
#include "defaults.h"
#endif
G_BEGIN_DECLS
#define YAD_RESPONSE_OK 0
......@@ -113,6 +117,7 @@ typedef enum {
YAD_FIELD_SCALE,
YAD_FIELD_BUTTON,
YAD_FIELD_FULL_BUTTON,
YAD_FIELD_LINK,
YAD_FIELD_LABEL,
YAD_FIELD_TEXT
} YadFieldType;
......@@ -229,6 +234,8 @@ typedef struct {
gboolean keep_icon_size;
GtkButtonBoxStyle buttons_layout;
gint def_resp;
gboolean use_interp;
gchar *interp;
/* window settings */
gboolean sticky;
gboolean fixed;
......@@ -336,11 +343,11 @@ typedef struct {
typedef struct {
GSList *columns;
gboolean no_headers;
gboolean tree_mode;
gboolean checkbox;
gboolean radiobox;
gboolean no_headers;
gboolean print_all;
gboolean rules_hint;
GtkTreeViewGridLines grid_lines;
gint print_column;
gint hide_column;
......@@ -358,6 +365,7 @@ typedef struct {
gchar *dclick_action;
gchar *select_action;
gchar *row_action;
gboolean tree_expanded;
gboolean regex_search;
gboolean clickable;
gboolean no_selection;
......@@ -434,6 +442,8 @@ typedef struct {
gboolean hide_cursor;
gchar *uri_color;
gboolean formatted;
gchar *fore;
gchar *back;
} YadTextData;
#ifdef HAVE_SOURCEVIEW
......@@ -520,6 +530,8 @@ typedef struct {
key_t plug;
guint tabnum;
gboolean debug;
#ifndef G_OS_WIN32
guint kill_parent;
gboolean print_xid;
......@@ -528,9 +540,12 @@ typedef struct {
} YadOptions;
extern YadOptions options;
extern GSettings *settings;
extern GtkIconTheme *yad_icon_theme;
#ifndef STANDALONE
extern GSettings *settings;
#endif
extern GdkPixbuf *big_fallback_image;
extern GdkPixbuf *small_fallback_image;
......@@ -640,6 +655,9 @@ void parse_geometry ();
gboolean get_bool_val (gchar *str);
gchar *print_bool_val (gboolean val);
gint run_command_sync (gchar *cmd, gchar **out);
void run_command_async (gchar *cmd);
#ifdef HAVE_SPELL
void show_langs ();
#endif
......
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