~ubuntu-branches/debian/squeeze/tasks/squeeze

« back to all changes in this revision

Viewing changes to libkoto/koto-group-combo.c

  • Committer: Bazaar Package Importer
  • Author(s): Ross Burton, Ross Burton, Loïc Minier, Emilio Pozuelo Monfort
  • Date: 2009-08-10 10:08:52 UTC
  • mfrom: (1.1.11 upstream)
  • Revision ID: james.westby@ubuntu.com-20090810100852-6gp4pydhwflg4vnb
Tags: 0.16-1
[ Ross Burton ]
* New upstream release (Closes: #539510)
* Fix debug package section and depends
* Bump Standards

[ Loïc Minier ]
* Set LDFLAGS directly; bump cdbs bdep to >= 0.4.41.
* Create tasks.pot during build: Add a common-build-arch:: snippet to call
  langpack.mk's langpack-mk-update-pot target with
  DEB_BUILDDIR=$(DEB_SRCDIR); intltool-update can't be called in builddir as
  it needs POTFILES.in and even with it wont lookup files listed there in
  srcdir; add a clean:: snippet to remove the pot file; LP: #188690.

[ Emilio Pozuelo Monfort ]
* Wrap build-deps and deps.

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
{
42
42
  KotoGroup *group = NULL;
43
43
  gboolean ret = FALSE;
44
 
  
 
44
 
45
45
  gtk_tree_model_get (model, iter, COL_GROUP, &group, -1);
46
46
  if (!group)
47
47
    return FALSE;
48
 
  
 
48
 
49
49
  if (g_type_is_a (G_OBJECT_TYPE (group), KOTO_TYPE_META_GROUP)
50
50
      && koto_meta_group_get_kind
51
51
      (KOTO_META_GROUP (group)) == KOTO_META_GROUP_SEPERATOR)
52
52
    ret = TRUE;
53
 
  
 
53
 
54
54
  g_object_unref (group);
55
 
  
 
55
 
56
56
  return ret;
57
57
}
58
58
 
112
112
koto_group_combo_init (KotoGroupCombo *self)
113
113
{
114
114
  GtkCellRenderer *renderer;
115
 
  
 
115
 
116
116
  renderer = gtk_cell_renderer_text_new ();
117
117
  gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (self), renderer, TRUE);
118
118
  gtk_cell_layout_set_cell_data_func  (GTK_CELL_LAYOUT (self), renderer,
133
133
  GtkWidget *combo;
134
134
 
135
135
  combo = g_object_new (KOTO_TYPE_GROUP_COMBO, NULL);
136
 
  
 
136
 
137
137
  if (store)
138
138
    g_object_set (combo, "model", store, NULL);
139
 
  
 
139
 
140
140
  return combo;
141
141
}
142
142
 
146
146
  GtkTreeIter iter;
147
147
  GtkTreeModel *model;
148
148
  KotoGroup *group = NULL;
149
 
  
 
149
 
150
150
  g_return_val_if_fail (KOTO_IS_GROUP_COMBO (combo), NULL);
151
 
  
 
151
 
152
152
  if (gtk_combo_box_get_active_iter (GTK_COMBO_BOX (combo), &iter)) {
153
153
    model = gtk_combo_box_get_model (GTK_COMBO_BOX (combo));
154
 
    
 
154
 
155
155
    gtk_tree_model_get (model, &iter, COL_GROUP, &group, -1);
156
 
    
 
156
 
157
157
    return group;
158
158
  }
159
 
  
 
159
 
160
160
  return NULL;
161
161
}
162
162
 
174
174
  KotoGroupComboPrivate *priv;
175
175
 
176
176
  g_return_if_fail (KOTO_IS_GROUP_COMBO (combo));
177
 
  
 
177
 
178
178
  priv = GET_PRIVATE (combo);
179
179
 
180
180
  if (priv->changed_id) {
181
181
    g_signal_handler_disconnect (combo, priv->changed_id);
182
182
    g_object_unref (priv->filter);
183
 
    
 
183
 
184
184
    priv->changed_id = 0;
185
185
    priv->filter = NULL;
186
186
  }
187
 
  
 
187
 
188
188
  if (filter) {
189
189
    priv->changed_id = g_signal_connect (combo, "changed",
190
190
                                         G_CALLBACK (on_group_changed), NULL);