anjuta r3868 - in trunk: . plugins/file-loader
- From: jhs svn gnome org
- To: svn-commits-list gnome org
- Subject: anjuta r3868 - in trunk: . plugins/file-loader
- Date: Wed, 16 Apr 2008 09:17:09 +0100 (BST)
Author: jhs
Date: Wed Apr 16 09:17:09 2008
New Revision: 3868
URL: http://svn.gnome.org/viewvc/anjuta?rev=3868&view=rev
Log:
2008-04-16 Johannes Schmid <jhs gnome org>
Patch from Ignacio Casal Quinteiro:
* plugins/file-loader/anjuta-recent-chooser-menu.c
(_gtk_recent_chooser_get_items),
(anjuta_recent_chooser_menu_insert_item), (idle_populate_func),
(anjuta_recent_chooser_menu_populate):
Show 5 project and 15 file items in recent-chooser
Modified:
trunk/ChangeLog
trunk/plugins/file-loader/anjuta-recent-chooser-menu.c
Modified: trunk/plugins/file-loader/anjuta-recent-chooser-menu.c
==============================================================================
--- trunk/plugins/file-loader/anjuta-recent-chooser-menu.c (original)
+++ trunk/plugins/file-loader/anjuta-recent-chooser-menu.c Wed Apr 16 09:17:09 2008
@@ -69,6 +69,7 @@
gulong populate_id;
gint prj_pos;
+ gint max_files;
};
typedef enum {
@@ -305,7 +306,7 @@
if (!items)
return NULL;
- limit = gtk_recent_chooser_get_limit (chooser);
+ limit = 100;
if (limit == 0)
return NULL;
@@ -1062,9 +1063,12 @@
if (anjuta_project)
{
- gtk_menu_shell_insert (GTK_MENU_SHELL (menu), menuitem,
- priv->prj_pos);
- priv->prj_pos++;
+ if (priv->prj_pos != 5)
+ {
+ gtk_menu_shell_insert (GTK_MENU_SHELL (menu), menuitem,
+ priv->prj_pos);
+ priv->prj_pos++;
+ }
}
else gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
@@ -1167,8 +1171,15 @@
if (strcmp (gtk_recent_info_get_mime_type (info), "application/x-anjuta") == 0)
anjuta_recent_chooser_menu_insert_item (pdata->menu, item,
pdata->displayed_items, TRUE);
- else anjuta_recent_chooser_menu_insert_item (pdata->menu, item,
- pdata->displayed_items, FALSE);
+ else
+ {
+ if (priv->max_files != 14)
+ {
+ anjuta_recent_chooser_menu_insert_item (pdata->menu, item,
+ pdata->displayed_items, FALSE);
+ priv->max_files++;
+ }
+ }
pdata->displayed_items += 1;
@@ -1240,6 +1251,7 @@
priv->icon_size = get_icon_size_for_widget (GTK_WIDGET (menu));
priv->prj_pos = 0;
+ priv->max_files = 0;
/* remove our menu items first and hide the placeholder */
anjuta_recent_chooser_menu_dispose_items (menu);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]