aboutsummaryrefslogtreecommitdiffstats
path: root/src/interface.c
blob: 0f9fad7facc38c6b8cee21902e0b11414d2ba0d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/* Eye on Manga - Manga collection software for Maemo 5
   Copyright (C) 2010-2013  Tom Willemse

   Eye on Manga 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.

   Eye on Manga 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 Eye on Manga.  If not, see <http://www.gnu.org/licenses/>.
*/
#include <hildon/hildon.h>
#include "interface.h"
#include "eom-main-window.h"
#include "eom-detail-window.h"
#include "eom-new-item-dialog.h"
#include "data.h"

void interface_show_main_window(void)
{
  GtkWidget *window;

  window = eom_main_window_new();
  gtk_widget_show_all(window);

  eom_main_window_load(EOM_MAIN_WINDOW(window));
}

GtkWidget *interface_show_detail_window(gint manga_id)
{
  GtkWidget *window;

  window = eom_detail_window_new(manga_id);
  gtk_widget_show_all(window);

  return window;
}

GtkWidget *interface_show_new_item_dialog(GtkWindow *window)
{
  GtkWidget *dialog;

  dialog = eom_new_item_dialog_new();
  gtk_widget_show_all(dialog);

  gtk_window_set_transient_for(GTK_WINDOW(dialog), window);

  return dialog;
}