Opened 15 years ago

Closed 15 years ago

Last modified 11 years ago

#875 closed enhancement (fixed)

reordering the journal pulldown menu

Reported by: walter Owned by: tomeu
Priority: Normal Milestone:
Component: journal Version: 0.84.x
Severity: Minor Keywords: r+
Cc: garycmartin, eben Distribution/OS: Unspecified
Bug Status: Assigned

Description

Now that we have so many activities, the list in the Journal activity search pulldown is getting unwieldy. Not sure what to do about it, but it would be nice to put the mime-type selectors, which are a relatively short list, at the top rather than the bottom of the list.

Attachments (1)

journaltool-sort-order.patch (2.4 KB) - added by walter 15 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 follow-up: Changed 15 years ago by erikos

  • Bug Status changed from Unconfirmed to New
  • Cc garycmartin eben added
  • Milestone changed from Unspecified by Release Team to 0.86
  • Priority changed from Unspecified by Maintainer to Normal

I remember that Gary had an idea about that - to have more than one column. I guess the fix can be split into first getting the mime-type selectors at the top.

comment:2 Changed 15 years ago by eben

I think the intended design was always to have the generic types at the top of the list, and custom types below. We wanted to first allow filtering by a generic type, and then by a particular activity.

comment:3 Changed 15 years ago by walter

proposed patch:

--- journaltoolbox.py 2009-04-24 08:03:49.000000000 -0400
+++ journaltoolbox.py 2009-05-21 09:52:50.000000000 -0400
@@ -272,13 +272,25 @@ class SearchToolbar(gtk.Toolbar):

registry = bundleregistry.get_registry()
appended_separator = False

+
+ types = mime.get_all_generic_types()
+ for generic_type in types :
+ if not appended_separator:
+ self._what_search_combo.append_separator()
+ appended_separator = True
+ self._what_search_combo.append_item(
+ generic_type.type_id, generic_type.name, generic_type.icon)
+ if generic_type.type_id == current_value:
+ current_value_index = \
+ len(self._what_search_combo.get_model()) - 1
+
+ self._what_search_combo.set_active(current_value_index)
+
+ self._what_search_combo.append_separator()
+

for service_name in model.get_unique_values('activity'):

activity_info = registry.get_bundle(service_name)
if not activity_info is None:

  • if not appended_separator:
  • self._what_search_combo.append_separator()
  • appended_separator = True

-

if os.path.exists(activity_info.get_icon()):

self._what_search_combo.append_item(service_name,

activity_info.get_name(),

@@ -291,18 +303,6 @@ class SearchToolbar(gtk.Toolbar):

if service_name == current_value:

current_value_index = \

len(self._what_search_combo.get_model()) - 1

-

  • self._what_search_combo.append_separator()

-

  • types = mime.get_all_generic_types()
  • for generic_type in types :
  • self._what_search_combo.append_item(
  • generic_type.type_id, generic_type.name, generic_type.icon)
  • if generic_type.type_id == current_value:
  • current_value_index = \
  • len(self._what_search_combo.get_model()) - 1

-

  • self._what_search_combo.set_active(current_value_index)

finally:

self._what_search_combo.handler_unblock(

self._what_combo_changed_sid)

comment:4 in reply to: ↑ 1 Changed 15 years ago by garycmartin

Replying to erikos:

I remember that Gary had an idea about that - to have more than one column. I guess the fix can be split into first getting the mime-type selectors at the top.

Yes, my (future feature) suggestion would be for a grid view instead of a list, a little like we started doing for the home favourites view layout shapes toolbar menu. This would make it a custom palette and require more work/maintenance, but would make better use of the space and minimise on scrolling.

comment:5 Changed 15 years ago by tomeu

Sorry, we missed this one because didn't appeared in the review queue. Walter, please see about the review process here and attach again the patch if you still have it handy: http://wiki.sugarlabs.org/go/Development_Team/CodeReview

Don't paste on trac because it messes up with the spaces and cannot be applied.

Changed 15 years ago by walter

comment:6 Changed 15 years ago by walter

  • Keywords -r? added

[test case]

Open the Journal and select the sort by type menu. See if the mimetypes are at the top of the list.

comment:7 Changed 15 years ago by erikos

  • Bug Status changed from New to Assigned
  • Keywords r+ added; -r? removed

Thanks for the patch!

First a comment about the patch creation: please create the patch from the root of the component. Easier to apply. Watch whitespace errors (good test is to test applying your patch after creation to a clean tree). You can use the pep8.py specified at http://wiki.sugarlabs.org/go/Development_Team/Code_guidelines#Tools to detect those.

All the code looks good!

comment:8 Changed 15 years ago by erikos

  • Resolution set to fixed
  • Status changed from new to closed

comment:9 Changed 15 years ago by erikos

For Gary's longterm plan - please open a new ticket. Actually, I think this is not the pulldown in the journal only. As well the language one in the control panel for example.

comment:10 Changed 11 years ago by dnarvaez

  • Milestone 0.86 deleted

Milestone 0.86 deleted

Note: See TracTickets for help on using tickets.