changeset 25601:8a0adeba5910

Rename common.[ch] to gtk_common.[ch], there are too many files by that name.
author diego
date Sun, 06 Jan 2008 16:22:00 +0000
parents 785d273c050f
children a3802ca6320a
files gui/Makefile gui/mplayer/gtk/about.c gui/mplayer/gtk/common.c gui/mplayer/gtk/common.h gui/mplayer/gtk/eq.c gui/mplayer/gtk/fs.c gui/mplayer/gtk/gtk_common.c gui/mplayer/gtk/gtk_common.h gui/mplayer/gtk/mb.c gui/mplayer/gtk/opts.c gui/mplayer/gtk/pl.c gui/mplayer/gtk/sb.c gui/mplayer/gtk/url.c
diffstat 13 files changed, 213 insertions(+), 213 deletions(-) [+]
line wrap: on
line diff
--- a/gui/Makefile	Sun Jan 06 14:30:25 2008 +0000
+++ b/gui/Makefile	Sun Jan 06 16:22:00 2008 +0000
@@ -41,7 +41,7 @@
                mplayer/gtk/opts.c \
                mplayer/gtk/url.c \
                mplayer/gtk/eq.c \
-               mplayer/gtk/common.c \
+               mplayer/gtk/gtk_common.c \
 
 endif
 
--- a/gui/mplayer/gtk/about.c	Sun Jan 06 14:30:25 2008 +0000
+++ b/gui/mplayer/gtk/about.c	Sun Jan 06 16:22:00 2008 +0000
@@ -6,7 +6,7 @@
 #include "mplayer/pixmaps/about.xpm"
 #include "../widgets.h"
 #include "about.h"
-#include "common.h"
+#include "gtk_common.h"
 
 GtkWidget * About = NULL;
 
--- a/gui/mplayer/gtk/common.c	Sun Jan 06 14:30:25 2008 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,180 +0,0 @@
-
-#include <gdk/gdkkeysyms.h>
-#include <gtk/gtk.h>
-
-#include "common.h"
-
-void WidgetDestroy( GtkWidget * widget,GtkWidget ** widget_pointer )
-{
- if ( !widget_pointer ) return;
- gtk_widget_hide( *widget_pointer );
- gtk_widget_destroy( *widget_pointer );
- *widget_pointer=NULL;
-}
-
-GtkWidget * AddDialogFrame( GtkWidget * parent )
-{
- GtkWidget * frame;
- frame=AddFrame( NULL,GTK_SHADOW_IN,parent,1 );
- gtk_container_set_border_width( GTK_CONTAINER( frame ),1 );
- frame=AddFrame( NULL,GTK_SHADOW_NONE,frame,1 );
- frame=AddFrame( NULL,GTK_SHADOW_ETCHED_OUT,frame,1 );
- frame=AddFrame( NULL,GTK_SHADOW_NONE,frame,1 );
- return frame;
-}
-
-GtkWidget * AddFrame( const char * title,int type,GtkWidget * parent,int add )
-{
- GtkWidget * frame = NULL;
- frame=gtk_frame_new( title );
- gtk_widget_set_name( frame,"frame" );
- gtk_widget_show( frame );
- gtk_frame_set_shadow_type( GTK_FRAME( frame ),type );
- if ( !parent ) return frame;
- if ( add ) gtk_container_add( GTK_CONTAINER( parent ),frame );
-  else gtk_box_pack_start( GTK_BOX( parent ),frame,FALSE,FALSE,0 );
- return frame;
-}
-
-GtkWidget * AddLabel( const char * title,GtkWidget * parent )
-{
- GtkWidget * label;
- label=gtk_label_new( title );
- gtk_widget_set_name( label,"label" );
- gtk_widget_show( label );
- if ( parent ) gtk_box_pack_start( GTK_BOX( parent ),label,FALSE,FALSE,0 );
- gtk_misc_set_alignment( GTK_MISC( label ),0,0.5 );
- gtk_misc_set_padding( GTK_MISC( label ),4,0 );
- return label;
-}
-
-GtkWidget * AddVBox( GtkWidget * parent,int type )
-{
- GtkWidget * vbox;
- vbox=gtk_vbox_new( FALSE,0 );
- gtk_widget_set_name( vbox,"vbox" );
- gtk_widget_show( vbox );
- if ( parent ) 
-  {
-   if ( type ) gtk_box_pack_start( GTK_BOX( parent ),vbox,FALSE,FALSE,0 );
-    else gtk_container_add( GTK_CONTAINER( parent ),vbox );
-  }
- return vbox;
-}
-
-GtkWidget * AddHBox( GtkWidget * parent,int type )
-{
- GtkWidget * hbox;
- hbox=gtk_hbox_new( FALSE,0 );
- gtk_widget_set_name( hbox,"hbox" );
- gtk_widget_show( hbox );
- if ( parent )
-  {
-   if ( type ) gtk_box_pack_start( GTK_BOX( parent ),hbox,FALSE,FALSE,0 );
-    else gtk_container_add( GTK_CONTAINER( parent ),hbox );
-  }
- return hbox;
-}
-
-GtkWidget * AddCheckButton( const char * title, GtkWidget * parent )
-{
- GtkWidget * CB;
- CB=gtk_check_button_new_with_label( title );
- gtk_widget_set_name( CB,"CB" );
- gtk_widget_show( CB );
- gtk_box_pack_start( GTK_BOX( parent ),CB,FALSE,FALSE,0 );
- return CB;
-}
-
-GtkWidget * AddRadioButton( const char * title,GSList ** group,GtkWidget * parent )
-{
- GtkWidget * RB;
- RB=gtk_radio_button_new_with_label( *group,title );
- *group=gtk_radio_button_group( GTK_RADIO_BUTTON( RB ) );
- gtk_widget_set_name( RB,"RB" );
- gtk_widget_show( RB );
- gtk_box_pack_start( GTK_BOX( parent ),RB,FALSE,FALSE,0 );
- return RB;
-}
-
-GtkWidget * AddSpinButton( const char * title,GtkAdjustment * adj,GtkWidget * parent )
-{
- GtkWidget * SB;
- GtkWidget * label;
- label=gtk_label_new( title );
- gtk_misc_set_alignment( GTK_MISC( label ),0,0.5 );
- gtk_box_pack_start( GTK_BOX( parent ),label,FALSE,FALSE,0 );
- gtk_widget_show( label );
- SB=gtk_spin_button_new( adj,0,0 );
- gtk_widget_set_name( SB,"SB" );
- gtk_box_pack_start( GTK_BOX( parent ),SB,FALSE,FALSE,0 );
- gtk_widget_show( SB );
- return SB;
-}
-
-GtkWidget * AddButton( const char * title,GtkWidget * parent )
-{
- GtkWidget * B;
- B=gtk_button_new_with_label( title );
- gtk_widget_set_name( B,"B" );
- gtk_widget_show( B );
- gtk_container_add( GTK_CONTAINER( parent ),B );
- return B;
-}
-
-GtkWidget * AddHSeparator( GtkWidget * parent )
-{
- GtkWidget * hseparator;
- hseparator=gtk_hseparator_new();
- gtk_widget_set_name( hseparator,"hseparator1" );
- gtk_widget_show( hseparator );
- gtk_box_pack_start( GTK_BOX( parent ),hseparator,FALSE,FALSE,0 );
- gtk_widget_set_usize( hseparator,-2,6 );
- return hseparator;
-}
-
-GtkWidget * AddHButtonBox( GtkWidget * parent )
-{
- GtkWidget * hbuttonbox;
- hbuttonbox=gtk_hbutton_box_new();
- gtk_widget_set_name( hbuttonbox,"hbuttonbox" );
- gtk_widget_show( hbuttonbox );
- gtk_box_pack_start( GTK_BOX( parent ),hbuttonbox,FALSE,FALSE,0 );
- gtk_button_box_set_child_size( GTK_BUTTON_BOX( hbuttonbox ),85,20 );
- return hbuttonbox;
-}
-
-GtkWidget * AddHScaler( GtkAdjustment * adj,GtkWidget * parent,int digit )
-{
- GtkWidget * HS;
- HS=gtk_hscale_new( adj );
- gtk_widget_set_name( HS,"HS" );
- gtk_widget_show( HS );
- if ( parent ) gtk_box_pack_start( GTK_BOX( parent ),HS,TRUE,TRUE,0 );
- gtk_scale_set_value_pos( GTK_SCALE( HS ),GTK_POS_RIGHT );
- gtk_scale_set_digits( GTK_SCALE( HS ),digit );
- return HS;
-}
-
-GtkWidget * AddVScaler( GtkAdjustment * adj,GtkWidget * parent,int digit )
-{
- GtkWidget * VS;
- VS=gtk_vscale_new( adj );
- gtk_widget_set_name( VS,"VS" );
- gtk_widget_show( VS );
- if ( parent ) gtk_box_pack_start( GTK_BOX( parent ),VS,TRUE,TRUE,0 );
-// gtk_scale_set_value_pos( GTK_SCALE( VS ),GTK_POS_RIGHT );
- if ( digit == -1 ) gtk_scale_set_draw_value( GTK_SCALE( VS ),FALSE );
-  else gtk_scale_set_digits( GTK_SCALE( VS ),digit );
- return VS;
-}
-
-GtkWidget * AddComboBox( GtkWidget * parent )
-{
- GtkWidget * CB;
- CB=gtk_combo_new();
- gtk_widget_set_name( CB,"CB" );
- gtk_widget_show( CB );
- if ( parent ) gtk_box_pack_start( GTK_BOX( parent ),CB,TRUE,TRUE,0 );
- return CB;
-}
--- a/gui/mplayer/gtk/common.h	Sun Jan 06 14:30:25 2008 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-
-#ifndef GUI_COMMON_H
-#define GUI_COMMON_H
-
-#include <gdk/gdkkeysyms.h>
-#include <gtk/gtk.h>
-
-extern GtkWidget * AddDialogFrame( GtkWidget * parent );
-extern GtkWidget * AddFrame( const char * title,int type,GtkWidget * parent,int add );
-extern GtkWidget * AddLabel( const char * title,GtkWidget * parent );
-extern GtkWidget * AddVBox( GtkWidget * parent,int type );
-extern GtkWidget * AddHBox( GtkWidget * parent,int type );
-extern GtkWidget * AddCheckButton( const char * title, GtkWidget * parent );
-extern GtkWidget * AddRadioButton( const char * title,GSList ** group,GtkWidget * parent );
-extern GtkWidget * AddSpinButton( const char * title,GtkAdjustment * adj,GtkWidget * parent );
-extern GtkWidget * AddButton( const char * title,GtkWidget * parent );
-extern GtkWidget * AddHSeparator( GtkWidget * parent );
-extern GtkWidget * AddHButtonBox( GtkWidget * parent );
-extern GtkWidget * AddHScaler( GtkAdjustment * adj,GtkWidget * parent,int digit );
-extern GtkWidget * AddVScaler( GtkAdjustment * adj,GtkWidget * parent,int digit );
-extern GtkWidget * AddComboBox( GtkWidget * parent );
-extern void WidgetDestroy( GtkWidget * widget,GtkWidget ** widget_pointer );
-
-#endif /* GUI_COMMON_H */
--- a/gui/mplayer/gtk/eq.c	Sun Jan 06 14:30:25 2008 +0000
+++ b/gui/mplayer/gtk/eq.c	Sun Jan 06 16:22:00 2008 +0000
@@ -22,7 +22,7 @@
 #include "../widgets.h"
 
 #include "eq.h"
-#include "common.h"
+#include "gtk_common.h"
 
 #define eqRange 15
 
--- a/gui/mplayer/gtk/fs.c	Sun Jan 06 14:30:25 2008 +0000
+++ b/gui/mplayer/gtk/fs.c	Sun Jan 06 16:22:00 2008 +0000
@@ -21,7 +21,7 @@
 #include "../widgets.h"
 #include "fs.h"
 #include "opts.h"
-#include "common.h"
+#include "gtk_common.h"
 
 #ifndef __linux__
 #define get_current_dir_name()  getcwd(NULL, PATH_MAX)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gui/mplayer/gtk/gtk_common.c	Sun Jan 06 16:22:00 2008 +0000
@@ -0,0 +1,180 @@
+
+#include <gdk/gdkkeysyms.h>
+#include <gtk/gtk.h>
+
+#include "gtk_common.h"
+
+void WidgetDestroy( GtkWidget * widget,GtkWidget ** widget_pointer )
+{
+ if ( !widget_pointer ) return;
+ gtk_widget_hide( *widget_pointer );
+ gtk_widget_destroy( *widget_pointer );
+ *widget_pointer=NULL;
+}
+
+GtkWidget * AddDialogFrame( GtkWidget * parent )
+{
+ GtkWidget * frame;
+ frame=AddFrame( NULL,GTK_SHADOW_IN,parent,1 );
+ gtk_container_set_border_width( GTK_CONTAINER( frame ),1 );
+ frame=AddFrame( NULL,GTK_SHADOW_NONE,frame,1 );
+ frame=AddFrame( NULL,GTK_SHADOW_ETCHED_OUT,frame,1 );
+ frame=AddFrame( NULL,GTK_SHADOW_NONE,frame,1 );
+ return frame;
+}
+
+GtkWidget * AddFrame( const char * title,int type,GtkWidget * parent,int add )
+{
+ GtkWidget * frame = NULL;
+ frame=gtk_frame_new( title );
+ gtk_widget_set_name( frame,"frame" );
+ gtk_widget_show( frame );
+ gtk_frame_set_shadow_type( GTK_FRAME( frame ),type );
+ if ( !parent ) return frame;
+ if ( add ) gtk_container_add( GTK_CONTAINER( parent ),frame );
+  else gtk_box_pack_start( GTK_BOX( parent ),frame,FALSE,FALSE,0 );
+ return frame;
+}
+
+GtkWidget * AddLabel( const char * title,GtkWidget * parent )
+{
+ GtkWidget * label;
+ label=gtk_label_new( title );
+ gtk_widget_set_name( label,"label" );
+ gtk_widget_show( label );
+ if ( parent ) gtk_box_pack_start( GTK_BOX( parent ),label,FALSE,FALSE,0 );
+ gtk_misc_set_alignment( GTK_MISC( label ),0,0.5 );
+ gtk_misc_set_padding( GTK_MISC( label ),4,0 );
+ return label;
+}
+
+GtkWidget * AddVBox( GtkWidget * parent,int type )
+{
+ GtkWidget * vbox;
+ vbox=gtk_vbox_new( FALSE,0 );
+ gtk_widget_set_name( vbox,"vbox" );
+ gtk_widget_show( vbox );
+ if ( parent ) 
+  {
+   if ( type ) gtk_box_pack_start( GTK_BOX( parent ),vbox,FALSE,FALSE,0 );
+    else gtk_container_add( GTK_CONTAINER( parent ),vbox );
+  }
+ return vbox;
+}
+
+GtkWidget * AddHBox( GtkWidget * parent,int type )
+{
+ GtkWidget * hbox;
+ hbox=gtk_hbox_new( FALSE,0 );
+ gtk_widget_set_name( hbox,"hbox" );
+ gtk_widget_show( hbox );
+ if ( parent )
+  {
+   if ( type ) gtk_box_pack_start( GTK_BOX( parent ),hbox,FALSE,FALSE,0 );
+    else gtk_container_add( GTK_CONTAINER( parent ),hbox );
+  }
+ return hbox;
+}
+
+GtkWidget * AddCheckButton( const char * title, GtkWidget * parent )
+{
+ GtkWidget * CB;
+ CB=gtk_check_button_new_with_label( title );
+ gtk_widget_set_name( CB,"CB" );
+ gtk_widget_show( CB );
+ gtk_box_pack_start( GTK_BOX( parent ),CB,FALSE,FALSE,0 );
+ return CB;
+}
+
+GtkWidget * AddRadioButton( const char * title,GSList ** group,GtkWidget * parent )
+{
+ GtkWidget * RB;
+ RB=gtk_radio_button_new_with_label( *group,title );
+ *group=gtk_radio_button_group( GTK_RADIO_BUTTON( RB ) );
+ gtk_widget_set_name( RB,"RB" );
+ gtk_widget_show( RB );
+ gtk_box_pack_start( GTK_BOX( parent ),RB,FALSE,FALSE,0 );
+ return RB;
+}
+
+GtkWidget * AddSpinButton( const char * title,GtkAdjustment * adj,GtkWidget * parent )
+{
+ GtkWidget * SB;
+ GtkWidget * label;
+ label=gtk_label_new( title );
+ gtk_misc_set_alignment( GTK_MISC( label ),0,0.5 );
+ gtk_box_pack_start( GTK_BOX( parent ),label,FALSE,FALSE,0 );
+ gtk_widget_show( label );
+ SB=gtk_spin_button_new( adj,0,0 );
+ gtk_widget_set_name( SB,"SB" );
+ gtk_box_pack_start( GTK_BOX( parent ),SB,FALSE,FALSE,0 );
+ gtk_widget_show( SB );
+ return SB;
+}
+
+GtkWidget * AddButton( const char * title,GtkWidget * parent )
+{
+ GtkWidget * B;
+ B=gtk_button_new_with_label( title );
+ gtk_widget_set_name( B,"B" );
+ gtk_widget_show( B );
+ gtk_container_add( GTK_CONTAINER( parent ),B );
+ return B;
+}
+
+GtkWidget * AddHSeparator( GtkWidget * parent )
+{
+ GtkWidget * hseparator;
+ hseparator=gtk_hseparator_new();
+ gtk_widget_set_name( hseparator,"hseparator1" );
+ gtk_widget_show( hseparator );
+ gtk_box_pack_start( GTK_BOX( parent ),hseparator,FALSE,FALSE,0 );
+ gtk_widget_set_usize( hseparator,-2,6 );
+ return hseparator;
+}
+
+GtkWidget * AddHButtonBox( GtkWidget * parent )
+{
+ GtkWidget * hbuttonbox;
+ hbuttonbox=gtk_hbutton_box_new();
+ gtk_widget_set_name( hbuttonbox,"hbuttonbox" );
+ gtk_widget_show( hbuttonbox );
+ gtk_box_pack_start( GTK_BOX( parent ),hbuttonbox,FALSE,FALSE,0 );
+ gtk_button_box_set_child_size( GTK_BUTTON_BOX( hbuttonbox ),85,20 );
+ return hbuttonbox;
+}
+
+GtkWidget * AddHScaler( GtkAdjustment * adj,GtkWidget * parent,int digit )
+{
+ GtkWidget * HS;
+ HS=gtk_hscale_new( adj );
+ gtk_widget_set_name( HS,"HS" );
+ gtk_widget_show( HS );
+ if ( parent ) gtk_box_pack_start( GTK_BOX( parent ),HS,TRUE,TRUE,0 );
+ gtk_scale_set_value_pos( GTK_SCALE( HS ),GTK_POS_RIGHT );
+ gtk_scale_set_digits( GTK_SCALE( HS ),digit );
+ return HS;
+}
+
+GtkWidget * AddVScaler( GtkAdjustment * adj,GtkWidget * parent,int digit )
+{
+ GtkWidget * VS;
+ VS=gtk_vscale_new( adj );
+ gtk_widget_set_name( VS,"VS" );
+ gtk_widget_show( VS );
+ if ( parent ) gtk_box_pack_start( GTK_BOX( parent ),VS,TRUE,TRUE,0 );
+// gtk_scale_set_value_pos( GTK_SCALE( VS ),GTK_POS_RIGHT );
+ if ( digit == -1 ) gtk_scale_set_draw_value( GTK_SCALE( VS ),FALSE );
+  else gtk_scale_set_digits( GTK_SCALE( VS ),digit );
+ return VS;
+}
+
+GtkWidget * AddComboBox( GtkWidget * parent )
+{
+ GtkWidget * CB;
+ CB=gtk_combo_new();
+ gtk_widget_set_name( CB,"CB" );
+ gtk_widget_show( CB );
+ if ( parent ) gtk_box_pack_start( GTK_BOX( parent ),CB,TRUE,TRUE,0 );
+ return CB;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gui/mplayer/gtk/gtk_common.h	Sun Jan 06 16:22:00 2008 +0000
@@ -0,0 +1,24 @@
+
+#ifndef GUI_COMMON_H
+#define GUI_COMMON_H
+
+#include <gdk/gdkkeysyms.h>
+#include <gtk/gtk.h>
+
+extern GtkWidget * AddDialogFrame( GtkWidget * parent );
+extern GtkWidget * AddFrame( const char * title,int type,GtkWidget * parent,int add );
+extern GtkWidget * AddLabel( const char * title,GtkWidget * parent );
+extern GtkWidget * AddVBox( GtkWidget * parent,int type );
+extern GtkWidget * AddHBox( GtkWidget * parent,int type );
+extern GtkWidget * AddCheckButton( const char * title, GtkWidget * parent );
+extern GtkWidget * AddRadioButton( const char * title,GSList ** group,GtkWidget * parent );
+extern GtkWidget * AddSpinButton( const char * title,GtkAdjustment * adj,GtkWidget * parent );
+extern GtkWidget * AddButton( const char * title,GtkWidget * parent );
+extern GtkWidget * AddHSeparator( GtkWidget * parent );
+extern GtkWidget * AddHButtonBox( GtkWidget * parent );
+extern GtkWidget * AddHScaler( GtkAdjustment * adj,GtkWidget * parent,int digit );
+extern GtkWidget * AddVScaler( GtkAdjustment * adj,GtkWidget * parent,int digit );
+extern GtkWidget * AddComboBox( GtkWidget * parent );
+extern void WidgetDestroy( GtkWidget * widget,GtkWidget ** widget_pointer );
+
+#endif /* GUI_COMMON_H */
--- a/gui/mplayer/gtk/mb.c	Sun Jan 06 14:30:25 2008 +0000
+++ b/gui/mplayer/gtk/mb.c	Sun Jan 06 16:22:00 2008 +0000
@@ -8,7 +8,7 @@
 
 #include "../widgets.h"
 #include "mb.h"
-#include "common.h"
+#include "gtk_common.h"
 
 GtkWidget * gtkMessageBoxText;
 GtkWidget * MessageBox = NULL;
--- a/gui/mplayer/gtk/opts.c	Sun Jan 06 14:30:25 2008 +0000
+++ b/gui/mplayer/gtk/opts.c	Sun Jan 06 16:22:00 2008 +0000
@@ -25,7 +25,7 @@
 #include "../widgets.h"
 #include "opts.h"
 #include "fs.h"
-#include "common.h"
+#include "gtk_common.h"
 
 // for mpcodecs_[av]d_drivers:
 #include "libmpcodecs/vd.h"
--- a/gui/mplayer/gtk/pl.c	Sun Jan 06 14:30:25 2008 +0000
+++ b/gui/mplayer/gtk/pl.c	Sun Jan 06 16:22:00 2008 +0000
@@ -17,7 +17,7 @@
 #include "interface.h"
 #include "../widgets.h"
 #include "pl.h"
-#include "common.h"
+#include "gtk_common.h"
 
 static char * book_open_xpm[] = {
 	"16 16 4 1",
--- a/gui/mplayer/gtk/sb.c	Sun Jan 06 14:30:25 2008 +0000
+++ b/gui/mplayer/gtk/sb.c	Sun Jan 06 16:22:00 2008 +0000
@@ -7,7 +7,7 @@
 #include <stdio.h>
 
 #include "sb.h"
-#include "common.h"
+#include "gtk_common.h"
 
 #include "app.h"
 #include "config.h"
--- a/gui/mplayer/gtk/url.c	Sun Jan 06 14:30:25 2008 +0000
+++ b/gui/mplayer/gtk/url.c	Sun Jan 06 16:22:00 2008 +0000
@@ -10,7 +10,7 @@
 #include <gtk/gtk.h>
 
 #include "url.h"
-#include "common.h"
+#include "gtk_common.h"
 #include "interface.h"
 #include "app.h"
 #include "../widgets.h"