/gpump/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/gpump/trunk

« back to all changes in this revision

Viewing changes to src/GPumpApp.c

  • Committer: Gustav Hartvigsson
  • Date: 2014-02-08 17:53:39 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20140208175339-yxn38uceduzzvswx
Initial code.

Non of the code is actualy functional.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* c-basic-offset: 2; tab-width: 2; indent-tabs-mode: nil
 
2
 * vi: set shiftwidth=2 tabstop=2 expandtab:
 
3
 * :indentSize=2:tabSize=2:noTabs=true:
 
4
 */
 
5
 
 
6
#include "GPumpApp.h"
 
7
 
 
8
#define GPUMP_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((GPumpApp *) obj)->priv)
 
9
 
 
10
G_DEFINE_TYPE (GPumpApp, gpump_app, GTK_TYPE_APPLICATION)
 
11
 
 
12
struct GPumpAppPrivate {
 
13
  
 
14
  GSettings * ui_settings;
 
15
  GSettings * login_settings;
 
16
  
 
17
  /* Widgets */
 
18
  GtkWidget * window;
 
19
  GtkWidget * header_bar;
 
20
  GtkWidget * layout; /* GtkBox */
 
21
  GtkWidget * post_list_view; /* GtkTreeView */
 
22
  GtkListStore * post_list_store;
 
23
};
 
24
 
 
25
/* * Callback and private function declarations *******************************/
 
26
void gpump_app_class_init (GPumpAppClass * klass);
 
27
void gpump_app_activate (GApplication * application);
 
28
void gpump_app_init (GPumpApp * self);
 
29
 
 
30
/* * Class functions **********************************************************/
 
31
GPumpApp * gpump_app_new (void) {
 
32
  GPumpApp * self = g_object_new (GPUMP_TYPE_APP,
 
33
                       "application-id", "org.gego.gpump",
 
34
                       "flags",G_APPLICATION_FLAGS_NONE,
 
35
                       NULL);
 
36
  return self;
 
37
}
 
38
 
 
39
void gpump_app_init (GPumpApp * self) {
 
40
  
 
41
}
 
42
 
 
43
void gpump_app_class_init (GPumpAppClass * klass) {
 
44
  g_print("GPumpApp class init.\n");
 
45
  
 
46
  // GObject * object_class = G_OBJECT_CLASS (klass);
 
47
  GApplicationClass * application_class = G_APPLICATION_CLASS (klass);
 
48
  
 
49
  application_class->activate = gpump_app_activate;
 
50
  
 
51
  g_type_class_add_private (klass, sizeof(GPumpApp));
 
52
  
 
53
  g_print ("GPumpApp class init done.\n");
 
54
}
 
55
 
 
56
 
 
57
void gpump_app_activate (GApplication * application) {
 
58
  g_print ("GPumpApp activate.\n");
 
59
  
 
60
  
 
61
  
 
62
  g_print ("done GPumpApp activate.\n");
 
63
}
 
64
 
 
65
 
 
66
 
 
67
/* * Callback implemenations **************************************************/
 
68