sdgui: decrease source code line count
This commit is contained in:
parent
82accaf200
commit
aa3ad12d44
20
src/sdgui.c
20
src/sdgui.c
|
@ -195,15 +195,9 @@ on_key_press (G_GNUC_UNUSED GtkWidget *widget, GdkEvent *event,
|
||||||
// Can't use gtk_widget_add_accelerator() to change-current-page(-1/+1)
|
// Can't use gtk_widget_add_accelerator() to change-current-page(-1/+1)
|
||||||
// because that signal has arguments, which cannot be passed.
|
// because that signal has arguments, which cannot be passed.
|
||||||
if (event->key.keyval == GDK_KEY_Page_Up)
|
if (event->key.keyval == GDK_KEY_Page_Up)
|
||||||
{
|
return gtk_notebook_prev_page (GTK_NOTEBOOK (g.notebook)), TRUE;
|
||||||
gtk_notebook_prev_page (GTK_NOTEBOOK (g.notebook));
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
if (event->key.keyval == GDK_KEY_Page_Down)
|
if (event->key.keyval == GDK_KEY_Page_Down)
|
||||||
{
|
return gtk_notebook_next_page (GTK_NOTEBOOK (g.notebook)), TRUE;
|
||||||
gtk_notebook_next_page (GTK_NOTEBOOK (g.notebook));
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (mods == GDK_MOD1_MASK)
|
if (mods == GDK_MOD1_MASK)
|
||||||
{
|
{
|
||||||
|
@ -220,15 +214,9 @@ on_key_press (G_GNUC_UNUSED GtkWidget *widget, GdkEvent *event,
|
||||||
{
|
{
|
||||||
StardictView *view = STARDICT_VIEW (g.view);
|
StardictView *view = STARDICT_VIEW (g.view);
|
||||||
if (event->key.keyval == GDK_KEY_Page_Up)
|
if (event->key.keyval == GDK_KEY_Page_Up)
|
||||||
{
|
return stardict_view_scroll (view, GTK_SCROLL_PAGES, -0.5), TRUE;
|
||||||
stardict_view_scroll (view, GTK_SCROLL_PAGES, -0.5);
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
if (event->key.keyval == GDK_KEY_Page_Down)
|
if (event->key.keyval == GDK_KEY_Page_Down)
|
||||||
{
|
return stardict_view_scroll (view, GTK_SCROLL_PAGES, +0.5), TRUE;
|
||||||
stardict_view_scroll (view, GTK_SCROLL_PAGES, +0.5);
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue