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
ac5ed202
Commit
ac5ed202
authored
Jul 04, 2019
by
Victor Ananjevsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make lookup_stock public
parent
64c6c96e
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
39 additions
and
58 deletions
+39
-58
POTFILES.in
po/POTFILES.in
+0
-1
Makefile.am
src/Makefile.am
+0
-1
stock.h
src/stock.h
+0
-54
util.c
src/util.c
+23
-2
yad.h
src/yad.h
+16
-0
No files found.
po/POTFILES.in
View file @
ac5ed202
...
...
@@ -21,5 +21,4 @@ src/text.c
src/browser.c
src/notebook.c
src/pfd.c
src/stock.h
data/yad-icon-browser.desktop.in
src/Makefile.am
View file @
ac5ed202
...
...
@@ -26,7 +26,6 @@ yad_SOURCES = \
util.c
\
main.c
\
yad.h
\
stock.h
\
calendar.xpm
if
TRAY
...
...
src/stock.h
deleted
100644 → 0
View file @
64c6c96e
/*
* This file is part of YAD.
*
* YAD is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* YAD is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* 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>
*/
#ifndef _STOCK_H_
#define _STOCK_H_
#define YAD_STOCK_COUNT 19
typedef
struct
{
gchar
*
key
;
gchar
*
label
;
gchar
*
icon
;
}
YadStock
;
const
YadStock
yad_stock_items
[]
=
{
{
"yad-about"
,
N_
(
"About"
),
"help-about"
},
{
"yad-add"
,
N_
(
"Add"
),
"list-add"
},
{
"yad-apply"
,
N_
(
"Apply"
),
"gtk-apply"
},
{
"yad-cancel"
,
N_
(
"Cancel"
),
"gtk-cancel"
},
{
"yad-clear"
,
N_
(
"Clear"
),
"document-clear"
},
{
"yad-close"
,
N_
(
"Close"
),
"window-close"
},
{
"yad-edit"
,
N_
(
"Edit"
),
"gtk-edit"
},
{
"yad-execute"
,
N_
(
"Execute"
),
"system-run"
},
{
"yad-no"
,
N_
(
"No"
),
"gtk-no"
},
{
"yad-ok"
,
N_
(
"OK"
),
"gtk-ok"
},
{
"yad-open"
,
N_
(
"Open"
),
"document-open"
},
{
"yad-print"
,
N_
(
"Print"
),
"document-print"
},
{
"yad-quit"
,
N_
(
"Quit"
),
"application-exit"
},
{
"yad-refresh"
,
N_
(
"Refresh"
),
"view-refresh"
},
{
"yad-remove"
,
N_
(
"Remove"
),
"list-remove"
},
{
"yad-save"
,
N_
(
"Save"
),
"document-save"
},
{
"yad-search"
,
N_
(
"Search"
),
"system-search"
},
{
"yad-settings"
,
N_
(
"Settings"
),
"gtk-preferences"
},
{
"yad-yes"
,
N_
(
"Yes"
),
"gtk-yes"
}
};
#endif
/* _STOCK_H_ */
src/util.c
View file @
ac5ed202
...
...
@@ -29,10 +29,31 @@
#include <sys/shm.h>
#include "yad.h"
#include "stock.h"
YadSettings
settings
;
const
YadStock
yad_stock_items
[]
=
{
{
"yad-about"
,
N_
(
"About"
),
"help-about"
},
{
"yad-add"
,
N_
(
"Add"
),
"list-add"
},
{
"yad-apply"
,
N_
(
"Apply"
),
"gtk-apply"
},
{
"yad-cancel"
,
N_
(
"Cancel"
),
"gtk-cancel"
},
{
"yad-clear"
,
N_
(
"Clear"
),
"document-clear"
},
{
"yad-close"
,
N_
(
"Close"
),
"window-close"
},
{
"yad-edit"
,
N_
(
"Edit"
),
"gtk-edit"
},
{
"yad-execute"
,
N_
(
"Execute"
),
"system-run"
},
{
"yad-no"
,
N_
(
"No"
),
"gtk-no"
},
{
"yad-ok"
,
N_
(
"OK"
),
"gtk-ok"
},
{
"yad-open"
,
N_
(
"Open"
),
"document-open"
},
{
"yad-print"
,
N_
(
"Print"
),
"document-print"
},
{
"yad-quit"
,
N_
(
"Quit"
),
"application-exit"
},
{
"yad-refresh"
,
N_
(
"Refresh"
),
"view-refresh"
},
{
"yad-remove"
,
N_
(
"Remove"
),
"list-remove"
},
{
"yad-save"
,
N_
(
"Save"
),
"document-save"
},
{
"yad-search"
,
N_
(
"Search"
),
"system-search"
},
{
"yad-settings"
,
N_
(
"Settings"
),
"gtk-preferences"
},
{
"yad-yes"
,
N_
(
"Yes"
),
"gtk-yes"
}
};
void
read_settings
(
void
)
{
...
...
@@ -151,7 +172,7 @@ write_settings (void)
g_free
(
context
);
}
static
gboolean
gboolean
stock_lookup
(
gchar
*
key
,
YadStock
*
it
)
{
gint
i
;
...
...
src/yad.h
View file @
ac5ed202
...
...
@@ -521,6 +521,7 @@ typedef struct {
extern
YadOptions
options
;
/* SETTINGS */
typedef
struct
{
guint
width
;
guint
height
;
...
...
@@ -543,6 +544,7 @@ typedef struct {
extern
YadSettings
settings
;
/* TABS */
typedef
struct
{
pid_t
pid
;
Window
xid
;
...
...
@@ -554,6 +556,18 @@ typedef struct {
/* xid - allow plugs to write shmem (for sync) */
extern
YadNTabs
*
tabs
;
/* STOCK ITEMS */
#define YAD_STOCK_COUNT 19
typedef
struct
{
gchar
*
key
;
gchar
*
label
;
gchar
*
icon
;
}
YadStock
;
extern
const
YadStock
yad_stock_items
[];
/* FUNCTION PROTOTYPES */
void
yad_options_init
(
void
);
GOptionContext
*
yad_create_context
(
void
);
void
yad_set_mode
(
void
);
...
...
@@ -621,6 +635,8 @@ gchar **split_arg (const gchar *str);
YadNTabs
*
get_tabs
(
key_t
key
,
gboolean
create
);
gboolean
stock_lookup
(
gchar
*
key
,
YadStock
*
it
);
GtkWidget
*
get_label
(
gchar
*
str
,
guint
border
,
GtkWidget
*
w
);
gchar
*
escape_str
(
gchar
*
str
);
...
...
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