Re: [CinCVS] [Bug 360] New: consistent list of items in View & Show Overlays

2006-11-09 Thread Andraž Tori


On Thu, 2006-11-09 at 19:14 +1030, Pierre Marc Dumuid wrote:
> Hey Andraz,
> 
> Attached is a "bit more work" patch that makes it match now..  I'm 
> wondering if some of the things I did are a non-standard way of doing 
> things, so could you review the patch please?
> 


I haven't tried to compile this, but looking at the source:

1. using bitmasks
using bitmasks has been largely avoided in cinelerra  (i've seen it at
one place only). Maybe it is not the wisest to start using it.

2. gettext... use gettextization please N_() around stuff that is not
translated inplace and _() for all prints of translatable phrases...

bye
adnaz


___
Cinelerra mailing list
Cinelerra@skolelinux.no
https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra


Re: [CinCVS] [Bug 360] New: consistent list of items in View & Show Overlays

2006-11-09 Thread Pierre Marc Dumuid

Hey Andraz,

Attached is a "bit more work" patch that makes it match now..  I'm 
wondering if some of the things I did are a non-standard way of doing 
things, so could you review the patch please?



Modifying the order of the menubar results in the numbers not being in 
order!  Do people mind if we change the keyboard shortcuts so the 
numbering is in order?



That's a bit nasty, couldn't we put a bit of extra more work and change
the way overlay window works?

  

done..

and while we are at it: i think in overlay window, each checkbox should
also have min and max range values there which should be editable... :)
  
If I was to do this, I'd want to use my widgetgrid class.. though that 
the same time, my desktop real estate isn't that large as it is, let 
alone adding textboxes!


Though if I used widgetgrid I'd probably make something so you could 
hide the ranges... I'll look into it sometime..
diff --git a/cinelerra/gwindowgui.C b/cinelerra/gwindowgui.C
index ebe4bed..d9b3961 100644
--- a/cinelerra/gwindowgui.C
+++ b/cinelerra/gwindowgui.C
@@ -31,7 +31,7 @@ GWindowGUI::GWindowGUI(MWindow *mwindow,
 	this->mwindow = mwindow;
 }
 
-static char *other_text[OTHER_TOGGLES] =
+static char *other_text[NONAUTOTOGGLES_COUNT] =
 {
 	"Assets",
 	"Titles",
@@ -55,13 +55,36 @@ static char *auto_text[] = 
 	"Nudge"
 };
 
+#define ISAUTO  0x1000
+#define NOTAUTO 0x2000
+
+static int auto_reorder[] = 
+{
+
+	NOTAUTO + NONAUTOTOGGLES_ASSETS,
+	NOTAUTO + NONAUTOTOGGLES_TITLES,
+	NOTAUTO + NONAUTOTOGGLES_TRANSITIONS,
+	ISAUTO  + AUTOMATION_FADE,
+	ISAUTO  + AUTOMATION_MUTE,
+	ISAUTO  + AUTOMATION_MODE,
+	ISAUTO  + AUTOMATION_PAN,
+	NOTAUTO + NONAUTOTOGGLES_PLUGIN_AUTOS,
+	ISAUTO  + AUTOMATION_MASK,
+	ISAUTO  + AUTOMATION_CAMERA_X,
+	ISAUTO  + AUTOMATION_CAMERA_Y,
+	ISAUTO  + AUTOMATION_CAMERA_Z,
+	ISAUTO  + AUTOMATION_PROJECTOR_X,
+	ISAUTO  + AUTOMATION_PROJECTOR_Y,
+	ISAUTO  + AUTOMATION_PROJECTOR_Z,
+};
+
 void GWindowGUI::calculate_extents(BC_WindowBase *gui, int *w, int *h)
 {
 	int temp1, temp2, temp3, temp4, temp5, temp6, temp7;
 	int current_w, current_h;
 	*w = 10;
 	*h = 10;
-	for(int i = 0; i < OTHER_TOGGLES; i++)
+	for(int i = 0; i < NONAUTOTOGGLES_COUNT + AUTOMATION_TOTAL; i++)
 	{
 		BC_Toggle::calculate_extents(gui, 
 			BC_WindowBase::get_resources()->checkbox_images,
@@ -75,29 +98,12 @@ void GWindowGUI::calculate_extents(BC_Wi
 			&temp5, 
 			&temp6,
 			&temp7, 
-			other_text[i]);
+			auto_reorder[i] & ISAUTO ? 
+auto_text[auto_reorder[i] - ISAUTO] : other_text[auto_reorder[i] - NOTAUTO]);
 		*w = MAX(current_w, *w);
 		*h += current_h + 5;
 	}
 
-	for(int i = 0; i < AUTOMATION_TOTAL; i++)
-	{
-		BC_Toggle::calculate_extents(gui, 
-			BC_WindowBase::get_resources()->checkbox_images,
-			0,
-			&temp1,
-			¤t_w,
-			¤t_h,
-			&temp2,
-			&temp3,
-			&temp4,
-			&temp5, 
-			&temp6,
-			&temp7, 
-			auto_text[i]);
-		*w = MAX(current_w, *w);
-		*h += current_h + 5;
-	}
 	*h += 10;
 	*w += 20;
 }
@@ -109,28 +115,16 @@ void GWindowGUI::create_objects()
 	int x = 10, y = 10;
 
 
-	for(int i = 0; i < OTHER_TOGGLES; i++)
+	for(int i = 0; i < NONAUTOTOGGLES_COUNT + AUTOMATION_TOTAL; i++)
 	{
-		add_tool(other[i] = new GWindowToggle(mwindow, 
+		add_tool(toggles[i] = new GWindowToggle(mwindow, 
 			this, 
 			x, 
 			y, 
-			-1,
-			i, 
-			other_text[i]));
-		y += other[i]->get_h() + 5;
-	}
-
-	for(int i = 0; i < AUTOMATION_TOTAL; i++)
-	{
-		add_tool(auto_toggle[i] = new GWindowToggle(mwindow, 
-			this, 
-			x, 
-			y, 
-			i,
-			-1, 
-			auto_text[i]));
-		y += auto_toggle[i]->get_h() + 5;
+			auto_reorder[i],
+			auto_reorder[i] & ISAUTO ? 
+auto_text[auto_reorder[i] - ISAUTO] : other_text[auto_reorder[i] - NOTAUTO]));
+		y += toggles[i]->get_h() + 5;
 	}
 }
 
@@ -145,14 +139,9 @@ void GWindowGUI::update_toggles(int use_
 {
 	if(use_lock) lock_window("GWindowGUI::update_toggles");
 
-	for(int i = 0; i < OTHER_TOGGLES; i++)
-	{
-		other[i]->update();
-	}
-
-	for(int i = 0; i < AUTOMATION_TOTAL; i++)
+	for(int i = 0; i < NONAUTOTOGGLES_COUNT + AUTOMATION_TOTAL; i++)
 	{
-		auto_toggle[i]->update();
+		toggles[i]->update();
 	}
 
 	if(use_lock) unlock_window();
@@ -205,40 +194,38 @@ GWindowToggle::GWindowToggle(MWindow *mw
 	GWindowGUI *gui, 
 	int x, 
 	int y, 
-	int subscript, 
-	int other,
+	int toggleref, 
 	char *text)
  : BC_CheckBox(x, 
  	y, 
-	*get_main_value(mwindow, subscript, other), 
+	*get_main_value(mwindow, toggleref), 
 	text)
 {
 	this->mwindow = mwindow;
 	this->gui = gui;
-	this->subscript = subscript;
-	this->other = other;
+	this->toggleref = toggleref;
 }
 
 int GWindowToggle::handle_event()
 {
-	*get_main_value(mwindow, subscript, other) = get_value();
+	*get_main_value(mwindow, toggleref) = get_value();
 	gui->update_mwindow();
 
 
 // Update stuff in MWindow
 	unlock_window();
 	mwindow->gui->lock_window("GWindowToggle::handle_event");
-	if(subscript >= 0)
+	if(toggleref & ISAUTO)
 	{
 		mwindow->gui->canvas->draw_overlays();
 		mwindow->gui->canvas->flash();
 	}
 	e

Re: [CinCVS] [Bug 360] New: consistent list of items in View & Show Overlays

2006-11-08 Thread Gour
On Wed, 2006-11-08 at 16:22 +0100, Andraž Tori wrote:

> That's a bit nasty, couldn't we put a bit of extra more work and change
> the way overlay window works?

This is a good proposal.

> and while we are at it: i think in overlay window, each checkbox should
> also have min and max range values there which should be editable... :)

Very nice. The present dialog definitely needs some love :-)

Sincerely,
Gour



signature.asc
Description: This is a digitally signed message part


Re: [CinCVS] [Bug 360] New: consistent list of items in View & Show Overlays

2006-11-08 Thread Andraž Tori
On Wed, 2006-11-08 at 23:27 +1030, Pierre Marc Dumuid wrote:
> I was having trouble making an attachment to bugzilla.
> I made a patch for this issue, but the ordering is kinda outa wack in 
> the menu:
> 
> Here is a patch that fixes the issue, but because of the way the overlay 
> window is created, it can't easily be made to match the order of the 
> menubar. 
> 
> Modifying the order of the menubar results in the numbers not being in 
> order!  Do people mind if we change the keyboard shortcuts so the 
> numbering is in order?

That's a bit nasty, couldn't we put a bit of extra more work and change
the way overlay window works?

and while we are at it: i think in overlay window, each checkbox should
also have min and max range values there which should be editable... :)

bye
andraz



___
Cinelerra mailing list
Cinelerra@skolelinux.no
https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra


Re: [CinCVS] [Bug 360] New: consistent list of items in View & Show Overlays

2006-11-08 Thread Pierre Marc Dumuid

I was having trouble making an attachment to bugzilla.
I made a patch for this issue, but the ordering is kinda outa wack in 
the menu:


Here is a patch that fixes the issue, but because of the way the overlay 
window is created, it can't easily be made to match the order of the 
menubar. 

Modifying the order of the menubar results in the numbers not being in 
order!  Do people mind if we change the keyboard shortcuts so the 
numbering is in order?



Pierre


[EMAIL PROTECTED] wrote:

http://bugs.cinelerra.org/show_bug.cgi?id=360

   Summary: consistent list of items in View & Show Overlays
   Product: Cinelerra
   Version: 2.1
  Platform: PC
OS/Version: Linux
Status: NEW
  Severity: enhancement
  Priority: Medium
 Component: User Interface
AssignedTo: cinelerra@skolelinux.no
ReportedBy: [EMAIL PROTECTED]


Hi!

The Program --> View show the list of different menu items (Show assets, Show
titles) which is not in the same order as the items in Program --> Window -->
Show Overlays, so the feature request is to put the two in the same order to
improve consistency in the user-interface.

Sincerely,
Gour



--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

___
Cinelerra mailing list
Cinelerra@skolelinux.no
https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra
  


Index: cinelerra/mainmenu.C
===
--- cinelerra/mainmenu.C	(revision 957)
+++ cinelerra/mainmenu.C	(working copy)
@@ -171,11 +171,11 @@
 	viewmenu->add_item(show_assets = new ShowAssets(mwindow, "0"));
 	viewmenu->add_item(show_titles = new ShowTitles(mwindow, "1"));
 	viewmenu->add_item(show_transitions = new ShowTransitions(mwindow, "2"));
+	viewmenu->add_item(plugin_automation = new PluginAutomation(mwindow, "7"));
 	viewmenu->add_item(fade_automation = new ShowAutomation(mwindow, _("Fade"), "3", AUTOMATION_FADE));
 	viewmenu->add_item(mute_automation = new ShowAutomation(mwindow, _("Mute"), "4", AUTOMATION_MUTE));
 	viewmenu->add_item(mode_automation = new ShowAutomation(mwindow, _("Mode"), "5", AUTOMATION_MODE));
 	viewmenu->add_item(pan_automation = new ShowAutomation(mwindow, _("Pan"), "6", AUTOMATION_PAN));
-	viewmenu->add_item(plugin_automation = new PluginAutomation(mwindow, "7"));
 	viewmenu->add_item(mask_automation = new ShowAutomation(mwindow, _("Mask"), "8", AUTOMATION_MASK));
 	viewmenu->add_item(camera_x = new ShowAutomation(mwindow, _("Camera X"), "", AUTOMATION_CAMERA_X));
 	viewmenu->add_item(camera_y = new ShowAutomation(mwindow, _("Camera Y"), "", AUTOMATION_CAMERA_Y));
Index: cinelerra/viewmenu.C
===
--- cinelerra/viewmenu.C	(revision 952)
+++ cinelerra/viewmenu.C	(working copy)
@@ -122,7 +122,7 @@
 
 
 PluginAutomation::PluginAutomation(MWindow *mwindow, char *hotkey)
- : BC_MenuItem(_("Plugin keyframes"), hotkey, hotkey[0]) 
+ : BC_MenuItem(_("Plugin Autos"), hotkey, hotkey[0]) 
 { 
 	this->mwindow = mwindow; 
 }
Index: cinelerra/gwindowgui.C
===
--- cinelerra/gwindowgui.C	(revision 952)
+++ cinelerra/gwindowgui.C	(working copy)
@@ -55,6 +55,22 @@
 	"Nudge"
 };
 
+static int auto_reorder[] = 
+{
+	AUTOMATION_FADE,
+	AUTOMATION_MUTE,
+	AUTOMATION_MODE,
+	AUTOMATION_PAN,
+	AUTOMATION_MASK,
+	AUTOMATION_CAMERA_X,
+	AUTOMATION_CAMERA_Y,
+	AUTOMATION_CAMERA_Z,
+	AUTOMATION_PROJECTOR_X,
+	AUTOMATION_PROJECTOR_Y,
+	AUTOMATION_PROJECTOR_Z
+};
+
+
 void GWindowGUI::calculate_extents(BC_WindowBase *gui, int *w, int *h)
 {
 	int temp1, temp2, temp3, temp4, temp5, temp6, temp7;
@@ -127,9 +143,9 @@
 			this, 
 			x, 
 			y, 
-			i,
+			auto_reorder[i],
 			-1, 
-			auto_text[i]));
+			auto_text[auto_reorder[i]]));
 		y += auto_toggle[i]->get_h() + 5;
 	}
 }


[CinCVS] [Bug 360] New: consistent list of items in View & Show Overlays

2006-11-07 Thread bugzilla-daemon
http://bugs.cinelerra.org/show_bug.cgi?id=360

   Summary: consistent list of items in View & Show Overlays
   Product: Cinelerra
   Version: 2.1
  Platform: PC
OS/Version: Linux
Status: NEW
  Severity: enhancement
  Priority: Medium
 Component: User Interface
AssignedTo: cinelerra@skolelinux.no
ReportedBy: [EMAIL PROTECTED]


Hi!

The Program --> View show the list of different menu items (Show assets, Show
titles) which is not in the same order as the items in Program --> Window -->
Show Overlays, so the feature request is to put the two in the same order to
improve consistency in the user-interface.

Sincerely,
Gour



--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

___
Cinelerra mailing list
Cinelerra@skolelinux.no
https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra