[mythtv-users] MythRecipe patch for mythtv 0.20

Allan Stirling Dibblahmythml0015 at pendor.org
Wed Feb 7 13:46:05 UTC 2007


Karl Hiramoto wrote:
> Allan Stirling wrote:
>> Karl Hiramoto wrote:
>>  
>>> If anyone is interested.
>>>
>>> I patched mythRecipe so it compiles with mythtv 0.20  and with gcc 4.1
>>>
>>> It is partially working,  a lot more debugging to do, but the browse
>>> recipes more or less works.
>>>
>>>
>>>     
>> Hi,
>>
>> Do you have a URL for the source you have used in this patch?
>>
>> I can only find older versions :(
>>
>> Cheers,
>>
>> Allan
> The official website seems to be down..  Here is a link though to the
> source code with my patch applied.
> 
> http://karl.hiramoto.org/mythtv/mythextra_20060405-karl-pateched_gcc4.1_mythv0.20.tar.bz2
> 
> 
> 
> disclaimer, it's not bug free, but the browse course/cuisine works good
> enough for me.
> 

Odd. I also have to make the attached change for this to
compile. All it does is makes the settings the same as all
of the rest of the plugins.

Cheers,

Allan.
-------------- next part --------------
diff -urN ./mythrecipe/mythModule/recipe_filter.cpp ../mythextra_20060405/mythrecipe/mythModule/recipe_filter.cpp
--- ./mythrecipe/mythModule/recipe_filter.cpp	2007-02-07 13:35:12.529537858 +0000
+++ ../mythextra_20060405/mythrecipe/mythModule/recipe_filter.cpp	2006-04-13 19:19:37.000000000 +0100
@@ -9,47 +9,54 @@
 
 // General Settings
 
-HostLineEdit *RecipeNameFilter() {
-    HostLineEdit *gc = new HostLineEdit("RecipeNameFilter");
-    gc->setLabel(QObject::tr("Recipe Name Filter"));
-    gc->setValue("All");
-    gc->setHelpText(QObject::tr("Display recipes which include (text) in title.. "));
-    return gc;
+class RecipeNameFilter: public LineEditSetting, public GlobalSetting {
+public:
+    RecipeNameFilter():
+        GlobalSetting("RecipeNameFilter") {
+        setLabel(QObject::tr("Recipe Name Filter"));
+        setValue("All");
+        setHelpText(QObject::tr("Display recipes which include (text) in title.. "));
+    };
 };
 
-                    
-HostCheckBox *RecipeShowFavorites() {
-    HostCheckBox *gc = new HostCheckBox("RecipeShowFavorites");
-    gc->setLabel(QObject::tr("Show Only Favorite Recipes"));
-    gc->setValue(false);
-    gc->setHelpText(QObject::tr("Show only Favourite (tagged) Recipes... " ));
-    return gc;
+class RecipeShowFavorites: public CheckBoxSetting, public GlobalSetting {
+public:
+    RecipeShowFavorites():
+        GlobalSetting("RecipeShowFavourites") {
+        setLabel(QObject::tr("Show Only Favorite Recipes"));
+        setValue(false);
+        setHelpText(QObject::tr("Show only Favourite (tagged) Recipes... " ));
+    };
 };
 
-
-HostLineEdit *RecipeCourseFilter() {
-    HostLineEdit *gc = new HostLineEdit("RecipeCourseFilter");
-    gc->setLabel(QObject::tr("Recipe Course Filter"));
-    gc->setValue("All");
-    gc->setHelpText(QObject::tr("Display recipes which include (text) in Course title."));
-    return gc;
+class RecipeCourseFilter: public LineEditSetting, public GlobalSetting {
+public:
+    RecipeCourseFilter():
+        GlobalSetting("RecipeCourseFilter") {
+        setLabel(QObject::tr("Recipe Course Filter"));
+        setValue("All");
+        setHelpText(QObject::tr("Display recipes which include (text) in Course title."));
+    };
 };
 
-
-HostLineEdit *RecipeCuisineFilter() {
-    HostLineEdit *gc = new HostLineEdit("RecipeCuisineFilter");
-    gc->setLabel(QObject::tr("Recipe Cuisine Filter"));
-    gc->setValue("All");
-    gc->setHelpText(QObject::tr("Display recipes which include (text) in Cuisine title."));
-    return gc;
+class RecipeCuisineFilter: public LineEditSetting, public GlobalSetting {
+public:
+    RecipeCuisineFilter():
+        GlobalSetting("RecipeCuisineFilter") {
+        setLabel(QObject::tr("Recipe Cuisine Filter"));
+        setValue("All");
+        setHelpText(QObject::tr("Display recipes which include (text) in Cuisine title."));
+    };
 };
 
-HostLineEdit *RecipeIngredientFilter() {
-    HostLineEdit *gc = new HostLineEdit("RecipeIngredientFilter");
-    gc->setLabel(QObject::tr("Recipe Ingredient Filter"));
-    gc->setValue("All");
-    gc->setHelpText(QObject::tr("Display recipes which include (text) in Ingredient name."));
-    return gc;
+class RecipeIngredientFilter: public LineEditSetting, public GlobalSetting {
+public:
+    RecipeIngredientFilter():
+        GlobalSetting("RecipeIngredientFilter") {
+        setLabel(QObject::tr("Recipe Ingredient Filter"));
+        setValue("All");
+      setHelpText(QObject::tr("Display recipes which include (text) in Ingredient name."));
+    };
 };
 
 MythRecipeFilterSettings::MythRecipeFilterSettings()
@@ -58,11 +65,11 @@
 
     filter->setLabel(QObject::tr("MythRecipe Filter Settings "));
 
-    filter->addChild(RecipeNameFilter() );
-    filter->addChild(RecipeShowFavorites() );
-    filter->addChild(RecipeIngredientFilter() );
-    filter->addChild(RecipeCourseFilter() );
-    filter->addChild(RecipeCuisineFilter() );
+    filter->addChild( new RecipeNameFilter() );
+    filter->addChild( new RecipeShowFavorites() );
+    filter->addChild( new RecipeIngredientFilter() );
+    filter->addChild( new RecipeCourseFilter() );
+    filter->addChild( new RecipeCuisineFilter() );
 
     addChild(filter);
 }


More information about the mythtv-users mailing list