[postr] Use get_iter_first instead of get_item_root
- From: Germán Poó Caamaño <gpoo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [postr] Use get_iter_first instead of get_item_root
- Date: Tue, 8 Jul 2014 23:55:17 +0000 (UTC)
commit bed32575ea57e9efcb8c3e80ac099e5aa1dc15b2
Author: Germán Poo-Caamaño <gpoo gnome org>
Date: Tue Jul 8 16:52:26 2014 -0700
Use get_iter_first instead of get_item_root
Both of them did the same, but only get_iter_first is present in
gtk3.
src/SetCombo.py | 2 +-
src/postr.py | 5 +++--
2 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/SetCombo.py b/src/SetCombo.py
index 82f9415..d4a0273 100644
--- a/src/SetCombo.py
+++ b/src/SetCombo.py
@@ -108,7 +108,7 @@ class SetCombo(Gtk.ComboBox):
# index of the iterator on export might no longer be valid
# when the upload set is imported.
def get_iter_for_set(self, set_id):
- iter = self.model.get_iter_root()
+ iter = self.model.get_iter_first()
while iter:
iter_set_id = self.model.get(iter, COL_SETID)
if iter_set_id[0] == set_id:
diff --git a/src/postr.py b/src/postr.py
index 09daef2..5f71e96 100644
--- a/src/postr.py
+++ b/src/postr.py
@@ -1285,7 +1285,7 @@ class Postr(UniqueApp):
if self.set_combo.new_photoset_name:
dest["new_photoset_name"] = self.set_combo.new_photoset_name
- iter = self.model.get_iter_root()
+ iter = self.model.get_iter_first()
while iter:
path = self.model.get_string_from_iter(iter)
dest[path] = self._marshal_row(path, iter)
@@ -1446,7 +1446,8 @@ class Postr(UniqueApp):
if set_iter:
self._set_value_in_model(ImageStore.COL_SET, set_iter, [index])
- self._set_value_in_model(ImageStore.COL_GROUPS, groups, [index])
+ if groups:
+ self._set_value_in_model(ImageStore.COL_GROUPS, groups, [index])
if privacy_path:
privacy_iter = self.privacy_combo.model.get_iter(privacy_path)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]