/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 Hatvigsson
  • Date: 2014-04-13 13:53:09 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20140413135309-mb8mrjww5cc2vikr
* Added a singeltonian class to keep settings data in.
* removed GSettings from GPumpApp and GPumpSettings, this should be done 
  using the GPumpSettingsData object instead.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 
6
6
#include "GPumpApp.h"
7
7
#include "GPumpSettings.h"
 
8
#include "GPumpSettingsData.h"
8
9
 
9
10
#define GPUMP_APP_GET_PRIVATE(obj)\
10
11
  (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GPUMP_TYPE_APP, GPumpAppPrivate))
13
14
 
14
15
struct GPumpAppPrivate {
15
16
  
16
 
  GSettings * ui_settings;
17
 
  GSettings * login_settings;
18
 
  
19
17
  /* Widgets */
20
18
  GtkWidget * window;
21
19
  GtkWidget * header_bar;
26
24
  GtkWidget * btn_new_post;
27
25
  GtkWidget * btn_refresh;
28
26
  
29
 
  GPumpSettings * gpump_settings; /* GPumpSettings */
30
 
  
31
27
  /* gear menu */
32
28
  GtkWidget * gear_menu; /* GtkMenu */
33
29
  
101
97
  
102
98
  g_list_free (w_list);
103
99
  
104
 
  GPUMP_APP(application)->priv->gpump_settings = gpump_settings_new (
105
 
    GPUMP_APP(application)->priv->window);
106
 
  
107
100
  /* Prepere stuff */
108
101
  _prepere_window (GPUMP_APP (application));
109
102
  _prepere_gear_menu (GPUMP_APP (application));
241
234
void _cb_show_settings (GSimpleAction * action, GVariant * parameter,
242
235
                        gpointer user_data) {
243
236
  GPumpApp * self = GPUMP_APP (user_data);
244
 
  gpump_settings_show (self->priv->gpump_settings);
 
237
  GPumpSettings * settings = gpump_settings_new (self->priv->window);
 
238
  gpump_settings_show (settings);
245
239
}
246
240
 
247
241
void _cb_do_nothing (GSimpleAction * action, GVariant * parameter,