[vlc-devel] [PATCH 2/2] Feature #2568 Hotkeys for font size change ------------------------------------------- Cleaned up changes

Subodh Shrestha forsubodh at gmail.com
Tue Mar 4 08:24:49 CET 2014


---
 modules/control/hotkeys.c        |   10 ++++------
 modules/text_renderer/freetype.c |    9 ---------
 src/config/keys.c                |    4 ----
 src/libvlc-module.c              |    7 -------
 4 files changed, 4 insertions(+), 26 deletions(-)

diff --git a/modules/control/hotkeys.c b/modules/control/hotkeys.c
index 42a06e0..5f02b5c 100644
--- a/modules/control/hotkeys.c
+++ b/modules/control/hotkeys.c
@@ -1051,10 +1051,10 @@ static int PutAction( intf_thread_t *p_intf, int i_action, filter_t *p_filter)
             if ( p_filter )
             {
                 int rel_fontsize = var_InheritInteger( p_filter, "freetype-rel-fontsize");
-                msg_Err(p_filter, "Old Relative Fontsize:%i", rel_fontsize);
+                msg_Dbg(p_filter, "Old Relative Fontsize:%i", rel_fontsize);
                 var_Create( p_filter, "freetype-rel-fontsize", VLC_VAR_INTEGER);
                 var_SetInteger( p_filter, "freetype-rel-fontsize", --rel_fontsize);
-                msg_Err(p_filter, "New Relative Fontsize:%i", rel_fontsize);
+                msg_Dbg(p_filter, "New Relative Fontsize:%i", rel_fontsize);
             }
             break;
 
@@ -1062,10 +1062,10 @@ static int PutAction( intf_thread_t *p_intf, int i_action, filter_t *p_filter)
             if( p_filter )
             {
                 int rel_fontsize = var_InheritInteger( p_filter, "freetype-rel-fontsize");
-                msg_Err(p_filter, "Old Relative Fontsize:%i", rel_fontsize);
+                msg_Dbg(p_filter, "Old Relative Fontsize:%i", rel_fontsize);
                 var_Create( p_filter, "freetype-rel-fontsize", VLC_VAR_INTEGER);
                 var_SetInteger( p_filter, "freetype-rel-fontsize", ++rel_fontsize);
-                msg_Err(p_filter, "New Relative Fontsize:%i", rel_fontsize);
+                msg_Dbg(p_filter, "New Relative Fontsize:%i", rel_fontsize);
             }
             break;
     }
@@ -1084,9 +1084,7 @@ static int ActionEvent( vlc_object_t *libvlc, char const *psz_var,
                         vlc_value_t oldval, vlc_value_t newval, void *p_data )
 {
     intf_thread_t *p_intf = (intf_thread_t *)p_data;
-    //SS>>
     filter_t *p_filter = (filter_t *)libvlc;
-    //SS<<
 
     (void)libvlc;
     (void)psz_var;
diff --git a/modules/text_renderer/freetype.c b/modules/text_renderer/freetype.c
index 7938ebc..527f01d 100644
--- a/modules/text_renderer/freetype.c
+++ b/modules/text_renderer/freetype.c
@@ -1624,8 +1624,6 @@ static int RenderCommon( filter_t *p_filter, subpicture_region_t *p_region_out,
 
     if( b_html )
     {
-        //SS
-        msg_Err(p_filter, "here");
         stream_t *p_sub = stream_MemoryNew( VLC_OBJECT(p_filter),
                                             (uint8_t *) p_region_in->psz_html,
                                             strlen( p_region_in->psz_html ),
@@ -1667,11 +1665,6 @@ static int RenderCommon( filter_t *p_filter, subpicture_region_t *p_region_out,
                 rv = VLC_EGENERIC;
             }
         }
-        //SS >>
-        //msg_Err(p_filter, "test: %i", p_region_in->p_style->i_font_size);
-        //SetFontSize( p_filter, 10);
-        //p_sys->style.i_font_size = 60;
-        //SS <<
         if( !rv )
         {
             rv = ProcessNodes( p_filter,
@@ -1686,8 +1679,6 @@ static int RenderCommon( filter_t *p_filter, subpicture_region_t *p_region_out,
     }
     else
     {
-        //SS
-        msg_Err(p_filter, "here2");
         text_style_t *p_style;
         if( p_region_in->p_style )
             p_style = CreateStyle( p_region_in->p_style->psz_fontname ? p_region_in->p_style->psz_fontname
diff --git a/src/config/keys.c b/src/config/keys.c
index 46407eb..8684101 100644
--- a/src/config/keys.c
+++ b/src/config/keys.c
@@ -449,9 +449,6 @@ static void vlc_InitAction (vlc_object_t *obj, void **map,
                             const char *confname, vlc_action_t action)
 {
     char *keys = var_InheritString (obj, confname);
-    //SS >>
-    msg_Err( obj, "For action:%s key found %s", confname, keys );
-    //SS <<
     if (keys == NULL)
         return;
 
@@ -478,7 +475,6 @@ static void vlc_InitAction (vlc_object_t *obj, void **map,
 struct vlc_actions *vlc_InitActions (libvlc_int_t *libvlc)
 {
     vlc_object_t *obj = VLC_OBJECT(libvlc);
-    msg_Err( libvlc, "init actions" );
     struct hotkey *keys;
     struct vlc_actions *as = malloc (sizeof (*as) + (ACTIONS_COUNT + 1) * sizeof (*keys));
 
diff --git a/src/libvlc-module.c b/src/libvlc-module.c
index ac7a682..96d2c07 100644
--- a/src/libvlc-module.c
+++ b/src/libvlc-module.c
@@ -1431,13 +1431,11 @@ static const char *const mouse_wheel_texts[] =
 #define AUDI_DEVICE_CYCLE_KEY_TEXT N_("Cycle through audio devices")
 #define AUDI_DEVICE_CYCLE_KEY_LONGTEXT N_("Cycle through available audio devices")
 
-//SS >>
 #define FONTSIZE_UP_KEY_TEXT N_("Increase font size")
 #define FONTSIZE_UP_KEY_LONGTEXT N_("Increase font size using hotkey")
 
 #define FONTSIZE_DOWN_KEY_TEXT N_("Decrease font size")
 #define FONTSIZE_DOWN_KEY_LONGTEXT N_("Decrease font size using hotkey")
-//SS<<
 /*
  * Quick usage guide for the configuration options:
  *
@@ -2396,10 +2394,8 @@ vlc_module_begin ()
 /* Playlist clear */
 #   define KEY_PLAY_CLEAR         "Ctrl+w"
 
-//SS >>
 #   define KEY_FONTSIZE_UP        "Ctrl+a"
 #   define KEY_FONTSIZE_DOWN      "Ctrl+Shift+a"
-//SS <<
 #endif
 
     add_key( "key-toggle-fullscreen", KEY_TOGGLE_FULLSCREEN, TOGGLE_FULLSCREEN_KEY_TEXT,
@@ -2627,13 +2623,10 @@ vlc_module_begin ()
     add_key( "key-clear-playlist", KEY_PLAY_CLEAR,
              PLAY_CLEAR_KEY_TEXT, PLAY_CLEAR_KEY_LONGTEXT, true )
 
-    //SS >>
     add_key( "key-fontsize-up", KEY_FONTSIZE_UP,
              FONTSIZE_UP_KEY_TEXT, FONTSIZE_UP_KEY_LONGTEXT, true)
     add_key( "key-fontsize-down", KEY_FONTSIZE_DOWN,
              FONTSIZE_DOWN_KEY_TEXT, FONTSIZE_DOWN_KEY_LONGTEXT, true)
-             
-    //SS <<
 
     add_string( "bookmark1", NULL,
              BOOKMARK1_TEXT, BOOKMARK_LONGTEXT, false )
-- 
1.7.9.5




More information about the vlc-devel mailing list