Skip to content

Commit 08394c9

Browse files
author
Rajdeep Singha
committed
Fix J and K to move between articles inverse bug
1 parent 9759a5d commit 08394c9

File tree

4 files changed

+47
-42
lines changed

4 files changed

+47
-42
lines changed

src/FeedReader.vala

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -253,28 +253,30 @@ namespace FeedReader {
253253
private void SetupActions ()
254254
{
255255
var quit_action = new SimpleAction ("quit", null);
256-
quit_action.activate.connect ( () => {
257-
258-
MainWindow.get_default ().writeInterfaceState (true);
259-
m_window.close ();
260-
261-
if (Settings.state ().get_boolean ("currently-updating"))
262-
{
263-
Logger.debug ("Quit: FeedReader seems to be syncing -> trying to cancel");
264-
FeedReaderBackend.get_default ().cancelSync ();
265-
while (Settings.state ().get_boolean ("currently-updating"))
266-
{
267-
Gtk.main_iteration ();
268-
}
269-
270-
Logger.debug ("Quit: Sync cancelled -> shutting down");
271-
}
272-
else
273-
{
274-
Logger.debug ("No Sync ongoing -> Quit right away");
275-
}
276-
277-
FeedReaderApp.get_default ().quit ();
256+
quit_action.activate.connect (() => {
257+
258+
// MainWindow.get_default ().writeInterfaceState (true);
259+
// m_window.close ();
260+
261+
// if (Settings.state ().get_boolean ("currently-updating"))
262+
// {
263+
// Logger.debug ("Quit: FeedReader seems to be syncing -> trying to cancel");
264+
// FeedReaderBackend.get_default ().cancelSync ();
265+
// while (Settings.state ().get_boolean ("currently-updating"))
266+
// {
267+
// Gtk.main_iteration ();
268+
// }
269+
270+
// Logger.debug ("Quit: Sync cancelled -> shutting down");
271+
// }
272+
// else
273+
// {
274+
// Logger.debug ("No Sync ongoing -> Quit right away");
275+
// }
276+
277+
// FeedReaderApp.get_default ().quit ();
278+
279+
MainWindow.get_default ().hide ();
278280
});
279281
this.add_action (quit_action);
280282
}

src/Widgets/ColumnView.vala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,15 +265,15 @@ public class FeedReader.ColumnView : Gtk.Paned {
265265
m_article_view.setTransition (Gtk.StackTransitionType.SLIDE_LEFT, 500);
266266
}
267267

268-
return m_articleList.move (false);
268+
return m_articleList.move (true);
269269
}
270270

271271
public int ArticleListPREV () {
272272
if (m_article_view.fullscreenArticle ()) {
273273
m_article_view.setTransition (Gtk.StackTransitionType.SLIDE_RIGHT, 500);
274274
}
275275

276-
return m_articleList.move (true);
276+
return m_articleList.move (false);
277277
}
278278

279279
public void FeedListNEXT () {

src/Widgets/MainWindow.vala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ public class FeedReader.MainWindow : Hdy.ApplicationWindow {
461461
if (checkShortcut (event, "articlelist-next")) {
462462
Logger.debug ("shortcut: articlelist next");
463463
ColumnView.get_default ().ArticleListNEXT ();
464-
return true;
464+
return false;
465465
}
466466

467467
if (checkShortcut (event, "feedlist-prev")) {

src/Widgets/Shortcuts.vala

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,19 @@ public class FeedReader.Shortcuts : Hdy.Window {
2222

2323
column_start.attach (new Granite.HeaderLabel (_("Articles")), 0, 0, 2);
2424
column_start.attach (new NameLabel (_("Move to previous article:")), 0, 1);
25-
column_start.attach (new ShortcutLabel (_("J")), 1, 1);
25+
column_start.attach (new ShortcutLabel ("J"), 1, 1);
2626
column_start.attach (new NameLabel (_("Move to next article:")), 0, 2);
27-
column_start.attach (new ShortcutLabel (_("K")), 1, 2);
27+
column_start.attach (new ShortcutLabel ("K"), 1, 2);
2828
column_start.attach (new NameLabel (_("Scroll article up:")), 0, 3);
29-
column_start.attach (new ShortcutLabel (_("I")), 1, 3);
29+
column_start.attach (new ShortcutLabel ("I"), 1, 3);
3030
column_start.attach (new NameLabel (_("Scroll article down:")), 0, 4);
31-
column_start.attach (new ShortcutLabel (_("U")), 1, 4);
31+
column_start.attach (new ShortcutLabel ("U"), 1, 4);
3232
column_start.attach (new NameLabel (_("Toggle article read:")), 0, 5);
33-
column_start.attach (new ShortcutLabel (_("R")), 1, 5);
33+
column_start.attach (new ShortcutLabel ("R"), 1, 5);
3434
column_start.attach (new NameLabel (_("Open article in browser:")), 0, 6);
35-
column_start.attach (new ShortcutLabel (_("O")), 1, 6);
35+
column_start.attach (new ShortcutLabel ("O"), 1, 6);
3636
column_start.attach (new NameLabel (_("Center selected article:")), 0, 7);
37-
column_start.attach (new ShortcutLabel (_("S")), 1, 7);
37+
column_start.attach (new ShortcutLabel ("S"), 1, 7);
3838

3939
var column_end = new Gtk.Grid () {
4040
column_spacing = 6,
@@ -44,22 +44,25 @@ public class FeedReader.Shortcuts : Hdy.Window {
4444

4545
column_end.attach (new Granite.HeaderLabel (_("Feeds")), 0, 8, 2);
4646
column_end.attach (new NameLabel (_("Move to previous feed:")), 0, 9);
47-
column_end.attach (new ShortcutLabel (_("Ctrl")), 1, 9);
48-
column_end.attach (new ShortcutLabel (_("J")), 2, 9);
47+
column_end.attach (new ShortcutLabel ("Ctrl"), 1, 9);
48+
column_end.attach (new ShortcutLabel ("J"), 2, 9);
4949
column_end.attach (new NameLabel (_("Move to next article:")), 0, 10);
50-
column_end.attach (new ShortcutLabel (_("Ctrl")), 1, 10);
51-
column_end.attach (new ShortcutLabel (_("K")), 2, 10);
50+
column_end.attach (new ShortcutLabel ("Ctrl"), 1, 10);
51+
column_end.attach (new ShortcutLabel ("K"), 2, 10);
5252
column_end.attach (new NameLabel (_("Toggle feed read:")), 0, 11);
53-
column_end.attach (new ShortcutLabel (_("Shift")), 1, 11);
54-
column_end.attach (new ShortcutLabel (_("A")), 2, 11);
53+
column_end.attach (new ShortcutLabel ("Shift"), 1, 11);
54+
column_end.attach (new ShortcutLabel ("A"), 2, 11);
5555

5656
column_end.attach (new Granite.HeaderLabel (_("Global")), 0, 12, 2);
5757
column_end.attach (new NameLabel (_("Global sync:")), 0, 13);
58-
column_end.attach (new ShortcutLabel (_("Ctrl")), 1, 13);
59-
column_end.attach (new ShortcutLabel (_("R")), 2, 13);
58+
column_end.attach (new ShortcutLabel ("Ctrl"), 1, 13);
59+
column_end.attach (new ShortcutLabel ("R"), 2, 13);
6060
column_end.attach (new NameLabel (_("Search.. :")), 0, 14);
61-
column_end.attach (new ShortcutLabel (_("Ctrl")), 1, 14);
62-
column_end.attach (new ShortcutLabel (_("F")), 2, 14);
61+
column_end.attach (new ShortcutLabel ("Ctrl"), 1, 14);
62+
column_end.attach (new ShortcutLabel ("F"), 2, 14);
63+
column_end.attach (new NameLabel (_("Close:")), 0, 15);
64+
column_end.attach (new ShortcutLabel ("Ctrl"), 1, 15);
65+
column_end.attach (new ShortcutLabel ("Q"), 2, 15);
6366

6467
var column_grid = new Gtk.Grid () {
6568
column_spacing = 48,

0 commit comments

Comments
 (0)