Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
GNOME
gThumb
Commits
784a3228
Commit
784a3228
authored
Nov 14, 2019
by
Paolo Bacchilega
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shortcuts: moved list tools in theirs own category
parent
60ac11cb
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
3 deletions
+39
-3
extensions/image_rotation/callbacks.c
extensions/image_rotation/callbacks.c
+3
-2
extensions/list_tools/gth-script.c
extensions/list_tools/gth-script.c
+2
-1
extensions/list_tools/main.c
extensions/list_tools/main.c
+7
-0
extensions/list_tools/shortcuts.h
extensions/list_tools/shortcuts.h
+27
-0
No files found.
extensions/image_rotation/callbacks.c
View file @
784a3228
...
...
@@ -27,6 +27,7 @@
#include <gthumb.h>
#include <extensions/image_viewer/image-viewer.h>
#include <extensions/list_tools/list-tools.h>
#include <extensions/list_tools/shortcuts.h>
#include "actions.h"
#include "callbacks.h"
...
...
@@ -43,8 +44,8 @@ static const GActionEntry actions[] = {
static
const
GthShortcut
shortcuts
[]
=
{
{
"rotate-right"
,
N_
(
"Rotate right"
),
GTH_SHORTCUT_CONTEXT_BROWSER_VIEWER
,
GTH_SHORTCUT_CATEGORY_
FILE_MANAGER
,
"bracketright"
},
{
"rotate-left"
,
N_
(
"Rotate left"
),
GTH_SHORTCUT_CONTEXT_BROWSER_VIEWER
,
GTH_SHORTCUT_CATEGORY_
FILE_MANAGER
,
"bracketleft"
},
{
"rotate-right"
,
N_
(
"Rotate right"
),
GTH_SHORTCUT_CONTEXT_BROWSER_VIEWER
,
GTH_SHORTCUT_CATEGORY_
LIST_TOOLS
,
"bracketright"
},
{
"rotate-left"
,
N_
(
"Rotate left"
),
GTH_SHORTCUT_CONTEXT_BROWSER_VIEWER
,
GTH_SHORTCUT_CATEGORY_
LIST_TOOLS
,
"bracketleft"
},
};
...
...
extensions/list_tools/gth-script.c
View file @
784a3228
...
...
@@ -23,6 +23,7 @@
#include <gthumb.h>
#include <gdk/gdkkeysyms.h>
#include "gth-script.h"
#include "shortcuts.h"
static
void
gth_script_dom_domizable_interface_init
(
DomDomizableInterface
*
iface
);
...
...
@@ -1046,7 +1047,7 @@ gth_script_get_shortcut (GthScript *self)
shortcut
->
action_parameter
=
g_variant_ref_sink
(
g_variant_new_string
(
gth_script_get_id
(
self
)));
shortcut
->
description
=
g_strdup
(
self
->
priv
->
display_name
);
shortcut
->
context
=
GTH_SHORTCUT_CONTEXT_BROWSER_VIEWER
;
shortcut
->
category
=
GTH_SHORTCUT_CATEGORY_
FILE_MANAGER
;
shortcut
->
category
=
GTH_SHORTCUT_CATEGORY_
LIST_TOOLS
;
gth_shortcut_set_key
(
shortcut
,
self
->
priv
->
accelerator
.
keyval
,
self
->
priv
->
accelerator
.
modifiers
);
shortcut
->
default_accelerator
=
g_strdup
(
shortcut
->
accelerator
);
...
...
extensions/list_tools/main.c
View file @
784a3228
...
...
@@ -24,11 +24,18 @@
#include <gtk/gtk.h>
#include <gthumb.h>
#include "callbacks.h"
#include "shortcuts.h"
static
GthShortcutCategory
shortcut_categories
[]
=
{
{
GTH_SHORTCUT_CATEGORY_LIST_TOOLS
,
N_
(
"Tools"
),
12
},
};
G_MODULE_EXPORT
void
gthumb_extension_activate
(
void
)
{
gth_main_register_shortcut_category
(
shortcut_categories
,
G_N_ELEMENTS
(
shortcut_categories
));
gth_hook_add_callback
(
"gth-browser-construct"
,
5
,
G_CALLBACK
(
list_tools__gth_browser_construct_cb
),
NULL
);
gth_hook_add_callback
(
"gth-browser-selection-changed"
,
10
,
G_CALLBACK
(
list_tools__gth_browser_selection_changed_cb
),
NULL
);
}
...
...
extensions/list_tools/shortcuts.h
0 → 100644
View file @
784a3228
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* GThumb
*
* Copyright (C) 2019 Free Software Foundation, Inc.
*
* This program 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 2 of the License, or
* (at your option) any later version.
*
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef LIST_TOOLS_SHORTCUTS_H
#define LIST_TOOLS_SHORTCUTS_H
#define GTH_SHORTCUT_CATEGORY_LIST_TOOLS "list-tools"
#endif
/* LIST_TOOLS_SHORTCUTS_H */
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