[MPlayer-cvslog] r38562 - trunk/gui/dialog/skinbrowser.c

ib subversion at mplayerhq.hu
Fri Jun 14 13:26:23 EEST 2024


Author: ib
Date: Fri Jun 14 13:26:23 2024
New Revision: 38562

Log:
Split ShowSkinBrowser() into CreateSkinBrowser() and ShowSkinBrowser().

All other dialogs work the same way.

FillSkinList(), gtk_clist_select_row() and gtk_clist_sort() become part
of the new ShowSkinBrowser().

Modified:
   trunk/gui/dialog/skinbrowser.c

Modified: trunk/gui/dialog/skinbrowser.c
==============================================================================
--- trunk/gui/dialog/skinbrowser.c	Fri Jun 14 13:19:14 2024	(r38561)
+++ trunk/gui/dialog/skinbrowser.c	Fri Jun 14 13:26:23 2024	(r38562)
@@ -115,7 +115,7 @@ static void on_SkinList_select_row( GtkC
   }
 }
 
-void ShowSkinBrowser( void )
+static GtkWidget *CreateSkinBrowser (void)
 {
  GtkWidget     * vbox5;
  GtkWidget     * scrolledwindow1;
@@ -185,16 +185,28 @@ void ShowSkinBrowser( void )
  gtk_widget_grab_focus( scrolledwindow1 );
 
  prevSelected = skinName;
- gtk_widget_show(SkinBrowser);
+
+ return SkinBrowser;
+}
+
+void ShowSkinBrowser (void)
+{
+  gint i;
+
+  if (SkinBrowser)
+  {
+    gtkRaise(SkinBrowser);
+    return;
+  }
+  else SkinBrowser = CreateSkinBrowser();
 
  FillSkinList(sbSkinDirInHome);
  FillSkinList(sbSkinDirInData);
-  {
-   gint i;
 
    if ((i = gtkFindInCList(SkinList, skinName)) > -1)
      gtk_clist_select_row(GTK_CLIST(SkinList), i, 0);
 
    gtk_clist_sort(GTK_CLIST(SkinList));
-  }
+
+  gtk_widget_show(SkinBrowser);
 }


More information about the MPlayer-cvslog mailing list